0% found this document useful (0 votes)
28 views

Chapter 3 Lecture Notes

1) The document introduces linear ordinary differential equations (ODEs) and discusses the existence and uniqueness theorem for linear initial value problems. 2) It defines key concepts such as homogeneous and nonhomogeneous equations, linearly independent and dependent functions, and the Wronskian test for linear independence. 3) Several examples are provided to demonstrate applying the Wronskian test to determine if sets of functions are linearly independent or dependent on given intervals.

Uploaded by

pastelgoreng
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Chapter 3 Lecture Notes

1) The document introduces linear ordinary differential equations (ODEs) and discusses the existence and uniqueness theorem for linear initial value problems. 2) It defines key concepts such as homogeneous and nonhomogeneous equations, linearly independent and dependent functions, and the Wronskian test for linear independence. 3) Several examples are provided to demonstrate applying the Wronskian test to determine if sets of functions are linearly independent or dependent on given intervals.

Uploaded by

pastelgoreng
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Chapter 3

3 Introduction

Notes Proofread by Yunting Gao and corrections made on 03/12/2021

3.1 Theory of Linear Equations

Recall that an nth order Linear ODE is an equation that can be written in the form

dn y dn−1 y d1 y
an (x) + a n−1 (x) + · · · + a 1 (x) + a0 (x)y(x) = g(x). (1)
dxn dxn−1 dx1

Recall that we say (1) is homogeneous if g(x) = 0 and nonhomogeneous if g(x) 6= 0


The Initial Value Problem (IVP) is given by (1) together with a set of n initial conditions

y(x0 ) = y1 , y 0 (x0 ) = y2 , · · · , y (n−1) (x0 ) = yn . (ICS)

Theorem 3.1 (Existence Uniqueness for Linear IVPs). If the functions {aj (x)}nj=0 and g(x)
are continuous on an interval I = {x : a < x < b} and an (x) 6= 0 for all x ∈ I and x0 ∈ I,
then there is a unique solution y = ϕ(x) for all x ∈ I.

Example 3.1. Consider the initial value problem (x − 2)y 00 + 3y = x with ICS y(0) = 0 and
y 0 (0) = 1. Here the leading coefficient is a2 = (x − 2) which satisfies a2 (x) = 0 when x = 2.
Now the initial x0 = 0 lies to the left of x = 2. So by Theorem 3.1 we see that a unique
solution exists on the interval −∞ < x < 2.

Remark 3.1. It is sometimes useful to use the following notation. Let D = d/dx denote
the derivative thought of as an operator. This notation allows us to define an operator

L = (an (x)Dn + an−1 (x)Dn−1 + · · · + a1 (x)D + a0 (x))

which we can use to write (1) as


Ly(x) = g(x).

1
With this notation we can write, in a very simple form, the important defining property
of a Linear equation. If f (x) and g(x) are two functions and α and β are two constants
then we have
L(αf (x) + βg(x)) = αL(f (x)) + βL(g(x)).

As a result of the linearity expressed above we can state the Principle of Superposition
for linear equations as follows: If y1 , y2 , · · · , yn are n functions satisfying the homogeneous
problem Ly = 0 then y = c1 y1 + c2 y2 + · · · + cn yn is also a solution.

Definition 3.1. A set of functions y1 , y2 , · · · , yn are called Linearly Independent on an


interval I = (a, b) if

c1 y1 (x) + c2 y2 (x) + · · · + cn yn (x) = 0 ∀ x ∈ I ⇔ c1 = c2 = · · · = cn = 0.

If the functions are not linearly independent then we say they are Dependent. This means
that there must exist a set of constants c1 , c2 , · · · , cn not all zero so that

c1 y1 (x) + c2 y2 (x) + · · · + cn yn (x) = 0 ∀ x ∈ I.

Example 3.2. 1. The functions 1, x, x2 , · · · , xn are linearly independent since a linear


combination
c1 + c2 x + · · · + cn x n

is a polynomial of degree n which can have at most n real roots so it cannot be


identically 0 in any interval unless c1 = c2 = · · · = cn = 0.

2. The functions x, |x| are linearly independent on R = (−∞, ∞) but not on the interval
(0, ∞).

3. To show the functions y1 = sin(x) and y2 = cos(x) are linearly independent we


consider c1 sin(x) + c2 cos(x) = 0. If we suppose (by way of contradiction) that c1 6= 0
then we can divide by c1 and divide by cos(x) to write

c2
tan(x) = −
c1

2
but notice that the left side is the well known function tan(x) which is not constant,
while the right hand side is a constant. This is a contradiction, which implies that
our assumption that c1 6= 0 is false so we must have c1 = 0 . But then we are left
with c2 cos(x) = 0 for all x which again is only possible if c2 = 0. We conclude that
c1 = c2 = 0 and trhe functions are linearly independent.

The above examples suggest that deciding whether functions are dependent or inde-
pendent can be difficult. We now present a simple method for deciding linear dependence
or independence.

Definition 3.2. Given a set of functions y1 , y2 , · · · , yn we define the Wronskian by

y1 y2 ··· yn
y10 y20 ··· yn0
W = W (y1 , y2 , · · · , yn ) = .. .. .. .. (2)
. . . .
(n−1) (n−1) (n−1)
y1 y2 ··· yn

Here the notation | · | denotes the determinant of the n × n matrix.

Theorem 3.2. [Wronskian Test for Independence] If y1 , y2 , · · · , yn are n solutions to an


nth order linear homogeneous equation on an interval I. Then the functions are linearly
independent ⇔ W (y1 , y2 , · · · , yn )(x) 6= 0 for every x ∈ I.

Remark 3.2. More generally, if the Wronskian of any set of n functions is not zero on an
interval I then the functions are linearly independent on the interval I.

In the case n = 2 the Wronskian of two functions y1 , y2 is

y1 y2
W = W (y1 , y2 ) = = y1 y20 − y2 y10 .
y10 y20

In the case n = 3 the Wronskian of three functions y1 , y2 , y3 is

y1 y2 y3
W = W (y1 , y2 , y3 ) = y10 y20 y30 .
y100 y200 y300

3
More generally, determinants are defined in Chapter 8 Section 4 where they describe
the concepts of minors and cofactors. As an example we give the expansion by expansion
by minors and cofactors using the first row. Consider the determinant of a 3 × 3 matrix
 
a a a
 11 12 13 
A = a21 a22 a23 
 
 
a31 a32 a33

First cover the row with plus and minus signs beginning with a + in the (1, 1) position and
then alternating signs. Then take the sum of the products of the sign, the element of the
row and the determinant of the 2 × 2 matrix obtained by deleting the row and column that
intersect in that particular element.


a+ +
11 a12 a13

det(A) = a21 a22 a23


a31 a32 a33

a22 a23 a21 a23 a21 a22


= a11 − a12 + a13 .
a32 a33 a31 a33 a31 a32

If the functions are solutions of a linear homogeneous ODE then the functions are
linearly independent on an interval I if and only if the Wronskian is not zero at a single
x ∈ I (and therefore for all x ∈ I).

Example 3.3. Show that y1 = e−3x and y2 = e4x are linearly independent for x > 0

e−3x e4x
W = W (y1 , y2 ) = = 4ex + 3ex = 7ex 6= 0.
−3x 4x
−3e 4e

Example 3.4. Let us reconsider showing y1 = sin(x) and y2 = cos(x) are linearly indepen-
dent
sin(x) cos(x)
W = W (y1 , y2 ) = = − sin2 (x) − cos2 (x) = −1 6= 0.
cos(x) − sin(x)

4
Example 3.5. Show that y1 = e−3x and y2 = e4x are linearly independent for all x

e−3x e4x
W = W (y1 , y2 ) = = 4ex + 3ex = 7ex 6= 0.
−3x 4x
−3e 4e

Example 3.6. 1. Consider the three functions (1 + x), x and x2 :

(1 + x) x x2
W = 1 1 2x = 2((1 + x) − x) = 2 6= 0.
0 0 2

So we conclude they are linearly independent.

2. Consider the three functions x, x2 and 4x − 3x2 :

x x2 (4x − 3x2 )
W = 1 2x (4 − 6x) = 0.
0 2 −6

So we conclude they are linearly dependent.

3. Consider the three functions ex , e−x and x. Show they are linearly independent for
x > 0: (expand by 3rd column)

ex e−x x
ex −e−x ex e−x
W = ex −e−x 1 = x −
ex e−x ex e−x
x −x
e e 0

= xex−x [(1) − (−1)] − 0 = 2xe0 = 2x 6= 0 for x > 0.

So we conclude they are linearly independent for x > 0.

Definition 3.3. A linearly independent set of functions y1 , y2 , · · · , yn of n solutions to an


nth order linear homogeneous equation is called a Fundamental Set.

5
Further, if y1 , y2 , · · · , yn is a fundamental set then the General Solution is given by

y(x) = c1 y1 (x) + c2 y2 (x) + · · · + cn yn (x)

where c1 , c2 , · · · , cn are arbitrary constants. The general solution of the homogeneous


problem is often denoted by yh or, in our book, yc which is called the Complementary
Solution.

Example 3.7. The functions y1 = e−x , y2 = ex form a fundamental set for the differential
equation y 00 − y = 0. To see this you can easily check the y1 and y2 satisfy the equation
so we need to show they are linearly independent.

e−x ex
W = W (y1 , y2 ) = = 2 6= 0
−e−x ex

so we conclude that y = c1 e−x + c2 ex is a general solution.


For the initial value problem

y 00 − y = 0, y(0) = 0, y 0 (0) = 2

we use the general solution and the initial conditions to obtain a unique solution as follows.
We have y = c1 e−x + c2 ex which implies y 0 = −c1 e−x + c2 ex so

