I use the DSolve command to solve a system of differential equations, and expand the analytical solution of il in Taylor series. I have two questions:
When I expand the Taylor series to the 20th degree, the result is similar to the analytical solution. Is this reasonable? Or should we take more terms to approximate the analytical solution?
d = a /. t -> 0.00900
Sa20 = N[Normal[Series[a, {t, 0, 20}]]] /. t -> 0.00900
We know that the first term taken by Taylor series expansion is the Euler method, but why is the calculation result so different from the analytical solution?
Sa1 = N[Normal[Series[a, {t, 0, 1}]]] /. t -> 0.00900
The complete code is given below:
(*DSolve*)
sol1 = DSolve[{l il'[t] == vl[t], c vc'[t] == ic[t],
ir[t] == -ic[t] + il[t], vl[t] == 24 - vc[t], vr[t] == vc[t],
vr[t] == r ir[t], il[0] == 0, vc[0] == 0}, {ir[t], il[t], ic[t],
vr[t], vl[t], vc[t]}, t];
{il[t_], vc[t_]} = {il[t], vc[t]} /. sol1[[1]];
pars1 = {r -> 22, l -> 2 10^-1, c -> 1 10^-4};
a = Evaluate[il[t] /. pars1] // Simplify;
b = Evaluate[vc[t] /. pars1] // Simplify;
d = a /. t -> 0.00900
Sa20 = N[Normal[Series[a, {t, 0, 20}]]] /. t -> 0.00900
Sa1 = N[Normal[Series[a, {t, 0, 1}]]] /. t -> 0.00900