0% found this document useful (0 votes)
147 views72 pages

Second Order ODE

Uploaded by

Sumukh Kini
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)
147 views72 pages

Second Order ODE

Uploaded by

Sumukh Kini
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/ 72

Second Order Ordinary Differential

Equation

Second Order Ordinary Differential Equation 1 / 61


A second-order ODE is called linear if it can be written as
′′ ′
y + p(x)y + q(x)y = r (x) (1)

and nonlinear otherwise. The functions p and q are called


coefficients of the ODEs.
Features of (1) is that it is linear in y and its derivatives,
whereas the function p, q and r maybe any function of x.
′′
If the equation have f (x)y then divide by f (x) to reduce it to
standard form (1).
If r (x) ≡ 0( read as r (x) is identically zero i.e, r (x) = 0 for all
x) then (1) reduces to
′′ ′
y + p(x)y + q(x)y = 0 (2)

and is called homogeneous.


Second Order Ordinary Differential Equation 2 / 61
If r (x) ̸≡ 0 then it is called nonhomogeneous.
An example of a nonhomogeneous linear ODE is
′′
y + 25 = e −x cos x and a homogeneous linear ODE is
′′ ′ ′′ 1 ′
xy + y + xy = 0 an be written as y + y + y = 0
x
Example for nonlinear ODE is
′′ ′2
y y +y =0

A function h(x) is called a solution of a (linear or nonlinear)


second-order ODE on some open interval I if h is defined and
twice differentiable throughout that interval and is such that the
ODE becomes an identity if we replace the unknown y by h, the
′ ′ ′′ ′′
derivative y by h and the second derivative y by h .

Second Order Ordinary Differential Equation 3 / 61


Homogeneous Linear ODEs:Superposition Principle

Example
Verify that y = cos x and y = sin x are solutions of the homogeneous
linear ODE
′′
y +y =0

for all x.

Second Order Ordinary Differential Equation 4 / 61


Homogeneous Linear ODEs:Superposition Principle

Example
Verify that y = cos x and y = sin x are solutions of the homogeneous
linear ODE
′′
y +y =0

for all x.

The superposition principle or linearity principle states that


if y1 and y2 are solutions of a homogeneous linear ODE then so
is their linear combination c1 y1 + c2 y2 where c1 and c2 are
arbitrary constants.

Second Order Ordinary Differential Equation 4 / 61


Theorem
Fundamental Theorem for the Homogeneous Linear ODE
For a homogeneous linear ODE
′′ ′
y + p(x)y + q(x)y = 0, (3)

any linear combination of two solution on an open interval I is again


a solution of (3) on I . In particular, for such an equation, sums and
constant multiples of solutions are again solutions.

Second Order Ordinary Differential Equation 5 / 61


Proof: Let y1 and y2 be solutions of
′′ ′
y + p(x)y + q(x)y = 0, (4)

on I . Then substitute y = c1 y1 + c2 y2 and its derivatives into (4) and


′ ′ ′
using the rule (c1 y1 + c2 y2 ) = c1 y1 + c2 y2

′′ ′ ′′ ′
y + p(x)y + q(x)y = (c1 y1 + c2 y2 ) + p(c1 y1 + c2 y2 )
+ q(c1 y1 + c2 y2 )
′′ ′′ ′ ′
= c1 y1 + c2 y2 + p(c1 y1 + c2 y2 ) + q(c1 y1 + c2 y2 )
′′ ′ ′′ ′
= c1 (y1 + py1 + qy1 ) + c2 (y2 + py2 + qy2 )
= 0 Since y1 and y2 are solutions, by assumption

Hence y is a solution of (4).

Second Order Ordinary Differential Equation 6 / 61


Note: This holds for homogeneous linear ODEs but not for
nonhomogeneous linear or nonlinear ODEs.

Example: The functions y = 1 + cos x and y = 1 + sin x are


′′
solutions of the nonhomogegeneous linear ODE y + y = 1 but their
sum is not a solution. Neither is, for instance, 2(1 + cos x) or
5(1 + sin x).

