Linear NonHomogeneous Differential Equation

OpenStax-CNX module: m49476
1
Linear NonHomogeneous
∗
Differential Equation: Example 7
John Taylor
This work is produced by OpenStax-CNX and licensed under the
Creative Commons Attribution License 3.0
†
Abstract
Demonstrates the Method of Undetermined Coecients for an exponential times a cosine.
1 Linear NonHomogeneous Dierential Equation: Example 7
Solve
y '' + y = e2x cos (3x)
What type of dierential equation is this?
It is a linear nonhomogeneous dierential equation with constant coecients.
How do we solve it?
We nd
yp ,
yh ,
the homogeneous solution, which takes care of the case of 0 on the right-hand side, and
a particular solution, which handles the actual right-hand side.
How do we nd the homogeneous solution?
1
We nd the characteristic equation .
Set up that equation.
m2 + 1 = 0
Solve for m.
m = ±i.
How do we use this result?
We get
yh = C1 cosx + C2 sinx.
This is the
Homogeneous Solution
.
What method can be used here to get the particular solution?
2
The Method of Undetermined Coecients .
What is the form of the particular solution here?
From the fourth line in the table in the above link,
How do we determine the coecients
We nd
yp '
and
yp ,
and
B?
and substitute into the dierential equation. Then by equating coecients of like
terms we can determine values for
Find
A
yp = Ae2x cos (3x) + Be2x sin (3x)
A
and
B.
yp '.
yp ' = Ae2x (−sin (3x)) ∗ 3 + Ae2x cos (3x) ∗ 2 + Be2x cos (3x) ∗ 3 + Be2x sin (3x) ∗ 2
Factor the exponential and collect like terms.
Version 1.1: Feb 25, 2014 8:45 am -0600
http://creativecommons.org/licenses/by/3.0/
1 "2nd Order Linear Homogeneous Di Eqns" <http://cnx.org/content/m48511/latest/>
2 "Method of Undetermined Coecients" <http://cnx.org/content/m48517/latest/>
∗
†
http://cnx.org/content/m49476/1.1/
OpenStax-CNX module: m49476
We get
Find
yp 2
yp ' = e2x [(−3A + 2B) sin (3x) + (2A + 3B) cos (3x)]
yp .
= e2x [(−3A + 2B) cos (3x) ∗ 3 + (2A + 3B) (−sin (3x) ∗ 3] +
2x
∗
e
2
∗
[(−3A + 2B) sin (3x) + (2A + 3B) cos (3x)]
Collect like terms.
We get
yp = e2x [(−5A + 12B) cos (3x) + (−12A − 5B) sin (3x)]
Susbstitute these results in the dierential equation.
yp Ae
+ yp = e2x [(−5A + 12B) cos (3x) + (−12A − 5B) sin (3x)] +
2x
cos (3x)
+
2x
Be
sin (3x)
=
e2x cos (3x)
Combine like terms.
yp '' + yp = e2x [(−4A + 12B) cos (3x) + (−12A − 4B) sin (3x)] = e2x cos (3x)
How can we use this result to nd A and B ?
We can equate the coecients of like terms.
Equate the coecients of the sin (3x) terms.
Since this term does not appear on the right-hand side, we get
−12A − 4B = 0
Solve for B .
B = −3A
Using this result, equate the coecients of the cos (3x) terms from both sides.
We get
−4A + 12 (−3A) = 1,
1
A = − 40
Find B .
3
B = −3A = 40
or
A and B to get yp .
2x
e
sin (3x) This is the
40
Combine these results for
1 2x
yp = − 40
e cos (3x) +
3
How can we check this result?
We can dierentiate to obtain
yp ''
Particular Solution
.
and substitute in the original dierential equation to see if we get
e2x cos (3x).
Determine
yp '.
Since every term will have
e2x as a factor, we shall indicate that: yp ' = e2x
3
40 sin (3x)
−
2
40 cos (3x)
+
9
40 cos (3x)
or collecting like terms we get
9
7
40 sin (3x) + 40 cos (3x)
Determine yp ''.
18
21
14
yp '' = e2x 27
40 cos (3x) + 40 sin (3x)− 40 sin (3x) + 40 cos (3x) , or collecting like terms:
41
3
yp '' = e2x 40
cos (3x) − 40
sin (3x)
Now combine yp '' and yp .
3
1
3
2x 41
2x
We get yp '' + yp = e
40 cos (3x) − 40 sin (3x) − 40 cos (3x) + 40 sin (3x) = e cos (3x) as expected.
Combine yh and yp to get the solution of the dierential equation.
1 2x
3 2x
y = C1 cosx + C2 sinx − 40
e cos (3x) + 40
e sin (3x)
yp ' = e2x
http://cnx.org/content/m49476/1.1/
+
6
40 sin (3x)