0% found this document useful (0 votes)
139 views18 pages

University of Zimbabwe: Linear Algebra and Probability For Engineering

This document contains a 3-page chapter summary on differential equations from a linear algebra and probability textbook. The summary covers: 1) An introduction to differential equations, including definitions of ordinary differential equations, order of a differential equation, and linear differential equations. 2) Methods for solving first order differential equations, including separable differential equations and exact equations. 3) Solutions to homogeneous and non-homogeneous linear differential equations, using separating variables, integrating factors, and integrating both sides of the equation. 4) Examples are provided to illustrate each method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views18 pages

University of Zimbabwe: Linear Algebra and Probability For Engineering

This document contains a 3-page chapter summary on differential equations from a linear algebra and probability textbook. The summary covers: 1) An introduction to differential equations, including definitions of ordinary differential equations, order of a differential equation, and linear differential equations. 2) Methods for solving first order differential equations, including separable differential equations and exact equations. 3) Solutions to homogeneous and non-homogeneous linear differential equations, using separating variables, integrating factors, and integrating both sides of the equation. 4) Examples are provided to illustrate each method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

University of Zimbabwe

LINEAR ALGEBRA AND PROBABILITY FOR


ENGINEERING
Chapter 6
Author: Department:
A. Mhlanga Mathematics

May 1, 2019
Chapter 1

Introduction to Differential Equations

A drunkard may not know which number is larger, 2/3 or 3/5, but he knows that 2 bottles of vodka for 3
people is better than 3 bottles of vodka for 5 people.

—Edward Frenkel

Many of the basic laws of the physical sciences, biological and social sciences are formulated in terms
of mathematical equations involving certain known and unknown quantities and their derivatives.
Such equations are called differential equations.

The term general solution will be used for a family of solutions of the differential equation
containing one or more arbitrary constants.

A particular solution will be any solution that is free of arbitrary constants.

A differential equation involving only ordinary derivatives (derivatives of a function of one vari-
able) is called an ordinary differential equation.
Theorem 1.0.1. The order of a differential equation is defined as the order of the highest derivative
appearing in the equation.
Example 1.0.1. The following are differential equations with indicated orders.

dy
1. = ay (first order).
dx
2. x00 (t) − 3x0 (t) + x(t) = cos t (second order).
3
3. (y (4) ) 5 − 2y 00 = cos x (fourth order).

A differential equation is said to be linear if it has the form


dn y dn−1 y dy
p0 (x) n
+ p 1 (x) n−1
+ · · · + pn−1 (x) + pn (x)y = f (x)
dx dx dx
1
where p0 (x), p1 (x), · · · , pn (x) are functions of x only.

A function that satisfies the differential equation when substituted is called a solution of the
equation. Sometimes referred to as the integral of the equation and its graph is called an integral
curve or solution curve.

1.1 First Order Differential Equations

1.1.1 Separable Differential Equations

Solution by Integration

Simplest type of first order differential equation and is of the form


dy
= f (x).
dx
Solved by integrating both sides. This gives
Z
y(x) = f (x) dx = F (x) + c.
Z
dy 1 dx
Example 1.1.1. If = , then y(x) = = tan−1 x + c.
dx 1 + x2 1 + x2

equations of the form


M (x, y)dx + N (x, y)dy = 0
or
dy M (x, y)
=−
dx N (x, y)
are also separable.
dy
Example 1.1.2. Solve = x(1 + y 2 ).
dx

Solution: Dividing by 1 + y 2 and integrating with respect to x, we get


Z   Z Z Z
1 dy dy −1 1 2
dx = x dx = = x dx ⇒ tan y = x +c
y + y 2 dx 1 + y2 2

where c is a constant. Therefore  


1 2
y = tan x +c .
2

2
1.2 Exact Equations

The total differential dg of a function of two variables g(x, y) is defined by


∂g ∂g
dg = dx + dy.
∂x ∂y
Here we use partial derivatives to solve ordinary differential equations.

Given the differential equation


