Richard P. answered 09/17/20
PhD in Physics with 10+ years tutoring experience in STEM subjects
I don't see an easy way to solve this using an integrating factor.
If the right hand side is written as V0 sin(ωt) [ take ω = 1 at the end ].
the conventional approach is to note that the solution to the homogeneous equation is
q(t) = Q0 exp( - t /RC) for some Q0.
The next step is to look for a particular solution to the full equation having the form
q = A sin( ωt - p) . After a lot of algebra one finds that
tan(p) = ωRC
sin(p) = 1 / ( 1 + (ωRC)^2 )^.5 and
A = [V0 C / (ωRC) ] / ( 1 + (ωRC)^2) ^.5
The full solution is q = Q0 exp(-RC/t) + A sin(ωt - p)
Setting this equal to zero for t = 0 gives:
Q0 = [V0 C /(ωRC) ] / [ 1+ 1/(ωRC)^2 ]