Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Contents

1 Vector Calculus 3
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Vector Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Addition and Subtraction of Vectors . . . . . . . . . . . . . 4
1.2.2 Scalar Multiplication . . . . . . . . . . . . . . . . . . . . . . 4
1.2.3 Vector Multiplication . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Scalar and Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Gradient of a Scalar Field . . . . . . . . . . . . . . . . . . . 6
1.3.2 Vector Field . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.3 Divergence of a Vector Field . . . . . . . . . . . . . . . . . . 7
1.3.4 Curl of a Vector Field . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Equations of Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Tangent Lines and Normal Plane to space curves . . . . . . . . . 9
1.6 Tangent Plane to a surface at a point . . . . . . . . . . . . . . . . . 10

2 Ordinary Differential Equations 13


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 First Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.1 First Order ODEs with separable variables . . . . . . . . . 14
2.2.2 First Order Linear Differential Equations . . . . . . . . . . 15
2.2.3 First Order Homogeneous Differential Equations . . . . . 16
2.2.4 First Order Exact Differential Equations . . . . . . . . . . 17
2.3 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4 Higher Order Differential Equations . . . . . . . . . . . . . . . . . 18

1
2 CONTENTS

2.5 Second Order Differential Equations . . . . . . . . . . . . . . . . . 18


2.5.1 Second Order Homogeneous Differential Equation with
constant coefficients . . . . . . . . . . . . . . . . . . . . . . 19
2.5.2 Non-Homogeneous Differential Equations . . . . . . . . . . 20
Chapter 1

Vector Calculus

1.1 Introduction

A vector is a quantity that has both magnitude and direction. Examples of


vector quantities are velocity, acceleration and force. Vectors are denoted by
bold directed lines or column matrices of the i, j, k notation
 e.g. vector ~r =
2
 
2i − 5j + 4k or can be written in column form as ~r =  −5  where i, j and
 
 
4
k are unit vectors in the x, y, and z axes respectively. A unit vector is a
vector with magnitude 1. The modulus or magnitude of a vector ~r is the length
of a line segment that represents the vector. If ~r = xi + yj + zk its modulus
p
is |r| = x2 + y 2 + z 2 . A position vector is a vector that originates from the
origin.

1.2 Vector Algebra

Vector algebra involves addition, subtraction, multiplication and division of


vectors. Vector multiplication involves scalar, cross and vector triple products.
4 Vector Calculus

1.2.1 Addition and Subtraction of Vectors

In vector addition or subtraction, corresponding components from given vectors


are added or subtracted together. If vectors ~r = 2i + 4j − 7k and ~b = −4i + 3j − k
are defined, the sum and difference of the two vectors are:

~r + ~b = (2 + −4)i + (4 + 3)j + (−7 + −1)k

= −2i + 7j − 8k.

~r − ~b = (2 − −4)i + (4 − 3)j + (−7 − −1)k

= 6i + j − 6k.

1.2.2 Scalar Multiplication

Vector scalar multiplication involves multiplying a vector with a scalar. All


vector components are multiplied by the scalar e.g.

2~r = 2(2i + 4j − 7k)

= 4i + 8j − 14k

0.25~r = 0.25(2i + 4j − 7k)

= 0.5i + j − 1.75k

1.2.3 Vector Multiplication

Vector multiplication include scalar or dot product, vector cross product and
vector triple product.

Vector Scalar / Dot Product


Given vectors r~1 = x1 i + y1 j + z1 k and r~2 = x2 i + y2 j + z2 k then the vector
scalar or dot product of r~1 and r~2 denoted by r~1 .~
r2 results in a scalar. This is
simplified using the identities i.j = i.k = j.k = 0 and i.i = j.j = k.k = 1. A dot
Vector Calculus 5

product is given by:

r~1 .~
r2 = x1 x2 + y1 y2 + z1 z2 (1.1)