M (x, y)dx + N (x, y)dy = 0. (1.1)
If we can find a functiong(x, y) such that
∂g ∂g
= M, = N,
∂x ∂y
then (1.1) becomes dg = 0. In this case M dx + N dy is said to be an exact differential and (1.1)
is called an exact differential equation.

To determine if a differential equation is exact we use the cross-derivative test.


Theorem 1.2.1. The equation

M (x, y)dx + N (x, y)dy = 0

is exact if and only if


∂M ∂N
= .
∂y ∂x

If M dx + N dy is exact, then we can solve the differential equation (1.1) by finding the function g
above.
Example 1.2.1. Solve the equation

(1 − sin x tan y)dx + (cos x sec2 y)dy = 0.

Solution: Letting M (x, y) = 1 − sin x tan y and N (x, y) = cos x sec2 y, we have
∂M ∂N
= − sin x sec2 y = ,
∂y ∂x
∂g ∂g
so the equation is exact. We now seek a function g of two variables, such that = M and = N,
∂x ∂y
then
Z Z
g(x, y) = M dx = (1 − sin x tan y)dx
= x + cos x tan y + h(y).

3
The constant of integration h(y) is an arbitrary function of y since we must introduce the most
general term that varnish under partial differentiation with respect to x. But
∂g
cos x sec2 y = N (x, y) = = cos x sec2 y + h0 (y).
∂y
This means h0 (y = 0) so h(y) = k, a constant. The general solution is

g(x, y) = x + cos x tan y + k or x + cos x tan y = k1 .

A first-order linear equation has the form


dy
+ a(x)y = f (x).
dx
If f (x) is the zero function, the linear differential equation is said to be homogeneous, otherwise
we say it is non-homogeneous.

dy
1.3 Solution of the Equation + a(x)y = 0.
dx

Separating variables, we have Z Z


dy
=− a(x)dx + c.
y
Integrating, we have Z
ln |y| = − a(x)dx + c

and R
y = c1 e− a(x)dx
.
Example 1.3.1. Solve the homogeneous differential equation

y 0 + 3y = 0.

Solution: Rewriting the equation as y 0 = −3y, and separating variables, we have


Z Z
dy
= −3 dx + c
y
ln |y| = −3x + c
y = c1 e−3x .

We want to use the integrating factor to obtain the solution of the non-homogeneous linear equation
dy
+ a(x)y = f (x).
dx

4
Example 1.3.2. Solve the equation y 0 = y + x2 .

Solution: Rewriting the equation as


y 0 − y = x2 , (1.2)
R
we see that a(x) = −1, thus the integrating factor is e dx = e−x . Multiplying both sides of (1.2) by
e−x , we get
e−x (y 0 − y) = x2 e−x
or
d
ye−x = x2 e−x .

dx
Integrating both sides, we get
Z
−x
ye = x2 e−x dx + c

= c − (x2 + 2x + 2)e−x
y = ce−x − (x2 + 2x + 2).
 
dy
Example 1.3.3. Solve x + 4y = x6 .
dx

Solution: Dividing by x, we have  


dy 4
+ y = x5 .
dx x
Z Z
4 4 R 4
Hence a(x) = and so a(x)dx = dx = 4 ln x = ln x4 . Thus e a(x)dx = eln x = x4 .
x x
Multiplying by x4 , we get
 
4 dy d
+ 4x3 y = x9 , or x4 y = x9 .

x
dx dx
x10
Integrating, we have x4 y = + c. Hence
10
x6 c
+ 4.
y=
10 x
Exercise 1.3.1. Find the general solution of the following equations.
(a) 3xy 0 − y = ln x + 1 (b) (sin x)y 0 + (cos x)y = 0 (c) (3x2 + 1)y 0 − 2xy = 6x
√ dy
(d) (x2 + 1)y 0 + xy = (1 − 2x) x2 + 1 (e) x sin x + (sin x + x cos x)y = xex
dx
dy dy
(f ) sin x cos x + y = tan2 x (g) (1 + sin x) + 2(cos x)y = tan x.
dx dx

1.4 The Bernoulli Equation

Definition 1.4.1. A Bernoulli equation is the equation of the form