0 = y(0) = c1 e−0 + c2 e0 = c1 + c2

2 = y 0 (0) = −c1 e−0 + c2 e0 = −c1 + c2

Now we solve the 2 × 2 system of equations

c1 + c2 = 0
−c1 + c2 = 2

Adding the two equations together we obtain 2c2 = 2 which implies c2 = 1. Substituting

6
this into the first equation we find c1 = −1. Finally then we obtain the unique solution

y = ex − e−x .

Example 3.8. The functions y1 = x, y2 = x ln(x) form a fundamental set for the differential
equation x2 y 00 − xy 0 + y = 0. Use this to solve the initial value problem

x2 y 00 − xy 0 + y = 0, y(1) = 3, y 0 (1) = 1.

The general solution is y = c1 x + c2 x ln(x) which implies y 0 = c1 + c2 (ln(x) + 1) so

3 = y(1) = c1 + c2 0 = c1

1 = y 0 (1) = c1 + c2 = c1 + c2

Now we solve the 2 × 2 system of equations

c1 = 3
c1 + c2 = 1

Adding the two equations together we obtain c1 = 3 which implies c2 = −2. Finally then
we obtain the unique solution
y = 3x − 2x ln(x).

The Non-homogeneous Problem

Theorem 3.3. Consider the non-homogeneous problem Ly = g where

L = (an (x)Dn + an−1 (x)Dn−1 + · · · + a1 (x)D + a0 (x)).

If yp is any Particular solution and yc is the complementary solution, then the general
solution of the non-homogeneous problem is y = yp + yc .

This follows from the following simple observation. If yp and yep are two particular
solutions of the non-homogeneous problem, i.e., Lyp = g and Lyep = g, then by the

7
superposition principle we have

L(yep − yp ) = L(yep ) − L(yp ) = g − g = 0,

i.e., (yep − yp ) is a solution of the homogeneous problem. But all solutions of the homo-
geneous problem are contained in yc so we must have yep − yp = yc or, in other words,
yep = yp + yc . In this way we see that every particular solution is given by finding any one
particular solution and adding it to yc .

Example 3.9. Consider the non-homogeneous IVP

y 00 + y = 1 + x2 , y(0) = −2, y 0 (0) = 1.

The general solution of the homogeneous problem y 00 + y = 0 is

yc = a cos(x) + b sin(x)

and a particular solution of the non-homogeneous problem is yp = x2 − 1.


Use this information to solve the IVP. The main thing we know is that the general
solution of the non-homogeneous problem is y = yc + yp so we have

y = a cos(x) + b sin(x) + x2 − 1.

To solve the IVP which we use this function and the initial conditions to find the the arbi-
trary constants a and b. Differentiating y we get

y 0 = −a sin(x) + b cos(x) + 2x.

Therefore from y(0) = −1 and y 0 (0) = 1 we have

a cos(0) + b sin(0) − 1 = −2 and − a sin(0) + b cos(0) + 0 = 1

or
a = −1, b = 1

8
So the unique solution to the IVP is

y = − cos(x) + sin(x) + x2 − 1.

Example 3.10. Consider the non-homogeneous IVP

y 00 − y = 1 − 2x − x2 , y(0) = 1, y 0 (0) = 4.

The general solution of the homogeneous problem y 00 − y = 0 is

yc = aex + be−x

and a particular solution of the non-homogeneous problem is yp = x2 + 2x + 1.


Use this information to solve the IVP. The main thing we know is that the general
solution of the non-homogeneous problem is y = yc + yp so we have

y = aex + be−x + x2 + 2x + 1.

To solve the IVP which we use this function and the initial conditions to find the the arbi-
trary constants a and b. Differentiating y we get

y 0 = aex − be−x + 2x + 2.

Therefore from y(0) = 1 and y 0 (0) = 4 we have

a + b + 1 = 1 and a − b + 2 = 4

or
a+b=0
a−b=2

If we add the two equations together the b’s drop out and we have 2a = 2 so that

a = 1, b = −1

9
So the unique solution to the IVP is

y = ex − e−x + x2 + 2x + 1.

Example 3.11. Consider the non-homogeneous IVP

y 00 − 4y 0 + 4y = 4x + 4, y(0) = 0, y 0 (0) = 0.

The general solution of the homogeneous problem y 00 − 4y 0 + 4y = 0 is

yc = ae2x + bxe2x

and a particular solution of the non-homogeneous problem is yp = x + 2.


Use this information to solve the IVP. The main thing we know is that the general
solution of the non-homogeneous problem is y = yc + yp so we have

y = ae2x + bxe2x + x + 2.

To solve the IVP which we use this function and the initial conditions to find the the arbi-
trary constants a and b. Differentiating y we get

y 0 = 2ae2x + b(1 + 2x)e2x + 1.

Therefore from y(0) = 0 and y 0 (0) = 0 we have

a + 2 = 0 and 2a + b + 1 = 0

or
a = −2, 2a + b + 1 = 0

which implies that a = −2 and b = 3. So the unique solution to the IVP is

y = −2e2x + 3xe2x + x + 2.

10
3.2 Reduction of Order

Suppose that y1 is a solution to the problem

y 00 + p(x)y 0 + q(x)y = 0, (3)

i.e.,
y100 + p(x)y10 + q(x)y1 = 0, (4)

Our goal is to find a second linearly independent solution y2 .


The motivation for this approach is the method of variation of parameters seen earlier
in the class. We seek a solution in the form

y2 (x) = v(x)y1 (x).

Taking the derivative this implies that

y20 = v 0 y1 + vy10 ,

and, taking the second derivative we have

y200 = v 00 y1 + 2v 0 y10 + vy100 .

Substituting these expressions into (3) gives

 00
v y1 + 2v 0 y10 + vy100 + p(x) v 0 y1 + vy10 + q(x) vy1 = 0.
    

Collecting the terms that multiply the expression v we get

v y100 + p(x)y10 + q(x)y1




which is 0 since y1 is a solution of the homogeneous problem (see (4)) so the equation for
v simplifies to
y1 v 00 + (2y10 + p(x)y1 )v 0 = 0.

11
Thus we obtain
(2y10 + p(x)y1 ) 0
v 00 + v = 0. (5)
y1
(2y10 + p(x)y1 ) y0
Setting w = v 0 and = 2 1 + p(x) this equation reduces to the first order
y1 y1
linear equation
y10
 
0
w + 2 + p(x) w = 0
y1
with integrating factor
 0 
R y
2 y1 +p(x) dx R 2
R R
µ=e 1
= e2 ln(y1 )+ p(x) dx
= eln(y1 ) e p(x) dx
= y12 e p(x) dx
.

Which gives us
[µw]0 = 0 ⇒ µw = C

for an arbitrary constant C. So we end up with

1 R
− p(x) dx
w(x) = C e .
y1 (x)2

Therefore R
e− p(x) dx
Z  
v(x) = C dx.
y1 (x)2
Finally then a second linearly independent solution
R
e− p(x) dx
Z  
y2 (x) = Cy1 (x) dx.
y1 (x)2

At this point we note that we can take any constant C we want. We usually choose it to
obtain the simplest answer. In particular, it can be chosen so the constant in front is 1.

Example 3.12. The function y1 = e2x is a solution of the equation

y 00 − 4y 0 + 4y = 0.

Find a second linearly independent solution y2 .

12
Applying the formula from reduction of order we have

R
p(x) = −4 ⇒ e− p(x) dx
= e4x

and we have
R
e− p(x) dx
Z  
y2 = Cy1 (x) dx
y1 (x)2
e4x
Z Z
2x
= Ce dx = e2x dx
(e2x )2
= Cxe2x

The simplest answer would be y2 = xe2x taking C = 1.

Example 3.13. The function y1 = cos(4x) is a solution of the equation y 00 + 16y = 0. Find
a second linearly independent solution y2 .
Applying the formula from reduction of order we have

R
p(x) = 0 ⇒ e− 0 dx
=1

and we have
R
e− p(x) dx
Z  
y2 = Cy1 (x) dx
y1 (x)2
Z Z
1
= C cos(4x) dx = cos(4x) sec2 (4x) dx
(cos(4x))2
1 1
= C cos(4x) tan(4x) = C sin(4x).
4 4

The simplest answer would be y2 = sin(4x) taking C = 4.

Example 3.14. The function y1 = ln(x) is a solution of the equation xy 00 + y 0 = 0. Find


a second linearly independent solution y2 . We must first rewrite the equation in the form
y 00 + py 0 + qy = 0:
1
y 00 + y 0 = 0.
x

13
Applying the formula from reduction of order we have

1 R
p(x) = ⇒ e− p(x) dx = x−1
x

and we have
R
e− p(x) dx
Z  
y2 = Cy1 (x) dx
y1 (x)2
x−1
Z Z
2x dx
= C ln(x) 2
dx = e
(ln(x)) x(ln(x))2
Z
du
= C ln(x) ( use u = ln(x), du = dx/x)
u2
Z
= C ln(x) u−2 du = − ln(x)u−1 = −C ln(x)(ln(x))−1 = −C

So the simplest answer would be y2 = 1 taking C = −1.

Example 3.15. The function y1 = x4 is a solution of x2 y 00 − 7xy 0 + 16y = 0. Find a


second linearly independent solution y2 . We must first rewrite the equation in the form
y 00 + py 0 + qy = 0:
7 16
y 00 − y 0 + 2 y = 0.
x x
Applying the formula from reduction of order we have

−7 R
p(x) = ⇒ e− p(x) dx = x7
x

