# Finding coefficients on a solved diff. equation

1. Apr 2, 2008

### Sparky_

1. The problem statement, all variables and given/known data

In an L-R-C circuit - L = 1, R = 2, C = 0.25, E(t) = 50cos(t)

2. Relevant equations

3. The attempt at a solution
$$L \frac {di(t)}{dt} + R \frac {dq(t)}{dt} + \frac {q}{C} = 0$$

$$\frac {dq^2(t)}{dt^2} + 2 \frac {dq(t)}{dt} + \frac {1}{0.25}q = 50cos(t)$$

$$m^2 + 2m + 4 = 0$$ (the homogeneous equation

$$q(t) = e^(-t) ( c1*cos(sqrt(12)t) + c2*sin(sqrt(12)t)$$

annihilate 50cos(t)
$$(D^2+1)(D^2+2D+4) = 0$$

$$m1, 2 = +/- i$$

$$qp(t) = Acos(t) + Bsin(t)$$

$$qp'(t) = -Asin(t) + Bcos(t)$$

$$qp''(t) = -Acos(t) - Bsin(t)$$

plugging back into the eq.

$$[-Acos(t) - Bsin(t)] -2Asin(t) + 2Bcos(t) + 4Acos(t) + 4Bsin(t) = 50 cos(t)$$

$$cos(t)[-A+2B + 4A] + sin(t)[-B -2A + 4B] = 50 cos(t)$$

$$3A + 2B = 50$$

$$3B - 2A = 0$$

$$A= \frac {150}{13}$$

$$B= \frac {100}{13}$$

$$qp(t) = \frac {150}{13}cos(t) + \frac {100}{13}sin(t)$$

the book has
$$qp(t) = \frac {100}{13}cos(t) - \frac {150}{13}sin(t)$$

I differ on which coefficient goes where and I missed a sign.

Do I have something crossed up / some careless error?

Thanks
-Sparky

2. Apr 2, 2008

### Mindscrape

I can't see your error, and mathematica says the particular would be 60cos(t)/29. You can always check by plugging it back into the ODE. If it works then it works, right?

3. Apr 2, 2008

### Sparky_

is ODE - ordinary differential equation?
(almost has to be based on usage)

-curious

4. Apr 3, 2008

### Mindscrape

Yep ODE is, I thought at least, a common terminology for ordinary differential equation, so you don't get PDEs confused with ODEs, and so you can describe separable solutions to PDEs as ODEs.

5. Apr 3, 2008

### Mindscrape

Actually both you and your book are wrong based on my checks. The answer should be

$$q_p(t) = \frac{1}{29}(60cos(t) + 5 sin(t))$$

6. Apr 3, 2008

### Sparky_

thanks Mindscrape.

I did try my solution:

$$qp(t) = \frac {150}{13}cos(t) + \frac {100}{13}sin(t)$$

into the ODE

and it works

$$qp'(t) = -\frac {150}{13}sin(t) + \frac {100}{13}cos(t)$$

$$qp''(t) = -\frac {150}{13}cos(t) - \frac {100}{13}sin(t)$$

$$\frac {dq^2(t)}{dt^2} + 2 \frac {dq(t)}{dt} + 4q = 50cos(t)$$

$$-\frac {150}{13}cos(t) - \frac {100}{13}sin(t) + 2(-\frac {150}{13}sin(t) + \frac {100}{13}cos(t) + 4(\frac {150}{13}cos(t) + \frac {100}{13}sin(t)))$$

$$cos (t)(-\frac {150}{13} + \frac {200}{13} + \frac {600}{13}) + sin(t)(-\frac {100}{13} - -\frac {300}{13} + -\frac {400}{13})$$

$$cos(t)(\frac {650}{13}) + 0 = 50cos(t)$$

7. Apr 3, 2008

### Sparky_

Mindscrape,

I found a problem with my original posting - I had ... "25q" = 50 cos(t) ...

it was 1/0.25 q or 4 q

I did have the 4 in the $$(D^2+1)(D^2+2D+4) = 0$$

I bet the 25q caused you some grief????

Sorry
-Sparky

8. Apr 3, 2008

### Mindscrape

Ah, okay, that makes sense then.