Second Order Ordinary Differential Equation 7 / 61


Initial Value Problem: Basis. General Solution
For a second-order homogeneous linear ODE (3), an initial value
problem consists of Equation (3) and two initial conditions

y (x0 ) = K0 , y (x0 ) = K1 (5)
These conditions prescribe given values K0 and K1 of the solution
and its first derivative at the same given x = x0 in the given interval
considered.
The conditions (5) are used to determine the two arbitrary constants
c1 and c2 in the general solution y of the ODE.
y = c1 y 1 + c2 y 2 (6)
Here y1 and y2 are suitable solutions of the ODE. This result is a
unique solution, passing through the point (x0 , K0 ) with K1 as the
tangent direction (the slope) at that point. That solution is called a
particular solution of the ODE.
Second Order Ordinary Differential Equation 8 / 61
Solve the initial value problem
′′ ′
y + y = 0, y (0) = 3 y (0) = −0.5

Second Order Ordinary Differential Equation 9 / 61


Solve the initial value problem
′′ ′
y + y = 0, y (0) = 3 y (0) = −0.5

Solution: Step 1 General solutionThe function cos x and sin x are


solutions of the ODE. Let

y = c1 cos x + c2 sin x

This is the general solution.



Step 2 Particular solution. The derivative y = −c1 sin x + c2 cos x.
Using the initial condition, since cos 0 = 1 and sin 0 = 0

y (0) = c1 = 3 and y (0) = c2 = −0.5

The particular solution of this initial value problem is

y = 3 cos x − 0.5 sin x


Second Order Ordinary Differential Equation 9 / 61
General Solution, Basis and Particular Solution
A general solution of an ODE
′′ ′
y + p(x)y + q(x)y = 0 (A)

on an open interval I is a solution

y = c1 y1 + c2 y2 (B)

in which y1 and y2 are solutions of (A) on I that are not proportional,


and c1 and c2 are arbitrary constants. These y1 and y2 are called a
basis(or a fundamental system) of solutions of (A) on I .
A particular solution of (A) on I is obtained if specific values are
assigned to c1 and c2 in (B).

Second Order Ordinary Differential Equation 10 / 61


y1 and y2 are proportional on I if for all x on I , if
y1 = ky2 y2 = ly1
where k and l are numbers, zero or not.
Two functions y1 and y2 are called linearly independent on an
interval I where they are defined if
k1 y1 (x)+k2 y2 (x) = 0 everywhere on I implies k1 = 0 and k2 = 0.
(7)
y1 and y2 are called linearly dependent on I if (7) also holds for
some constants k1 , k2 not both zero. Then if k1 ̸= 0 or k2 ̸= 0,
we can divide and see that y1 and y2 are proportional,
k2 k1
y1 = − y2 or y2 = − y1
k1 k2
In the case of linear independence, these functions are not
proportional because then we cannot divide in (7)
Second Order Ordinary Differential Equation 11 / 61
Basis Reformulated
A basis of a solution of (3) on an open interval I is a pair of linearly
independent solutions of (3) on I .

Example
′′
cos x and sin x form a basis of solutions od the ODE y + y = 0 for
all x because their quotient is cot x ̸= constant(or tan x ̸= constant).
Hence y = c1 cos x + c2 sin x is a general solution. The solution
y = 3.0 cos x − 0.5 sin x of the initial value problem is a particular
solution.

Second Order Ordinary Differential Equation 12 / 61


Find a Basis if One Solution is Known. Reduction of Order
If one solution can be found in some way then a second linearly
independent solution can be obtained by solving a first-order
ODE.
This is called the method of reduction of order.

Second Order Ordinary Differential Equation 13 / 61


Find a basis of solutions of the ODE
′′ ′
(x 2 − x)y − xy + y = 0

Second Order Ordinary Differential Equation 14 / 61


Find a basis of solutions of the ODE
′′ ′
(x 2 − x)y − xy + y = 0

By inspection, y1 = x is a solution of the given ODE.


