You are on page 1of 78

PHY 158 MATHEMATICS FOR PHYSICS

Dorcas Attuabea Addo


Kwame Nkrumah University of Science and Technology

February 13, 2020

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 1 / 72
Outline of Presentation
1 Introduction
2 Definition and Examples of Differential Equation
3 Classification of Differential Equations
Method of Separation of Variables
4 Example
5 Integrating Factors
Non-Exact Equations
6 Linear Equations and those Reducible to that form
7 Equations Reducible to Linear Form
8 Linear differential equation of higher order
Homogeneous Equation with Constant Coefficients
Theory of Solutions of Linear Differential Equations
Reduction Order
Linear Non-Homogeneous Equation with Constant Coefficients
Method of Undetermined Coefficients
Method of Variation of Parameters
Dorcas Attuabea Addo (Kwame Nkrumah University
PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 2 / 72
Applications of differential equations in physics

Differential Equations regularly appear in Physics. They appear when


we have got rate of change of certain variable.

Take for example a ball released from some height. If air resistance is
ignored, for small height, we can easily find time or distance by
applying equations of motion. But consider air resistance which
varies and say, is directly proportional to velocity. Then we have
dv
m = mg − mv λ
dt

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 3 / 72
Applications of differential equations in physics

Another famous example of use of differential equations in Physics is


Oscillation of spring. It makes use of second order differential
equation.

Take a mass m suspended through a light spring. Let e be elongation


in equilibrium position and k be restoring force per unit elongation (It
is a constant).
d 2x
= mg − k(e + x) = −kx
dt 2
d 2x k
2
+ µ2 x = 0 where = µ2
dt m

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 4 / 72
Applications of differential equations in physics

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 5 / 72
Intoduction

Differential equations are an important part of the calculus, the


fundamentals of which are presented here. In developing the theory
of differential equations in a systematic manner it is helpful to classify
different types of equations.

There are two types of derivatives which usually are (and always can
dy
be) interpreted as rates. For example, the ordinary derivative is
dx
the rate of change of y with respect to x (independent variable), and
∂y
the partial derivative .
∂x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 6 / 72
Definition and Examples of Differential Equation

Definition
A differential equation is an equation which involves one or more
derivatives, or differentials of an unknown function

Example (1)
The following are examples of differential equations involving their
respective unknown functions:
dy
= 3x 2
dx  2 2

∂v ∂ v ∂ v
= h2 + .
∂t ∂x 2 ∂y 2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 7 / 72
Classification of Differential Equations

Differential equations are classified as to:


Type: We can place all differential equations into two types:
ordinary differential equation (ODE) and partial differential
equations (PDE).
Order: The order of a differential equation is the order of the
highest-ordered derivative appearing in the equation.
Degree: The degree of the differential equation is the power
(exponent) or the index that its highest ordered derivative is
raised, if the equation is rationalized or cleared of fractions with
regard to the dependent variable and its derivatives involve in it.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 8 / 72
Linearity: The conditions for a linear differential equation are as
follows:
1 The dependent variable and all its derivatives occur only in the
first degree (or to the first power).
2 No product of the dependent variable, say y , and/or any of its
derivatives present
3 No transcendental function (trigonometric, logarithmic or
exponential) of the dependent variable and/or its derivatives
occurs.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 9 / 72
Example (2)
1 3x 2 y ” + 2 ln(x)y 0 + e x y = 3x cos x.
This is a second order linear ordinary differential equation
2 4yy 000 − x 3 y 0 + cos y = e 2x .
This is not a linear differential equation because of the 4yy 000 and
the cos y term

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 10 / 72
A linear differential equation is always in the first degree of the
dependent variable.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 11 / 72
Try
For each of the following, state whether the equations are ordinary or
partial, linear or non-linear, and give its order and degree.
d 2y
1 + kx 2 = 0
dx 2
∂ 2v ∂ 2v ∂ 2v
2 + + =0
∂x 2 ∂y 2 ∂z 2
3 y 0 + p(x)y = q(x)
∂ 2w 2
2∂ w
4 = a
∂t 2 ∂x 2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 12 / 72
Solution to a DE

Definition
A solution of a differential equation is any function, say φ, satisfying
the given differential equation on a specified interval, I .

Example (3)
The function φ = A cos x + B sin x is a solution of the differential
d 2φ
equation + φ = 0.
dx 2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 13 / 72
Solution

φ = A cos x + B sin x

= −A sin x + B cos x
dx
d 2φ
= −A cos x − B sin x
dx 2

d 2φ
+ φ = (−A cos x − B sin x) + (A cos x + B sin x) = 0
dx 2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 14 / 72
Example (4)
1
Show that y = is a solution of y 0 + 2xy 2 = 0 on I = (−1, 1)
−1 x2
but not on any larger interval containing I .

Solution:

1 −2x
y= =⇒ y 0 = 2
,
x2 −1 (x − 1)2
 2
0 2 −2x 1
y + 2xy = 2 +2 2 = 0.
(x − 1)2 x −1

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 15 / 72
Exercise

1 Show that y = ln x is a solution of xy 00 + y 0 = 0 on I = (0, ∞)


but is not a solution on I = (−∞, ∞)
d 2y
2 Prove that y = e −x + sin x is a solution of + y = 2e −x
dx 2
1
3 Show that the two functions y = (c 2 − x 2 ) 2 and
1
−y = (c 2 − x 2 ) 2 are both solutions of the equation
dy
x +y = 0, −c < x < c.
dx

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 16 / 72
Initial-value and Boundary-value Problems

Initial-Value Problem is the differential equation along with


subsidiary conditions on the unknown function and its
derivatives, all given at the same value of the independent
variable. The subsidiary conditions are initial conditions.
Boundary-Value Problem is the differential equation along with
subsidiary conditions on the unknown function and its
derivatives, which are given at more than one value of the
independent variable. The subsidiary conditions are boundary
conditions.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 17 / 72
Worked Example:

Example (5)
y = c1 e −x + c2 e 3x is a general solution of the differential equation:
y 00 − 2y 0 + 3y = 0. Determine the particular solution of the initial
solution of the initial conditions y = 3 and x = 0 and y 0 = 4 when
x = 0.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 18 / 72
Solution:

y (0) = 3, y 0 (0) = 4
let y = c1 e −x + c2 e 3x when x = 0, y = 3
=⇒ 3 = c1 e (0) + c2 e 3(0) = c1 + c2
y 0 = −c1 e −x + 3c2 e 3x when x = 0, y 0 = 4,
=⇒ 4 = c1 e (0) + 3c2 e 3(0)
5 7
=⇒ 4 = −c1 + 3c2 , thus c1 = and c2 =
4 4

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 19 / 72
General and Particular Solutions of a First Order
Ordinary Differential Equation

Method of Separation of Variables


A first order differential equation is said to be separable if it can be
written in the form:
dy
= f (x, y ) = G (x)H(y ) (1)
dx
or equivalent form:

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

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 20 / 72
If (2) is separable, then:

M(x, y ) = m(x)p(y ) and N(x, y ) = n(x)q(y ) (3)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 21 / 72
Example

Question: Solve the following differential equations by separation of


variables:
dy
(x + 1) = x(y 2 + 1)
dx

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 21 / 72
Solution:
We change to differential form, separate the variables, and integrate:
x 1
(x + 1)dy = x(y 2 + 1)dx ⇒ dx − 2 dy = 0
x +1 y +1
Integrating both side we get

x − ln(x + 1) − arctan y = c

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 22 / 72
Equations with homogeneous coefficients
A differential equation of the form (differential form):

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

is homogeneous if the functions M(x, y ) and N(x, y ) are both


homogeneous functions of the same degree. Or if the equation in
standard form:
y 0 = f (x, y ) (5)
y x
depends only on the ratio or , then it is said to be homogeneous
x y

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 23 / 72
To solve homogeneous equations, turn them into separable ones
using the substitution:
y = xv (6)
where v is a function of x ; also:
dy dv
=v +x or dy = xdv + vdx (7)
dx dx

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 24 / 72
Definition
A function of two variables,f (x, y ) is said to be homogeneous of
degree n if there is constant n such that:

f (λx, λy ) = λn f (x, y ) (8)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 25 / 72
Example:
Question: Solve the following differential equation:

(x 2 + y 2 )dx − 2xydy = 0

Solution:
Notice that the function M(x, y ) = x 2 + y 2 and N(x, y ) = −2xy are
both homogeneous of degree 2; therefore, the differential equation is
homogeneous.The substitution y = xv implies that
dy = xdv + vdx,and given is transformed into

x 2 + (xv )2 dx − 2x(xv )(xdv + vdx) = 0




Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 25 / 72
After little algebra, this becomes the separable equation:
1 2v
dx = dv
x 1 − v2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 26 / 72
Integrating both side gives: ln(x) = − ln(1 − v 2 ) + ln(c), in which we
wrote the arbitrary constant of integration as ln(c) because it makes
the next step neater:
c
ln(x) = ln( )
1 − v2
Finally, to write the solution in terms of the original variables, x and
y
y , we replace v by :
x
c
x= ⇒ x 2 + y 2 = cx
1 − (y /x)2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 26 / 72
Exact Differential Equation and Integration Factors
Given a function f (x, y ) its total differentials, df , is defined as:

∂f ∂f
df = dx + dy (9)
∂x ∂y

This shows that the family of curves (or general solution) f (x, y ) = c
satisfies the differential equation df = 0.
∂f ∂f
dx + dy = 0 (10)
∂x ∂y

So if there exists a function f (x, y ) such that

∂f ∂f
M(x, y ) = and N(x, y ) =
∂x ∂y

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 27 / 72
M(x, y )dx + N(x, y )dy (11)
is called an exact differential, and the equation:

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

is said to be an exact equation, whose solution is the family


f (x, y ) = c.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 28 / 72
Example
Solve the differential equation (1 − 2xy )dx + (4y 3 − x 2 )dy = 0
Solution
3 2
M(x, y ) = 1 − 2xy
Z Z and N(x, y ) = 4y − x
M(x, y )dx = (1 − 2xy )dx = x − x 2 y + φ(y )
Z Z
N(x, y )dy = (4y 3 − x 2 )dy = y 4 − x 2 y + φ(x)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 29 / 72
∂f ∂f
= M = 1 − 2xy and = N = 4y 3 − x 2 is
∂x ∂y
:f (x, y ) = x − x 2 y + y 4

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 30 / 72
Non-Exact Equations

Using Integrating factors for Non- Exact Equations


If
M(x, y )dx + N(x, y )dy = 0 (13)
is not exact, sometimes we can turn it into an exact differential
equation by multiplying the whole equation by an appropriate factor,
called an integrating factor

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 31 / 72
Some of the important rules and procedures follow.
 
1 ∂M ∂N R
1 f (x) = − Then u(x) = e f (x) the integrating
N ∂x ∂y
factor which
 is a function
 of x alone
1 ∂N ∂M R
2 f (x) = − Then u(y ) = e f (y ) the integrating
M ∂y ∂x
factor which is a function of y alone

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 32 / 72
Example
dy
Solve the differential equation (3xy + y 2 ) + (x 2 + xy ) =0
dx
Solution
The integrating factor is x. Multiply the DE by the integrating factor
will make the DE exact. Solving the exact DE we will get
x 3 y + 21 x 2 y 2 = c.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 33 / 72
Linear Equations and those Reducible to that form

A first order linear equation is defined as a differential of the form:

A(x)y 0 + B(x)y = C (x) (14)

Then (14) in the standard form is written as

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


R
p(x) dx
Finding the integrating factor µ = e , then multiply through
the DE and solve.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 34 / 72
Example
dy 3
Find the solution of + y = 5x
dx x
Solution
3
R R
p(x) dx dx
µ=e =e x = e 3 log x = x 3
multiply DE through by µ = x 3
dy
x3 + 3x 2 y = 5x 4
dx
Z
3
x y= 5x 4 dx = x 5 + c ⇒ y = x 5 + cx −3

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 35 / 72
Equations Reducible to Linear Form

Other first order equations in first degree which are not linear may be
reduced to the linear form by means of appropriate transformations.
Consider

{xs(y ) + t(y )}y 0 = µ(y ) (16)

in which the coefficient of y 0 is a linear function of x and no other x


appears anywhere again.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 36 / 72
Thus (16) can be expressed as a linear differential equation with x as
the dependent variable and y the independent variable. To be able to
dy
do this, multiply through by to obtain:
dx
dx dx
µ(y ) = xs(y ) + t(y ) or µ(y ) − s(y )x = t(y ). (17)
dy dy
Thus this is a linear differential equation of x as a function of the
independent variable y .

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 37 / 72
Example
Solve the differential equation (3x − 4y 3 )y 0 + y = 0.
Solution:
dy
Multiply through by to obtain:
dx
dy
(3x − 4y 3 )y 0 + y =0
dx
dy
y + 3x = 4y 3 .
dx
Whose standard form is:
dy 3
+ x = 4y 2
dx y

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 38 / 72
Integrating factor:
R dy 3
µ(y ) = e 3 y = e ln y = y 3
dx
=⇒ y 3 + 3y 2 x = 4y 5
dy
Z Z
4
d(xy ) = 4y 5
3
=⇒ xy 3 = y 6 + c
6
=⇒ 3xy − 2y 6 + c
3

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 39 / 72
Linear differential equation of higher order

A general nth order linear differential equation has the form:

an (x)y n + an−1 (x)y n−1 + · · · + a2 (x)y ” + a1 (x)y 0 + a0 (x)y = f (x)

This equation above is homogeneous if f (x) = 0 and


non-homogeneous if f (x) 6= 0 .
The solution of the homogeneous differential equation is called the
complimentary function (conventionally yc ) and the solution of the
non-homogeneous part is known as the particular integral
(conventionally yp ).

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 39 / 72
Homogeneous Equation with Constant Coefficients
A general homogeneous differential equation with constant
coefficients is:

an y n + an−1 y n−1 + · · · + a2 y ” + a1 y 0 + a0 y = 0 (18)

We start problem solving with second order differential equation of


the form:
a2 y ” + a1 y 0 + a0 y = 0 (19)
We consider a trial solution y = e rx . We can write (19) as
ar 2 + br + c = 0.Hence if r is root of this quadratic equation,often
called the auxiliary or characteristic equation.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 40 / 72
There are three cases to consider:
1 If the roots are real and distinct,that is r = r1 , r = r2 and r1 6= r2
then the general solution of the differential equation is:

y = c1 e r1 x + c2 e r2 x (20)

2 If the roots are real and identical,that is r = r1 , r = r2 and


r = r1 = r2 then the general solution of the differential equation
is:
y = c1 e r1 x + c2 xe r2 x (21)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 41 / 72
3. If the roots are not real,the roots are complex conjugates,thst is
r = α ± β general solution of the differential equation is:

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

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 42 / 72
Example
1 Solve the differential equation y ” + 2y 0 + y = 0
Solution
r 2 + 2r + 1 : r = −1

y = c1 e −x + c2 xe −x

2 Solve the differential equation y ” + 2y 0 + 5y = 0


Solution
r 2 + 2r + 5 : r = −1 ± 2i

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

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 43 / 72
3. Solve the differential equation y ” + y 0 − 6y = 0
Solution
r 2 + r − 6 : r1 = 2, r2 = −3

y = c1 e −x + c2 xe −x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 44 / 72
Theory of Solutions of Linear Differential Equations
Consider a Homogeneous second-order linear differential equation

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

Principle of Superposition
Let y1 and y2 be two solutions of the homogeneous linear equation
(23) on the interval I . If c1 and c2 are constants, then the linear
combination

y = c1 y 1 + c2 y 2 (24)

is a solution of (23) on I .

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 45 / 72
Linear Independence of Two Functions and the Wronskian
Two functions defined on an open interval are called linearly
independent provided that neither is a constant multiple of the other.
Two functions are said to be linearly dependent if they are not
linearly independent; that is, one is a constant multiple of the other.
Given two functions
 f and g , the Wronskian of f and g is the
f g
determinant : 0 0 = fg 0 − f 0 g
f g

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 46 / 72
Example
 
cos x sin x
W (cos x, sin x) = = cos2 x + sin2 x = 1 6= 0
− sin x cos x
if the W (f , g ) 6= 0 then f and g are linearly independent otherwise
Linearly dependent.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 47 / 72
Reduction Order
Consider the non-constant coefficient, second order differential
equations of the form

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

Solution of Reduction Order:


Consider

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

Let

y2 (x) = v (x)y1 (x) (27)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 48 / 72
Substitute (27) into (26), using the derivatives:

y20 = vy10 + v 0 y1 =⇒ y200 = vy100 + 2v 0 y10 + v 00 y1 (28)

We get

[vy100 + 2v 0 y10 + v 00 y1 ] + p[vy10 + v 0 y1 ] + qvy1 = 0 (29)


v [y100 + py10 + qy1 ] + v 00 y1 + 2v 0 y10 + pv 0 y1 = 0 (30)

But v100 + py10 + qy1 = 0 is a solution of (26).

y1 v 00 + (2y10 + py1 )v 0 = 0 (31)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 49 / 72
If we write u = v 0 and assume that y1 never vanishes on I , then (27)
yields:
 0 
0 2y1
u + + p(x) u = 0 (32)
y1

An integrating factor will be:


Z  0  
y1
µ = exp 2 + p(x) dx (33)
y1
 Z 
= exp ln |y1 | + p(x)dx (34)

Thus
R
µ = y12 e p(x)dx
(35)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 50 / 72
R
We now integrate the equation in (26) to obtain: y12 e p(x)dx
=c
So
c − R p(x)dx
u= e . (36)
y12

Another integration gives:


R
e− p(x)dx
Z
y2
=v =c dx + k. (37)
y1 y12

With the particular choices c = 1 and k = 0, we get:


Z − R p(x)dx
e
y2 = y1 dx (38)
y12

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 51 / 72
Example

Find the general solution to 2x 2 y 00 + xy 0 − 3y = 0


Solution:

2x 2 y 00 + xy 0 − 3y = 0
1 3 1
=⇒ y 00 + y 0 + 2 = 0 where p(x) =
2x 2x 2x
Z − R p(x)dx
e
y2 = y1 x
d
Z − R 1 dx Z −1
−1 e 2x −1 x 2
=⇒ y2 = x = x dx
(x −1 )2 x −2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 52 / 72
Z  
−1 3
−1 2 5
=⇒ y2 = x x dx = x
2 x2 +c
5
2 3
let c = 0 y2 = x 2
5
3
The general solution is: y = c1 x −1 + c 2 x 2 .

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 53 / 72
Linear Non-Homogeneous Equation with Constant
Coefficients

A general linear n-n-homogeneous coefficient equation is:

d ny d n−1 dy
an = n
+ a n−1 n−1
+ · · · + a1 + a0 y = f (x) (39)
dx dx dx
f (x) is a given function of x, and a0 , a1 , · · · , an−1 , an also given
constants.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 53 / 72
Method of Undetermined Coefficients

1 Assume a trial solution function yp (x), a family of functions that


is guaranteed to include a correct particular solution;
2 Find the image of the trial solution whose form depends on f (x)
of (39),
3 yp (x) is then substituted into (39) and the constants take values
which satisfy (39) completely.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 54 / 72
Example

Find the particular integral of y 00 − 3y 0 + 2y = e 2x


Solution:
The auxiliary equation is:
r 2 − 3r + 2 = 0, =⇒ (r − 2)(r − 1) = 0, ∴ r = 2, 1
Hence f (x) = e 2x that is b = 2, a root.
The trial function is: yp (x) = Axe 2x
Substituting into the differential equation:

yp (x) = Axe 2x , yp0 (x) = Ae 2x + 2Axe 2x


yp00 (x) = 2Ae 2x + 2Ae 2x + 4Axe 2x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 55 / 72
4Ae 2x + 4Axe 2x − 3Ae 2x − 6Axe 2x + 2Axe 2x = e 2x
=⇒ Ae 2x = e 2x =⇒ A = 1
∴ yp (x) = xe 2x

General solution: y = yc + yp = c1 e 2x + c2 e 2x + xe 2x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 56 / 72
Method of Variation of Parameters
In this method, the particular integral is expressed as the modification
of the complementary solution. This is done by making of the
coefficient of the complementary solution change from the constants
to variables.
Thus we have

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

where y1 (x) and y2 (x) are independent solutions of the homogeneous


equations.

y 0p = c01 (x) y1 (x) + c02 (x) y2 (x)


+ c1 (x) y 01 (x) + c2 (x) y 02 (x)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 57 / 72
assume for simplicity that

c10 (x) y1 (x) + c20 (x) y2 (x) = 0 (40)

so that

yp0 = c10 (x) y1 (x) + c20 (x) y2 (x)


=⇒ yp00 (x) = c10 (x) y1 (x) + c20 (x) y2 (x)
+ c1 (x) y100 (x) + c2 (x) y200 (x)

yp00 = c1 (x) y100 (x) + c2 (x)


+ y200 (x) + c10 (x) y10 (x) + c20 (x) y20 (x)
0
a 2 yp = c1 (x) a2 y10 + c2 (x) a2 y20
a 1 yp = c1 (x) a1 y1 + c2 (x) a2 y2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 58 / 72
yp0 + a2 yp0 + a1 yp = c1 (x)[y100 + a2 y10 + a1 y1 ]
+ c2 (x)[y200 + a2 y20 + a2 y2 ]
+ c10 (x) y10 (x) + c20 (x) y20 (x)
= c10 (x) y10 (x) + c20 (x) y20 (x)

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 59 / 72
since

y2 + a2 y20 + a2 y1 = 0
=⇒ y20 + a2 y20 + a1 y2 = 0

y1 , y2 being solution of the homogeneous equation.

c10 (x) y10 (x) + c20 (x) y20 (x) = f (x) (41)

Note that equations (40) and (41) give the system:


  0  
y1 (x) y2 (x) c1 (x) 0
y10 (x) y20 (x) c20 (x) f (x)
.

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 59 / 72
Solving by means of rule, we have

0 y2 (x)

f (x) y 02 (x) −y2 (x) f (x)
c01 (x) = =
w (y1 (x, y2 (x))) w (y1 , y2 )

y1 0

y2 f (x) y1 (x) f (x)
c02 (x) = =
w (y1 (x, y2 (x))) w (y1 , y2 )

Therefore
Z
y2 (x) f (x)
c1 (x) = dx + k1
w (y1 (x), y2 (x))
Z
y1 (x) f (x)
c2 (x) = dx + k2
w (y1 (x), y2 (x))

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 60 / 72
Example:
Solve the IVP using the method of variation of parameters.

y 00 + 3y 0 + 2y = sin x
y (0) = 0, y 0(0) = 1

Solution

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


have y1 (x) = e −2x , y2 (x) = e −x
Thus y (x) = c1 (x) e −2x + c2 (x) e −x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 61 / 72
Solution Cont’d
Applying the method of variation of parameters from the first
principles, we have:

y 0(x) = c01 (x) e −2x + c20 (x) e −x


− 2c1 (x) e −2x − c2 (x) e −x

We assume:

c01 (x) e −2x + c02 (x) e −x = 0 (42)

=⇒ y 0(x) = −2c1 (x) e −2x − c2 (x) e −x


=⇒ y 00(x) = −2c01 (x) e −2x − c02 (x) e −x
+ 4c1 (x) e −2x − c2 (x) e −x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 62 / 72
=⇒ 3y 0(x) = 3(−2c1 (x) e −2x − c2 (x) e −x )
2y (x) = 2(c1 (x) e −2x − c2 (x) e −x )
y 00(x) + 3y 0(x) + 2y (x) = −2c1 (x) e −2x − c2 (x) e −x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 63 / 72
Therefore

− 2c1 (x) e −2x − c2 (x) e −x = sin x (43)

Equations (42) and (43) in matrix notation gives:


 −2x
e −x
   
e c01 (x) 0
=
−2e −2x −e −x c02 (x) sin x
e −x
 
0
sin x −e −x −e −x sin x
=⇒ c01 (x) = =
e −3x e −3x
2x
 −2x  = −e sin x
e 0
−2x
−2e sin x e −2x sin x
=⇒ c20 (x) = =
e −3x e −3x
x
= e sin x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 64 / 72
Z x
c1 (x) = − e 2t sin tdt + A1
Z
= te 2x cos x − 2 cos te 2t dt + A1

 Z 
2x 2x 2t
c1 (x) = e cos x − 2 e sin x − 2 e sin tdt

Z x
=⇒ −5 e 2t sin tdt = e 2x cos x − 2e 2x sin x + A1
1 2x
c1 (x) = e [cos x − 2e 2x sin x] + A1
5

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 65 / 72
Similarly
Z x
c2 (x) = e t sin tdt + A2
Z x
x
= −e cos x + e t cos tdt + A2

 Z 
x x t
c2 (x) = −e cos x + e sin x − e sin tdt + A2

Z x
=⇒ 2 e t sin tdt = e x [sin x − cos x] + A2
1 x
=⇒ c2 (x) = e [sin x − cos x] + A2
2

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 66 / 72
Now the fundamental functions are y1 (x) = e −2x and y2 (x) = e −x
Therefore

y = c1 (x)e −2x + c2 (x)e −x + A1 e −2x + A2 e −x


1 1
= [cos x − 2 sin x] + [sin x − cos x]
5 2
2 5 4 5
= cos x − cos x − sin x + sin x
10 10 10 10
1
= [sin x − 3 cos x]
10

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 67 / 72
Thus the general solution is given by
1
y = A1 e −2x + A2 e −x + [sin x − 3 cos x]
10

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 68 / 72
Example

Find the general solution of the differential equation


π
y 00 + y = sec x 0<x <
2
Solution:
The two general solution of the homogeneous equation are:

y1 = cos x and y2 = sin x

Then

yp = u1 cos x + u2 sin x
=⇒ yp0 = u10 cos x − u1 sin x + u20 sin x + u2 cos x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 69 / 72
u10 cos x + u20 sin x (44)

yp0 = −u1 (x) sin x + u2 (x) cos x


yp00 = −u10 sin x − u1 cos x + u20 cos x − u2 sin x.

Then the differential equation becomes:

−u10 sin x − u1 cos x + u20 cos x − u2 sin x + u1 cos x + u2 sin x = sec x

=⇒ −u10 sin x + u20 cos x = sec x (45)

Using (44) and (45), we have:

u10 cos x + u20 = 0


−u10 sin x + u20 cos x = sec x
Dorcas Attuabea Addo (Kwame Nkrumah University
PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 70 / 72
The Cramer’s Rule for the solution of a linear system of equation
yields:

0 sin x cos x 0

sec x cos x − sin x sec x
u10 = u2
0
=
cos x sin x cos x sin x

− sin x cos x − sin x cos x
=⇒ u10 = tan x, =⇒ u20 = 1
=⇒ u1 = ln cos x, =⇒ u2 = x

Therefore, yp = (ln cos x) cos x + x sin x


General solution:

y (x) = c1 cos x + c2 sin x + (ln cos x) cos x + x sin x

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 71 / 72
THANK YOU

Dorcas Attuabea Addo (Kwame Nkrumah University


PHY 158of Science
MATHEMATICS
and Technology)
FOR PHYSICS February 13, 2020 72 / 72

You might also like