TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
CHAPTER 9: Ordinary Differential Equations
CONTENTS
PAGE
9.1
Basic Concepts and Ideas
2
9.2
Solving First Order Differential Equations
9.2.1 Separable equation
9.2.1.1 Additional notes
9.2.2 Linear equation
9.2.2.1 Additional notes
9.2.3 Exact equation
9.2.3.1 Additional notes
Numerical Solution for First Order Differential Equations
9.3.1 Euler method
9.3.2 Second Order Runge-Kutta method
9.3.3 Additional notes
Solving Second Order Differential Equations
9.4.1 Homogenous equations with constant coefficients
9.4.2 Non-homogeneous equations
9.4.2.1 Method of Undetermined coefficient
9.4.2.2 Additional notes: variation of parameters
Additional notes: Alternative methods
9.5.1 Laplace transform
9.5.2 Fourier transform
5
5
6
8
9
11
14
16
16
18
20
23
24
27
27
30
32
32
34
9.3
9.4
9.5
cwc
1
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
9.1 BASIC CONCEPTS AND IDEAS
Definition:
An equation containing the derivatives or differentials of one or more dependent variables,
with respect to one or more independent variables, is said to be a differential equation.
Differential equations are classified according to type, order, and linearity.
Classification of differential equation
If an equation contains only ordinary derivatives, with respect to single independent
variables, is said to be an ordinary differential equation.
Example 9.1.1:
y' cosx
dy
5y 1
dt
du dv
x
dx dx
d2 y
dy
2 6y 0
2
dx
dx
An equation involving the partial derivatives of more than one independent variables is
called a partial differential equation.
Example 9.1.2:
u 2 u
(heat equation)
t x 2
2u
x 2
2u
y 2
0 (Laplace’s equation)
Classification by Order
The order of the highest-order derivative in a differential equation is called the order of the
equation.
Example 9.1.3:
d2y
dx 2
a2
4u
x 4
3
dy
x
- 4y = e
dx
+5
+
2u
t 2
=0
second-order ordinary differential equation.
forth-order partial differential equation.
A general nth-order, ordinary differential equation is often represented by the symbolism
cwc
2
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
dy
d n y
F x , y , , ,
0
dx
dx n
Thus first-order differential equations, contain only y’ and may contain y and given functions
of x. Hence it is written as
F(x, y, y’) = 0
Classification as Linear or Nonlinear
Only used to classify ordinary differential equation.
A differential equation is said to be linear if it can be written in the form
an ( x )
dny
dx
n
a n 1 ( x )
d n 1 y
dx
n 1
a1 ( x )
dy
a 0 ( x ) y g ( x ).
dx
It is characterized by two properties:
(i)
The dependent variable y and all its derivatives are of the first degree; that is, the
power of each term involving y is 1.
(ii)
Each coefficient depends on only the independent variable x.
An equation that is not linear is said to be nonlinear.
Example 9.1.4:
Linear first-order ordinary differential equation
Linear second-order ordinary differential equation
xdy ydx 0
y'' - 2y' + y = 0
x3
d3y
3
x2
d2y
2
dx
dx
yy' ' 2 y' x
d3y
dx
3
y2 0
3x
dy
5y e x
dx
Linear third-order ordinary differential equation
Nonlinear second-order ordinary differential equation
Nonlinear third-order ordinary differential equation
Concept of Solution
Definition: Any function f defined on some interval I, which when substituted into a
differential equation reduces the equation to an identity, is said to be a solution
of the equation on the interval.
Example 9.1.5:
Verify that y = x2 is a solution of the differential equation: xy' = 2y for all x.
Solution:
By substituting y = x2 and y’ = 2x into the equation we obtain xy’ = x(2x) = 2x2 = 2y, an
identity in x.
Explicit and Implicit Solutions
A solution of an ordinary differential equation that can be written in the form y = f(x) is said
to be an explicit solution. It is also a solution in which the dependent variable is expressed
solely in terms of the independent variable and constant.
A relation G(x, y) = 0 is said to be an implicit solution of an ordinary differential equation on
an interval I provided it defines one or more explicit solutions on I.
cwc
3
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Example 9.1.6:
For -1 < x < 1, the relation x2 + y2 - 1 = 0 is an implicit solution of the differential equation
dy
x
dx
y
.
By implicit differentiation it follows that
d 2
d
d
( x ) ( y 2 ) (1) 0
dx
dx
dx
dy
2x 2 y
0
dx
dy
x
.
dx
y
Example 9.1.7:
Show that the function y =3xex is a solution of the linear equation
y'' - 2y' + y = 0
on (-,).
Solution:
y' = 3xex + 3ex
y'' = 3xex + 3ex + 3ex
y'' - 2y' + y = (3xex + 6ex) - 2(3xex + 3ex) + 3xex = 0
for every real number.
In general, y = Axex is a solution of f, where A is an arbitrary constant. Hence this is known
as the general solution of f and y = 3xex is a particular solution of f.
The most general function that will satisfy the differential equation contains one or more
arbitrary constants is known as the general solution of the differential equation. Giving
particular numerical values to one or more of the constants in the general solution results in a
particular solution of the equation.
Example 9.1.8:
Solve y’ = cos x.
Solution:
y = sin x + c with arbitrary c.
Figure 1 shows some of the solutions, for c = -3, -2, -1, 0, 1, 2, 3, 4.
cwc
4
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Initial-Value Problem
Solving for an nth-order differential equation,
dy
d n y
F x , y , ,...,
0
dx
dx n
subject to the initial conditions
y(x0) = y0, y’(x0) = y1 , . . . , y(n-1)(x0) = yn-1 ,
where y0, y1 , . . . , yn-1 are arbitrary constants, is called an initial-value problem.
Example 9.1.9 :
1. The initial value problem.
2. The initial value problem
y'(x) = y ; y(0) = 3
2
d y
y 0; y (0) 1,
dx 2
dy
(0) 1.
dx
9.2 SOLVING FIRST ORDER DIFFERENTIAL EQUATIONS
9.2.1 First Order Separable Differential Equations
Definition:
A first-order differential equation of the form
g(y)y’ = f(x)
dy f ( x )
dx g ( y )
or
is said to be separable or to have separable variables where f(x) is a function that depends
only on x and g(y) is a function that depends only on y.
Example 9.2.1:
y ' xe ( x 2 y )
y’ = 3x – y
is separable,
is not separable.
Method of Solution : Separable equation
To solve (1), we integrate on both sides with respect to x, obtaining
dy
g ( y ) dx dx f ( x )dx c .
g ( y )dy f ( x )dx c .
Example 9.2.2
Solve the differential equation y' = 1 + y.
Solution:
dy
dx 1 y
1
1 y
dy dx
ln (1 y ) x c
(1 y ) be x
y Ke x 1
where c is constant, b ec , and K b , an arbitrary constant.
cwc
5
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Example 9.2.3
Solve the differential equation 9yy' + 4x = 0.
Solution:
dy
dx
4 x
9y
9 ydy 4 xdx
9
2
x2
9
y 2 2 x 2 c*
y2
4
c
The solutions represent a family of ellipses.
9.2.1.1 Additional Notes: Homogeneous Equation – Reduction to separable form
Definition
If the right hand side of the equation
dy
f ( x, y )
dx
can be expressed as a function of the ratio y alone, then we say the equation is
x
homogeneous.
y'
Example 9.2.4
Determine whether the following equation is homogeneous
a. ( xy y 2 x 2 )dx x 2 dy 0
b. x cos( y / x)dx ydy 0
c. x 3 dx y 2 dy 0
Solution
a)
( xy y 2 x 2 )dx x 2 dy 0
dy ( xy y 2 x 2 )
dx
x2
2
y y
1
x x
u u2 1
g (u )
Hence homogeneous equation.
b)
x cos( y / x)dx ydy 0
cwc
6
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
dy x cos( y / x )
dx
y
cos( y / x )
y
x
cos(u )
u
g (u )
Homogeneous Equation
c)
x 3 dx y 2 dy 0
dy
x3
2
dx
y
2
x
x
y
1
2 x
u
g u
Not a homogeneous equation.
Method of solution : Homogeneous equation
y
We write that y g g u
x
y
y xu.
x
Product differentiation now gives
where u
y' = u + xu'
where u'
du
.
dx
y
Since y g g u , we have
x
u + xu' = g(u)
Now we may separate the variable u and x,
du
dx
.
g( u ) u
x
Example 9.2.5
Solution:
a) xdy y x dx
dy y x y
1 u 1
dx
x
x
u xu u 1
cwc
7
TMA1101 CALCULUS
x
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
du
1
dx
1
du x dx
u ln x c
y
ln x c
x
b) 2xyy' = y2 - x2.
Dividing by x2, we have
2
Let u
y
y'
x
2
y
1
x
y
, we have y’ = u + u’x, hence
x
2u(u + u’x) = u2 - 1
2xuu’ = - u2 - 1
2u
1
du dx
x
u 1
2
ln(1 + u2) = -ln|x| + a
1 + u2 =
Replacing u by
c
x
y
,
x
x2 + y2 = cx
9.2.2 First Order Linear Differential Equations
Definition:
A differential equation of the form
a1 ( x )
dy
a0 ( x ) y g ( x )
dx
is said to be a first-order linear equation.
Method of solution : Linear Differential equation
1.
Make the coefficient of
dy
unity. i.e.
dx
dy
p( x ) y r ( x )
dx
For homogeneous equation, r(x) = 0,
dy
p( x ) y 0 , is a separable equation.
dx
2.
Identify p(x) and find the integrating factor
P ( x ) dx
u ( x) e
.
3.
Multiply the equation obtained in step (1) by the integrating factor:
P ( x ) dx dy
P ( x ) dx
P ( x ) dx
e
P ( x )e
y e
r ( x).
dx
cwc
8
TMA1101 CALCULUS
4.
5.
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
The left side of the equation in step (3) is the derivative of the product of the
integrating factor and the dependent variable y; that is,
P ( x ) dx
d P ( x ) dx
[e
y] e
r ( x ).
dx
Integrate both sides of the equation found in step (4).
Example 9.2.6
Solve x
dy
4y x6e x .
dx
Solution:
dy 4
y x 5e x .
dx x
Hence, the integrating factor, ( x ) e dx e 4 ln x
4
x
1 dy
4
1
y
( x 5e x )
4 dx
5
x
x
x4
d 1
y xe x
dx x 4
1
x
4
1
x4
.
is an exact equation.
y xe x dx xe x e x c
y x 5 e x x 4 e x cx 4 .
Example 9.2.7
Solve the initial value problem:
y’ + ytanx = sin 2x, y(0) = 1.
Solution:
Here p(x) = tan x,
Integrating factor,
u(x) = e p( x )dx e tan xdx e ln|sec x| sec x .
Multiplying into the equation,
sec x(y’ + ytanx) = sec x sin 2x
d
y sec x 2 sin x
dx
ysecx = 2 sin xdx
= -2cos x + c
y(x) = c cos x – 2 cos2 x.
From the initial condition, when x = 0, y = 1
1 = c.1 – 2.12
c = 3.
The solution of our initial value problem is
y(x) = 3 cos x – 2 cos2 x.
9.2.2.1 Additional notes: Bernoulli Equation – Reduction to Linear Form
The differential equation
dy
p( x ) y g ( x ) y a ,
dx
(4)
where a is any real number, is called Bernoulli’s equation. For a = 0 and a = 1, equation (4)
is linear in y. Now for y 0 , (4) can be written as
cwc
9
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
dy
p ( x ) y 1 a g ( x)
dx
If we let v = y1- a, a 0, a 1, then
y a
(5)
v' (1 a) y a y' (1 a ) y a gya py (1 a) g py1 a
.
With these substitutions, (5) can be simplified to the linear equation
v'(1 a) p( x)v (1 a) g ( x).
(6)
Solving (6) for v and using y1 -a = v lead to a solution of (4).
Method of solution
To solve equation (4), use substitution v y 1 a to reduce any equation of form (4) to a linear
differential equation.
Example 9.2.8
Solve the differential equation,
Solution
dy
3 y 5 y 3
dx
dy
y 3
3 y 2 5
dx
Thus the substitution v = y-2 and
y' = 3y - 5y3
dv
dy
2 y 3
gives
dx
dx
1 dv
3v 5
2 dx
dv
6v 10
dx
The integrating factor for this linear equation is
u ( x) e
6dx
e6 x
Therefore,
d 6x
(e v) 10e 6 x
dx
5
e 6x v e 6x c
3
5
e 6 x y 2 e 6 x c
3
cwc
10
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
9.2.3. First Order Exact Differential Equations - Integrating Factor
Recall Chapter 8:
Definition for Partial Derivative
The partial derivative of f ( x, y ) with respect to x at the point ( x0 , y0 ) is
f ( x0 h, y0 ) f ( x0 , y0 )
f
d
f ( x, y0 )
lim
h
0
x ( x0 , y0 ) dx
h
x x0
provided the limit exists.
The partial derivative of f ( x, y ) with respect to y at the point ( x0 , y0 ) is
f ( x0 , y0 h) f ( x0 , y0 )
f
d
f ( x0 , y )
lim
h0
y ( x0 , y0 ) dx
h
y y0
provided the limit exists.
cwc
11
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Example 9.2.9
Find the value of
f
f
and
at the point (4, 5) if f ( x, y ) x 2 3xy y 1 .
x
y
Solution
f
x 2 3 xy y 1 2 x 3 y
x x
f
x 2 3 xy y 1 3x 1
y y
f
2(4) 3(5) 7 ,
x (4, 5)
f
y
3(4) 1 13
(4, 5)
Example 9.2.10
f
Find
if f ( x, y ) y sin xy
y
f
y sin xy y sin xy (sin xy ) ( y )
y y
y
y
y cos xy ( xy ) sin xy xy cos xy sin xy
y
Definition of Total Differentiation
If we move from ( x0 , y0 ) to a point ( x0 dx, y0 dy ) nearby, the resulting change
df f x x0 , y 0 dx f y x 0 , y 0 dy
in the linearization of f is called the total differential of f.
Exact Differential Equations - Integrating Factor
A differential expression: M ( x , y )dx N ( x , y )dy is an exact differential in a region R of
the xy-plane if there is a function F(x, y) such that
F
( x , y ) M ( x, y )
x
and F ( x , y ) N ( x , y ) .
y
That is, the total differential of F satisfies
dF(x, y) = M ( x , y )dx N ( x , y )dy .
If M(x, y)dx + N(x, y)dy is an exact differential form, then the equation
M ( x , y )dx N ( x , y )dy 0
is called an exact equation.
Example 9.2.11
1. The equation x2y3dx + x3y2dy = 0 is exact since it is recognised that
d( 13 x3y3) = x2y3dx + x3y2dy.
2. Solve
dy
sin y
.
dx 2 y x cos y
Solution:
cwc
12
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Rewritten in differential form
sin ydx + (xcos y – 2y)dy = 0
d(xsiny – y2) = 0
xsiny – y2 = c.
Theorem (Criterion for an Exact Differential)
Let M(x, y) and N(x, y) be continuous and have continuous first partial derivatives in a
rectangular region R. Then a necessary and sufficient condition that
M ( x , y )dx N ( x , y )dy
be an exact differential is
M N
.
y
x
Method of solution : Exact equation
1.
If Mdx + Ndy = 0 is exact, then F M . Integrate this last equation with respect to x
x
to get
2.
F ( x, y ) M ( x, y )dx g ( y ) .
(2)
To determine g(y), take the partial derivative with respect to y of both sides of
equation (2) and substitute N for F . We can now solve for g’(y).
y
3.
Integrate g’(y) to obtain g(y) up to a numerical constant. Substituting g(y) into
equation (2) gives F(x, y).
4.
The solution to Mdx + Ndy = 0 is given implicitly by
F(x, y) = C.
F
(Alternatively, starting with
N , the implicit solution can be found by first
y
integrating with respect to y)
Example 9.2.12
Solve (e2y - ycos xy)dx + (2xe2y - xcos xy + 2y)dy = 0.
Solution:
Since My 2e 2 y xy sin xy cos xy Nx , the equation is exact. Hence, a function exists for
which
M ( x, y )
F
x
and
N ( x, y )
F
y
F
e 2 y y cos xy
x
F ( x, y ) e 2 y dx y cos xydx xe 2 y sin xy g ( y )
F
2 xe 2 y x cos xy g '( y ) N 2 xe 2 y x cos xy 2 y
y
so that
g’(y) = 2y and g(y) = y2+ c.
Hence, a one parameter family of solutions is given by
xe2y – sin xy + y2 + C = 0.
cwc
13
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
9.2.3.1 Additional notes: Integrating factors – Reduction to Exact form
It is sometimes possible to convert a non-exact differential equation into an exact equation by
multiplying it by a function u(x, y) called an integrating factor. However, the resulting exact
equation
(3)
uM( x , y )dx uN( x , y )dy 0
may not be equivalent to the original equation in the sense that a solution of one is also a
solution of the other. It is possible for a solution to be lost or gained as a result of the
multiplication.
Example 9.2.13
Consider the differential equation
-ydx + xdy = 0
1
Show that x2 is an integrating factor.
Solution:
With u = x12 ,
1
x2
(-ydx + xdy) = 0
we have
ydx xdy
x2
y
x2
dx
1
x
dy 0
Since
y
y
x2
Hence u =
1
x 2 x
1
x2
1x ,
the equation
y
x2
dx
1
x
dy 0 is exact.
is an integrating factor.
In this case, the exact equation is
ydx xdy
xy2 dx 1x dy d yx 0.
x2
y
c
x
or
y = cx is the solutions.
We find that taking
1
u=
y
2
,
u=
1
xy
and
u=
1
2
x y2
, the equations can also be
reduced to exact form;
ydx xdy
y2
d x ,
y
ydx xdy
xy
d ln x ,
y
ydx xdy
x2 y 2
d arctan yx .
Hence, we can have more than one integrating factor for a single equation.
cwc
14
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Example 9.2.14
1
x
Solve (x + y)dx + xln x dy = 0, using ( x , y ) , on ( 0 , ).
Solution:
Since
M
1
y
M N
y
x
N
1 ln x .
x
and
the equation is not exact.
By multiplying ( x , y ) 1x ,
1 y dx ln xdy 0 .
x
Then,
y
M 1 ( x, y ) 1 ,
x
Since M 1 1 N 1
N1 ( x, y ) ln x .
the equation is exact.
y
x
x
F
y
1 M 1 ( x, y)
x
x
F ( x, y ) x y ln x g ( y)
F
0 ln x g ' ( y) N 1 ( x, y) ln x
y
Hence g’(y) = 0
The solution is
and
g(y) = c.
F(x,y) = x + yln x + c = 0.
How to Find Integrating Factors
Theorem 1 [Integrating factor (x)]
If
1 M N
R( x ) , depends only on x, then (3) has an integrating factor
N y
x
u ( x) exp R( x )dx .
Theorem 2 [Integrating factor (y)]
If
1 N M ~
R ( y ) , depends only on y, then (3) has an integrating factor
M x
y
~
u ( y ) exp R ( y )dy .
Example 9.2.15
Solution:
a) Solve the equation (4x + 3y2)dx + 2xy dy = 0.
Let M(x, y) = 4x + 3y2 and N(x, y) = 2xy.
M
N
equation is not exact.
6y 2y
y
x
Consider
1 M N
1
6 y 2 y 2 f ( x ).
N y
x 2 xy
x
cwc
15
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
From Theorem 1,
( x ) e
2
x
dx
e 2 ln x x 2 is
an integrating factor.
Multiplying ( x ) into the equation, we have
x2(4x + 3y2)dx + 2x3ydy = 0
which is an exact equation.
d(x4 + x3y2 )= 0
x4 + x3y2 = c.
b) xy 2 dx x 2 dy xdx 0
xy
2
x dx x 2 dy 0
M
2 xy
y
N
2x
x
1 N M
2
M x
y
y 1
2
Integrating factor = e
Multiplying
( x )
Final solution:
y 1dy
=
1
( y 1) 2
into the equation, solve the exact differential equation.
x 2 y 1
c
2 y 1
9.3 NURMERICAL SOLUTION FOR FIRST ORDER DIFFERENTIAL EQUATIONS
9.3.1 Euler Method
In this section we shall consider initial value problems of the form
y f x, y , y x0 y 0
assuming the problem has a unique solution on some interval containing x0 .
We start form the given y 0 y x0 and proceed stepwise, computing approximate values of
the solution y x at the "mesh points"
x1 x0 h ,
x 2 x0 2h ,
x3 x0 3h ,……..
where the step size h is a fixed number.
The computation in each step is done by the same formula. Such formulas are suggested by
the Taylor series
y x h y x hy x y x hf x, y .
In the first step we compute
y1 y 0 hf x0 , y 0 which approximates y x1 y x0 h .
cwc
16
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
In the second step, we compute
y 2 y1 hf x1 , y1 which approximates y x 2 y x0 2h .
In general
y n 1 y n hf xn , y n ;
n 0,1,2,3,
This is called the Euler method or Euler-Cauchy method.
y2
y1
y0
h
x0 h
x0
x 0 2h
Figure 6.1: Illustrating Euler's method
Example 9.3.1
Apply the Euler's method to approximate the solution of the following initial value problem
and compute y1 , y 2 , y3 , y 4 and y 5 . Give each of your values in 4 decimal places.
y y x 2 1,
for 0 x 1 with y(0) = 0.5 and h = 0.2
Solution:
f x, y y x 2 1 , h = 0.2, x0 0, y 0 0.5
The general term
y n 1 y n hf xn , y n
y n 1 y n h y n x n2 1
Iteration 1: when n = 0
y1 y 0 h y 0 x02 1
where x0 0, y 0 0.5
2
= 0.5 + 0.2 (0.5 - 0 + 1)
= 0.8
Iteration 2: when n = 1
y 2 y1 h y1 x12 1
where x1 x0 h 0 0.2 0.2,
y1 0.8
= 0.8 + 0.2 (0.8 – (0.2)2 + 1)
= 1.152
cwc
17
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
n
0
1
2
xn
0
0.2
0.4
TRIMESTER I JUNE 2012
yn
0.5
0.8
1.152
9.3.2 Runge-Kutta second order methods
Consider the following geometric method, y (x) curve to obtain the solution to the
dy
differential equation
f ( x, y )
y( x0 ) y 0
dx
Slope k1
y1
*
y1
y0
Slope k 0
Slope
x0
k 0 k1
2
x0 h
Figure 6.2: Illustrating Runge Kutta second order method
- Starting from ( x0 , y 0 ) , draw a straight line with slope k 0 f ( x0 , y 0 ) .
- Find the value of y1* where this line cuts the vertical line erected at x0 h .
Calculate k1 f x0 h, y1* which is the slope of the solution curve at this point.
y1* y 0 k 0 h
k1 f x0 h, y 0 k 0 h
(k 0 k1 )
. This cuts the vertical line erected
2
x0 h at y1 . This is taken as the approximate solution of the differential equation at
- Draw a straight line from ( x0 , y 0 ) , with slope
at
x0 h .
y1 y 0 h
(k 0 k1 )
2
- In general, one would proceed from the nth point to the (n+1)th point in the algorithm,
cwc
18
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
k1 f x n ,
TRIMESTER I JUNE 2012
yn
k 2 f x n h,
y n 1 y n
y n hk1
h
k1 k 2
2
This method is called a second order Runge-Kutta method (also Modified-Euler method).
Example 9.3.2
Apply the Runge-Kutta method of order 2 to find the value of y1 , y 2 , y3 , y 4 and y 5 for the
following initial value problem
y y x 2 1,
for 0 x 1 with y(0) = 0.5 and h = 0.2
Give each of your values in 4 decimal places
Solution:
f x, y y x 2 1 , h = 0.2, x0 0, y 0 0.5
In general we have,
k1 f x n , y n
k 2 f x n h,
y n 1 y n
Iteration 1: when n = 0
k1 f x 0 , y 0 y 0
x 02
y n hk1
h
k1 k 2
2
where x0 0,
y 0 0.5
2
1 0.5 0 1 1.5
k 2 f x 0 h, y 0 hk1 f 0 0.2, 0.5 0.2 1.5 f 0.2, 0.8 0.8 0.2 2 1 1.76
y1 y 0
h
k1 k 2 0.5 0.2 1.5 1.76 0.826
2
2
Iteration 2: when n = 1
where x1 x0 h 0 0.2 0.2,
y1 0.826
k1 f x1 , y1 f 0.2, 0.826 0.826 0.2 2 1 1.786
k 2 f x1 h, y1 hk1 f 0.4, 1.1832 1.1832 0.4 2 1 2.0232
h
0.2
y 2 y1 k1 k 2 0.826
1.786 2.0232 1.2069
2
2
n
0
1
2
cwc
xn
0
0.2
0.4
yn
0.5
0.826
1.2069
19
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Accuracy measurement
Absolute error = | exact value – approximation |
|
|
Percentage error =
× 100%
|
|
Example 9.3.3
Refer to example 9.3.2, solve y y x 2 1 ,
with y(0) = 0.5 using the method learned in
9.2 for linear equation and get the general solution
=
( −
3
+ )
Initial value problem: y(0) = 0.5
= 0.5
Therefore
=
xn
yn (Euler method)
=
0
0.2
0.4
1
+ )
3 2
Exact solution:
n
0
1
2
( −
Absolute error
Percentage error
0
0.051725
0.158817
0
6.072954
12.11585
1
( − + )
3 2
0.5
0.851725
1.310817
0.5
0.826
1.2069
9.3.3 Additional notes: Runge-Kutta fourth order Method
One of the more popular as well as most accurate numerical procedures used in obtaining
approximate solutions to the initial-value problem y' = f(x,y), y(x0) = y0 is the fourth-order
Runge-kutta method. As the name suggests, there are Runge-Kutta methods of different
orders. These methods are derived using both the Taylor series expansion with remainder of
function y(x) and the geometrical approach. The following method is geometrically
explained using Figure as follow-
k4
D
E
k3
hS
C
k
A
k2
B
yn
k1
xn
xn
h
2
xn h
Figure 6.2 : Illustrating Runge Kutta Fourth order method
cwc
20
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
- Given the point A ( x n , y n ) on the solution curve. Draw a straight line through it with
h
slope k1 f ( x n , y n ) . Let this straight line cut the vertical line erected at x n at B.
2
h
h
- Find the slope k 2 of the solution curve at B.
k 2 f x n , y n k1
2
2
From the point A, draw a straight line with slope k 2 . Let this straight line cut the vertical
h
line erected at x n at C.
2
h
h
- Find the slope k3 of the solution curve at C.
k3 f xn , y n k 2
2
2
From the point A, draw a straight line with slope k3 . Let this straight line cut the vertical line
erected at x n h at D.
- Find the slope k 4 of the solution curve at D.
k 4 f x n h, y n k 3 h
- Find a weighted average of the four slopes as given by
1
k (k1 2k 2 2k 3 k 4 )
6
- Draw a straight line from A with slope k. Let it cut the vertical line erected at x n h at E.
The point E is taken as the approximate solution of the differential equation at x n h .
- The formula is summarized as:
k1 f x n ,
yn
1
1
k 2 f x n h, y n hk1
2
2
1
1
k 3 f x n h, y n hk 2
2
2
k 4 f xn h, y n hk 3
y n 1 y n
h
k1 2k 2 2k3 k 4
6
Example 9.3.3
Apply the Runge-Kutta forth order method to solve the following initial value problem,
y y x 2 1,
for 0 x 1 with y(0) = 0.5 and h = 0.2
Perform 4 iterations and give each of your values in 4 decimal places
Solution:
f x, y y x 2 1 , h = 0.2, x0 0, y 0 0.5
In general we have,
cwc
21
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
k1 f x n ,
TRIMESTER I JUNE 2012
yn
1
1
k 2 f x n h, y n hk1
2
2
1
1
k 3 f x n h, y n hk 2
2
2
k 4 f xn h, y n hk 3
y n 1 y n
h
k1 2k 2 2k3 k 4
6
where x0 0,
Iteration 1: when n = 0
y 0 0.5
k1 f x0 , y 0 y 0 x02 1 0.5 0 2 1 1.5
1
1
1
1
k 2 f x0 h, y 0 hk1 f 0 0.2, 0.5 0.2 1.5 f 0.1, 0.65
2
2
2
2
0.65 0.12 1 1.64
1
k 3 f x0 h,
2
1
1
1
hk 2 f 0 0.2, 0.5 0.21.64 f 0.1, 0.664
2
2
2
y0
0.664 0.12 1 1.654
k 4 f x0 h, y 0 hk 3 f 0 0.2, 0.5 0.21.654 f 0.2, 0.8308
0.8308 0.2 2 1 1.7908
h
0.2
1.5 21.64 2 1.654 1.7908 0.8293
y1 y 0 k1 2k 2 2k 3 k 4 0.5
6
6
Iteration 2: when n = 1
where x1 0.2,
y1 0.8293
k1 f x1 , y1 y1 x12 1 0.8293 0.2 2 1 1.7893
1
1
1
1
k 2 f x1 h, y1 hk1 f 0.2 0.2 , 0.8293 0.2 1.7893 f 0.3, 1.0082
2
2
2
2
1.0082 0.3 2 1 1.9182
1
k 3 f x1 h,
2
y1
1
hk 2
2
1
1
f 0.2 0.2 , 0.8293 0.2 1.9182 f 0.3, 1.0211
2
2
1.0211 0.3 2 1 1.9311
k 4 f x1 h, y1 hk 3 f 0.2 0.2, 0.8293 0.2 1.9311 f 0.4, 1.2155
1.2155 0.4 2 1 2.0555
h
0.2
y 2 y1 k1 2k 2 2k 3 k 4 0.8293
1.7893 2 1.9182 2 1.9311 2.0555 1.2141
6
6
cwc
22
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
n
0
1
2
9.4
xn
0
0.2
0.4
TRIMESTER I JUNE 2012
yn
0.5
0.8293
1.2141
SOLVING SECOND ORDER DIFFERENTIAL EQUATIONS
A second-order differential equation is called linear if it can be written as
y’’ + p(x)y' + q(x)y = r(x)
(1)
where p, q, r are any given function of x. Any second order differential equation that cannot
be written in the above form is called nonlinear.
If r(x) = 0, equation (1) becomes
y’’ + p(x)y' + q(x)y = 0
and is called homogeneous.
(2)
If r(x) is not identically zero, the equation is called non-homogeneous.
Example 9.4.1
y’’ + 4y = e-xsin x
--- non-homogeneous linear d e
(1 – x2)y’’ – 2xy’ + 6y = 0 --- homogeneous linear d.e
x(y’’y + y’2) + 2y’y = 0 --- homogeneous nonlinear d.e
Theorem (Fundamental theorem for the homogeneous equation)
For a homogeneous linear differential equation (2), any linear combination of two solutions
on an open interval I is again a solution of (2) on I. In particular, for such an equation, sums
and constant multiples of solutions are again solutions.
Example 9.4.2
1. Verify that y = ex and y = e-x are solutions of the homogeneous linear differential equation
y’’ – y = 0.
x
-x
2. Are y = ce , y = de and y = cex + de-x also the solutions?
Solution:
1. Since (ex)’’ – ex = ex – ex = 0 and (e-x)’’ – e-x = e-x – e-x = 0, y = ex and y = e-x are
solutions of the d.e.
2. Since (cex)’’ – cex = cex – cex = 0 and (de-x)’’ – de-x = de-x – de-x = 0, y = cex and y = dex
are solutions of the d.e.
Similarly, (cex + de-x)’’ - (cex + de-x) = (cex + de-x) - (cex + de-x) = 0, we have y = cex +
de-x as another solution.
Note: This theorem does not hold for the non-homogeneous equation or for a nonlinear
equation.
cwc
23
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
General Solution
For second-order homogeneous linear equations (2), a general solution will be of the form
y= c1y1 + c2y2
(3)
a linear combination of two (suitable) solutions involving two arbitrary constants c1, c2.
These y1, y2 are then called a basis (or fundamental system) of (2) on I.
Particular Solution
A particular solution of (2) on I is obtained if we assign specific values to c1 and c2 in (3).
Initial Value Problem
An initial value problem now consists of a homogeneous linear differential equation and two
initial conditions
y’’ + p(x)y' + q(x)y = 0 ;
y(x0) = K0, y’(x0) = K1,
Linear independence and dependence
Two functions y1(x), y2(x) is said to be linearly dependent on an interval I if there exist
constants c1, c2 not all zero, such that
c1y1(x) + c2y2(x) = 0
for every x in the interval.
It is said to be linearly independent on an interval I if it is not linearly dependent on the
interval.
Example 9.4.3
The function f1(x) = sin 2x and f2(x) = sin xcos x are linearly dependent on the interval
since
c1sin2x + c2sin xcos x = 0
is satisfied for every real x if we choose c1 1 and c2 = -1.
( , )
2
Definition of a basis
A basis of solutions of (2) on an interval I is a pair y1, y2 of linearly independent solutions of
(2) on I.
9.4.1 HOMOGENEOUS EQUATIONS WITH CONSTANT COEFFICIENTS
In this section, we show how to solve homogeneous second order linear equations
ay’’ + by’ + cy = 0
(4)
which coefficients a( 0), b and c are constants.
We try a solution of the form y = ex. Then y’ = ex and y’’ = 2ex.
Equation (4) becomes
a2ex + bex + cex = 0
(a2 + b + c)ex = 0.
Because ex is never zero for real values of x,
a2 + b + c = 0.
cwc
24
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
This latter equation is called the auxiliary equation, or characteristic equation.
The roots of the auxiliary equation are
1
b b 2 4ac
,
2a
2
b b 2 4ac
2a
With that, we obtain
Case I:
two real roots if b2 – 4ac > 0
Case II: a real double root if b2 – 4ac = 0
Case III: complex conjugate roots if b2 – 4ac < 0
Consider these three cases, namely, the solutions of the auxiliary equation corresponding to
distinct real roots, real but equal roots, and a conjugate pair of complex roots.
CASE 1: DISTINCT REAL ROOTS ( 1 2 )
The general solution of (4) on R is
y c1e x c 2 e
1
2
x
where c1 and c2 are arbitrary constants.
Example 9.4.4
Find the general solution of
Solution:
y'' + 5y' + 6y = 0.
The characteristic equation is
2 + 5 + 6 = 0
( + 2)( + 3) = 0
Thus, the general solution is
y c1e 2 x c2 e 3 x .
CASE II: REPEATED REAL ROOTS (1 = 2 )
The general solution of (4) on R is
y c1e x c 2 xe x
1
1
where c1 and c2 are arbitrary constants.
Example 9.4.5
Solve the differential equation
Solution:
y'' + 4y' + 4y = 0.
The characteristic equation is
2 + 4 + 4 = ( + 2)2 = 0
Thus, the general solution is
y c1e 2 x c2 xe 2 x .
CASE III: CONJUGATE COMPLEX ROOTS (1, 2 are complex)
cwc
25
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
If 1 and 2 are complex, then we can write
1 = + i and 2 = - i
where and > 0 are real.
Therefore, the general solution of (4) on R is
y c1e x cos x c 2 ex sin x
e x (c1 cos x c 2 sin x).
where c1 and c2 are arbitrary constants.
Example 9.4.6
Find the general solution of y'' + 9y = 0.
Solution:
The characteristic equation is
2 + 9 =0
= 3i
The general solution is
y =c1cos 3x + c2sin 3x.
Summary of Case I, II, and III
Case
I
II
III
cwc
Roots of (2)
Basis of (1)
General Solution of
(1)
Distinct real
1, 2
Repeated real
root
= 1 = 2
Complex
conjugate
1 = + i
2 = - i
e 1 x , e 2 x
y c1e 1 x c 2 e 2 x
e x , xe x
y c1 c 2 x e x
e x cos x,
y ex (c1 cos x c2 sin x).
e x sin x
26
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
9.4.2 NON-HOMOGENEOUS EQUATIONS
In this section, we show how to solve non-homogeneous linear differential equations
y’’ + p(x)y' + q(x)y = r(x)
(5)
where r(x) 0.
The corresponding homogeneous equation of (5) is
y’’ + p(x)y' + q(x)y = 0
(6)
Definition: (General Solution, particular solution)
A general solution of the non-homogeneous equation (5) on the interval is defined to be
y = yh(x) + yp(x)
(7)
where yh = c1 y1(x) + c2 y2(x)(complementary function) is a general solution of the
homogeneous equation (6) on I and yp (particular solution) is any solution of (5) with no
arbitrary constants.
Example 9.4.7
A particular solution of
Since yp’’ = 0 , then
9.4.2.1
y’’ + 9y = 27 is yp = 3.
yp’’ + 9 yp = 0 + 9 yp = 9(3) = 27.
Method of Undetermined coefficients
Method of undetermined coefficient can be used to solve non-homogeneous DE with constant
coefficient.
Method of Undetermined coefficients
Step 1:
Solve for homogeneous equation (6).
Step 2:
Find any particular solution yp of (5).
Step 3:
Form general solution y = yh + yp
Rules for the Method of Undetermined Coefficients
(a) Basic Rule.
If r(x) is one of the functions in the first column in the table below, choose the corresponding
function yp in the second column and determine its undetermined coefficients by substituting
yp and its derivatives into (5).
cwc
27
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
Term in r(x)
ke x
Choice for yp
Ce x
kx n (n 0,1,)
k cos x
k sin x
K n x n K n 1 x n 1 K1 x K 0
ke x cos x
TRIMESTER I JUNE 2012
K cos x M sin x
x
e K cos x M sin x
x
ke sin x
x n cos x
n
n 1
n
n 1
( K n x K n 1 x K 0 ) cos x ( Ln x Ln 1 x L0 ) sin x
n
x sin x
Example 9.4.8
Solve
y'' + 4y' - 2y = 2x2 - 3x + 6.
Solution:
Step 1.
We first solve the associated homogeneous equation
y'' + 4y' - 2y = 0.
The characteristic equation is
2 + 4 -2 = 0
4 16 8
2 6
2
yh c1e( 2 6 ) x c2 e( 2 6 ) x
Step 2. Solve for particular solution.
Since r(x) = 2x2 - 3x + 6 is a quadratic polynomial, we assume
yp = Ax2 + Bx + C.
yp’’ = 2A.
yp’ = 2Ax + B and
Substitute into the equation, we have
2A + 4(2Ax + B) – 2(Ax2 + Bx + C) = 2x2 –3x + 6
2A =- 2, 8A – 2B = -3, 2A + 4B – 2C = 6
5
A =- 1, B = , C =- 9
2
y p x 2 52 x 9
Step 3.
The general solution of the given equation is
y ( x ) yh y p c1e( 2 6 ) x c2 e( 2 6 ) x x 2 52 x 9
(b) Sum Rule.
If r(x) consists of sum of m terms of the kind given in above table, the assumption for a
particular solution of y p consists of the sum of the trial forms y p1 , y p2 , , y pm corresponding
to these terms
y p y p1 y p2 y pm .
cwc
28
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Example 9.4.9
Find the general solution of the equation
d2y
dx
2
5
dy
6 y e 2 x 2 x .
dx
Solution:
Step 1. We first solve the associated homogeneous equation
The characteristic equation is
2 + 5 - 6 = 0
( – 1)( + 6) = 1
yh = c1ex + c2 e -6 x
Step 2. Solve for particular solution.
Since r(x) = e-2x + 2 – x is the sum of two function, we assume
y p1 Ae 2 x , y p2 Bx C
yp = Ae-2x + Bx + C
yp’ = -2A e 2 x + B
yp’’ = 4A e 2 x
Substitute into the equation, we have
-12A=1,
- 6B=-1,
5B-6C=2
A = -1/12, B = 1/6 and C = -7/36.
Step 3. The general solution of the given equation is
e 2 x x 7
y = yh + yp = c1 e x c 2 e 6 x
12 6 36
(c) Modification Rule.
If a term in your choice for y pi contains terms that duplicate terms in yh , then that y pi must
be multiplied by x n , where n is the smallest positive integer that eliminates that duplication.
Example 9.4.10
Find the general solution of the equation
d2y
dy
2 y et
2
dt
dt
Solution:
Step 1. We first solve the associated homogeneous equation
The characteristic equation is
2 - 2 + 1 = 0
( - 1)2 = 1
yh = c1et + c2 tet
Step 2. Solve for particular solution.
Since r(t) = et is a term in yc, we assume
yp = At2et
cwc
29
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
yp’ =2At e t + A t 2 e t
yp’’ = 2A e t +4At e t +A t 2
TRIMESTER I JUNE 2012
et
1
2
Step 3. The general solution of the given equation is
1
y = yh + yp= c1 e t + c 2 t e t + t 2 e t .
2
Substitute into the equation, we have A=
Example 9.4.11
Given that the function y1(x)=e-5x and y2(x) = e2x are both the solutions of the
homogeneous equation, find the general solution of the equation
d2y
dy
3 10 y x(e x 1)
2
dx
dx
Solution:
Step 1. We first determine the associated homogeneous equation
Since y1(x)=e-5x and y2(x) = e2x are both the solutions of the homogeneous
equation
yh = c1e-5x + c2 e2x
Step 2. Solve for particular solution.
Since r(x) =x ( ex + 1) is a combination of 2 functions, we assume
yp
= (Ax + B)ex + Cx + D
yp’
= (Ax + B)ex + Aex +C
yp’’
= (Ax + B)ex + 2Aex
Substitute into the equation, we have
1
5
1
3
A
B
C
D
6
36
10
100
Step 3. The general solution of the given equation is
5
1
3
1
y yh y p c1e5 x c2 e 2 x x e x x
36
10
100
6
9.4.2.2 Additional notes: Variation of Parameter
Variation of parameter has a distinct advantage over the method of undetermined coefficients
in that it will always yield a particular solution y p provided the related homogeneous
equation can be solved. Also, variation of parameters, unlike undetermined coefficients, is
applicable to differential equations with variable coefficients.
Variation of Parameter
To solve a non-homogeneous linear second order differential equation ay"by 'cy g ( x )
Step 1: Find the complementary function y h c1 y1 c 2 y 2
Step 2: Compute the Wronskian, W y1
y '1
cwc
y2
y '2
30
TMA1101 CALCULUS
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
Step 3: By dividing by a, we put the equation into the standard form
y" py 'qy f ( x)
to determine f (x ) .
Step 4: Find W1 , W2 , u '1 , u1 , u '2 , u 2
where
W1
0
f ( x)
y2
y'2
W1
W
W
u'2 2
W
u '1
W2
y1
y '1
u1 u'1 dx
u 2 u '2 dx
0
f ( x)
Step 5: A particular solution is y p u1 y1 u 2 y 2
Step 6: A general solution is y y h y p
Example 9.4.12
Solve the differential equation using variation of parameter.
y"4 y '4 y ( x 1)e 2 x
Solution:
(i)
The characteristic equation
2 4 4 0
( 2) 2 0
2
(repeated roots)
(ii)
y h c1e 2 x c 2 xe 2 x
With the identification y1 e 2 x
Compute
W
y1
y '1
y2
e 2x
2x
y' 2
2e
y 2 xe 2 x
and
xe 2 x
2 xe 2 x e 2 x
2 xe 4 x e 4 x 2 xe 4 x e 4 x
(iii)
Since the coefficient of y” is 1, we identify f ( x) ( x 1)e 2 x
(iv)
Compute W1 , W2 , u '1 , u1 ,
W1
W2
0
f ( x)
y1
y '1
y2
y' 2
0
( x 1)e
0
e2 x
2x
f ( x) 2e
W
u '1 1 x 2 x
W
(vi)
cwc
, u2
2 xe 2 x e 2 x
x( x 1)e 4 x
0
( x 1)e4 x
( x 1)e2 x
u1 u '1 dx
x3 x 2
3
2
x2
x
2
2
3
A particular solution, y p u1 y1 u 2 y 2 x x e 2 x
2
6
u '2
(v)
xe
2x
u '2
2x
W2
x 1
W
u 2 u ' 2 dx
x3 x2
A general solution, y y h y p c1e 2 x c 2 xe 2 x e 2 x
2
6
31
TMA1101 CALCULUS
9.5
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
ADDITIONAL NOTES: ALTERNATIVE METHODS
9.5.1 Laplace transform
Due to space scarcity, the details of Laplace transform are excluded from this note. Students
are freely to find them through internet and texts.
Laplace transforms:
F ( s ) L [ f (t )] e st f (t ) dt and
f (t ) L1[ F (s)]
0
df
d2 f
Noting that f ' (t )
and f " (t )
,
dt
dt 2
L[ f ' (t )] sF ( s) f (0)
L[ f " (t )] s 2 F (s) sf (0) f ' (0)
The strategy: Convert the original differential equation in time (or space) variable into
algebraic equation in s-space using the Laplace transform.
Example 9.5.1
Solve the following initial value problem.
(a). y ' (t ) 4 y (t ) 1,
y (0) 1 .
Perform Laplace transform on the l.h.s and r.h.s of the differential equation given.
L[ y ' (t ) 4 y (t )] L[1]
Based on linear superposition principle:
L[ y' (t )] 4L[ y(t )] L[1] .
(*)
Use the property of Laplace transform of derivative: L [ y ' (t )] sY ( s ) y (0) , thus equation
(*) is written as
sY ( s) 1 4Y (s )
1
s
or simplified to give
cwc
32
TMA1101 CALCULUS
Y (s)
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
1
1
.
s(s 4) (s 4)
The solution to the original differential equation is obtain by taking the inverse Laplace
transform, y (t ) L1[Y (s )] , namely
1
1
y (t ) L1[Y ( s)] L1
L1
s ( s 4)
( s 4)
Refering to the Table of Laplace transform
1
1
L1
1 e4t
4
s ( s 4)
1
L1
e4t
(s 4)
Thus the solution to the initial value problem is
y (t )
1 4t
e 1 e 4t
4
5 4t 1
e
4
4
(b) y" (t ) y (t ) 1,
#
y (0) 6, y ' (0) 0
Perform Laplace transform on the differential equation:
L[ y" y ] L[1]
L[ y" ] L[ y ] L[1]
Recall that,
L[ y"(t )] s 2Y (s) sy (0) y' (0)
L[ y" ] L[ y ] L[1]
L[1]
1
s
Substitute the above equations in the differential equation:
s 2 Y ( s ) 6s 0 Y ( s )
1
s
or simplify to
cwc
33
TMA1101 CALCULUS
Y (s)
FACULTY OF COMPUTING & INFORAMTICS
TRIMESTER I JUNE 2012
1 1
5s
1
6s 2
(s 1) s
s ( s 1)
2
The solution is given by
1
s
y(t ) L1 5L1 2
s
s 1
Refering to the Table of Laplace transform, the solution is
#
y(t ) 1 5 cos t
9.5.2 Fourier transform
Fourier transform for function f ( x ) , denoted as { f } or fˆ ( ) is defined as
{ f } fˆ (w)
1
2
f ( x) exp(i x)dx .
The corresponding inverse Fourier transform, denoted 1 ( fˆ ) is denoted as
f ( x)
1
2
fˆ ( ) exp(iwx)d
Example 9.5.2
Find the Fourier transform of
f ( x ) k if 0 x a and f ( x ) 0 otherwise.
Solution
(a) From definition of Fourier transform, we get that
1 a
k exp{i a} 1 k (1 exp{i a})
fˆ ( )
k exp{i x}dx
i
2 0
2
i 2
This show that the Fourier transform will in general be a complex-valued function.
---------------------------THE END----------------------------
cwc
34
© Copyright 2026 Paperzz