# General solution of a differential equation

• May 23rd 2010, 03:24 AM
Beard
General solution of a differential equation
Hi,

I have to solve the general equation for this differential

$\displaystyle \frac{d^2y}{dx^2} - 6\frac{dy}{dx} + 9y = 50\sin(x)$

I have the homogeneous equation as $\displaystyle (A + Bx)e^{3x}$

However now that I am trying to get the partial equation I am stuck, I am unsure as what to use for the $\displaystyle y_{PI} = k(something)$ I have tried using sin(x) but that gets difficult to untangle

Thanks

Beard
• May 23rd 2010, 04:00 AM
HallsofIvy
You will need both sine and cosine:

y= A cos(x)+ B sin(x)

y'= -Asin(x)+ Bcos(x)

y"= -Acos(x)- Bsin(x)

y"- 6y+ 9y= -Acos(x)- Bsin(x)- 6Asin(x)+ 6Bcos(x)+ 9Acox(x)+ 9Bsin(x)

= (-A+ 6B+ 9A) cos(x)+ (-B- 6A+ 9B) sin(x)

= (8A+ 6B) cos(x) + (8B- 6A) sin(x)= 50 sin(x)

Solve 8A+ 6B= 0, 8B- 6A= 0 for A and B.
• May 23rd 2010, 04:02 AM
Beard
Quote:

Originally Posted by HallsofIvy
You will need both sine and cosine:

y= A cos(x)+ B sin(x)

y'= -Asin(x)+ Bcos(x)

y"= -Acos(x)- Bsin(x)

y"- 6y+ 9y= -Acos(x)- Bsin(x)- 6Asin(x)+ 6Bcos(x)+ 9Acox(x)+ 9Bsin(x)

= (-A+ 6B+ 9A) cos(x)+ (-B- 6A+ 9B) sin(x)

= (8A+ 6B) cos(x) + (8B- 6A) sin(x)= 50 sin(x)

Solve 8A+ 6B= 0, 8B- 6A= 0 for A and B.

I wasn't actually expecting all of that, I was just asking for the first bit y= A cos(x)+ B sin(x) but thanks anyway.