If a dot product of two vectors is zero, the two vectors are said to be perpen-
dicular or orthogonal to each other. Orthogonal projection of one vector onto
another (~a, ~b) is the length of the shadow of ~a along ~b when the light is vertically
above ~a and ~b is horizontally oriented. The orthogonal projection of ~a onto ~b is
= |~a| cos θ where θ is the angle between the two vectors. A dot product of vectors
~a and ~b is:

~a.~b = |a||b| cos θ (1.2)

Vector Cross Product


The vector cross product of two vectors r~1 and r~2 is given by the determinant
of a 3 × 3 matrix formed by i, j and k and elements of the two vectors such as:

i j k


r~1 × r~2 = x1 y1 z1



x2 y2 z2
r~1 × r~2 = i(y1 z2 − z1 y2 ) − j(x1 z2 − x2 z1 ) + k(x1 z2 − x2 y1 )

which results in a vector. The modulus of the cross product denotes the area
of the parallelogram made by the two vectors i.e. Area = |~r1 × ~r2 |.

Vector Triple Product


If r~3 = x3 i + y3 j + z3 k then the vector triple product is given as the deter-
minant of the 3 × 3 matrix formed by elements of the 3 vectors. The modulus
of the vector triple product is the volume of the parallelepiped with the three
6 Vector Calculus

vectors as sides.

x1 y1 z1


r~1 × r~2 × r~3 = x2 y2 z2



x3 y3 z3
r~1 × r~2 × r~3 = x1 (y2 z3 − y3 z2 ) − y1 (x2 z3 − x3 z2 ) + z1 (x2 y3 − x3 y2 )

Volume of the parallelepiped formed is V olume = |~r1 × ~r2 × ~r3 |.

1.3 Scalar and Vector Fields

A field is a space or portion of space where the value of some quantity is defined.
If the quantity in question is a scalar, the field is said to be a scalar field and
if the it is a vector then the field is a vector field. Examples of scalar fields are
the density of atmospheric air and temperature at each point in an insulated
wall. F = x + 2y + 3z is an example of a scalar function. If x + 2y + 3z = k where
k is constant, we say a level surface has been defined. There is a collection of
all points at which the scalar field has the same value k.

1.3.1 Gradient of a Scalar Field

The gradient of a scalar field is a vector function that gives a vector which is
perpendicular to a given scalar field at a given point. Gradient is defined by
the differential operator, ∇:

∂ ∂ ∂
∇ = i +j +k (1.3)
∂x ∂y ∂z

such that ∇φ is

∂ ∂ ∂
∇φ = (i +j + k )φ.
∂x ∂y ∂z
∂φ ∂φ ∂φ
∇φ = i +j +k .
∂x ∂y ∂z
Vector Calculus 7

Example 1.1. Find the gradient of φ(x, y, z) = 2x + y + z.

Solution: The gradient of φ is:

∂(2x + y + z) ∂(2x + y + z) ∂(2x + y + z)


∇φ = i +j +k
∂x ∂y ∂z
∇φ = 2i + j + k

which is normal to the family of planes 2x + y + z = k.

1.3.2 Vector Field

Vector field is a space or portion of a space where a vector is defined at every


point of the space. An example is the gravitational field of the earth. Vector
F~ (x, y, z) = x2 i + 2xyj + (x + y)3 k and vector F~ = xi + yj are examples of vector
functions.

1.3.3 Divergence of a Vector Field

The divergence of a vector field is a scalar which tells the extent to which a
vector field explodes. It is interpreted as a dot product of the Grad operator
and a vector field. Given a vector field F~ = F1 i+F2 j +F3 k, then the divergence
of F~ is given by:

∂ ∂ ∂
∇.F~ = (i +j + k ).(F1 i + F2 j + F3 k)
∂x ∂y ∂z
2
∂(x y) ∂(yx) ∂0
= +j +k
∂x ∂y ∂z
∂F1 ∂F2 ∂F3
∇.F~ = + +
∂x ∂y ∂z

For a vector field F~ = x2 yi + yxj its divergence is given by:

∂ ∂ ∂
∇.F~ = (i +j + k ).(x2 yi + yxj + ok)
∂x ∂y ∂z
∇.F~ = 2xy + x
8 Vector Calculus

If the divergence of a vector field is zero, the vector field is said to be solenoidal.
If the divergence of a vector field is positive, the vector field is a source and if
it is negative the vector field is a sink.

1.3.4 Curl of a Vector Field

The curl of a vector field tells how a vector field rotates. It is given as the
cross product of the Grad operator and the vector field. For vector field F~ =
F1 i + F2 j + F3 k, its curl is:

i j k



~
∇ × F = ∂x
∂ ∂ ∂
(1.4)
∂y ∂z



F1 F2 F3
∂F3 ∂F2 ∂F3 ∂F1 ∂F2 ∂F1
∇ × F~ = i( − ) − j( − ) + k( − )
∂y ∂z ∂x ∂z ∂x ∂y

Then for a vector field F~ = −yi + xj the curl of a vector field F~ is:

i j k


∇ × F~ = ∂x
∂ ∂ ∂ = 2k
∂y ∂z

−y

x 0

If the curl of a vector field is zero, the vector field is said to be irrotational or
conservative.

1.4 Equations of Lines

The vector equation of a line that passes through a position vector ~a in the
direction of vector ~b is given by ~r, where ~r = xi + yj + zk:

~r = ~a + (~b − ~a)t

~r = ~a + ~ut (1.5)
Vector Calculus 9

where vector ~u is a direction vector from vector ~a to vector ~b and (xo , yo , zo ) is


a point where the line passes through. The vector equation can be written in
Cartesian form as:
x − x0 y − y0 z − z0
= =
a b c
where (a, b, c) is a direction vector from vector ~a to vector ~b. Lines in space can
be intersecting, parallel, skew or coinciding.

1.5 Tangent Lines and Normal Plane to space


curves

Given a vector function, F~ (t) = (t − cos t)i + (3 + sin 2t)j + (1 + cos 3t)k. Equation
of a tangent line through a point to is given by:

0
~r(t) = ~u(to ) + λ~u (to ) (1.6)

and equation of normal plane to a vector function F~(t) is:

[~r − ~ro ].F ~0 (t) = 0 (1.7)

Example 1.2. Find the equation of the tangent line to the curve F~ (t) = (t −
cos t)i + (3 + sin 2t)j + (1 + cos 3t)k at t = π2 . Find also the equation of the normal
plane through this point.

Solution
0
From the given vector function, F~ (t) = (1 + sin t)i + (2 cos 2t)j + (−3 sin 3t)k. At
0
t = π2 , F~ ( π2 ) = 2i − 2j + 3k and F~ ( π2 ) = π2 i + 3j + k.
10 Vector Calculus

Therefore equation of tangent line through a point t = to is given in general by:

0
~r(t) = ~u(to ) + λ~u (to )
π
~r(t) = ( i + 3j + k) + λ(2i − 2j + 3k)
2   
π
2
 2   
~r(t) =  3  + λ  −2 
   
   
1 3

and the equation of a normal plane to curve at a point to is given by:

0
[~r(t) − ~r(to )].F~ (to ) = 0

So taking, ro (t) = F~ ( π2 , equation of normal plane is:

0
(~r(t) − ~r(to )).F~ (to ) = 0
π
[~r(t) − ( i + 3j + k)].(2i − 2j + 3k) = 0
2

1.6 Tangent Plane to a surface at a point

Given ~r = (x, y, z) to be a general point in a plane and ~ro = (xo , yo , zo ) a point of


interest and F be a scalar field of concern (surface). The tangent plane to the
surface is given by:
(~r − ~ro ).~n = (r − ro ).∇F |Po = 0

Example 1.3. Find the equation of a i) tangent plane and ii) normal line to the
surface F (x, y, z) = x2 yz + 3y 2 − 2xz 2 + 8z at (1, 2, −1).
Vector Calculus 11