and we have
R
e− p(x) dx
Z  
y2 = Cy1 (x) dx
y1 (x)2
x7
Z Z
4 dx
= Cx dx = Cx4
(x4 )2 x
= Cx4 ln(x)

So the simplest answer would be y2 = x4 ln(x) by taking C = 1.

Example 3.16. The function y1 = x sin(ln(x)) is a solution of x2 y 00 − xy 0 + 2y = 0. Find

14
a second linearly independent solution y2 . We must first rewrite the equation in the form
y 00 + py 0 + qy = 0:
1 2
y 00 − y 0 + 2 y = 0.
x x
Applying the formula from reduction of order we have

−1 R
p(x) = ⇒ e− p(x) dx = x
x

and we have
R
e− p(x) dx
Z  
y2 = Cy1 (x) dx
y1 (x)2
Z
x
= Cx sin(ln(x)) dx
(x sin(ln(x)))2
csc2 (ln(x))
Z
= Cx sin(ln(x)) dx ( use u = ln(x), du = dx/x)
x
Z
= Cx sin(ln(x)) csc2 (u) du = Cx sin(ln(x))(− cot(u))

= Cx sin(ln(x))(− cot(ln(x))) = −Cx cos(ln(x))

So the simplest answer would be y2 = x cos(ln(x)) by taking C = −1.

3.3 Homogeneous Linear Constant Coefficient Equations

The Second Order Case


Consider a Second Order Homogeneous Linear Constant Coefficient Equation
ay 00 + by 0 + cy = 0

Substituting y = erx into the equation we arrive at the so-called Characteristic Equation
ar2 + br + c = 0 has roots r1 , r2 by the quadratic equation

−b ± b2 − 4ac
r= .
2a

An important number is the Discriminant: ∆ = b2 − 4ac. From College Algebra you may
recall there are Three Cases depending on the sign of the discriminant:

15
1. ∆ > 0 Real distinct roots r1 6= r2 ⇒ (general solution) y = c1 er1 x + c2 er2 x

2. ∆ = 0 Real double root r0 = r1 = r2 ⇒ (general solution) y = c1 er0 x + c2 xer0 x

3. ∆ < 0 Complet roots r = α±iβ ⇒ (general solution) y = c1 eαx cos(βx)+c2 eαx sin(βx)

Here only the first case is obvious. If we have real distinct roots r1 and r2 then each
gives a solution er1 x and er2 x which are linearly independent so they form a fundamental
set and the general solution is y = c1 er1 x + c2 er2 x .
In case 2, we know one solution is er0 x so we appeal to the reduction of order formula
to find a second linearly independent solution y2 . In the case of a double root the equation
can be written in the form y 00 − 2r0 y 0 + r02 y = 0. Here so

R
p(x) = −2r0 ⇒ e− p(x) dx
= e2r0 x

So we have
R
e− p(x) dx
Z  
y2 = y1 (x) dx
y1 (x)2
e2r0 x
Z Z
r0 x
=e dx = er0 x dx
(er0 x )2
= xer0 x

Therefore the general solution is y = c1 er0 x + c2 xer0 x as we have above.


For case number 3 we encounter complex roots. Here we first introduce a very useful
thing to remember. If a quadratic equation with real coefficients has complex roots they
must be complex conjugates, i.e., r = α ± iβ where α, β are real. From this and the factor
and remainder theorem (from College Algebra) we find that the characteristic equation
can be written as follows:

0 =[r − (α + iβ)] [r − (α − iβ)] = [(r − α) − iβ] [(r − α) + iβ)]

=(r − α)2 − (iβ)2 = r2 − 2αr + (α2 + β 2 ).

This can be very useful in finding the roots and, in particular, α and β.

16
Another tool that is particularly useful is the famous Euler Formula

eiθ = cos(θ) + i sin(θ) (6)

which also implies (since cos is even and sin is odd)

e−iθ = cos(θ) − i sin(θ) (7)

An important side result from the Euler formulas are the following formulas. Adding
the formulas (6) and (7) together and dividing by 2 we arrive at

eiθ + eiθ
cos(θ) = .
2

Next we subtract the formulas (6) and (7) and divide by 2i to arrive at

eiθ − eiθ
sin(θ) = .
2i

While we will not use the above results at this time they are nevertheless important.
Returning to the solution in the case of complex roots, since we found the roots r =
α ± iβ we should be able to write the general solution as

c1 e(α+iβ)x + e
c2 e(α−iβ)x = eαx e c2 e−iβx .
 iβx 
y=e c1 e + e

Now we can use the Euler formulas (6), (7) to obtain

y =eαx e c2 e−iβx
 iβx 
c1 e + e

=eαx e
 
c1 {cos(βx) + i sin(βx)} + ec2 {cos(βx) − i sin(βx)}

=eαx (e
 
c1 + e c1 − e
c2 ) cos(βx) + (e c2 )i sin(βx)

=eαx c1 cos(βx) + c2 sin(βx)


 

where we have set


c1 := (e
c1 + e
c2 ), c1 − e
c2 := (e c2 )i

17
and since e
c1 and e
c2 are arbitrary constants then so also are c1 and c2 .

Example 3.17. Consider y 00 − y 0 − 6y = 0 with characteristic polynomial r2 − r − 6 = 0. The


discriminant is positive and quadratic factors giving two real roots, namely, r2 − r − 6 =
(r + 2)(r − 3) = 0 so r = −2, 3 and the general solution is y = c1 e−2x + c2 e3x .

Example 3.18. Consider y 00 −4y 0 +5y = 0 with characteristic polynomial r2 −4r+5 = 0. For
this example the discriminant is negative so there are complex roots r = α ± iβ. In order
to find α and β we write the characteristic polynomial in the form r2 − 2αr + α2 + β 2 = 0
which gives r2 − 2(2)r + (2)2 + (1)2 = 0 and we can read off that α = 2 and β = 1 so the
general solution is y = c1 e2x cos(x) + c2 e2x sin(x).

Example 3.19. Consider y 00 + 8y 0 + 16y = 0 with characteristic polynomial r2 + 8r + 16 = 0.


The discriminant is zero so there is a double root. The quadratic factors r2 + 8r + 16 =
(r + 4)2 = 0 so r = −4, −4 (a double root) and the general solution is y = c1 e−4x + c2 x e−4x .

Example 3.20. Consider the IVP y 00 + 16y = 0 with y(0) = 2 and y 0 (0) = −4. The
characteristic polynomial is r2 + 16 = 0. The discriminant is negative so there are two
complex roots r = 4i, −4i and the general solution is y = c1 cos(4x) + c2 sin(4x). Next
we differentiate to get y 0 = −4c1 sin(4x) + 4c2 cos(4x). Applying the first IC we get c1 = 2
and applying the second IC we get 4C2 = −4 so that C2 = −1 and the solution is y =
2 cos(4x) − sin(4x).

The Higher Order Case

This completes our discussion of the second order case. We now turn to the more
general case of a homogeneous linear differential equation with constant real coefficients
of order n which has the form

an y (n) + an−1 y (n−1) + · · · + a0 y = 0. (8)

d
We can introduce the notation D = and write the above equation as
dx

P (D)y ≡ an Dn + an−1 D(n−1) + · · · + a0 y = 0.




18
By the fundamental theorem of algebra we can factor P (D) as