dy
+ a(x)y = f (x)y n , n 6= 0, 1. (1.3)
dx

5
When n = 0, 1 the Bernoulli equation becomes a linear equation.

Set z = y 1−n . Then z 0 = (1 − n)y −n y 0 . So if we multiply both sides of equation (1.3) by (1 − n)y −n ,
we obtain
(1 − n)y −n y 0 + (1 − n)a(x)y 1−n = (1 − n)f (x)
or
dz
+ (1 − n)a(x)z = (1 − n)f (x).
dx
This equation is now linear and can be solved as before.

Example 1.4.1. Solve


dy y 5
− = − x2 y 3 .
dx x 2

Solution: Here n = 3 so let z = y −2 . Let z 0 = −2y −3 y 0 and multiply both sides of the equation by
−2y −3 to obtain
2
−2y −3 y 0 + y −2 = 5x2
x
or
2z
z0 + = 5x2 . (1.4)
x
dx 2
R
The integrating factor for this linear equation is e2 x = e2 ln x = eln x = x2 . Multiplying both sides
of equation (1.4) by x2 , we have x2 z 0 + 2xz = 5x4 or (x2 z)0 = 5x4 . Thus
Z
x z = 5 x4 dx + c = x5 + c.
2

Hence
1
y −2 = z = x3 + cx−2 or y = (x3 + cx−2 )− 2 .

1.5 Initial Value Problems (IVPs)

If we interested in solving a first order differential equation


dy
= f (x, y)
dx
subject to the condition y = y0 when x = x0 or y(x0 ) = y0 .

This is an example of an initial value problem and the condition y(x0 ) = y0 is called an initial
condition and x0 is called the initial point.
dy
Example 1.5.1. (a) = 2y − 3x, y(0) = 2. (x = 0 is the initial point)
dx
(b) x00 (t) + 5x0 (t) + sin x(t) = 0, x(1) = 0, x0 (1) = 7. (t = 1 is the initial point)

6
1.6 Boundary Value Problems (BVPs)

A boundary value problem consists of a differential equation and a collection of values that must
be satisfied by the solution of the differential equation or its derivatives.
d2 y
Example 1.6.1. (a) + 5xy = cos x, y(0) = 0, y 0 (1) = 2.
dx2
dy
(b) + 5xy = 0, y(0)y(1) = 2.
dx

1.7 Second and Higher Order Differential Equations

The most general second order linear equation can be written as

y 00 (x) + a(x)y 0 (x) + b(x)y(x) = f (x) (1.5)

where a(x), b(x) and f (x) are functions of the independent variable x only.

If the function f (x) is identically zero, we say equation (1.5) is homogeneous, otherwise it is
non-homogeneous.

Example 1.7.1. (a) y 00 + 2xy 0 + 3y = 0 is homogeneous.

(b) y 00 + 2xy 0 + 3y = ex is non-homogeneous.

If the coefficient functions a(x) and b(x) are constants, a(x) = a and b(x) = b, the equation is said
to have constant coefficients. If either a(x) or b(x) is not constant, the equation is said to have
variable coefficients.

Example 1.7.2. (a) y 00 + 3y 0 − 10y = 0 has constant coefficients.

(b) y 00 + 3xy 0 + 10x2 y = 0 has variable coefficients.

1.7.1 Linear Combination and Linear Independence

Definition 1.7.1. Let y1 and y2 be any two functions. By a linear combination of y1 and y2 we
mean a function y(x) that can be written in the form

y(x) = c1 y1 (x) + c2 y2 (x)

for some constants c1 and c2 .

7
Definition 1.7.2. Two functions are linearly independent whenever the relation

c1 y1 (x) + c2 y2 (x) = 0,

for all x, implies that c1 = c2 = 0. Otherwise they are linearly dependent.

Example 1.7.3. Verify that the functions y1 = 1 and y2 = x are linearly independent.

To determine linear independence, we consider

c1 y1 + c2 y2 = c1 · 1 + c2 · x = 0.

