I have a system of differential equations that can be solved with DSolve. However, the coefficients are very long there are like terms which can be combined. I used //FullSimplify in my code but the output of DSolve is still too complicated. Is there a way for Mathematica to turn all the coefficients into decimals and then combine the like terms?
Remove["Global'*"];
i = 4;
R2 = 0.001 // Rationalize;
RL = 100000;
RS = 100000000;
R1 = 0.04834 // Rationalize;
C1 = 8.48 // Rationalize;
C2 = 3.44 // Rationalize;
s = DSolve[{V1[t] == RS/(RS + R1)*V2[t] + RS*R1*i/(RS + R1),
V2'[t] ==
1/C1*(i R2 RL RS - (R2 RL + R1 (R2 + RL) + (R2 + RL) RS) V2[t] +
RL (R1 + RS) V3[t])/(R2 RL (R1 + RS)),
V3'[t] == 1/C2*(V2[t] - V3[t])/R2, V2[0] == 0,
V1[0] == RS*R1*i/(RS + R1), V3[0] == 0}, {V1[t], V2[t], V3[t]},
t] // FullSimplify
Plot[Evaluate[{V1[t], V2[t], V3[t]} /. s], {t, 0, 5},
PlotStyle -> {Blue, {Green, Thick}, {Red,
AbsoluteDashing[{10, 10}]}}, PlotLegends -> {V1[t], V2[t], V3[t]}]
s // N // Simplify
orSimplify@N@s
orSimplify[N[s]]
. $\endgroup$s
is the name you gave to the output ofDSolve
. You can look upN
in the MMA help files (which you should be in the habit of doing). Sos // N // Simplify
is a command you would add to the code on the line after the definition ofs
(and you should remove theFullSimplify
). $\endgroup$