Substitute
′ ′ ′′ ′′ ′
y = uy1 = ux, y = u x + u, y = u x + 2u
Then the ODE becomes
′′ ′ ′
(x 2 − x)(u + 2u ) − x(u x + u) + ux = 0

ux and −xu cancel and then divide by x and simplify,

′′ ′ ′ ′′ ′
(x 2 − x)(u x + 2u ) − x 2 u = 0, (x 2 − x)u + (x − 2)u = 0

Second Order Ordinary Differential Equation 14 / 61



This ODE is of first order in v = u , namely

(x 2 − x)v + (x − 2)v = 0.
Separation of variables and integration gives

dv x −2 1 2
=− 2 dx = ( − )dx (8)
v x −x x −1 x

ln|v | = ln|x − 1| − 2ln|x|


|x − 1|
= ln
x2
We need no constant of integration because we want to obtain a
particular solution. Similarly, for this integration, by taking exponents
and integrating them again, we obtain
Second Order Ordinary Differential Equation 15 / 61
x −1 1 1
v= = −
x2 x x2
Z
1
u= vdx = ln|x| + .
x
Hence y2 = ux = xln|x| + 1.

Since y1 = x and y2 = x ln|x| + 1 are linearly independent, we


obtained a basis of solution, valid for all positive x.

Second Order Ordinary Differential Equation 16 / 61


Homogeneous Linear ODEs with Constant
Coefficients

Consider the second-order homogeneous linear ODEs whose


coefficients a and b are constants,
′′ ′
y + ay + by = 0 (9)

The solution of the first-order linear ODE with a constant coefficient



k, y + ky = 0 is an exponential function y = ce −kx .

So we’ll try y = e λx as a solution of the ODE (9). Substituting


′ ′′
y = e λx , y = λe λx and y = λ2 e λx in (9)

Second Order Ordinary Differential Equation 17 / 61


we obtain,

(λ2 + aλ + b)e λx = 0.

Hence if λ is a solution of the characteristic equation (or auxiliary


equation)
λ2 + aλ + b = 0 (10)
then y = e λx is a solution of the ODE (9).
The roots of the quadratic equation (10) are
1 √  1 √ 
λ1 = −a + a2 − 4b , λ2 = −a − a2 − 4b (11)
2 2
Hence functions y1 = e λ1 x and y2 = e λ2 x are solutions of the (9).

Second Order Ordinary Differential Equation 18 / 61


The characteristic equation may have three kinds of roots, depending
on the sign of the discriminant a2 − 4b, namely,

Case 1: Two real roots if a2 − 4b > 0,


Case 2: A real double root if a2 − 4b = 0,
Case 3: Complex conjugate roots if a2 − 4b < 0.

Case 1: Two distinct real roots λ1 and λ2


If this is the case, then,

y 1 = e λ1 x and y2 = e λ2 x

is a basis of solutions of the ODE (9). The corresponding general


solution is
y = c1 e λ 1 x + c2 e λ 2 x . (12)

Second Order Ordinary Differential Equation 19 / 61


Solve the IVP
′′ ′ ′
y + y − 2y = 0, y (0) = 4, y (0) = −5.

Second Order Ordinary Differential Equation 20 / 61


Solve the IVP
′′ ′ ′
y + y − 2y = 0, y (0) = 4, y (0) = −5.

Sol. Characteristic equation of the given IVP is

λ2 + λ − 2 = 0.

Its roots are λ1 = 1 and λ2 = −2. So the general solution is

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

Now, y (x) = c1 e x − 2c2 e −2x , so from the initial conditions and
general solution we have,

y (0) = c1 + c2 = 4,

y (0) = c1 − 2c2 = −5

Second Order Ordinary Differential Equation 20 / 61


Solving, we get c1 = 1 and c2 = 3. Thus the solution of the given
IVP is,

y = e x + 3e −2x .

Second Order Ordinary Differential Equation 21 / 61