Solution: A normal to the surface at a point (1, 2, −1) is:

~n = ∇F |(xo ,yo ,zo )

∇F |(1,2,−1) = (2xyz − 2z 2 )i + (x2 z + 6y)j + (8 − 4xz + x2 y)k

∇F |(1,2,−1) = −6i + 11j + 14k = ~n

~n = −6i + 11j + 14k

(1.8)

The equation of the tangent plane to the surface at point (1, 2, −1) is:

[~r − ~ro ].~n = 0

[~r − (i + 2j − k)].(−6i + 11j + 14k) = 0

This can be written in Cartesian coordinates as:

−6x + 11y + 14z − 2 = 0

The equation of the normal line to surface at point (1, 2, −1) is:

0
~r = ~a + λ (to )t

~r = (i + 2j − k) + t(−6i + 11j + 14k)


   
1 −6
   
~r =  2  + t  11 
   
   
−1 14

This reduces to:


x−1 y−2 z+1
= =
−6 11 14

Example 1.4. Find the equations of a i) tangent line and ii) normal plane to a
curve ~r = (t − cos t)i + (3 + sin 2t)j + (1 + cos 3t)k at t = π2 .
12 Vector Calculus
π
Solution: A vector tangent to the curve at a point t = 2
is:

dr
~n = |t= π
dt 2
= (1 + sin t)i + 2 cos 2tj − 3 sin 3tk|t= π2

~n = 2i − 2j + 3k

and at t = π2 , ~n = π2 i + 3j + k. The required equation in Cartesian form is:

π
x− 2 y−3 z−1
= =
2 −2 3

Which is given in general as:

x − xo y − yo z − zo
= =
a b c

A tangent vector to the curve is normal to the required plane and ( π2 , 3, 1) is on


the plane, so the required equation of a tangent plane is:

(~r − r~o ).∇~r = 0


π
[r − ( i + 3j + k)].(2i − 2j + 3k) = 0
2

Exercises

1.

2.
Chapter 2

Ordinary Differential Equations

2.1 Introduction
dy d2 y dn y
A differential equation is an equation containing differential coefficients , 2 , ... n
dx dx dx
which are also represented as y 0 , y 00 , . . . y n or the differentials dy, d2 y, ...dn y, dx, d2 x, ..dn x
of one or more dependent variables with respect to one or more independent
variables. Differential equations are classified by:

1. Type - i.e. either ordinary or partial differential equations.

2. Order - i.e. 1st , 2nd , ...nth order. The order represents highest derivative in
the equation.

3. Linearity - indicating the degree or power of highest derivative.

d2 y dy
The equation 2
− 3 + 2y = 0 is a second order linear ordinary differential
dx dx
equation with constant coefficients. The standard form of a first order differen-
tial equation is:

P (x, y)dx + Q(x, y)dy = 0 (2.1)

The order of a differential equation is the highest derivative occuring in the


differential equation. An nth order differential equation can be written as
0 00 0 00
F (x, y, y , y , ...y n ) = 0 where x is the independent variable and y , y , . . . y n are
14 Ordinary Differential Equations

the dependent variables.

The general solution of a differential equation is a function f (x) which when


substituted into the differential equation reduces the equation to an identity.
The solution of a first order differential equation contains an arbitrary con-
stant, c. A particular solution is one member of the family of solutions in the
general solution got by substituting initial conditions in the general solution to
get the value of the constant.

2.2 First Order ODEs

The highest derivative in first order differential equations is 1. A first order


0
differential equation takes the form F (x, y, y ) = 0 where F is a function of
0 0
three variables x, y and y . x is an independent variable whilst y and y de-
dy
pends on x. First order equations are equations of the form = F (ax + by + c).
dx
du dy
They are solved by letting u = ax+by+c giving = a+b = a+bF (ax+by+c).
dx dx

There are different types of first order differential equations that are solved
using different ways. Four types of first order equations include separable
variables, linear, homogeneous and exact first order differential equations.