If x = 0, we have c1 · 1 + c2 · 0 = c1 = 0. If x = 1 we get c2 = 0. Hence c1 = c2 = 0. This proves


that y1 = 1 and y2 = x are linearly independent.

If you have a collection of functions y1 (x), y2 (x), · · · , yn (x). A linear combination of these functions
is any function of the form

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

where c1 , c2 , · · · , cn are constants. We shall say that the collection of functions y1 (x), y2 (x), · · · , yn (x)
are linearly independent if the equation

c1 y1 (x) + c2 y2 (x) + · · · + cn yn (x)n = 0,

when c1 = c2 = · · · = cn = 0.

Theorem 1.7.1. Every homogeneous linear second order differential equation

y 00 + a(x)y 0 + b(x)y = 0

has two linearly independent solutions.

Theorem 1.7.2. Let y1 (x) and y2 (x) be any two solutions of the homogeneous equation

y 00 + a(x)y 0 + b(x)y = 0.

Then, any linear combination of them is also a solution of the differential equation.

1.7.2 The General Solution to a Linear Second Order Equation

The general solution of (1.5) is given by the linear combination

y(x) = c1 y1 (x) + c2 y2 (x)

where c1 and c2 are arbitrary constants and y1 (x) and y2 (x) are linearly independent solutions of
(1.5).

8
1.8 The Wronskian

Definition 1.8.1. Let y1 (x) and y2 (x) be any two solutions to the differential equation

y 00 + a(x)y 0 + b(x)y = 0.

The Wronskian of y1 and y2 is defined as



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

The Wronskian is defined at all points a at whichy1 (x) and y2 (x) are differentiable.

Theorem 1.8.1. Two solutions y1 (x) and y2 (x) of (1.5) are linearly independent if and only if
W (y1 , y2 ) 6= 0.

Example 1.8.1. We see that y1 (x) = sin x and y2 (x) = cos x are solutions of y 00 + y = 0. Using
the Wronskian
sin x cos x
W (y1 , y2 ) = = − sin2 x − cos2 x = −1 6= 0.
cos x − sin x
The functions y1 (x) = sin x and y2 (x) = cos x are linearly independent.

Example 1.8.2. Verify that y1 (x) = e−5x and y2 (x) = e2x are linearly independent solutions of the
differential equation
y 00 + 3y 0 − 10y = 0.

Solution: −5x
e e2x
W (y1 , y2 ) =
= 2e−3x + 5e−3x = 7e−3x 6= 0.
−5e−5x 2e2x
So the solutions are linearly independent.

1.8.1 Using One Solution to find Another : Reduction of Order

It is easy to write down the general solution of the homogeneous equation

y 00 + a(x)y 0 + b(x)y = 0 (1.6)

provided we know two linearly independent solutions y1 and y2 of equation (1.6). The general
solution is then given by
y = c1 y1 + c2 y2
where c1 and c2 are arbitrary constants.

A procedure exists for finding y2 when y1 is known.

9
We assume that y1 is a non-zero solution of (1.6) and seek another solution y2 such that y1 and y2
are linearly independent. Since, y1 and y2 are linearly independent, y2 6= ky1 , for any constant k.
y2
So = v(x) must be a non constant function of x and y2 = vy1 must satisfy (1.6). Thus
y1
(vy1 )00 + a(vy1 )0 + b(vy1 ) = 0.

But
(vy1 )0 = vy10 + v 0 y1
and
(vy1 )00 = (vy10 + v 0 y1 )0 = vy100 + v 0 y10 + v 00 y10 + v 00 y1 = vy100 + 2v 0 y10 + v 00 y1 .
Then
(vy100 + 2v 0 y10 + v 00 y1 ) + a(vy1 + v 0 y1 ) + bvy1 = 0
or
v(y100 + ay1 + by1 ) + v 0 (2y10 + ay1 ) + v 00 y1 = 0.
The first term vanishes, since y1 is a solution of (1.6), so we obtain

v 00 y1 + v 0 (2y10 + ay1 ) = 0.