a
Case 2: Real Double Root λ = −
2
If the discriminant a2 − 4ab is zero, then from (11) that we get only
a
one root λ = λ1 = λ2 = − , hence only one solution
2
a
y1 = e − 2 x .

To obtain a second independent solution y2 , we use the method on


reduction of order discussed in the last section, setting y2 = uy1 .
′ ′ ′ ′′
Substituting this and its derivatives y2 = u y1 + uy1 and y2 we have,
′′ ′ ′ ′′ ′ ′
(u y1 + 2u y1 + uy1 ) + a(u y1 + uy1 ) + buy1 = 0
′′ ′
Collecting terms in u , u , and u we obtain,
′′ ′ ′ ′′ ′
u y1 + u (2y1 + ay1 ) + u(y1 + ay1 + by1 ) = 0

Second Order Ordinary Differential Equation 22 / 61


Since y1 is a solution of the given ODE, the expression in the
parentheses is zero. Since
′ ax
2y1 = −ae − 2 = −ay1
the expression in the first parentheses is zero.
′′ ′′
Thus we have u y1 = 0. Hence u = 0. By two integration
u = c1 x + c2 .
To get a second independent solution y2 = uy1 , we can choose
c1 = 1, c2 = 0 and take u = x.Then y2 = xy1 . Since these solutions
are not proportional, they form a basis. Hence in the case of double
root of (10) a basis of solutions of (9) on any interval is
ax ax
e− 2 , xe − 2

The corresponding general solution is


ax
y = (c1 + c2 x)e − 2
Second Order Ordinary Differential Equation 23 / 61
Example
′′ ′
The characteristic equation of the ODE y + 6y + 9y = 0 is
λ2 + 6λ + 9 = (λ + 3)2 = 0. It has the double root λ = −3. Hence a
basis is e −3x and xe −3x . The corresponding general solution is
y = (c1 + c2 x)e −3x .

Second Order Ordinary Differential Equation 24 / 61


Case 3: Complex roots
This case occurs if the discriminant a2 − 4b of the characteristic
equation (10) is negative. Then the roots of the characteristic
equation are complex roots λ1 = α + iβ and λ2 = α − iβ.
Then,

e λ1 x = e (α+iβ)x = e αx e iβx
= e αx [cos βx + i sin βx]
= e αx cos βx + ie α x sin βx
Similarly, e λ2 x = e αx [cos βx − i sin βx]
e λ1 x + e λ2 x
Then = e αx cos βx = y1
2
e λ1 x − e λ2 x
= e αx sin βx = y2
2i

Second Order Ordinary Differential Equation 25 / 61


These are two real-valued solutions which are linearly independent.
Hence our solution reduces to

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

Second Order Ordinary Differential Equation 26 / 61


Solve the IVP
′′ ′ ′
y + 0.4y + 9.04y = 0, y (0) = 0, y (0) = 3.

Second Order Ordinary Differential Equation 27 / 61


Solve the IVP
′′ ′ ′
y + 0.4y + 9.04y = 0, y (0) = 0, y (0) = 3.

Sol.

λ = −0.2 ± 3i, ω = 3 and the general solution is


y = e −0.2x (A cos 3x + B sin 3x).
Particular solution is y = e −0.2x sin 3x.

Second Order Ordinary Differential Equation 27 / 61


Case Roots Basis General Solution
Distinct real:
I e λ1 x , e λ2 x y = c1 e λ1 x + c2 e λ2 x
λ1 , λ2
Real Double Roots:
II e λx , xe λx y = (c1 + c2 x)e λx
λ
Complex conjugate
III λ1 = α + iβ e αx cos βx y = e αx (c1 cos βx
λ2 = α − iβ e αx sin βx +c2 sin βx)

Second Order Ordinary Differential Equation 28 / 61


