rethic Wrote:Hi, I'm totally sucking at math right now, particularly differential equations. Right now, I'm in the section of the book talking about solving nonhomogeneous equations suing the method of undetermined coefficients.
A specific problem I'm having trouble with is y"-3y'+2y = e^x*sin(x). Anyone care to explain the process to me?
The answer in the back of the book is y = c1*e^x + c2*e^(2x) + 1/2*e^x*(cos(x)-sin(x)) where c1 and c2 are arbitrary coefficients.
Haven't done this in a while, but I'll give it a shot.
y"-3y'+2y = e^x*sin(x)
First solve as if it was homogeneous
so we have y''-3y'+2y=0
Using the quadratic formula, on m^2 -3m +2
3 +/- sqrt(9-4*1*2) /2
So m= (3 +sqrt1)/2 = 2
or m = (3- sqrt 1)/2 = 1
With the 2 roots, we now have a general solution with 2 arbitary constants, c1 and c2 being
y= c1*e^(x) + c2*e^(2x)
Then we need to find a complementary solution for the full equation ( I admit, I had to check a list of complementary solutions to know which one to use here)
If we look at the right hand side of the original equation, e^x *sin(x), we should try a particular solution of the form Ae^x*cosx + Be^x*sinx, (where A and B are constants, but they CAN be 0)
So, we need to differentiate this twice using hte product rule (ugh, horrible I know)
letting y= Ae^x*cosx +Be^x*sinx
y' = Ae^x*cos(x)-Ae^x*sin(x) + Be^x*sin(x) + Be^x*cos(x)
y'' = Ae^x*cos(x)-Ae^x*sin(x) -Ae^x*sin(x)-Ae^x*cos(x) + Be^x*sin(x)+Be^x*cos(x) +Be^x*cos(x)-Be^x*sin(x)
which cancels nicely to
y''= -2Ae^x*sin(x) +2Be^x*cos(x)
Substituting these values for y, y' and y'' back into the original equation y"-3y'+2y = e^x*sin(x)
Gives
-2Ae^x*sin(x) +2Be^x*cos(x) -3[Ae^x*cos(x)-Ae^x*sin(x) + Be^x*sin(x) + Be^x*cos(x)] + 2[Ae^x*cosx +Be^x*sinx] = e^x*sin(x)
Then we can cancel the e^x which is in every term to get
-2A*sin(x) +2Bcos(x) -3Acos(x)+3Asin(x) -3Bsin(x) -3Bcos(x) + 2Acosx +2Bsinx = sin(x)
Then we can gather all the sin and cos terms on both sides seperatly to get 2 equations
-2Asin(x) +3Asin(x) -3Bsin(x) +2Bsinx = sin(x)
=> Asin(x)-Bsin(x)= sin(x)
=> A-B = 1
And
2Bcos(x) -3Acos(x) -3Bcos(x) + 2Acosx = 0
(Dividing both sides by cos(x)]
=>2B-3A-3B+2A = 0
=> -A-B = 0
Solving these simultaneously gives
-2 B = 1 => B= -1/2
A= 1/2
Throw these back into our complementary solution, and bobs your uncle
Ae^x*cosx +Be^x*sinx becomes
1/2e^x*cos(x)-1/2 e^x *sin(x)
= 1/2 e^x (cos(x)-sin(x))
Then combining this with our general solution, this becomes the complete solution to the equation.
y= c1*e^(x) + c2*e^(2x) +1/2 e^x (cos(x)-sin(x)).
If I made any mistakes in my working, I blame it on doing this all in my head instead of using paper like a sane person