2.2.1 First Order ODEs with separable variables


dy
This is an ordinary differential equation that takes the form = g(x)h(y) or
dx
the form M (x)dx + N (y)dy = 0. The solution of this equation is given by sepa-
rating the common terms and integrating them separately giving:
Z Z
dy
= g(x)dx + c
h(y)

where c is an arbitrary constant.

dy x2
Example 2.1. Solve the differential equation = .
dx 1 − y2
Ordinary Differential Equations 15

Solution The right hand side of the equation can be separated in f (x) and
g(y) hence can be solved by separation of variables, we get:

dy x2
=
dx 1 − y2
(1 − y 2 )dy = x2 dx
Z Z
2
(1 − y )dy = x2 dx
y3 x3
y− = +c
3 2

The above is a general solution since a constant of integration, c is given. When


the differential equation is solved for particular conditions where the value of
c is identified, we get a particular solution.

Exercise
dy
a) Find the general solution of dx
= xy. If the curve passes through (2, 1),
find the particular solution.
dy
b) Solve = ex (1 + y 2 ).
dx

2.2.2 First Order Linear Differential Equations


0
First order linear differential equations take the form ao (x)y + a1 (x)y = f (x).
Such an equation is reduced to exact equation by multiplying it with an inte-
R a1 (x)
grating factor (IF) given by: I.F = e h(x)dx where h(x) = for which the
ao (x)
general solution becomes

d(I.F × y)
= I.F × f (x)
dx

On integrating, both sides with respect to x, we get


Z
(I.F × y) = I.F × f (x)dx

0 1
Example 2.2. Solve y + y = 2, x 6= 0.
x
16 Ordinary Differential Equations
1
R
Solution The integrating factor is e x dx = eln x = x. Therefore multiplying
0 1
the differential equation y + y = 2 by the integrating factor, we get
x

0 1
x(y + y) = 2x
x

which simplifies to:

d(xy)
= 2x
dx
xy = x2 + c
c
y = x+ f or x 6= 0
x

c
Giving a general solution y = x + x
or alternatively xy − x2 = c

2.2.3 First Order Homogeneous Differential Equations

A differential equation of the form y 0 = f (x, y), if it can be written in the form
dy y−x y 2 − x2
y 0 = F ( xy ) when x 6= 0. Examples of such equations are = or .
dx x−y xy
Such equations are solved by substituting y = vx or v = xy which will result in
a separable variable differential equation.

y
Example 2.3. Solve (xe x + y)dx − xdy = 0.

Solution Substituting y = vx and dy = xdv +vdx in this equation, it reduces


to:

(xev + vx)dx − x(xdv + vdx) = 0

x(ev + v − v)dx − x2 dv = 0

(ev + v − v)dx − xdv = 0


dx
= e−v dv
x
ln x = −e−v + c
y
ln x = −e− x + c
Ordinary Differential Equations 17

2.2.4 First Order Exact Differential Equations

An ordinary differential equation of the form P (x, y)dx + Q(x, y)dy = 0 is exact
if there exists a function f (x, y) such that df (x, y) = P (x, y)dx + Q(x, y)dy i.e. the
right side is the total differential of some function f (x, y). If such a function
∂f ∂f
exists, then ∂x
= P (x, y) and ∂y
= Q(x, y). The solution of such an equation is
f (x, y) = c. The function f (x, y) exists if

∂Q ∂P
=
∂x ∂y

If this is the case, then we get the solution by integrating P with respect to x
and Q with respect to y. f (x, y) is then given by the sum of the common term(s)
i.e. terms in x only and those in y only.

Example 2.4. Solve the differential equation 3x2 y 2 dx + 2x3 ydy = 0.

∂P ∂Q
Solution = = 6x2 y. Therefore the equation is exact. So integrating
∂y ∂x
Q(x, y) or P (x, y) we get:
Z
3x2 y 2 dx = x3 y 2 + g(y)
Z
2x3 ydy = x3 y 2 + h(x)