Euler-Cauchy Equations
Euler-Cauchy Equations are ODE of the form
′′ ′
x 2 y + axy + by = 0 (13)
with given constants a and b and unknown function y (x). We
substitute
′ ′′
y = x m, y = mx m−1 , y = m(m − 1)x m−2
in (13). This gives
x 2 m(m − 1)x m−1 + axmx m−1 + bx m = 0
Taking x m as a common factor and dropping it we have the auxiliary
equation m(m − 1) + am + b = 0 or
m2 + (a − 1)m + b = 0 (14)
Second Order Ordinary Differential Equation 29 / 61
y m is a solution of (13) if and only if m is a root of (14). The roots
are
r
1 1
m1 = (1 − a) + (1 − a)2 − b
2 4
r
1 1
m2 = (1 − a) − (1 − a)2 − b
2 4
Case I: Distinct real roots
m1 and m2 give two real solutions

y1 (x) = x m1 and y2 (x) = x m2


These are linearly independent and hence form a basis of solution of
(13) for all x for which they are real.

Second Order Ordinary Differential Equation 30 / 61


The corresponding general solution for all these x is

y = c1 x m1 + c2 x m2 (c1 , c2 arbitrary)

Second Order Ordinary Differential Equation 31 / 61


Case II: A real double root
1
If m1 = m2 = (1 − a) is a real double root of the auxilliary equation,
2
then one solution is y1 = x (1−a)/2 ,
and the other solution is y2 = ln x x (1−a)/2 ,
which is obtained from the method of reduction of order.

These y1 and y2 are linearly independent solutions and hence the


general solution corresponding to this basis is

1
y = (c1 + c2 lnx)x m , m = (1 − a)
2

Second Order Ordinary Differential Equation 32 / 61


Finding y2 using method of reduction of order
1 1
m1 = m2 = (1 − a) occurs if and only if b = (a − 1)2 because
2 4
1 2
then (14) becomes [m + (a − 1) ] and Euler Cauchy equation is of
2
the form

′′ ′ 1
x 2 y + axy + (1 − a)2 y = 0 (15)
4
or
′′ a ′ (1 − a)2
y + y + y =0 (16)
x 4x 2

Second Order Ordinary Differential Equation 33 / 61


A second linearly independent solution can be obtained by the
method of reduction of order. Starting from y2 = uy1 , we obtain
expression for u as
Z
1 − R pdx
u= Udx where U = e
y12

−a
R
−pdx
From (16), p = xa . Hence e = e (−alnx) = e lnx = x −a
Divide by y12 = x 1−a gives U = 1/x so that u = lnx by integration.
Thus, y2 = uy1 = y1 lnx = ln x x (1−a)/2 .

Second Order Ordinary Differential Equation 34 / 61


Case III: Complex conjugate roots
If the auxiliary equation (14) has complex conjugate roots
m = α ± iβ, then

y1 = x α cos (β ln x)
y2 = x α sin (β ln x)
are two linearly independent solutions and hence the general solution
is
 
y = x α c1 cos (β ln x) + c2 sin (β ln x)

Second Order Ordinary Differential Equation 35 / 61


Solve
′′ ′
x 2 y + 1.5xy − 0.5y = 0

Second Order Ordinary Differential Equation 36 / 61


Solve
′′ ′
x 2 y + 1.5xy − 0.5y = 0

Sol. This is an Euler Cauchy Equation with the auxiliary


equation
m2 + 0.5m − 0.5 = 0.
The roots are m1 = 0.5 and m2 = −1. Hence a basis of solutions for
all positive x is y1 = x 0.5 and y2 = x1 .
Hence the general solution is
√ c2
y = c1 x + (x > 0)
x

Second Order Ordinary Differential Equation 36 / 61


Solve the Euler-Cauchy Equation
′′ ′
x 2 y − 5xy + 9y = 0

Second Order Ordinary Differential Equation 37 / 61


Solve the Euler-Cauchy Equation
′′ ′
x 2 y − 5xy + 9y = 0

Sol. The given ODE has the auxiliary equation


m2 − 6m + 9 = 0. It has the double root m = 3, so general solution
for all positive x is,
y = (c1 + c2 lnx)x 3

Second Order Ordinary Differential Equation 37 / 61


