RL and RC circuits with ideal diodes
The method is just like any problem with an ideal diode.


Guess whether the diode is in forward or reverse bias.
Solve the circuit under that assumption.
Check whether the solution actually biases the diode the way you thought.
If it does not, assume the diode is biased the other way, solve again, and check your answer again.


For your circuits you'll have to essentially do this procedure for each switching event in the forcing function (for the \$t&lt;0\$ initial state, for \$0&lt;t&lt;T\$, and for \$t&gt;T\$). For the second circuit, you also have to consider the possibility that the diode changes state during the transient.

As you gain more experience you'll find it gets easier to guess correctly in the first step.