# Solving a first order differential

1. Dec 8, 2005

### georgeh

I have the following problem that i can't get the right answer to:
y'+y=5sin(2t)

I find the integrating factor u(t)=e^t
multiply the whole function u(t)
and i get (ye^t)'=5e^tsin(2t)

I do integraton by parts on the second part and get
1/9 for the coefficents, in the calculator they don't get those coefficents! :(
very frustrating, not sure why.

2. Dec 8, 2005

### neo143

Ans: Y = Sin2t - Cos2t + c

3. Dec 8, 2005

### georgeh

yeah they get that answer, mind showing me how you did it? i've been at it for an hour.. all help is greatly appreciated.

4. Dec 8, 2005

### BerkMath

That is not the answer. Proceeding from your last step, integration of both sides yields: y*e^t= -e^t (2cos(2t)-sin(2t))+C. Where the right hand side, RHS, was found using integration by parts. Next, dividing both sides by e^t, gives: y= -(2cos(2t)-sin(2t))+Ce^(-t) or y=sin(2t)-2cos(2t)+Ce^(-t). C can be found given some intial condtion y(t_0)=y_0.

5. Dec 8, 2005

### georgeh

yeah, i just need someone to show me the integration by parts, i am unable to get that solution. I know how to solve the first order d.e.

6. Dec 8, 2005

### Hammie

Why even bother integrating by parts? It will work.. but- why not try an educated guess:

This kind of differential equation will have a solution of Y= (K1)Sin (2X) + (K2)Cos(2X).

simply differentiate Y, add Y and Y Prime, and equate the unknown constants.

7. Dec 8, 2005

### BerkMath

You apply integration by parts to the RHS, twice. To begin let I=RHS. Then apply integration by parts twice. After the second integration by parts you will end up with another integral, after dividing out the necessary constants, you can make this integral look exactly like I. Stop. Then solve it as though it is a linear equation in I, for I. You are exploiting the cyclic nature of the cosine and sine derivatives.