Existence and Uniqueness of Solutions. Wronskian
Theorem
Existence and Uniqueness theorem for IVPs
If p(x) and q(x) are continuous functions on some open interval I
and x0 is in I , then the initial value problem
′′ ′ ′
y + p(x)y + q(x)y = 0 y (x0 ) = K0 , y (x0 ) = K1

has a unique solution y (x) on the interval I .

Wronskian of two functions y1 and y2 is

y1 y2 ′ ′
W (y1 , y2 ) = ′ ′ = y1 y2 − y2 y1 (17)
y1 y2

Second Order Ordinary Differential Equation 38 / 61


Theorem
Linear Dependence and Independence of Solutions
′′ ′
Let the ODE y + p(x)y + q(x)y = 0 have continuous coefficients
p(x) and q(x) on an open interval I . Then two solutions y1 and y2 of
the given ODE on I are linearly dependent on I if and only if their
Wronskian
′ ′
W (y1 , y2 ) = y1 y2 − y2 y1 (18)

is 0 at some x0 in I . Furthermore, if W = 0 at an x = x0 in I , then


W = 0 on I ; hence, if there is an x1 in I at which W is not 0, then
y1 , y2 are linearly independent on I .

Second Order Ordinary Differential Equation 39 / 61


′′
Consider the ODE y + ω 2 y = 0 having solutions y1 = cos ωx and
y2 = sin ωx

cos ωx sin ωx
W (y1 , y2 ) =
−ω sin ωx ω cos ωx
= ω cos2 ωx + ωsin2 ωx

y1 and y2 are linearly independent if and only if ω ̸= 0. If ω = 0 then


y1 = 1 and y2 = 0 which are linearly dependent.

Second Order Ordinary Differential Equation 40 / 61


Theorem
Existence of a General Solution
If p(x) and q(x) are continuous on an open interval I , then
′′ ′
y + p(x)y + q(x)y = 0 has a general solution on I

Theorem
′′ ′
If the ODE y + p(x)y + q(x)y = 0 has continuous coefficients p(x)
and q(x) on some special interval I , then every solution y = Y (x) of
it on I is of the form

Y (x) = C1 y1 (x) + C2 y2 (x) (19)

where y1 and y2 is any basis of solution of the second order


homogeneous linear ODE on I and C1 and C2 are suitable constants.
′′ ′
Hence y + p(x)y + q(x)y = 0 does not have singular solutions(that
is, solutions not obtainable from a general solution).
Second Order Ordinary Differential Equation 41 / 61
Nonhomogeneous ODEs

Consider the second-order nonhomogeneous linear ODE

′′ ′
y + p(x)y + q(x)y = r (x) (20)

where r ̸≡ 0. The general solution of (20) is the sum of a general

solution of the corresponding homogeneous ODE


′′ ′
y + p(x)y + q(x)y = 0 and a particular solution of (20).

Second Order Ordinary Differential Equation 42 / 61


General Solution, Particular Solution
A general solution of the nonhomogeneous ODE
′′ ′
y + p(x)y + q(x)y = r (x) (21)

on an open interval, I is a solution of the form

y (x) = yh (x) + yp (x) (22)

where yh = c1 y1 + c2 y2 is a general solution of the homogeneous


′′ ′
ODE y + p(x)y + q(x)y = 0 on I and yp is any solution of (21) on
I containing no arbitrary constants.
A particular solution of (21) is a solution obtained from (22) by
assigning specific values to the arbitrary constants c1 and c2 in yh .

Second Order Ordinary Differential Equation 43 / 61


′′ ′
y + p(x)y + q(x)y = r (x) (A)
′′ ′
y + p(x)y + q(x)y = 0 (B)
y (x) = yh (x) + yp (x) (C)

Theorem
Relations of Solutions (A) to those of (B)
1 The sum of a solution y of (A) on some open interval I and a
solution ỹ of (B) on I is a solution of (A). In particular, (C) is
a solution of (A) on I .
2 The difference of two solutions of (A) on I is a solution of (B)
on I .

Second Order Ordinary Differential Equation 44 / 61


