Disclosure, I am an electrical engineer but I deal with designing power system for construction projects. I decided to go back for Masters in Power Electronics. I'm rusty with DC circuits.

My homework is the same as a previous thread... https://forum.allaboutcircuits.com/threads/buck-boost-converter-duty-cycle.128700/

I am not comfortable with the MOSFET. Could someone help explain how the current changes as it transitions through the MOSFET? my values are the same as in the link...

(Given) Vg= 12V, V= -5, R=2.5, f= 200kH,

(Solved) L=117uH, C=20uF, D=0.2941

I am looking to solve for the MOSFET peak current iQ1(t) with the ripple current.