Dividing by v 0 y1 ,
v 00 2y10
= − − a.
v0 y1
Let z = v 0 , then z 0 = v 00 and
z0 2y 0
= − 1 − a,
z y1
which is a separable first order equation. Thus we have reduced the order of our equation.
Integrating with respect to x to obtain
Z
ln z = −2 ln y1 − a(x)dx.

Exponentiating, we have
R 1 − R a(x)dx
z = eln z = e−2 ln y1 − a(x)dx
= e .
y12
But since z = v 0 ,
1 − R a(x)dx
v0 = e .
y12
To find v, we perform another integration and obtain
Z − R a(x)dx
e
y2 = y1 v = y1 (x) dx.
y12 (x)
Example 1.8.3. Note that y1 = x is a solution of

x2 y 00 − xy 0 + y = 0, x > 0. (1.7)

Find the general solution.

10
Solution: Setting y2 = y1 v = xv(x), it follows that

y20 = xv 0 + v, y200 = xv 00 + 2v 0 and (1.7)

becomes
x2 (xv 00 + 2v 0 ) − x(xv 0 + v) + (xv) = 0 or x3 v 00 + x2 v 0 = 0.
Setting z = v 0 and separating variables, we have
dz dx
=− or ln |z| = − ln x,
z x
and from exponentiation,
1
v0 = z =.
x
Thus, v(x) = ln x, so y2 = y1 v = x ln x and the general solution of (1.7) is

y = c1 x + c2 x ln x, x > 0.

1.9 Homogeneous Equations with Constant Coefficients

1.9.1 Case 1: Real Roots

Linear homogeneous equation with constant coefficients is

y 00 + ay 0 + by = 0. (1.8)

Let a solution of (1.8) be of the form y(x) = eλx for some number λ (real or complex), then y 0 = λeλx
and y 00 = λ2 eλx , so that (1.8) yields

λ2 eλx + aλeλx + beλx = 0.

Since eλx 6= 0, we obtain


λ2 + aλ + b = 0, (1.9)
where a and b are real numbers. Equation (1.9) is called the characteristic equation of the
differential equation (1.8).

We need to obtain two linearly independent solutions. Equation (1.9) has the two roots
√ √
−a + a2 − 4b −a − a2 − 4b
λ1 = and λ2 = .
2 2
Three possibilities arise, a2 − 4b > 0, a2 − 4b = 0 and a2 − 4b < 0.

11
Roots Real and Unequal

If a2 − 4b > 0, then λ1 and λ2 are distinct real numbers, given by y1 = eλ1 x and y2 = eλ2 x are
distinct solutions.

Theorem 1.9.1. If a2 − 4b > 0, then the roots of the characteristic equation are real and unequal
and the general solution to the equation (1.8) is given by

y(x) = c1 eλ1 x + c2 eλ2 x

where c1 and c2 are arbitrary constants and λ1 and λ2 are the real roots of (1.9).

Example 1.9.1. Solve the equation

y 00 + 3y 0 − 10y = 0.

Solution: The characteristic equation is λ2 + 3λ − 10 = 0 and a2 − 4b = 49 and the roots are


λ1 = 2 and λ2 = −5. The general solution is

y(x) = c1 e2x + c2 e−5x .

If we specify the initial conditions y(0) = 1 and y 0 (0) = 3, for example, differentiating and substi-
tuting x = 0, we obtain the simultaneous equations

c1 + c2 = 1
2c1 − 5c2 = 3
8 1
which have the unique solution c1 = and c2 = − . The unique solution to the initial value
7 7
problem is therefore
1
y(x) = (8e2x − e−5x ).
7

Roots Real and Equal

a ax
Suppose a2 − 4b = 0. We have the double root λ1 = λ2 = − . Thus y1 (x) = e− 2 is a solution. To
2
find the second solution y2 , we use reduction of order to get
Z −ax
e
y2 (x) = y1 (x) dx
y12
e−ax
Z Z −ax
− ax − ax e
= e 2 − ax
dx = e 2 dx
(e 2 )2 e−ax
Z
− ax ax
= e 2 dx = xe− 2 .

