# SECTION 3.5# Example 1 de := L*diff(I(t),t) + R*I(t) = E(t);# The above result is due to the fact that I is a reserved symbol# in Maple, as can be seen by: ?II^2;# As explained in the above help, this can be changed by, for example,interface(imaginaryunit = j);j^2;I^2;de := L*diff(I(t),t) + R*I(t) = E(t); # Solution by using an integration factor (first put into standard form):de1 := de/L;mu := exp(int(R/L,t));de2 := mu*de1; # Check that LHS = derivitive of mu*I(t);diff(mu*I(t),t) - lhs(de2);simplify(%);# Solve by integrating both sides:mu*I = Int(rhs(de2),t);sol := I = rhs(%)/mu;subs({R=1,L=.01,E(t)=sin(100*t)},sol);sol := I = value(rhs(%))+K;subs({t=0,I=0},%);solve(%,K);subs(K=%,sol);# Solution using dsolve:subs({R=1,L=.01,E(t)=sin(100*t)},de);de3 := %;dsolve(de3);dsolve({de3,I(0)=0});# Example 2de := R*diff(q(t),t) + q(t)/C = V;# Solution by integrating factor (first put into standard form):de1 := de/R;mu := exp(int(1/(R*C),t));de2 := mu*de1;# Check:diff(mu*q(t),t) - lhs(de2);simplify(%);# Solve by integrating both sides:mu*q = Int(rhs(de2),t);sol := q = (value(rhs(%)) + K)/mu;subs({q=Q,t=0},sol);solve(%,K);subs(K=%,sol);# Solution using dsolve:dsolve(de);dsolve({de,q(0)=Q});