Solving electrical circuits is a typical problem leading to solving differential equations and the Modern Taylor Series Method can again be used. We start from Kirchhoff's laws. A simple example follows.
For a serial circuit RLC connected to a voltage source u we have
uL + uR + uC = u
or
By substituting
y'= i
we have
Time functions uR, uL, uC for u=1V,
,
L=1H,
C=10-6F
are
shown in Fig.7.1.
The corresponding source text in TKSL/386 is
var i,y,u,UR,UL,UC; const R=1000,L=1,C=1E-6,tmax=0.01,dt=0.0001; system u=1; i'=1/L*(u-R*i-1/C*y) &0; y'=i &0; UR=R*i; UC=1/C*y; UL=u-R*i-1/C*y; sysend.
Fig.7.2 ( the part labelled LVAR) shows the current I1=i and voltage
V1=uC
of the serial circuit
RLC (
)
as functions
of time
(for u=0,
V1(0)=uC(0)=500V) if the time
function of inductivity is
defined as
L=L0 + 1000 t2[H].
For completness' sake the part labelled LVAR1 shows time functions I1N=i and V1N=uc for L=L0.