12
Theorem 1.9.2. If a2 − 4b = 0, then the roots of the characteristic equation are equal and the
general solution is given by
ax ax
y(x) = c1 e− 2 + c2 xe− 2
where c1 and c2 are arbitrary constants.

Example 1.9.2. Solve the equation

y 00 − 6y 0 + 9y = 0.

Solution: The characteristic equation is λ2 − 6λ + 9 = 0 and a2 − 4b = 0, yielding the unique


a
double root, λ1 = − = 3. The general solution is
2
y(x) = c1 e3x + c2 xe3x .

If we use the initial conditions y(0) = 1 and y 0 (0) = 7, we obtain the simultaneous equations

c1 = 1, 3c1 + c2 = 7 ⇒ c2 = 4.

Then the solution for this initial value problem is

y(x) = e3x + 4xe3x = e3x (1 + 4x).

Complex Conjugate Roots

We have from Eulers’ formula


eiβx = cos βx + i sin βx.
Suppose a2 − 4b < 0. The roots of the characteristic equation are

λ1 = α + iβ, λ2 = α − iβ.

Theorem 1.9.3. If a2 − 4b < 0, then the characteristic equation has complex conjugate roots and
the general solution is given by

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

Example 1.9.3. Solve y 00 + y = 0.

Solution: The characteristic equation is λ2 + 1 = 0, with roots ±i. We have α = 0 and β = 1, so


the general solution is
y(x) = c1 cos x + c2 sin x.

13
1.10 Non-Homogeneous Equations

Definition 1.10.1. A solution yp is a particular solution or particular integral of a differ-


ential equation if yp has no arbitrary parameters or constants.

Let y 00 + ay 0 + by = f (x) be a non-homogeneous linear differential equation. Then y 00 + ay 0 + by = 0


is the associated homogeneous linear differential equation.

Theorem 1.10.1. Let yp be any particular solution of a non-homogeneous differential equation


and let {y1 , y2 , · · · , yn } be a fundamental set of solutions of the associated homogeneous differential
equation. Then,the general solution of the non-homogeneous equation is

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

where ci , i = 1, 2, . . . , n are arbitrary constants.

The part c1 y1 + c2 y2 + · · · + cn yn is called the complementary function. So, in general, the


solution of a non-homogeneous linear differential equation is

y(x) = complementary solution + any particular solution.

The method of undetermined coefficients is used to find particular solutions to a given non-
homogeneous linear second order differential equation, either having

(a) a polynomial including constants.

(b) a constant multiplied by the sine and cosine function and their linear combination.

(c) exponential functions.

(d) linear combination of functions in (a),(b) and (c).

f (x) Appropriate form of yp


1 or any constant A
ax + b Ax + B
2
ax + bx + c Ax2 + bx + C
sin kx A sin kx + B cos kx
cos kx A sin kx + B cos kx
aekx Aekx
(ax + b)ekx (Ax + B)ekx
x2 ekx (Ax2 + Bx + C)ekx
kx
e sin mx Ae sin mx + Bekx cos mx
kx

14
Example 1.10.1. Solve the following equation

y 00 − y = x2

Solution: Here f (x) = x2 is a polynomial of degree two, so yp is also a polynomial of degree two.
We try a general polynomial of degree two, say yp (x) = a + bx + cx2 , then yp0 (x) = b + 2cx and
yp00 (x) = 2c. Substituting, we obtain

2c − (a + bx + cx2 ) = x2 .

Equating coefficients

coef f icients of constant term : 2c − a = 0


of x : −b = 0
of x2 : −c = 1,

which yields a = −2, b = 0 and c = −1 and the particular solution is

yp (x) = −2 − x2 .

General solution of the homogeneous equation y 00 − y = 0 is given by y = c1 ex + c2 e−x and the


general solution of the non-homogeneous equation is

y = c1 ex + c2 e−x − 2 − x2 .

Example 1.10.2. Solve


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

Solution: The particular solution is of the form yp (x) = aex sin x + bex cos x, then
yp0 = (a − b)ex sin x + (a + b)ex cos x and yp00 = 2aex cos x − 2bex sin x. Substituting, we have