The final general solution is x3 y 2 = c.

2.3 Exercise

Solve the following first order differential equations

dy
1. =x+y
dx
0
2. y = sin(x − y)

2xy + 1 y−x
3. Solve dx + dy = 0
y y2

4. sin ydx + x cos ydy = 0


18 Ordinary Differential Equations

5. (3x2 + 2y sin 2x)dx + (2 sin2 x + 3y 2 )dy = 0

dy 3x2 y + 2xy
6. =− 3
dx x + x2 + 2y

7. x2 ecos t dt + 2xesin t dx = 2tdt

2.4 Higher Order Differential Equations

A differential equation of the form

dn y dn−1 y dy
an n
+ a n−1 n−1
+ ...a1 + ao y = F (x) (2.2)
dx dx dx

alternatively it can be written as:

0
an y n + an−1 y n−1 + ...a1 y + ao y = F (x) (2.3)

Equation (2.3) is called a linear differential equation of order n. If F (x) is iden-


tically equal to zero, the equation is said to be homogeneous, otherwise it is
non-homogeneous. Second order differential equations has highest deriva-
tive of two. We will discuss solutions of second order differential equations
with constant coefficients, homogeneous and non-homogeneous differen-
tial equations.

2.5 Second Order Differential Equations

Referring to equation (2.2), second order differential equation takes the highest
derivative, n to be 2. The general form of the second order differential equation
is:

d2 y dy
a0 2
+ a1 + a2 y = F (x) (2.4)
dx dx
Ordinary Differential Equations 19

Which can be written as:

a0 y 00 + a1 y 0 + a2 y = F (x) (2.5)

2.5.1 Second Order Homogeneous Differential Equation


with constant coefficients

Second order ordinary differential equations with constant coefficients take the
form

00 0
a0 y + a1 y + a2 y = 0 (2.6)

Where a0 , a1 and a2 are real numbers. Methods of solving such type of differ-
ential equation involve coming up with a characteristic equation from the
original differential equation, then solve it to determine the required solution.
0
The characteristic equation takes the form of substituting y with 1 (m0 ), y
00
with m1 and y with m2 . A characteristics equation of equation (2.6) takes a
quadratic form as:

a0 m2 + a1 m + a2 = 0 (2.7)

On solving this characteristic equation, solutions may be:

i. Equal and real - If there are equal roots, say, m1 twice, the solution of
the differential equation takes the form y = (ax + b)em1 x .

ii. Distinct and real - If there are two distinct roots, say, m1 and m2 , the
solution of the differential equation takes the form y = aem1 x + bem2 x .

iii. Distinct and complex - If the solutions are m1 = a1 + a2 i and m2 =


a1 − a2 i, hence the solution is y = ea1 x (c1 cos a2 x + c2 sin a2 x).

Example 2.5. Solve the second order homogeneous differential equations


d2 y dy
1. 2
− − 6y = 0
dx dx
20 Ordinary Differential Equations

d2 y dy
2. − 6 + 9y = 0
dx2 dx
d2 y dy
3. + 2 + 2y = 0
dx2 dx

Solutions

00 0
1. The characteristic equation of the equation y −y −6y = 0 is m2 −m−6 = 0,
which results in (m−3)(m+2) = 0. The solutions of characteristic equation
are m = 3 and m = −2. The solution to the differential equation is:
y = ae−2x + be3x

00
2. The characteristic equation of y − 6y 0 + 9y = 0 is m2 − 6m + 9 = 0, which
results in (m − 3)(m − 3) = 0. The solutions characteristic equation are
m = 3 twice. The solution to the differential equation is: y = (ax + b)e3x

00
3. The characteristic equation of y + 2y 0 + 2y = 0 is m2 + 2m + 2 = 0 which

result in solutions m = −1 ± 2i. The solution of the differential equation
√ √
is: y = e−x (a cos 2x + b sin 2x)

Exercises
Solve the following homogeneous differential equations.