an (D − r1 )m1 · · · (D − rk )mk (D2 − 2α1 D + α12 + β12 )p1 · · · (D2 − 2α` D + α`2 + β`2 )p` ,

k
X `
X
where mj + 2 pj = n.
j=1 j=1

There are two types of factors (D − r)k and (D2 − 2αD + α2 + β 2 )k :

1. The general solution of (D − r)k y = 0 is

y = c1 + c2 x + · · · + ck x(k−1) erx


2. The general solution of (D2 − 2αD + α2 + β 2 )k y = 0 is

y = c1 + c2 x + · · · + ck x(k−1) eαx cos(βx) + d1 + d2 x + · · · + dk x(k−1) eαx sin(βx).


 

Finally then the general solution of (8) contains one such term for each term in the
factorization.

Rather than use D notation we can also argue as before and seek solutions of (8) in
the form y = erx to get a characteristic polynomial

an rn + an−1 r(n−1) + · · · + a0 = 0.

In either case we find that the general solution consists of a sum of arbitrary con-
stants {cj }nj=1 multiplied times elements of a fundamental set, {yj }nj=1 , where each yj has
one of the following forms: xk , xk erx , xk eαx cos(βx) or xk eαx sin(βx). The yj are linearly
independent and the general solution is y = c1 y1 + c2 y2 + · · · + cn yn .
The best way to learn what to do is by working examples so let’s consider some ex-
amples of higher order homogeneous problems with constant coefficients.

Example 3.21. Consider y 000 −4y 00 −5y 0 = 0 with characteristic polynomial r3 −4r2 −5r = 0.

19
This cubic polynomial factors in r(r − 5)(r + 4) = 0 and we have roots r = 0, 5, −4 so the
general solution is y = c1 + c2 e5x + c3 e−4x .

000
Example 3.22. Consider y +3y 00 −4y 0 −12y = 0 with auxiliary polynomial r3 +3r2 −4r−12 =
0. We find the roots of this polynomial by factoring by grouping

0 = r3 + 3r2 − 4r − 12 = r2 (r + 3) − 4(r + 3) = (r + 3)(r2 − 4) = (r + 3)(r − 2)(r + 2)

so the roots are r = −3, 2, −2 and y = c1 e−3x + c2 e2x + c3 e−2x .

The Rational Root Test which states that if p(r) = an rn + an−1 rn−1 + · · · + a1 r + a0 with
integer coefficients, r = q1 /q2 is a rational root in lowest terms (i.e., q1 and q2 are integers
having no nontrivial common factors) of p(r) = 0, then q1 divides evenly into a0 and q2
divides evenly into an .
We also employ the factor and remainder theorem and synthetic division. Please
consult a college algebra or pre-calculus book for more details.

1. The Factor Theorem states that (r − a) is a factor of p(r) if and only if p(a) = 0.

2. The Remainder Theorem states that if a polynomial p(r) of degree n is divided by a


factor (r − a) then the remainder (which is a number) R = p(a). Here we have by
the division algorithm

p(r) R
= q(r) + ⇒ p(r) = (r − a)q(r) + R
(r − a) (r − a)

where R is the remainder and q(r) is the quotient polynomial of degree (n − 1).

The synthetic division form of this is

an an−1 ··· a0
aan ··· ··· .
a an (aan + an−1 ) ··· R

Here the coefficients of the quotient polynomial are in the third row.

20
Example 3.23. Consider y 000 − 5y 00 + 3y 0 + 9y = 0 with characteristic polynomial r3 − 5r2 +
3r + 9 = 0. This is a cubic polynomial and it factors but it is not obvious how. We apply
the rational root test to find that the only possible rational roots are r = ±1, ±3, ±9. We
try synthetic division to synthesize (r − 1) divided into r3 − 5r2 + 3r + 9.

1 −5 3 9

1 1 −4 −1

1 −4 −1 8

From this we see that r = 1 is not a root since the remainder is R = 8. Next we try
synthetic division to synthesize (r + 1) divided into r3 − 5r2 + 3r + 9

1 −5 3 9

−1 −1 6 −9

1 −6 9 0

We see that R = 0 so that r = −1 is a root and also the quotient polynomial is a


quadratic q(r) = r2 − 6r + 9 which factors into (r − 3)2 and has a double root r = 3, 3.
So the roots in this case are r = −1, 3, 3 and the general solution is

y = c1 e−x + c2 e3x + c3 xe3x .

Example 3.24. Consider y 000 + 3y 00 + 3y 0 + y = 0 with characteristic polynomial r3 + 3r2 +


3r + 1 = 0. This is a cubic polynomial and it factors but it is not obvious how. We apply the
rational root test to find that the only possible rational roots are r = ±1. We try synthetic
division to compute (r − 1) divided into r3 + 3r2 + 3r + 1.

1 3 3 1

1 1 4 7

1 4 7 8

From this we see that r = 1 is not a root since the remainder is R = 8. Next we try

21
synthetic division to compute (r + 1) divided into r3 − 5r2 + 3r + 9

1 3 3 1

−1 −1 −2 −1

1 2 1 0

We see that R = 0 so that r = −1 is a root and also the quotient polynomial is a


quadratic q(r) = r2 + 2r + 1 which factors into (r + 1)2 so r = −1 a double root r = −1, −1.
So the roots in this case are r = −1, −1, −1 and the general solution is

y = c1 e−x + c2 xe−x + c3 x2 e−x .

Sometimes a higher order equation can be easily factored using simple algebraic tech-
niques as the following example demonstrates

Example 3.25. Consider y (4) − 13y 00 + 36y = 0 with auxiliary polynomial r4 − 13r2 + 36 = 0.
We can factor this as follows

r4 − 13r2 + 36 = (r2 − 9)(r2 − 4) = 0

The terms (r2 − 9) = 0 and (r2 − 4) = 0 each have real roots r = ±3 and r = ±2 so the
general solution is
y = c1 e−3x + c2 e3x + c3 e−2x + c4 e2x .

Here is another similar example

Example 3.26. Consider 16y (4) +24y 00 +9y = 0 with auxiliary polynomial 16r4 +24r2 +9 = 0.
We can write this as follows

(4r2 )2 + (2)(4r2 )(3) + 32 = (4r2 + 3)2 = 0.

Notice this equation is 4th order so it has to have four roots. We find that 4r2 + 3 = 0 has
√ √ √ √ √
roots r = ± 3/2i so the double roots are 0 + 3/2i, 0 + 3/2i and 0 − 3/2i, 0 − 3/2i.

22
We obtain the general solution

√ √
y = (c1 + c2 x) cos( 3/2x) + (c3 + c4 x) sin( 3/2x).

Example 3.27. Consider y 000 − y 0 = 0 with initial conditions y(0) = 0, y 0 (0) = 2, y 00 (0) = 2.
To find the general solution we consider the auxiliary polynomial r3 − r = 0 which factors
to r(r −1)(r +1) = 0 with roots r = 0, −1, 1 and the general solution is y = c1 +c2 e−x +c3 ex .
Then we also need y 0 = −c2 e−x + c3 ex and y 00 = c2 e−x + c3 ex . Applying the ICs we get

c1 + c2 + c3 = 0

− c2 + c3 = 2

c2 + c3 = 2

Notice we can solve the last two equations for c2 and c3 . Adding the equations together
we get 2c3 = 4 so that c3 = 2. Then from the last equation we must have c2 = 0. Finally
plugging in these values into the first equation we find c1 + 0 + 2 = 0 so that c1 = −2.
Therefore the unique solution of the IVP is

y = −2 + 2ex .

Let’s try one a little harder

Example 3.28. Consider y (4) + 13y 00 + 36y = 0 with initial conditions y(0) = 0, y 0 (0) = 30,
y 00 (0) = 0, y 000 (0) = 0. To find the general solution we consider the auxiliary polynomial
r4 + 13r2 + 36 = 0. Notice that this equation cannot have any real roots. This expression
factors to (r2 + 4)(r2 + 9) = 0 with roots r = 0 + 2i, 0 − 2i, 0 + 3i, 0 − 3i and the general
solution is y = c1 cos(2x) + c2 sin(2x) + c3 cos(3x) + c4 sin(3x). Then we also need

y = c1 cos(2x) + c2 sin(2x) + c3 cos(3x) + c4 sin(3x)

y 0 = −2c1 sin(2x) + 2c2 cos(2x) − 3c3 sin(3x) + 3c4 cos(3x),

y 00 = −4c1 cos(2x) − 4c2 sin(2x) − 9c3 cos(3x) − 9c4 sin(3x),

23
and
y 000 = 8c1 sin(2x) − 8c2 cos(2x) + 27c3 sin(3x) − 27c4 cos(3x).

Applying the ICS we get

c1 + 0c2 + c3 + 0c4 = 0

0c1 + 2c2 + 0c3 + 3c4 = 30

− 4c1 + 0c2 − 9c3 + 0c4 = 0

0c1 − 8c2 + 0c3 − 27c4 = 0.

Consider the first and third equations together

c1 + c3 = 0

− 4c1 − 9c3 = 0

which gives c1 = c3 = 0. Now consider the second and forth which give

2c2 + 3c4 = 30

− 8c2 − 27c4 = 0

Adding 4 times the first equation to the second, the c2 drop out and we have 12c4 − 27c4 =
120 or −15c4 = 120 which gives c4 = −8 and using this value in either equation we find
c2 = 27. Therefore the unique solution of the IVP is

y = 27 sin(2x) − 8 sin(3x).

000
Example 3.29. Consider y + y 00 − 2y = 0 with y(0) = 0, y 0 (0) = 3, y 00 (0) = −1. To find the
general solution we have the auxiliary polynomial r3 + r2 − 2 = 0. To find the roots of this
equation we need synthetic division and the rational root test. The possible rational roots
are ±1 and ±2. Let us try r = 1

24
1 1 0 −2

1 1 2 2

1 2 2 0

We see that the quotient polynomial is r2 + 2r + 2 which has complex roots −1 ± i since
we can write it as r2 − 2(−1)r + (−1)2 + (1)2 . Therefore the general solution is

y = c1 ex + c2 e−x cos(x) + c3 e−x sin(x).

To solve the initial value problem we need to find y 0 (x) and y 00 (x). To do this we need to
use the product rule.

y 0 =c1 ex + c2 e−x (− cos(x) − sin(x)) + c3 e−x (− sin(x) + cos(x))

=c1 ex + (−c2 + c3 )e−x cos(x) + (−c2 − c3 )e−x sin(x)

Next we need

y 00 =c1 ex + (−c2 + c3 )e−x (− cos(x) − sin(x)) + (−c2 − c3 ))e−x (− sin(x) + cos(x))

=c1 ex + (−2c3 )e−x cos(x) + (2c2 )e−x sin(x)

Applying the initial conditions we have

c1 + c2 = 0
c1 − c2 + c3 = 3
c1 − 2c3 = −1

Solving this system of 3 equations in 3 unknowns we get c1 = 1, c2 = −1 and c3 = 1. So


the unique solution of the initial value problem is y = ex − e−x cos(x) + e−x sin(x).

Example 3.30. Consider y (4) −81y = 0 with initial conditions y(0) = 2, y 0 (0) = 6, y 00 (0) = 0,
y 000 (0) = 0. To find the general solution we consider the auxiliary polynomial r4 − 81 = 0.
This expression factors to (r2 − 9)(r2 + 9) = 0 with roots r = 0 + 3i, 0 − 3i, 3, −3 and the

25
general solution is y = c1 cos(3x) + c2 sin(3x) + c3 e−3x + c4 e3x . Then we also need

y = c1 cos(3x) + c2 sin(3x) + c3 e−3x + c4 e3x

y 0 = −3c1 sin(3x) + 3c2 cos(3x) − 3c3 e−3x + 3c4 e3x ,

y 00 = −9c1 cos(3x) − 9c2 sin(3x) + 9c3 e−3x + 9c4 e3x ,

and
y 000 = 27c1 sin(3x) − 27c2 cos(3x) − 27c3 e−3x + 27c4 e3x .

Applying the ICS we get

c1 + 0c2 + c3 + c4 = 2

0c1 + 3c2 − 3c3 + 3c4 = 6

− 9c1 + 0c2 + 9c3 + 9c4 = 0

0c1 − 27c2 − 27c3 − 27c4 = 0

This simplifies to

c1 + c3 + c4 = 2

3c2 − 3c3 + 3c4 = 6

− 9c1 + 9c3 + 9c4 = 0

− 27c2 − 27c3 + 27c4 = 0

Now divide the second equation by 3, the third by 9 and the last by 27 to get

c1 + c3 + c4 = 2

c2 − c3 + c4 = 2

− c1 + c3 + c4 = 0

− c2 − c3 + c4 = 0

26
Subtract the third equation from the first and the c3 + c4 drops out to give 2c1 = 2 so c1 = 1.
Next in the big system above subtract the fourth equation from the second to get
2c2 = 2 so that c2 = 1.
Plugging these values in to the big system we then have

1 + c3 + c4 = 2

1 − c3 + c4 = 2

− 1 + c3 + c4 = 0

− 1 − c3 + c4 = 0

Lets look at the first two equations which simplify to

c3 + c4 = 1

− c3 + c4 = 1

Adding these equations together we find 2c4 = 2 so c4 = 1 and then this implies c3 = 0.
These same values satisfy the third and fourth equations above so we have c1 = 1, c2 = 1,
c3 = 0 and c4 = 1.
Therefore the unique solution of the IVP is

y = cos(3x) + sin(3x) + e3x .

Example 3.31. Consider y 0000 − 4y 000 + 7y 00 − 6y 0 + 2y = 0 with initial conditions y(0) = 2,


y 0 (0) = 0, y 00 (0) = −3, y 000 (0) = −6. To find the general solution we consider the auxiliary
polynomial r4 − 4r3 + 7r2 − 6r + 2 = 0. Notice that the only possible rational roots are ±1
and ±2.
1 −4 7 −6 2

1 1 −3 4 −2

1 −3 4 −2 0

Therefore r = 1 is a root. But it might be a double root so we try it again on the quotient

27
polynomial
1 −3 4 −2

1 1 −2 2

1 −2 2 0

And, we see that r = 1 is a root once again. Therefore r = 1 is a double root. At this
point the quotient polynomial is quadratic so we only need to find the roots of r2 − 2r + 2
and a quick check of the discriminant shows it has complex roots. Namely we have
r2 − 2(1)r + (1)2 + (1)2 which implies that r = 1 ± i. Finally then the 4 roots are 1, 1, 1 ± i.
Then we can write the general solution as

y = c1 ex + c2 xex + c3 ex cos(x) + c4 ex sin(x).

We need to find the constants c1 , c2 , c3 , c4 so that the initial conditions are satisfied. This
requires us to compute y 0 , y 00 and y 000 . We have

y 0 = c1 ex + c2 (1 + x)ex + c3 ex (cos(x) − sin(x)) + c4 ex (sin(x) + cos(x))

= (c1 + c2 + c2 x)ex + (c3 + c4 )ex cos(x) + (−c3 + c4 )ex sin(x).

y 00 = [c2 + c1 + c2 + c2 x]ex + (c3 + c4 )ex (cos(x) − sin(x)) + (−c3 + c4 )ex (sin(x) + cos(x))

= (c1 + 2c2 + c2 x)ex + (2c4 )ex cos(x)(−2c3 )ex sin(x).

y 000 = [c1 + 3c2 + c2 x]ex + (2c4 )ex (cos(x) − sin(x)) + (−2c3 )ex (sin(x) + cos(x))

= [c1 + 3c2 + c2 x]ex + (−2c3 + 2c4 )ex cos(x) + (−2c3 − 2c4 )ex sin(x).

From the initial conditions we have

c1 + c3 = 2

c1 + c2 + c3 + c4 = 0

c1 + 2c2 + 2c4 = −3

28
c1 + 3c2 − 2c3 + 2c4 = −6

1. From the first equation we have c3 = 2 − c1

2. Replacing c3 by 2 − c1 in the second equation we have c2 + c4 = −2 which implies


that c4 = −2 − c2 .

3. Substituting c4 = −2 − c2 into the third equation we have c1 = 1 .

4. Using c1 = 1, c3 = 2 − c1 and c4 = −2 − c2 in the fourth equation we have c2 = −1

5. But then by item 1 above we have c3 = 1 .

6. And, finally, by item 2 we have c4 = −1 .

Therefore the unique solution of the IVP is

y = ex − xex + ex cos(x) − ex sin(x).

3.4 Method of Undetermined Coefficients

Non-Homogeneous Problem:

We now turn to the hardest part of Chapter 3, finding the general solution to the non-
homogeneous problem:

Ly = (an Dn + an−1 Dn−1 + · · · + a0 )y = f (x) (9)

As we have already mentioned, the general solution is obtained as y = yc + yp where

1. yc is the general solution of the homogeneous (or complementary) problem, i.e.


yc = c1 y1 + c2 y2 + · · · + cn yn where y1 , · · · , yn are n linearly independent solutions of

Ly = (an Dn + an−1 Dn−1 + · · · + a0 )y = 0

29
with the Characteristic Polynomial

an rn + an−1 rn−1 + · · · + a0 = 0 (10)

2. yp is (any) particular solution of the non-homogeneous problem (9).

The main problem then is to find yp .

Remark 3.3. We will be mostly concerned with the general solution in case the left hand
side is a second order equation

ay 00 + by 0 + cy = f (x).

Method of Undetermined Coefficients


The method of undetermined coefficients is only applicable if the right hand side is a
sum of terms of the following form

p(x), p(x)eax , p(x)eαx cos(βx), p(x)eαx sin(βx) (11)

where we denote by p(x) = cm xm + cm−1 xm−1 + · · · + c0 a general polynomial of degree


m. For a right hand side function consisting of a sum of terms like these, yp will be found
as a sum of such terms. Each of the individual terms are computed using the following:

BOX 1:
ay 00 + by 0 + cy = p(x)er0 x ⇒ yp = xs (Am xm + · · · + A1 x + A0 )er0 x

1. s = 0 if r0 is not a root of ar2 + br + c = 0.


2. s = ` if r0 is a root ` times of ar2 + br + c = 0 (here ` = 1 or 2).

