Chapter 3 Lecture Notes
Chapter 3 Lecture Notes
3 Introduction
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
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
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.
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
2. The functions x, |x| are linearly independent on R = (−∞, ∞) but not on the interval
(0, ∞).
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.
y1 y2 ··· yn
y10 y20 ··· yn0
W = W (y1 , y2 , · · · , yn ) = .. .. .. .. (2)
. . . .
(n−1) (n−1) (n−1)
y1 y2 ··· yn
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.
y1 y2
W = W (y1 , y2 ) = = y1 y20 − y2 y10 .
y10 y20
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
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
(1 + x) x x2
W = 1 1 2x = 2((1 + x) − x) = 2 6= 0.
0 0 2
x x2 (4x − 3x2 )
W = 1 2x (4 − 6x) = 0.
0 2 −6
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
5
Further, if y1 , y2 , · · · , yn is a fundamental set then the General Solution is given by
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
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
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.
3 = y(1) = c1 + c2 0 = c1
1 = y 0 (1) = c1 + c2 = c1 + c2
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).
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
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 .
yc = a cos(x) + b sin(x)
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
or
a = −1, b = 1
8
So the unique solution to the IVP is
y = − cos(x) + sin(x) + x2 − 1.
y 00 − y = 1 − 2x − x2 , y(0) = 1, y 0 (0) = 4.
yc = aex + be−x
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.
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.
y 00 − 4y 0 + 4y = 4x + 4, y(0) = 0, y 0 (0) = 0.
yc = ae2x + bxe2x
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
a + 2 = 0 and 2a + b + 1 = 0
or
a = −2, 2a + b + 1 = 0
y = −2e2x + 3xe2x + x + 2.
10
3.2 Reduction of Order
i.e.,
y100 + p(x)y10 + q(x)y1 = 0, (4)
y20 = v 0 y1 + vy10 ,
00
v y1 + 2v 0 y10 + vy100 + p(x) v 0 y1 + vy10 + q(x) vy1 = 0.
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
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.
y 00 − 4y 0 + 4y = 0.
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
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
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
−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)
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))
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
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
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
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
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)
17
and since e
c1 and e
c2 are arbitrary constants then so also are c1 and c2 .
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.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).
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
d
We can introduce the notation D = and write the above equation as
dx
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
y = c1 + c2 x + · · · + ck x(k−1) erx
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
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.
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).
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
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
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
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 .
Example 3.26. Consider 16y (4) +24y 00 +9y = 0 with auxiliary polynomial 16r4 +24r2 +9 = 0.
We can write this as follows
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 .
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
23
and
y 000 = 8c1 sin(2x) − 8c2 cos(2x) + 27c3 sin(3x) − 27c4 cos(3x).
c1 + 0c2 + c3 + 0c4 = 0
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
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.
Next we need
c1 + c2 = 0
c1 − c2 + c3 = 3
c1 − 2c3 = −1
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
and
y 000 = 27c1 sin(3x) − 27c2 cos(3x) − 27c3 e−3x + 27c4 e3x .
c1 + 0c2 + c3 + c4 = 2
This simplifies to
c1 + c3 + c4 = 2
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
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
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
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 00 = [c2 + c1 + c2 + c2 x]ex + (c3 + c4 )ex (cos(x) − sin(x)) + (−c3 + c4 )ex (sin(x) + cos(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).
c1 + c3 = 2
c1 + c2 + c3 + c4 = 0
c1 + 2c2 + 2c4 = −3
28
c1 + 3c2 − 2c3 + 2c4 = −6
Non-Homogeneous Problem:
We now turn to the hardest part of Chapter 3, finding the general solution to the non-
homogeneous problem:
29
with the Characteristic Polynomial
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).
BOX 1:
ay 00 + by 0 + cy = p(x)er0 x ⇒ yp = xs (Am xm + · · · + A1 x + A0 )er0 x
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)
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
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
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
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)
3. y 00 − 4y 0 + 3y = x2 + x − 1 + sin(x) ⇒
(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).
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.
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.
y = yc + yp = c1 e−x + c2 e−2x + 3.
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.
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.
y = yc + yp = c1 + c2 ex − 2x2 − 4x.
34
Example 3.35.
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.
(−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 = 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).
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
6Ax = 18x ⇒ A = 3.
2A + 3B = 0 ⇒ B = −2.
(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
36
so that yp2 = 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.
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 .
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.
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.
0 − 2A + 2(Ax + B) = 2x.
y = yc + yp = c1 ex cos(x) + c2 ex sin(x) + x + 1.
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
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
Suppose that y1 and y2 form a fundamental set for the homogenous problem
y 00 + p(x)y 0 + q(x)y = 0
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:
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)
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
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
cos(x) sin(x)
W (x) = = cos2 (x) + sin2 (x) = 1.
− sin(x) cos(x)
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
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
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
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
Z Z
cos(x) tan(x)
dx = sin(x) dx = − cos(x).
1
So we have
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.
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
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
This equation has roots r1 , r2 just like the constant coefficient case and there are cases:
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
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:
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 ,
46
and
y = c1 eαt cos(βt) + c2 eαt sin(βt) = c1 xα cos(β ln(x)) + c2 xα sin(β ln(x)).
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 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)).
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
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
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 .
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
Therefore the unique solution of the IVP is y = −6x + 2x3 + (2x2 − 2x)ex .
50