A series circuit contains a resistor with R = 24 , an inductor with L = 2 H, a capacitor with C = 0.005 F, and a generator producing a voltage of E(t) = 12 sin(10t). The initial charge is Q = 0.001 C and the initial current is 0. Find the charge at time t.

----------------------
Q" + 24 Q' + 200 Q = 12 sin (10t)
r^2 + 24r + 200 = 0
r = -12 +/- 2sqrt(14)*i

Qc(t) = e^-12*(c1*cos(2sqrt(14)t)+c2*sin(2sqrt(14)t))
Qp(t) = A*cos(10t) + B*sin(10t)
Q'p(t) = -10A*sin(10t) + 10B*cos(10t)
Q"p(t) = -100A*cos(10t) - 100B*sin(10t)

(-100A*cos(10t)-100B*sin(10t))+24(-10A*sin(10t)+10B*cos(10t))+200(A*cos(10t)+B*sin(10t))
(100A+240B)*cos(10t)+(100B+240A)*sin(10t)=12*sin(10t)
100A+240B=12 -> 25A + 60B = 3
-240A+100B=0 -> -48A + 20B = 0
B = 36/845, A = 3/169
Q(t)=e^(-12t)(c1*cos(2sqrt(14)t)+c2*sin(2sqrt(14)t))+(3/169)cos(10t)+(36/845)sin(10t)
c1 = -3/169

I(t)=e^(-12t)[(-12*c1+2sqrt(14)*c2)cos(2sqrt(14)t)+(-2sqrt(14)*c1-12*c2)sin(2sqrt(14)t))]
+(10/845)(15*cos(10t)+36*cos(10t))
I(0)=-12*c1+2sqrt(14)*c2+(360/845)=0
c2 = 108/(338sqrt(14))

Q(t)=e^(-12t)((-3/169)cos(2sqrt(14)t)+(108/(338sqrt(14))sin(2sqrt(14))+(1/845)(15cos(10t)+36sin(10t))

Also,
I(t)=e^(-12t)[(144/169)cos(2sqrt(14)t)-(1128/(338sqrt(14))sin(2sqrt(14)t)]

Is this correct? Thanks.

Substitute Q(t) in the differential equation to see if it is correct. The probability of making two mistakes that exactly cancel each other out is pretty small...

Ok, its incorrect. Where am I making a mistake?

Check if Qp satisfies the inhomogeneous equation and if Qc satisfies the homogeneous part.

To check if Qp satisfies the inhomogeneous equation, substitute Qp(t) = A*cos(10t) + B*sin(10t) into the differential equation:

Q" + 24 Q' + 200 Q = (-100A*cos(10t) - 100B*sin(10t)) + 24(-10A*sin(10t) + 10B*cos(10t)) + 200(A*cos(10t) + B*sin(10t))
= -100A*cos(10t) - 100B*sin(10t) - 240A*sin(10t) + 240B*cos(10t) + 200A*cos(10t) + 200B*sin(10t)
= -100A*cos(10t) - 240A*sin(10t) + 200A*cos(10t) - 100B*sin(10t) + 240B*cos(10t) + 200B*sin(10t)
= 100A*cos(10t) - 240A*sin(10t) - 100B*sin(10t) + 240B*cos(10t)

Comparing this with 12*sin(10t), we can equate the coefficients:

100A = 0 -> A = 0
-240A = 0 -> A = 0
-100B = 12 -> B = -12/100 = -0.12
240B = 0 -> B = 0

Since A and B both equal 0, Qp(t) = 0, which is not correct. Therefore, our assumption for Qp(t) was incorrect.

Now, check if Qc = e^(-12t)(c1*cos(2sqrt(14)t) + c2*sin(2sqrt(14)t)) satisfies the homogeneous part of the differential equation:

Q" + 24 Q' + 200 Q = (-12^2)(c1*cos(2sqrt(14)t) + c2*sin(2sqrt(14)t)) + 24*(-12)*(e^(-12t))(c1*sin(2sqrt(14)t) - c2*cos(2sqrt(14)t)) + 200(e^(-12t))(c1*cos(2sqrt(14)t) + c2*sin(2sqrt(14)t))
= -144(c1*cos(2sqrt(14)t) + c2*sin(2sqrt(14)t)) - 288(sqrt(14))(c1*sin(2sqrt(14)t) - c2*cos(2sqrt(14)t)) + 200(c1*cos(2sqrt(14)t) + c2*sin(2sqrt(14)t))
= -144c1*cos(2sqrt(14)t) - 144c2*sin(2sqrt(14)t) - 288(sqrt(14))c1*sin(2sqrt(14)t) + 288(sqrt(14))c2*cos(2sqrt(14)t) + 200c1*cos(2sqrt(14)t) + 200c2*sin(2sqrt(14)t))
= (200c1 - 144c1)cos(2sqrt(14)t) + (200c2 - 144c2)sin(2sqrt(14)t) - 288(sqrt(14))c1*sin(2sqrt(14)t) + 288(sqrt(14))c2*cos(2sqrt(14)t)

Now, since this needs to equal 0, we can equate the coefficients:

200c1 - 144c1 = 0 -> 56c1 = 0 -> c1 = 0
200c2 - 144c2 = 0 -> 56c2 = 0 -> c2 = 0

Since c1 and c2 both equal 0, Qc(t) = 0, which is correct.

Therefore, the given solution for Q(t) is incorrect.