N.B. The above case includes the case r0 = 0 in which case the right side is p(x).

30
BOX 2: 


 p(x)eαx cos(βx)

ay 00 + by 0 + cy = or ⇒


 p(x)eαx sin(βx)

yp = xs (Am xm + · · · + A1 x + A0 )eαx cos(βx) + xs (Bm xm + · · · + B1 x + B0 )eαx sin(βx)

1. s = 0 if r0 = α + iβ is not a root of ar2 + br + c = 0.


2. s = 1 if r0 = α + iβ is a root of ar2 + br + c = 0.

Remark 3.4. It can happen that the function f (x) on the right hand side is a sum of several
functions each of which must be handled separately. For example

f (x) = f1 (x) + f2 (x) + · · · + fn (x)

where each fj (x) is of the form described in BOX 1 or BOX 2 but with different r0 or α
and β. Notice that if one of the terms is a polynomial, e.g., 3x3 + 2x2 + x + 1, then this
is to be considered as a single function corresponding to r0 = 0 and not several different
functions.
So let us consider Ly = ay 00 + by 0 + cy and the associated non-homogeneous problem

Ly = f1 (x) + f2 (x) + · · · + fn (x)

To find yp for a situation like this we simply find n particular solutions ypj satisfying
Lypj = fj and add them together. Namely we have

yp = yp1 + yp2 · · · + ypn .

The reason this works is that the problem is linear:

Lyp = L(yp1 + · · · + ypn ) = L(yp1 ) + · · · + L(ypn ) = f1 + · · · + fn = f.

In the following examples you are asked to find a candidate for a particular solution.
This means we give the form of the particular solution but do not find the values of the

31
coefficients themselves.

1. y 00 −2y 0 +2y = 2ex cos(x) ⇒ For the homogenous problem we have y 00 −2y 0 +2y = 0
⇒ r2 − 2r + 2 = 0 ⇒ r = 1 ± i so we have yc = c1 ex cos(x) + c2 ex sin(x). The right
hand side has p(x) = 2 (a polynomial of degree 0, i.e., a constant), r0 = 1 + i which
is a root once of the characteristic polynomial. So we look at BOX 2 with s = 1 we
have
yp = Axex sin(x) + Bxex cos(t)

2. y 00 − 2y 0 + y = 2ex ⇒ For the homogenous problem we have y 00 − 2y 0 + y = 0 ⇒


r2 − 2r + 1 = 0 ⇒ r = 1, 1 is a double root. So we have yc = c1 ex + c2 xex . The right
hand side has p(x) = 2 (a polynomial of degree 0, i.e., a constant), r0 = 1 which is a
root twice of the characteristic polynomial. So we look at BOX 1 with s = 2 and we
have
yp = Ax2 ex

3. y 00 − 4y 0 + 3y = x2 + x − 1 + sin(x) ⇒

For the homogenous problem we have y 00 − 4y 0 + 3y = 0 ⇒ r2 − 4r + 3 = 0 ⇒ r = 3, 4


so we have yc = c1 e3x + c2 e4x . Following the discussion in Remark 3.4 we see that
the right hand side has two parts:

(a) For the first we have p(x) = x2 + x − 1 (a polynomial of degree 2, i.e., a


quadratic), and r0 = 0 which is NOT a root of the characteristic polynomial.
So we look at BOX 1 with s = 0 and we have yp1 = (Ax2 + Bx + C).

