Transients in RL circuits analyzed, using a Ti-84 Plus
The RL circuit is an important circuit in electric engineering.
On this page, the TI-84 Basic program for solving first-order differential equations is used to calculate the inrush current of an RL circuit, also known as an inductive circuit. On YouTube, an extended example of the inrush current of an RL circuit supplied with a DC source is demonstrated. The inrush current of an RL circuit with a sinusoidal source voltage is analyzed on this page and shows that the the amplitude of the current strongly depends on the moment of switching. If you have no experience with numerical programs, it is advised that you study the next page first;
The inrush current in an RL circuit supplied by a sinusoidal voltage source
The amplitude of the transient current in a RL circuit supplied by a sinusoidal voltage source strongly depends of the switch-on moment of the sinusoidal voltage. With the first-order differential equation solver, we demonstrate these phenomena. First, we introduce the circuit.

Here above the 2 situations.
Circuit 1 : the switch S1 is closed at a phase of 0 degrees. V1=120√2*sin(ωt+0deg) V.
Circuit 2 : the switch S1 is closed at a phase of 0 degrees. V1=120√2*sin(ωt++90deg) V.
Because of the difference in phase angle at the moment the switch is closed, different amplitudes of the current will occur For the two circuits, the following equations yield;

For circuit 1 we substitute the following parameters in the program DV1ETRP2 :
1: the step size dx=dt = 1/360 times the period time (T=1/60sec). 1-step equals 1 degree of the sinusoidal voltage and is equals to 4.6E-5 sec,
2: Xmax = 5*1/60, which equals 5 periods
3: Y(0) = 0 because i= 0A at t=0sec.
Due to the small step size, the calculation on the Ti84 plus CE takes 2 minutes. A larger step size is allowed, e.g.1/(60*180) which also yields good results and requires less calculation time.
The maximum current is 2.139 A, which is about twice the amplitude of the stationary current.
(120√2)/(abs(Z))=√((120√2)/√((5^2)+(2π*60*.4)^2)=1.12478 A (amplitude of the stationary current).

For circuit 2 we use the same parameters in the differential equation solver DV1ETRP2 except f(x) differs and equals 120√2*sin(2π*60X+π/2). Notice that the phase shift is defined in radians, not degrees.

Now, the amplitude of the transient current is approximately equal to the steady-state current amplitude. It can be shown that the best switch moment on a heavily inductive circuit is at the peak of the sinusoidal voltage, which is in fact a cosine. If the circuit is a pure inductive load (R=0 Ohm), then 90 degrees gives the least transient current.
Conclusion: The best switching moment of a heavily inductive circuit is at the peak of the sinusoidal voltage, which may be either the positive peak or the negative peak.
More information you can be find on: https://electronicspani.com/transient-response-in-series-r-l-circuit-with-sinusoidal-excitation/
You can find the formulas of the analytical solution there and derive that the transient disappears if S is switched on at :
Φ=tan-1(ωL/R)= tan-1(2π60*.4/5)=1.53765 rad=88.1 deg. For f(x) we substitute:
120√2*sin(2π*60X +1.53765) which gives the following input and response with no transients occurring, and the current remaining stationary from the beginning. The third plot shows the phase shift between the source voltage and the current.