Theorem
A General Solution of a Nonhomogeneous ODE includes all
solutions
If the coefficients p(x), q(x) and the function r (x) in (A) are
continuous on some open interval I , then every solution of (A) on I
is obtained by assigning suitable values to the arbitrary constants c1
and c2 in a general solution (C) of (A) on I .

Second Order Ordinary Differential Equation 45 / 61


To solve the nonhomogeneous ODE (A) or an initial value problem
for (A), we have to solve the homogeneous ODE (B) and find any
solution yp of (A), so that we obtain a general solution(C) of (A).

Second Order Ordinary Differential Equation 46 / 61


Method of Undetermined Coefficients

The method of undetermined coefficients is suitable for linear


ODEs with constant coefficients a and b:
′′ ′
y + ay + by = r (x) (23)

where r (x) is an exponential function, a power of x, a cosine or


sine, or sums or products of such functions. The derivatives are
similar to r (x).
We choose yp similar to r (x), with unknown coefficients.
The unknown coefficients are determined by substituting yp and
its derivatives into the ODE.

Second Order Ordinary Differential Equation 47 / 61


Terms in r (x) Choice for yp

ke γx Ce γx

kx n (n = 0, 1, 2, . . .) Kn x n + Kn−1 x n−1 + . . . K1 x + K0
)
k cos ωx
Kcos ωx + M sin ωx
k sin ωx
)
ke αx cos ωx
eαx (K cos ωx + M sin ωx)
ke αx sin ωx

Second Order Ordinary Differential Equation 48 / 61


Choice Rules for the Method of Undetermined Coefficients

Basic Rule
Is r (x) in (23) is one of the functions in the first column in the
Table, choose yp in the same line and determine its undetermined
coefficients by substituting yp and its derivatives into the (23).

Second Order Ordinary Differential Equation 49 / 61


′′
Solve y + y = 0.001x 2

Second Order Ordinary Differential Equation 50 / 61


′′
Solve y + y = 0.001x 2

Step 1. General Solution of the homogeneous ODE


′′
The ODE y + y = 0 has the general solution

yh = A cos x + B sin x.

Step 2. Solution yp of the nonhomogeneous ODE


The table suggests the choice yp as

yp = K2 x 2 + K1 x + K0 .
′′
Then, yp + yp = 2K2 + K2 x 2 + K1 x + K0 = 0.001x 2
Equating the coefficients of x 0 , x, x 2 on both sides, we have
K2 = 0.001, K1 = 0, K2 + K0 = 0. Hence K0 = −2, K2 = −0.002.

Second Order Ordinary Differential Equation 50 / 61


Then yp = 0.001x 2 − 0.002 and

y = yh + yp = A cos x + B sin x + 0.001x 2 − 0.002.

Second Order Ordinary Differential Equation 51 / 61


Modification Rule.
If a term in your choice for yp happens to be a solution of the
homogeneous ODE corresponding to (23), multiply this term by
x (or by x 2 if this solution corresponds to a double root of the
characteristic equation of the homogeneous ODE).

Second Order Ordinary Differential Equation 52 / 61


Solve
′′ ′
y + 3y + 2.25y = −10e −1.5x

Second Order Ordinary Differential Equation 53 / 61


Solve
′′ ′
y + 3y + 2.25y = −10e −1.5x
Step 1. General Solution of the homogeneous ODE
The characteristic ODE is λ2 + 3λ + 2.25 = (λ + 1.5)2 = 0. Hence
the homogeneous ODE has the general solution
yh = (c1 + c2 x)e −1.5x
Step 2. Solution yp of the nonhomogeneous ODE
The right choice of yp for r = e −1.5x is Ce −1.5x . But from yh we see
that this is a solution of the homogeneous ODE. Hence we use the
modification rule to multiply our choice function by x 2 . That is,
yp = Cx 2 e −1.5x

yp = C (2x − 15x 2 )e −1.5x
′′
yp = C (2 − 3x − 3x + 2.25x 2 )e −1.5x
Second Order Ordinary Differential Equation 53 / 61
Substitute them in the ODE and omit the factor e −1.5x we’ve