ex (2a cos x − 2b sin x) − 3ex [(a − b) sin x + (a + b) cos x] + 2ex (a sin x + b cos x) = ex sin x.

Dividing both sides by ex and equating the coefficients of sin x and cos x, we have

2a − 3(a + b) + 2b = 0
−2b − 3(a − b) + 2a = 1
1 1
which yields a = − and b = , so that
2 2
ex
yp = (cos x − sin x).
2
Finally, the general solution is
ex
y = c1 e2x + c2 ex + (cos x − sin x).
2

15
Example 1.10.3. Solve
y 00 + y = xe2x .

Solution: The particular solution is of the form yp (x) = e2x (a + bx), then yp0 (x) = e2x (2a + b + 2bx)
and yp00 (x) = e2x (4a + 4b + 4bx) and substituting yields

e2x (4a + 4b + 4bx) + e2x (a + bx) = xe2x .

Dividing both sides by e2x and equating like powers, we have

5a + 4b = 0, 5b = 1.
4 1
Thus a = − , b = and a particular solution is
25 5
e2x
yp (x) = (5x − 4).
25
Therefore the general solution is

e2x
y(x) = c1 sin x + c2 cos x + (5x − 4).
25
Example 1.10.4. Find the solution to the equation

y 00 − y = 2ex .

Solution: The general solution of y 00 − y = 0 is

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

Then yp = Axex , and yp0 = Aex (x + 1), yp00 = Aex (x + 2) and substituting, we have

yp00 − yp = Aex (x + 2) − Axex = 2Aex = 2ex .

Here A = 1 and yp = xex . Thus, the general solution is

y(x) = c1 ex + c2 e−x + xex .

Given the homogeneous equation


y 00 + ay 0 + by = 0. (1.10)
If any term of the guessed solution yp (x) is a solution of the homogeneous equation (1.10), multiply
yp (x) by x repeatedly until no term of the product xk yp (x) is a solution of (1.10). Then use the
product xk yp (x) to solve the equation

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

16
Example 1.10.5. Find the solution to

y 00 + y = cos x

that satisfies y(0) = 2 andy 0 (0) = −3.

Solution: The general solution to y 00 + y = 0 is y = c1 cos x + c2 sin x. Since y = cos x is a solution.


Ordinarily we would guess a solution of the form

yp = A cos x + B sin x.

Instead we multiply by x and try a solution of the form

yp = Ax cos x + Bx sin x.

Note no terms of yp is a solution of y 00 + y = 0. Then yp0 = A cos x − Ax sin x + B sin x + Bx cos x


and

cos x = yp00 +yp = (−2A sin x−Ax cos x+2B cos x−Bx sin x)+(Ax cos x+Bx sin x) = −2A sin x+2B cos x.

1 1
Therefore −2A = 0, 2B = 1 ⇒ b = and yp = x sin x. The general solution is
2 2
1
y = c1 cos x + c2 sin x + x sin x.
2
We have
1 1
y 0 = −c1 sin x + c2 cos x + x cos x + sin x.
2 2
0
Then y(0) = c1 = 2 and y (0) = c2 = −3, which yields the unique solution
1
y(x) = 2 cos x − 3 sin x + x sin x.
2
Example 1.10.6. Find the general solution of

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

Solution: The homogeneous equation y 00 − 4y 0 + 4y = 0 has the independent solutions e2x and
xe2x . Multiplying e2x by x twice, we look for a particular solution of the form yp = ax2 e2x . Then
yp0 = ae2x (2x2 + 2x) and yp00 = ae2x (4x2 + 8x + 2), so

yp00 − 4yp0 + 4yp = ae2x (4x2 + 8x + 2 − 8x2 − 8x + 4x2 ) = 2ae2x = e2x

1 1
or 2a = 1 and a = . Thus yp = x2 e2x and the general solution is
2 2
 
2x 2x 1 2 2x 2x 1 2
y(x) = c1 e + c2 xe + x e = e c1 + c2 x + x .
2 2

17

You might also like