(b) For the second part we have p(x) = 1 (a polynomial of degree 0, i.e., a con-
stant), and r0 = 0 + i. We note that r0 is not a root of the characteristic polyno-
mial so s = 0 and we have yp2 = D sin(x) + E cos(x).

Adding these together we arrive at

yp = (Ax2 + Bx + C) + (D sin(x) + E cos(x))

4. y 00 + 9y = sin(2x) ⇒ yp = A sin(2x) + B cos(2x)

32
5. y 00 − 3y 0 + 2y = ex ⇒ yp = Axex

6. y 00 − y 0 = x + 1 ⇒ yp = Ax2 + Bx

Let us turn now to the problem of actually finding a particular solution. We will present
a few simple examples.

Example 3.32. Find the general solution for y 00 + 3y 0 + 2y = 6.

1. First we solve the homogeneous problem y 00 + 3y 0 + 2y = 0 by finding the roots of the


characteristic equation r2 + 3r + 2 = 0 which gives (r + 2)(r + 1) = 0 which implies
r = −1 r = −2 so we have yc = c1 e−x + c2 e−2x .

2. Next we need to find yp so we first need to find a candidate for a particular solution.
The function on the right hand side is from BOX 1 with m = 0 (a polynomial of
degree zero) and r0 = 0 which is not a root of the characteristic equation. So we
have yp = Ae0x = A. To find yp we now need to find A and we do this by plugging
this yp into the given equation and solve for A.

We have yp = A, yp0 = 0, yp00 = 0 so we obtain

(0) + 3(0) + 2(A) = 6.

This gives 2A = 6 which implies A = 3. So yp = 3.

3. Finally then the general solution for this problem is

y = yc + yp = c1 e−x + c2 e−2x + 3.

Example 3.33. Find the general solution for y 00 + 3y 0 + 2y = 40e3x .

1. First we solve the homogeneous problem y 00 + 3y 0 + 2y = 0 by finding the roots of the


characteristic equation r2 + 3r + 2 = 0 which gives (r + 2)(r + 1) = 0 which implies
r = −1 r = −2 so we have yc = c1 e−x + c2 e−2x .

2. Next we need to find yp so we first need to find a candidate for a particular solution.
The function on the right hand side is from BOX 1 with m = 0 (a polynomial of

33
degree zero) and r0 = 3 which is not a root of the characteristic equation. So we
have yp = Ae3x . To find yp we now need to find A and we do this by plugging this yp
into the given equation and solve for A.

We have yp = Ae3x , yp0 = 3Ae3x , yp00 = 9Ae3x so we obtain

(9Ae3x ) + 3(3Ae3x ) + 2(Ae3x ) = 40Ae3x .

This gives 20A = 40 which implies A = 2. So yp = 2e3x .

3. Finally then the general solution for this problem is

y = yc + yp = c1 e−x + c2 e−2x + 2e3x .

Example 3.34. Find the general solution for y 00 − y 0 = 4x.

1. First we solve the homogeneous problem y 00 − y 0 = 0 by finding the roots of the


characteristic equation r2 − r = 0 which gives r(r − 1) = 0 which implies r = 0, r = 1
so we have yc = c1 + c2 ex .

2. Next we need to find yp so we first need to find a candidate for a particular solution.
The function on the right hand side is from BOX 1 with m = 1 (a polynomial of
degree one) and r0 = 0 which is a root of the characteristic equation once. So we
have yp = x(Ax + B). To find yp we now need to find A and we do this by plugging
this yp into the given equation and solve for A and B.

We have yp = Ax2 + Bx, yp0 = 2Ax + B, yp00 = 2A so we obtain

(2A) − (2Ax + B) = 4x.

This gives 2A − B = 0 and −2A = 4 which implies A = −2 and B = −4. So


yp = −2x2 − 4x.

3. Finally then the general solution for this problem is

y = yc + yp = c1 + c2 ex − 2x2 − 4x.

34
Example 3.35.

Find the general solution for y 00 + 3y 0 + 2y = 10 sin(x).

1. First we solve the homogeneous problem y 00 + 3y 0 + 2y = 0 by finding the roots of the


characteristic equation r2 + 3r + 2 = 0 which gives (r + 2)(r + 1) = 0 which implies
r = −1 r = −2 so we have yc = c1 e−x + c2 e−2x .

2. Next we need to find yp so we first need to find a candidate for a particular solution.
The function on the right hand side is from BOX 2 with m = 0 (a polynomial of
degree zero) and r0 = 0 + i which is not a root of the characteristic equation. So we
have yp = A cos(x) + B sin(x). To find yp we now need to find A and B which we do
by plugging our candidate for yp into the given equation and solve for A and B.

We have yp = A cos(x)+B sin(x), yp0 = −A sin(x)+B cos(x), yp00 = −A cos(x)−B sin(x)


so we obtain

(−A cos(x) − B sin(x)) + 3(−A sin(x) + B cos(x)) + 2(A cos(x) + B sin(x)) = sin(x).

Now collect the sine and cosine terms on each side of the equation.

(A + 3B) cos(x) + (−3A + B) sin(x) = sin(x).

Equating the like terms on each side we find

A + 3B = 0

−3A + B = 10

Taking 3 times the first equation added to the second we get 10B = 10 which implies
B = 1. with B = 1 in the first equation we get A = −3 so we have yp = −3 cos(x) +
sin(x).

3. The general solution for this problem is

y = yc + yp = c1 e−x + c2 e−2x − 3 cos(x) + sin(x).

35
4. Consider y 00 + y 0 − 2y = 18xex − 4x ⇒ For the homogenous problem we have
y 00 + y 0 − 2y = 0 ⇒ r2 + r − 2 = 0 ⇒ r = 1, −2. So we have yc = c1 ex + c2 e−2x .
Again following the discussion in Remark 3.4 we see that the right hand side has
two parts:

(a) For the first we have p(x) = 18xex (a polynomial of degree 1), and r0 = 1 which
is a root once of the characteristic polynomial. So we look at BOX 1 with s = 1
and we have yp1 = x(Ax + B)ex .

yp0 1 = (Ax2 + (2A + B)x + B)ex , yp001 = (Ax2 + (4A + B)x + (2A + 2B))ex .

Substituting these into the equation and dividing both sides by ex gives

(Ax2 + (4A + B)x + (2A + 2B)) + (Ax2 + (2A + B)x + B) − 2(Ax2 + Bx) = 18x

Notice that the x2 terms all cancel out and we have

6Ax = 18x ⇒ A = 3.

2A + 3B = 0 ⇒ B = −2.

So we have yp1 = x(3x − 2)ex .

(b) For the second part we have p(x) = −4x (a polynomial of degree 1 ), and
r0 = 0. We note that r0 is not a root of the characteristic polynomial so s = 0
and, we look at BOX 1, which gives yp2 = Cx + D.

yp0 2 = C, yp002 = 0

so we have
C − 2(Cx + D) = −4x

which implies

−2C = −4 ⇒ C = 2, and C − 2D = 0 => D = 1

36
so that yp2 = 2x + 1

Adding these together we arrive at

yp = yp1 + yp2 = x(Ax + B)ex + Cx + D = x(3x − 2)ex + 2x + 1.

Example 3.36. Find the general solution for y 00 + y = x3 . Then solve the IVP y(0) = 2 and
y 0 (0) = −3.

1. First we solve the homogeneous problem y 00 + y = 0 by finding the roots of the


characteristic equation r2 + 1 = 0 which gives r = 0 ± i so we have yc = c1 cos(x) +
c2 sin(x).

2. Next we need to find yp so we first need to find a candidate for a particular solution.
The function on the right hand side is from BOX 1 with m = 3 (a polynomial of
degree 3) and r0 = 0 which is not a root of the characteristic equation. So we have
yp = (Ax3 + Bx2 + Cx + D). To find yp we now need to find A and we do this by
plugging this yp into the given equation and solve for A.

We have yp = (Ax3 + Bx2 + Cx + D), yp0 = (3Ax2 + 2Bx + C), yp00 = (6Ax + 2B) so
we obtain
(6Ax + 2B) + (Ax3 + Bx2 + Cx + D) = x3 .

This immediately gives A = 1 and B = 0. Then we have 6A + C = 0 and D + 2B = 0


so we have C = −6 and D = 0. So then we have yp = x3 − 6x.

3. Then the general solution for this problem is

y = yc + yp = c1 cos(x) + c2 sin(x) + x3 − 6x.

4. For the IVP we have y(0) = 2 and y 0 (0) = −3

y = c1 cos(x) + c2 sin(x) + x3 − 6x, ⇒ c1 = 2,

y 0 = −c1 sin(x) + c2 cos(x) − 6, ⇒ c2 − 6 = −3, ⇒ c2 = 3.

37
Finally we have
y = 2 cos(x) + 3 sin(x) + x3 − 6x.

Example 3.37. Find the general solution for y 00 − 2y 0 + 2y = 2x. Then solve the IVP
y(0) = 0 and y 0 (0) = 0.

1. First we solve the homogeneous problem y 00 − 2y 0 + 2y = 0 by finding the roots


of the characteristic equation r2 − 2r + 2 = 0 which gives r = 1 ± i so we have
yc = c1 ex cos(x) + c2 ex sin(x).

2. Next we need to find yp so we first need to find a candidate for a particular solution.
The function on the right hand side is from BOX 1 with m = 1 (a polynomial of
degree 3) and r0 = 0 which is not a root of the characteristic equation. So we have
yp = (Ax + B). To find yp we now need to find A and we do this by plugging this yp
into the given equation and solve for A.

We have yp = (A + B), yp0 = A, yp00 = 0 so we obtain

0 − 2A + 2(Ax + B) = 2x.