1. y 000 − 3y 00 + 4y = 0

2. y 0000 + 2y 00 + y = 0

3. y 0000 − 3y 000 − 2y 00 + 2y 0 + 12y = 0

4. y 0000 + 6y 000 + 15y 00 + 20y 0 + 12y = 0

2.5.2 Non-Homogeneous Differential Equations

Higher order non-homogeneous differential equations take the form

dn y dn−1 y dy
an n
+ a n−1 n−1
+ ...a1 + ay = f (x) (2.8)
dx dx dx
Ordinary Differential Equations 21

where f (x) 6= 0. The general solution will be expressed as a sum of the com-
plementary solution and a particular solution of the non-homogeneous equa-
tion.

The solution of such an equation is got by first letting f (x) = 0 and getting
the solution to the resulting homogeneous equation. This solution is called the
complementary function. The particular solution is then found for f (x). The
form of the particular solution depends on the form of the right hand side. It
takes the following forms, if f (x) is:

i. nth order: yp = a1 xn + a2 xn−1 + · · · + ao . Say if f (x) = 2x3 + 4, then yp =


ax3 + a1 x2 + a2 x + a3 .

ii. a trigonometric function, say f (x) = 3 cos 2x, then yp = a cos 2x + b sin 2x.

iii. exponential function, say f (x) = 3e2x , then yp = ae2x

This particular solution is added to the complementary solution to pro-


duce the wanted general solution. The final solution will be:

y = yp + yc

The presence of f (x) means that some function g(x) has to be found from f (x)
then added to the complementary function to form the complete solution. The
type of function g(x) depends on the function f (x).

00 0
Example 2.6. Find the general solution of the differential equation y − 4y +
3y = 2x2 − 3

Solution: The solution will be given by the sum of the complementary and
particular solution. The complementary solution is got from the characteristic
22 Ordinary Differential Equations

equation:

m2 − 4m + 3 = 0

(m − 3)(m − 1) = 0

m = 3 or 1

The complementary solution, yc = aex + be3x . The particular solution will be


of order 2 since the right hand side of the differential equation is in quadratic
form. So the particular solution is:

yp = ax2 + bx + c
0
yp = 2ax + b
00
yp = 2a

Substituting the above in the differential equation, we get:

2a − 4(2ax + b) + 3(ax2 + bx + c) = 2x2 − 3

3ax2 + (3b − 8a)x + (2a − 4b + 3c) = 2x2 − 3

Solving by equating the coefficients of x2 , x and constant we get: a = 32 , b = 16


9
25
and c = 27
. The particular solution is:

2 2 16 25
yp = x + x+
3 9 27

The final solution of the differential equation is:

y = yc + yp
2 16 25
y = aex + be3x + x2 + x +
3 9 27

Example 2.7. Solve the differential equations

i with trig solution


Ordinary Differential Equations 23

ii with exponential

Exercises
Solve the following problems using the given hints.
00 0
1. 2y + 2y + 33y = x2 + 2x − 1. Use the particular solution yp = ax2 + bx + c
to get the first and second derivatives and substitute in the original ODE
to get the values of the coefficients.
00 0
2. y − 4y + 3y = x2 . Take yp = ax2 + bx + c.
00 0
3. y − 5y − 6y = 2e3x . Take yp = ae3x .
00 0
4. y − 4y + 3y = 2e3x . Take yp = axe3x since a term of the form ae3x is part
of the complimentary function.
00 0
5. y + 2y − 3y = sin x. Take yp = a sin x + b cos x
00 0
6. y + 3y − 4y = sin 2x. Take yp = x(a sin 2x + b cos 2x) since sin 2x is part of
the complimentary function.
0000 00
7. y − 4y = x2 + ex
000 00 0
8. y − 2y + y = 2 − 24ex + 40e5x
0000 00
9. y + 2y + y = 3x + 4
0000 000 00
10. y + 2y + 2y = 3ex + 2xe−x + e−x sin x

You might also like