C (2 − 6x + 2.25x 2 ) + 3C (2x − 1.5x 2 ) + 2.25Cx 2 = −10

Comparing coefficients of x 0 , x, x 2 gives, 2C = −10, hence C = −5.

The solution yp = −5x 2 e −1.5x . Hence the ODE has a general solution

y = yh + yp = (c1 + c2 x)e −1.5x − 5x 2 e −1.5x

Second Order Ordinary Differential Equation 54 / 61


Sum Rule.
If r (x) is a sum of functions in the first column of Table, choose
for yp the sum of the functions in the corresponding lines of the
second column.

Second Order Ordinary Differential Equation 55 / 61


Solve
′′ ′
y + 2y + 0.75y = 2 cos x − 0.25 sin x + 0.09x

Second Order Ordinary Differential Equation 56 / 61


Solve
′′ ′
y + 2y + 0.75y = 2 cos x − 0.25 sin x + 0.09x

Step 1. General Solution of the homogeneous ODE


The characteristic equation of the homogeneous ODE is
λ2 + 2λ + 0.75 = (λ + 12 )(λ + 32 ) = 0 which gives the general solution

yh = c1 e −x/2 + c2 e −3x/2

. Step 2. Particular solution of the nonhomogeneous ODE.


We write yp = yp1 + yp2 and from the table our choice for yp1 and yp2
is

yp1 = K cos x + M sin x and yp2 = K1 x + K0 .

Second Order Ordinary Differential Equation 56 / 61


Differentiation gives
′ ′′
yp1 = −K sin x + M cos x, yp1 = −K cos x − M sin x and
′ ′′
yp2 = 1, yp2 = 0. Substitution of yp1 into the given ODE gives, by
comparing the cosine and sine terms,

−K + 2M + 0.75K = 2, −M − 2K + 0.75M = −0.25,

hence K = 0 and M = 1.
Substituting of yp2 into the given ODE and comparing the x and x 0
terms gives,

0.75K1 = 0.09, 2K1 + 0.75K0 = 0, thus K1 = 0.12, K0 = −0.32.

Hence a general solution of the ODE is

y = c1 e −x/2 + c2 e −3x/2 + sin x + 0.12x − 0.32

.
Second Order Ordinary Differential Equation 57 / 61
Solution by Variations of Parameters I

Consider the non-homogeneous linear ODE

′′ ′
y + p(x)y + q(x)y = r (x) (24)

Here p, q, r are functions of x.


If r (x) is a function such that its derivatives are of a form similar to
r (x) we use the method of undetermined coefficient.
In a more general case, a new method called method of variation
of parameters is used. The particular solution yp on I is of the form

Second Order Ordinary Differential Equation 58 / 61


Solution by Variations of Parameters II

Z Z
y2 r y1 r
yp (x) = −y1 dx + y2 dx (25)
W W
where y1 , y2 form a basis of solution of the corresponding
homogeneous ODE

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

on I , and W is the Wronskian of y1 , y2

′ ′
W = y1 y2 − y2 y1
Second Order Ordinary Differential Equation 59 / 61
Solve the nonhomogeneous ODE
′′ 1
y + y = sec x =
cos x

Second Order Ordinary Differential Equation 60 / 61


Solve the nonhomogeneous ODE
′′ 1
y + y = sec x =
cos x
A basis of solutions of the homogeneous ODE on any interval is
y1 = cos x and y2 = sin x. The Wronskian is

W (y1 , y2 ) = cos x cos x − sin x(− sin x) = 1

Choosing zero constant of integration, we get the particular solution


of the given ODE

Z Z
yp = − cos x sin x sec xdx + sin x cos x sec xdx

= cos xln| cos x| + x sin x

Second Order Ordinary Differential Equation 60 / 61


The general solution is then

y = yh + yp
= (c1 + ln| cos x|) cos x + (c2 + x) sin x.

Second Order Ordinary Differential Equation 61 / 61

You might also like