This immediately gives A = 1 and B = 1. So then we have yp = x + 1.

3. Then the general solution for this problem is

y = yc + yp = c1 ex cos(x) + c2 ex sin(x) + x + 1.

4. For the IVP we have y(0) = 2 and y 0 (0) = −3

y = c1 ex cos(x) + c2 ex sin(x) + x + 1, ⇒ c1 + 1 = 0, ⇒ c1 = −1,

y 0 = −c1 ex (cos(x)−sin(x))+c2 ex (sin(x)+cos(x))+1, ⇒ (c1 +c2 )+1 = 0, ⇒ c2 = 0.

Finally we have
y = −ex cos(x) + x + 1.

38
3.5 Variation of Parameters

In this section we consider a second order homogeneous problem (not necessarily con-
stant coefficient).
The general second order linear equation has the form

a2 (x)y 00 + a1 (x)y 0 + a0 (x)y = g(x).

Under the assumption that an (x) is not ever zero, we can divide by a2 (x) and obtain the
required form for the following computations

y 00 + p(x)y 0 + q(x)y = f (x). (12)

Suppose that y1 and y2 form a fundamental set for the homogenous problem

y 00 + p(x)y 0 + q(x)y = 0

so that the the complementary solution is yc = c1 y1 + c2 y2 .


Our goal now is to find a particular solution yp . In the method of Variation of Parameters
we seek a particular solution by “varying” the two constants in the general solution of the
homogeneous problem. This is a bit vague but the general idea is this. We seek a partic-
ular solution in the form
yp = uy1 + vy2 (13)

for some unknown (to be determined) functions u and v.

Z
y2 (x)f (x)
Z
y1 (x)f (x) y1 y2
yp (x) = −y1 (x) dx + y2 (x) dx, W (x) = (14)
W (x) W (x)
y10 y20

To obtain this formula we proceed by substituting yp = uy1 + vy2 into the equation (12)
and then solving for u and v as follows:

yp = uy1 + vy2 ⇒ yp0 = uy10 + u0 y1 + vy20 + v 0 y2 .

39
At this point we make an assumption that

u0 y1 + v 0 y2 = 0. (15)

There is nothing wrong with making such an assumption as long as we end up finding u
and v for which the assumption holds. With this assumption our formula for yp0 simplifies
to
yp0 = uy10 + vy20 (16)

which can differentiate again

yp00 = (uy10 + vy20 )0 = uy100 + u0 y10 + vy200 + v 0 y20 . (17)

We now substitute the right hand side of (13) for yp , the rhs of (16) for yp0 and the rhs
of (17) for yp00 into the equation (12). This gives

f (x) =y 00 + p(x)y 0 + q(x)y

=(uy100 + u0 y10 + vy200 + v 0 y20 ) + p(x)(uy10 + vy20 ) + q(x)(uy1 + vy2 )

=u(y100 + p(x)y10 + q(x)y1 ) + v(y200 + p(x)y20 + q(x)y2 ) + (u0 y10 + v 0 y20 )

=u(0) + v(0) + (u0 y10 + v 0 y20 )

=(u0 y10 + v 0 y20 ).

So we end up with two equation in the two unknowns u0 , v 0 .

u0 y1 + v 0 y2 = 0
.
u0 y10 + v 0 y20 = f

This system can be solved using Cramer’s rule (see any college algebra book). The
system is solvable due to the fact that the Wronskian of y1 and y2 is not zero.

y1 (x) y2 (x)
W (x) =
y10 (x) y20 (x)

40
and we get
0 y2
f (x) y20 −y2 (x)f (x)
u0 = = ,
W (x) W (x)
and
y1 0
y10 f (x) y1 (x)f (x)
0
v = = .
W (x) W (x)
Integrating these results we arrive at

−y2 (x)f (x)


Z Z
y1 (x)f (x)
u= dx, v= dx (18)
W (x) W (x)

and we immediately arrive at the formula (14).

Example 3.38. Consider y 00 + y = sec(x). The homogeneous problem y 00 + y = 0 has


solution yc = c1 cos(x) + c2 sin(x) so we set y1 = cos(x) and y2 = sin(x).

cos(x) sin(x)
W (x) = = cos2 (x) + sin2 (x) = 1.
− sin(x) cos(x)

− sin(x) sec(x) − sin(x)


Z
0 sin(x)
u = = , ⇒ u=− dx = ln(cos(x)).
1 cos(x) cos(x)
Z
0 cos(x) sec(x)
v = = 1, ⇒ v= 1 dx = x.
1
So we have
yp = cos(x) ln(cos(x)) + x sin(x).

Example 3.39. Consider y 00 − y = 1/x. The homogeneous problem y 00 − y = 0 has


r2 − 1 = 0 so r = ±1. A fundamental set of solutions for the homogeneous problem is
y1 = e−x and y2 = ex and the solution yc = c1 e−x + c2 ex .

e−x ex
W (x) = = 2.
−x x
−e e

41
ex ex
Z
0
u =− , ⇒ u=− dx.
2x 2x
e−x e−x
Z
0
v = , ⇒ v= dx.
2x 2x
The point of this exercise is that the integrals

ex e−x
Z Z
dx and dx
2x 2x

cannot be computed in closed form. In other words you cannot compute these integrals
using any methods from calculus. So the answer has to be given in this form

ex e−x
Z Z
−x
yp = −e dx + ex dx.
2x 2x

Example 3.40. Consider y 00 − 2y 0 + y = 6xex . The homogeneous problem y 00 − 2y 0 + y = 0


has r2 − 2r + 1 = 0 so r = 1, 1 (a double root). A fundamental set of solutions for the
homogeneous problem is y1 = ex and y2 = xex and the solution yc = c1 ex + c2 xex .

ex xex
W (x) = = e2x .
x x
e (1 + x)e

xex 6xex
Z
0
u =− , ⇒ u=− 6x2 dx = −2x3 .
e2x
ex 6xex
Z
0
v = , ⇒ v= 6x dx = 3x2 .
e2x

yp = (−2x3 )ex + (3x2 )xex = x3 ex .

Example 3.41. Consider y 00 + y = 2 sin(x). The homogeneous problem y 00 + y = 0 has


solution yc = c1 cos(x) + c2 sin(x) so we set y1 = cos(x) and y2 = sin(x).

cos(x) sin(x)
W (x) = = cos2 (x) + sin2 (x) = 1.
− sin(x) cos(x)

42
sin(x) sin(x)
u0 = −2 = −2 sin2 (x),
1
Z Z
2 2 1
u = −2 sin (x) dx = (1 − cos(2x)) dx = −x + sin(2x).
2 2
Z
cos(x) sin(x)
v0 = 2 = 2 sin(x) cos(x), ⇒ v = 2 sin(x) cos(x) dx = sin2 (x).
1
So we have

1
yp = (−x + sin(2x)) cos(x) + sin3 (x) = −x cos(x) + sin(x).
2

Notice that sin(x) is part of yc so we could take yp = −x cos(x).

Example 3.42. Consider y 00 + y = tan(x). The homogeneous problem y 00 + y = 0 has


solution yc = c1 cos(x) + c2 sin(x) so we set y1 = cos(x) and y2 = sin(x).

cos(x) sin(x)
W (x) = = cos2 (x) + sin2 (x) = 1.
− sin(x) cos(x)

Z Z
sin(x) tan(x) cos(x) tan(x)
yp = − cos(x) dx + sin(x) dx.
1 1

sin2 (x) (1 − cos2 (x))


Z Z Z
sin(x) tan(x)
dx = dx dx
1 cos(x) cos(x)
Z
= (sec(x) − cos(x)) dx = ln(| sec(x) + tan(x)|) − sin(x).

Z Z
cos(x) tan(x)
dx = sin(x) dx = − cos(x).
1
So we have

yp = −(ln(| sec(x) + tan(x)|) − sin(x)) cos(x) − sin(x) cos(x)

= − ln(| sec(x) + tan(x)|) cos(x).

43
Example 3.43. Consider y 00 −4y 0 +4y = 10e2x . The homogeneous problem y 00 −4y 0 +4y = 0
has r2 − 4r + 4 = 0 so r = 2, 2 (a double root). A fundamental set of solutions for the
homogeneous problem is y1 = e2x and y2 = xe2x and the solution yc = c1 e2x + c2 xe2x .

e2x xe2x
W (x) = = e4x .
2x 2x
2e (1 + 2x)e

xe2x 10e2x
Z Z 2x 2x
2x 2x e 10e
yp = −e dx + xe dx.
e4x e4x
xe2x 10e2x
Z Z
dx = 10 x dx = 5x2 .
e4x
Z 2x 2x Z
e 10e
dx = 10 1 dx = 10x
e4x
So we have
yp = −5x2 e2x + 10x2 e2x = 5x2 e2x .

In the next example we compare the use of undetermined coefficients and variation of
parameters.

Example 3.44. Consider y 00 − y = 2x + 4. The homogeneous problem y 00 − y = 0 has


r2 − 1 = 0 so r = −1, 1. A fundamental set of solutions for the homogeneous problem is
y1 = e−x and y2 = ex and the solution yc = c1 e−x + c2 ex .

e−x ex
W (x) = = 2.
−x x
−e e

Z −x
ex (2x + 4)
Z
−x x e (2x + 4)
yp = −e dx + e dx.
2 2
Z x Z
e (2x + 4)
dx = ex (x + 2) dx
2
Z −x Z
e (2x + 4)
dx = e−x (x + 2) dx.
2
We will compute both of these integrals at once using integration by parts. With k = ±1

44
we consider
0
ekx
Z Z 
kx
e (x + 1) dx = (x + 2) dx
k
ekx ekx (x + 2)ekx ekx
Z
= (x + 1) − dx = − 2.
k k k k

