# Homework Help: 1st order linear diff eq. problem

1. Jul 11, 2010

### Abraham

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

Find the general solution of

$$\frac{dy}{dt}$$ = 2y +sin(2t)

2. Relevant equations

The general solution of a nonhomogeneous ode is the particular solution of the nonhomo plus the solution of the homogeneous ode.: y(t)= y$$_{p}$$(t)+y$$_{h}$$(t)

3. The attempt at a solution

$$\frac{dy}{dt}$$ - 2y = sin(2t)

Initial guess, is that y$$_{p}$$ = a*Sin(2t)+b*Cos(2t), where a and b are unknown constants later to be found

Then, the d.e. becomes:

$$\frac{d}{dt}$$ ( a*Sin(2t)+b*Cos(2t) ) - 2( a*Sin(2t)+b*Cos(2t) ) = Sin2t

=2aCos(2t)-2bSin(2t) - 2aSin(2t)+2bCos(2t) = Sin2t

=(2a+2b)*Cos(2t) + (-2b-2a)*Sin(2t) = Sin2t

Using the fact that polynomial coefficients must be equal:

2a+2b=0
-2b-2a=1

And here is my issue. These simultaneous equations are false, and thus I cannot possibly solve the d.e.

Can someone tell me where I messed up? Thanks

PS. I know this can also be found using integrating factors, but i need help on the section with "guessing" the solution

2. Jul 11, 2010

### vela

Staff Emeritus
You got a sign wrong when you went from this line

$$\frac{d}{dt} (a \sin 2t + b \cos 2t ) - 2(a \sin 2t + b \cos 2t ) = \sin 2t$$

to your next one. You should have gotten

$$2a\cos 2t - 2b \sin 2t - 2a \sin 2t - 2b \cos 2t = \sin 2t$$

3. Jul 11, 2010

### Abraham

Hey thanks. You hw helpers save my life.