So we have

yp = −e−x [(x + 2)ex − ex ] + ex [−(x + 2)e−x − e−x ] = −2(x + 2).

3.6 Euler - Cauchy Equations

So far in this chapter almost all of our work has been applied to constant coefficient
equations. We now turn to a class of problems that are not constant coefficient but can
be handled using those methods after a substitution. We consider the so-called Euler-
Cauchy Equations
ax2 y 00 + bxy 0 + cy = 0 for x 6= 0. (19)

One simple approach to studying these problems is to look for solutions in the form y = xr .
In this case we have y 0 = rxr−1 and y 00 = r(r − 1)xr−2 . Plugging these into the equation
(19) we have

0 = ax2 [r(r − 1)xr−2 ] + bx [rxr−1 ] + c [xr ] = (ar(r − 1) + br + c)xr .

Since x 6= 0 we can divide by x to get something like a “characteristic polynomial”

ar2 + (b − a)r + c = 0 (20)

This equation has roots r1 , r2 just like the constant coefficient case and there are cases:

1. Real distinct roots r1 6= r2 ⇒ (general solution) y = c1 xr1 + c2 xr2

2. Real double root r0 = r1 = r2 ⇒ (general solution) y = c1 xr0 + c2 ln(x)xr0

3. Complet roots r = α±iβ ⇒ (general solution) y = c1 xα cos(β ln(x))+c2 xα sin(β ln(x))

45
Only the first case is obvious. In the case of a double root or complex roots it is per-
haps easier to see the big picture by taking a slightly different approach. Let us consider
a change of variables that will transform the problem (19) to a problem with constant coef-
ficients. We set x = et which is equivalent to ⇒ t = ln(x). Using this change of variables
we have
dy dy dt 1 dy
= = ,
dx dt dx x dt
d2 y 1 d2 y
 
d 1 dy 1 dy
= = − + .
dx2 dx x dt x2 dt x2 dt2
Substituting these expressions into the differential equation (19) we arrive at

d2 y dy
    
2 1 1 dy
ax − + bx + [cy] = 0.
x2 dt2 dt x dt

Notice that all the powers of x cancel and we end up with

d2 y dy
a 2
+ (b − a) + cy = 0.
dt dt

To solve this constant coefficient equation we look for solutions in the form y = ert and
we get characteristic equation ar2 + (b − a)r + c = 0. The general solution is therefore
determined by the discriminant Discriminant: ∆ = (b − a)2 − 4ac. From College Algebra
you may recall there are Three Cases depending on the sign of the discriminant:

A. ∆ > 0 Real distinct roots r1 6= r2 ⇒ (general solution) y = c1 er1 t + c2 er2 t

B. ∆ = 0 Real double root r0 = r1 = r2 ⇒ (general solution) y = c1 er0 t + c2 xer0 t

C. ∆ < 0 Complet roots r = α ± iβ ⇒ (general solution) y = c1 eαt cos(βt) + c2 eαt sin(βt)

But we do not want the answers in terms of t so we must convert these formulas back to
x using x = et (and t = ln(x)). Doing so gives exactly the formulas above in 1., 2. and 3.
In particular
y = c1 er1 t + c2 er2 t = c1 xr1 + c2 xr2 ,

y = c1 er0 t + c2 xer0 t = c1 xr0 + c2 ln(x)xr0

46
and
y = c1 eαt cos(βt) + c2 eαt sin(βt) = c1 xα cos(β ln(x)) + c2 xα sin(β ln(x)).

Example 3.45. Consider x2 y 00 − 2y = 0 which implies a = 1, b = 0 and c = −2 so the


characteristic polynomial is r2 −r −2 = 0 which has roots r = −1, 2 so the general solution
is
y = c1 x2 + c2 x−1 .

Now solve the IVP with y(1) = 6 and y 0 (1) = 3: We have y 0 = 2c1 x − c2 x−2 so

c1 + c2 = 6
2c1 − c2 = 3

so that 3c1 = 9 ⇒ c1 = 3 ⇒ c2 = 3 and we have y = 3x2 + 3x−1 .

Example 3.46. Consider x2 y 00 + xy 0 + 4y = 0 which implies a = 1, b = 1 and c = 4 so the


characteristic polynomial is r2 + 4 = 0 which has roots r = 0 ± 2i so the general solution
is
y = c1 cos(2 ln(x)) + c2 sin(2 ln(x)).

Example 3.47. Consider x2 y 00 − 3xy 0 + 4y = 0 which implies a = 1, b = −3 and c = 4 so


the characteristic polynomial is r2 − 4r + 4 = 0 which has a double root r = 2, 2 so the
general solution is
y = c1 x2 + c2 ln(x) x2 .

Example 3.48. Consider x2 y 00 + 3xy 0 + 2y = 0 which implies a = 1, b = 3 and c = 2 so the


characteristic polynomial is r2 + 2r + 2 = 0 which can be written as

r2 − 2(−1)r + (−1)2 + (1)2 = 0

so it has complex roots with α = −1 and β = 1 so that r = −1 ± i and the general solution
is
y = c1 x−x cos(ln(x)) + c2 x−x sin(ln(x)).

Example 3.49. Suppose we are give x2 y 00 + xy 0 + y = sec(ln(x)). First we consider the


homogeneous problem x2 y 00 + xy 0 + y = 0 so that the auxiliary equation is r2 + 1 = 0

47
so that r = 0 ± i. In this case we can take y1 = cos(ln(x)) and y2 = sin(ln(x)) so the
complementary solution is yc = c1 cos(ln(x))+c2 sin(ln(x)). Next for variation of parameters
we need to write the equation in the correct form by dividing by x2 to obtain

1 1 sec(ln(x))
y 00 + y 0 + 2 y = .
x x x2

In this way we see that f (x) = sec(ln(x))/x2 . Next we compute the Wronskian

cos(ln(x)) sin(ln(x)) cos2 (ln(x)) + sin2 (ln(x)) 1


W (x) = = = .
x x
− sin(ln(x))/x cos(ln(x))/x)

− sin(ln(x)) sec(ln(x)/x2 ) − sin(ln(x))


Z
0 sin(ln(x))
u = = , ⇒ u=− dx = ln(cos(ln(x))).
1/x x cos(ln(x)) x cos(ln(x))
cos(ln(x)) sec(ln(x)/x2 )
Z
1
v0 = = 1/x, ⇒ v= dx = ln(x).
1/x x
So we have
yp = cos(ln(x)) ln(cos(ln(x))) + ln(x) sin(ln(x)).

Example 3.50. Suppose we are give x2 y 00 − xy 0 + y = 2x. First we consider the homoge-
neous problem x2 y 00 − xy 0 + y = 0 so that the auxiliary equation is r2 − 2r + 1 = 0 so that
r = 1, 1. In this case we can take y1 = x and y2 = x ln(x) so the complementary solution
is yc = c1 x + c2 x ln(x). Next for variation of parameters we need to write the equation in
the correct form by dividing by x2 to obtain

1 1 2
y 00 − y 0 + 2 y = .
x x x

In this way we see that f (x) = 2/x. Next we compute the Wronskian

x x ln(x)
W (x) = = x.
1 1 + ln(x)

48
Z Z
x ln(x)(2/x) x(2/x)
yp = −x dx + x ln(x) dx
x x
Z Z
ln(x) dx
= −2x dx + x ln(x)2
x x
( in the first intrgral set u = ln(x) ⇒ du = dx/x)
Z
− 2 u du + 2x(ln(x))2 = −u2 + 2x(ln(x))2 = −x(ln(x))2 + 2x(ln(x))2

= x(ln(x))2

Example 3.51. Suppose we are give x2 y 00 − 3xy 0 + 3y = 2x4 ex with y(1) = −4 and y 0 (1) =
2e1 . First we consider the homogeneous problem x2 y 00 − 3xy 0 + 3y = 0 so that the auxiliary
equation is r2 − 4r + 3 = 0 so that r = 1, 3. In this case we can take y1 = x and y2 = x3 so
the complementary solution is yc = c1 x + c2 x3 . Next for variation of parameters we need
to write the equation in the correct form by dividing by x2 to obtain

3 3
y 00 − y 0 + 2 y = 2x2 ex .
x x

In this way we see that f (x) = 2x2 ex . Next we compute the Wronskian

x x3
W (x) = = 2x3 .
1 3x2

x3 (2x2 ex ) x(2x2 ex )
Z Z
3
yp = −x dx + x dx
2x3 2x3
Z Z
2 x 3
= −x x e dx + x ex dx

= −x(x2 − 2x + 2)ex + x3 ex = (2x2 − 2x)ex ,

R
where above we have applied integration by parts twice to compute x2 ex dx:
Z Z Z
2 x x 0
x e dx = x (e ) dx = x e − 2xex dx
2 2 x

Z  Z 
x 0
= x e − 2 x(e ) dx = x e − 2 xe − e dx = (x2 − 2x + 2)ex
2 x 2 x x x

49
Therefore the general solution is

y = c1 x + c2 x3 + (2x2 − 2x)ex

and so
y 0 = c1 + 3c2 x2 + (2x2 + 2x − 2)ex .

Applying the initial conditions we have

c1 + c2 + 2 = −4 c1 + c2 = −6
or .
c1 + 3c2 + 2e1 = 2e1 c1 + 3c2 = 0

Multiplying the second equation by −1 and adding to the first equation we have

−2c2 = −4 ⇒ c2 = 2. so then c1 = −6.

Therefore the unique solution of the IVP is y = −6x + 2x3 + (2x2 − 2x)ex .

50

You might also like