Professional Documents
Culture Documents
m
Unit 2: Fourier Transforms…………………………26-38
o
s.c
Unit 4: Curve Fitting & Optimization ……………….49-66
UNIT- I
FOURIER SERIES
m
CONTENTS:
Introduction
o
Periodic function
s.c
Trigonometric series and Euler’s formulae
c
Fourier series of even and odd functions
vtu
Fourier series of arbitrary period
UNIT- I
FOURIER SERIES
m
DEFINITIONS :
A function y = f(x) is said to be even, if f(-x) = f(x). The graph of the even function is
always symmetrical about the y-axis.
o
A function y=f(x) is said to be odd, if f(-x) = - f(x). The graph of the odd function is
always symmetrical about the origin.
s.c
For example, the function f(x) = x in [-1,1] is even as f(-x) = x x = f(x) and the
function f(x) = x in [-1,1] is odd as f(-x) = -x = -f(x). The graphs of these functions are
shown below :
c
vtu
w.
ww
Note that the graph of f(x) = x is symmetrical about the y-axis and the graph of f(x) = x
is symmetrical about the origin.
For example,
1. h(x) = x2 cosx is even, since both x2 and cosx are even functions
2. h(x) = xsinx is even, since x and sinx are odd functions
3. h(x) = x2 sinx is odd, since x2 is even and sinx is odd.
a a
2. If f(x) is even, then f ( x)dx 2 f ( x)dx
m
a 0
a
3. If f(x) is odd, then f ( x)dx 0
o
a
For example,
a a
s.c
cos xdx 2 cos xdx, as cosx is even
a 0
a
and
a
sin xdx 0, as sinx is odd
c
vtu
PERIODIC FUNCTIONS :-
A periodic function has a basic shape which is repeated over and over again. The
fundamental range is the time (or sometimes distance) over which the basic shape is
defined. The length of the fundamental range is called the period.
w.
f(x+T) = f(x)
Thus,
f(x) = f(x+nT), n=1,2,3,…..
o m
s.c
Note that the graph of the function between 0 and 2 is the same as that between 2 and
4 and so on. It may be verified that a linear combination of periodic functions is also
periodic.
FOURIER SERIES
c
A Fourier series of a periodic function consists of a sum of sine and cosine terms. Sines
and cosines are the most fundamental periodic functions.
vtu
The Fourier series is named after the French Mathematician and Physicist Jacques
Fourier (1768 – 1830). Fourier series has its application in problems pertaining to Heat
conduction, acoustics, etc. The subject matter may be divided into the following sub
topics.
w.
FOURIER SERIES
ww
Consider a real-valued function f(x) which obeys the following conditions called
Dirichlet’s conditions :
1. f(x) is defined in an interval (a,a+2l), and f(x+2l) = f(x) so that f(x) is a periodic
function of period 2l.
2. f(x) is continuous or has only a finite number of discontinuities in the interval
(a,a+2l).
3. f(x) has no or only a finite number of maxima or minima in the interval (a,a+2l).
Also, let
m
1 a 2l
l a
a0 f ( x)dx (1)
1 a 2l n
o
an f ( x) cos xdx, n 1,2,3,..... (2)
l a l
1 a 2l n
s.c
bn
l a f ( x) sin
l
xdx, n 1,2,3,...... (3)
It can be proved that the sum of the series (4) is f(x) if f(x) is continuous at x. Thus we
have
a
n n
f(x) = 0 an cos x bn sin
w.
x ……. (5)
2 n 1 l l
Suppose f(x) is discontinuous at x, then the sum of the series (4) would be
1
2
f ( x ) f (x )
+ -
where f(x ) and f(x ) are the values of f(x) immediately to the right and to the left of f(x)
ww
respectively.
Particular Cases
Case (i)
Suppose a=0. Then f(x) is defined over the interval (0,2l). Formulae (1), (2), (3) reduce
to
n
2l 2l
1 1
a0 f ( x)dx an f ( x) cos xdx,
l0 l0 l
n
2l
1
bn
l0 f ( x) sin
l
xdx,
n 1,2,...... (6)
Then the right-hand side of (5) is the Fourier expansion of f(x) over the interval (0,2l).
If we set l=, then f(x) is defined over the interval (0,2). Formulae (6) reduce to
m
1 2
0
a0 = f ( x)dx
o
1 2
0
an f ( x) cos nxdx
, n=1,2,….. (7)
s.c
1 2
bn f ( x) sin nxdx n=1,2,…..
0
Suppose a=-l. Then f(x) is defined over the interval (-l , l). Formulae (1), (2) (3) reduce
to
1
l
(9)
w.
a0 f ( x)dx
l l 1
l
n
bn f ( x) sin xdx,
n l l l
l
1
an
l l
f ( x) cos
l
xdx
n =1,2,……
ww
Then the right-hand side of (5) is the Fourier expansion of f(x) over the interval (-l , l).
If we set l = , then f(x) is defined over the interval (-, ). Formulae (9) reduce to
1
a0 = f ( x)dx
1
an f ( x) cos nxdx
, n=1,2,….. (10)
1
bn f ( x) sin nxdx n=1,2,…..
a0
m
Putting l = in (5), we get f(x) = an cos nx bn sin nx
2 n 1
o
Some useful results :
1. The following rule called Bernoulli’s generalized rule of integration by parts is useful
s.c
in
evaluating the Fourier coefficients.
uvdx uv1 u v2 u v3 .......
' ''
3 e 2 e e2 x e2 x
2x 2x
e ax
e cos bxdx
ax
a cos bx b sin bx
a2 b2
e ax
e ax
sin bxdx a sin bx b cos bx
a2 b2
ww
Problems
1. Obtain the Fourier expansion of
1
f(x) = x in - < x <
2
We have,
1 1 1
2
a0 f ( x ) dx ( x)dx
1 x2
= x
2 2
m
1 1 1
2
an f ( x ) cos nxdx ( x) cos nxdx
o
Here we use integration by parts, so that
1 sin nx cos nx
an x (1)
s.c
2 n n 2
1
0 0
2
1 1
bn ( x) sin nxdx
c
2
1 cos nx sin nx
x n
vtu
(1)
2 n
2
(1) n
n
a0
f ( x) an cos nx bn sin nx
2 n 1 n 1
we get,
(1) n
f ( x) sin nx
ww
2 n 1 n
This is the required Fourier expansion of the given function.
2. Obtain the Fourier expansion of f(x)=e-ax in the interval (-, ). Deduce that
2 (1) n
cos ech
n2 n2 1
Here,
1 1 e ax
a0 e ax dx
a
e a e a 2sinh a
a a
1
an e ax cos nxdx
m
1 e ax
2
an 2 a cos nx n sin nx
a n
o
2a (1) n sinh a
a 2 n 2
s.c
1 ax
bn = e sin nxdx
1 e ax
= 2 c a sin nx n cos nx
a n 2
2n (1) n sinh a
vtu
=
a2 n2
sinh a 2a sinh a
(1) n 2
n(1) n
Thus,f(x) =
a
n 1 a n
2 2
cos nx
sinh a
n 1 a n
2 2
sin nx
sinh 2 sinh
(1) n
f(0)=1 =
n 1 n 1
2
or
sinh 2 sinh 1 (1) n
ww
1= 2
2 n 2 n 1
2 sinh
(1) n
or 1=
n2 n 1
2
Thus,
(1) n
cos ech 2 2 This is the desired deduction.
n2 n 1
3. Obtain the Fourier expansion of f(x) = x2 over the interval (-, ). Deduce that
2 1 1
1 2 2 ......
6 2 3
1 2
The function f(x) is even. Hence a0
f ( x)dx f ( x)dx
0
2 2 x3
= x 2 dx
m
0 3 0
2 2
a0
or 3
o
1
an f ( x) cos nxdx
s.c
2
0
= f ( x) cos nxdx, since f(x)cosnx is even
2 2
0
= x cos nxdx
1
Also, bn f ( x) sin nxdx 0 since f(x)sinnx is odd.
2
(1)n cos nx
Thus f ( x) 4
3 n2
ww
n 1
2
1
2 4 2
3 n 1 n
1 2
n
1
2
6
2 1 1
Hence, 1 2 2 .....
6 2 3
x,0 x
f ( x)
2 x, x 2
2 1 1
Deduce that 1 2 2 ......
8 3 5
m
1 2
Here, a0 = f ( x)dx = f ( x)dx
0
2
o
xdx
0
since f(x)cosnx is
1 2
s.c
an
f ( x) cos nxdx f ( x) cos nxdx
0
even.
2
= 0
x cos nxdx
c
vtu
2 sin nx cos nx
x n 1 n 2
= 0
2
n 2
(1) n 1
Also,
1
bn f ( x) sin nxdx 0 , since f(x)sinnx is odd
w.
2 1
f ( x) (1) n 1cos nx
2 n 1 n 2
ww
Thus,
2
1
n 1 ( 2n 1)
2
8
2 1 1
or 1 2 2 ......
8 3 5
This is the series as required.
m
5. Obtain the Fourier expansion of
, x 0
f(x) =
x,0 x
2
o
1 1
Deduce that 1 2 2 ......
8 3 5
s.c
Here,
1
0
a0 dx xdx
0 2
1
0
an cos nxdx x cos nxdx
c 0
1
(1) n 1
vtu
n 2
1
0
bn sin nxdx x sin nxdx
0
1
n
1 2(1) n
Fourier series is
w.
1 1
1 2(1) n
f(x) = 2 (1) n 1 cos nx sin nx
4 n 1 n n 1 n
Note that the point x=0 is a point of discontinuity of f(x). Here f(x+) =0, f(x-)=- at x=0.
1 1
Hence [ f ( x ) f ( x )] 0
2 2 2
ww
6. Obtain the Fourier series of f(x) = 1-x2 over the interval (-1,1).
The given function is even, as f(-x) = f(x). Also period of f(x) is 1-(-1)=2
1 1
1
Here a0 = f ( x)dx = 2 f ( x)dx
1 1
m
0
1
1
x3
= 2 (1 x )dx 2 x
2
0 3 0
4
o
3
1
1
an f ( x) cos(nx)dx
s.c
1 1
1
2 f ( x) cos(nx)dx as f(x) cos(nx) is even
0
1
= 2 (1 x 2 ) cos(nx)dx
0
c
Integrating by parts, we get
vtu
1
sin nx cos nx sin nx
an 2 1 x 2
(2 x) (2)
n (n ) (n ) 0
2 3
4(1) n 1
=
n 2 2
w.
1
1
bn f ( x) sin( nx)dx =0, since f(x)sin(nx) is odd.
1 1
2 4 (1) n 1
f(x) =
3 2 n 1 n 2
cos(nx)
4x 3
1 3 in 2 x 0
f(x) = 4 x 3
1 in0 x
3 2
2 1 1
Deduce that 1 2 2 ......
m
8 3 5
3 3
The period of f(x) is 3
2 2
o
Also f(-x) = f(x). Hence f(x) is even
s.c
3/ 2 3/ 2
1 2
a0
3 / 2 3 / 2
f ( x)dx
3/ 2 f ( x)dx
0
3/ 2
4 4x
3 1
0
3
dx 0
nx
3/ 2
1 c
an
3 / 2 3 / 2
f ( x) cos dx
3/ 2
vtu
2nx
3/ 2
2
3/ 2 f ( x) cos
0
3
dx
3/ 2
2nx
sin cos 2nx
4 4x 3 4 3
1
3 3 2n 3 2n 2
3
w.
3 0
4
= 2 2 1 (1) n
n
1 2
3
nx
bn f ( x) sin dx 0
ww
Also,
3 3 3
2 2
Thus
2 n x
f(x) =
4 1
2 2
n 1 n
1 (1) n cos
3
putting x=0, we get
f(0) =
4 1
2 2
n 1 n
1 (1) n
8 1 1
or 1= 2
1 2 2 ......
3 5
2
1 1
Thus, 1 2 2 ......
8 3 5
m
The Fourier expansion of the periodic function f(x) of period 2l may contain both sine
and cosine terms. Many a time it is required to obtain the Fourier expansion of f(x) in the
interval (0,l) which is regarded as half interval. The definition can be extended to the
o
other half in such a manner that the function becomes even or odd. This will result in
cosine series or sine series only.
s.c
Sine series :
Suppose f(x) = (x) is given in the interval (0,l). Then we define f(x) = -(-x) in (-l,0).
Hence f(x) becomes an odd function in (-l , l). The Fourier series then is
n x
f ( x) bn sin (11)
c n 1 l
2l nx
where bn f ( x) sin dx
l 0 l
vtu
The series (11) is called half-range sine series over (0,l).
Putting l= in (11), we obtain the half-range sine series of f(x) over (0,) given by
f ( x) bn sin nx
n 1
w.
2
0
bn f ( x) sin nxdx
ww
Cosine series :
Let us define
( x) in (0,l) .....given
f ( x)
( x ) in (-l,0) …..in order to make the function even.
Then the Fourier series of f(x) is given by
a
n x
f ( x) 0 an cos (12)
2 n 1 l
where,
n x
l
2
an
l 0
f ( x) cos
l
dx
m
Putting l = in (12), we get
a0
f ( x) a n cos nx
2 n 1
o
where
2
0
a0 f ( x)dx
s.c
2 Problems :
a n f ( x) cos nxdx n 1,2,3, ..
0
1. Expand f(x) = x(-x) as half-
range sine series over the interval (0,).
We have,
2
c
vtu
bn f ( x) sin nxdx
0
2
0 (x x 2 ) sin nxdx
n n
2
n 0
4
3 1 (1) n
n
The sine series of f(x) is
4 1
ww
f ( x) 3 1 (1) n sin nx
n 1 n
x,0 x 2
f ( x) over (0, )
x, x
2
2 2
0
Solution : a0 xdx ( x ) dx
2
2
2 2
x cos nxdx ( x) cos nxdx
0
an
m
2
Performing integration by parts and simplifying, we get
2 n
an 2 1 (1) n 2 cos
n 2
o
8
, n 2,6,10,.....
n 2
s.c
Thus, the Fourier cosine series is
2 cos 2 x cos 6 x cos10 x
f(x) = 2 ......
4 1 32
5 2
Here
2c
c 0
c
vtu
a0 (c x)dx c
2c nx
an (c x) cos dx
c0 c
Integrating by parts and simplifying we get,
2c
w.
an 1 (1) n
n2 2
a0 n x nx
f ( x) an cos bn sin
2 n 1 l l
If we use Euler formulae
e i cos i sin
DEPT OF MATHEMATICS/SJBIT Page 18
SUBJECT:MATHEMATICS SUBJECTCODE:10MAT31
n
i x
f ( x) c e
n
n
l
………..(*)
where
n
m
2l
1 i x
cn
2l
f ( x)e l
dx n = 0, 1, 2, 3, …….
Note:-(1)
o
Putting l in (*), we get Fourier series valid in (l , l ) as
n
i x
c e
s.c
f ( x) n
l
………..(**)
n
where
n
1 l i x
cn l f ( x ) e l
dx
2l
Note:-(2)
Putting α = 0 and l
cin (*), we get Fourier series valid in (0, 2 ) as
vtu
f ( x) cn einx
n
where
1
cn f ( x ) e dx
in x
2
Note:-(3)
w.
1 2
cn 0 f ( x ) e d x
in x
2
Problems:
1. Obtain the complex Fourier series of the function f(x) defined by f(x) = x over the
interval
(- , ).
Here f(x) is defined over the interval (- , ). Hence complex Fourier series of f(x) is
where
1
f ( x)e
inx
cn dx
2
n = 0, 1, 2, 3, …….
1
2
m
xe inx dx
o
n
Using this in (1), we get
(1) n inx
f ( x) i
s.c
e , n0
n n
This is the complex form of the Fourier series of the given function
2. Obtain the complex Fourier series of the function f(x) = eax over the interval
(- , ).
c
As the interval is again (- , ) we find cn which is given by
vtu
1 1
f ( x)e inx dx e
ax inx
cn e dx
2
2
1 1 e( a in ) x
( a in ) x
e dx
2
2 (a in)
(1)n (a in) sinh a
w.
(a 2 n 2 )
Hence the complex Fourier series for f(x) is
f ( x) c e
n
n
inx
sinh a
(1) n (a in) inx
a 2 n2 e
ww
n
HARMONIC ANALYSIS
The Fourier series of a known function f(x) in a given interval may be found by finding
the Fourier coefficients. The method described cannot be employed when f(x) is not
known explicitly, but defined through the values of the function at some equidistant
points. In such a case, the integrals in Euler’s formulae cannot be evaluated. Harmonic
analysis is the process of finding the Fourier coefficients numerically.
To derive the relevant formulae for Fourier coefficients in Harmonic analysis, we employ
the following result :
The mean value of a continuous function f(x) over the interval (a,b) denoted by [f(x)] is
defined as
m
The Fourier coefficients defined through Euler’s formulae, (1), (2), (3) may be redefined
as
1 b 1 a 2l
f ( x ) f ( x)dx a0 2 f ( x)dx 2[ f ( x)] .
ba a 2l a
o
1 a 2l n x n x
an 2 f ( x) cos dx 2 f ( x) cos
s.c
2l a l l
1 a 2l n x n x
bn 2
2l a
f ( x)sin
l
dx 2 f ( x) sin
l
c
Using these in (5), we obtain the Fourier series of f(x). The term a1cosx+b1sinx is called
vtu
the first harmonic or fundamental harmonic, the term a2cos2x+b2sin2x is called the
second harmonic and so on. The amplitude of the first harmonic is a12 b12 and that
of second harmonic is a22 b22 and so on.
Problems:
w.
1. Find the first two harmonics of the Fourier series of f(x) given the following table
:
x 0 2 4 5 2
ww
3 3 3 3
f(x) 1.0 1.4 1.9 1.7 1.5 1.2 1.0
Note that the values of y = f(x) are spread over the interval 0 x 2 and f(0) = f(2) =
1.0. Hence the function is periodic and so we omit the last value f(2) = 0. We prepare
the following table to compute the first two harmonics.
ycos2
x0 y = f(x) cosx cos2x sinx sin2x ycosx ysinx ysin2x
x
0 1.0 1 1 0 0 1 1 0 0
120 1.9 -0.5 -0.5 0.866 -0.866 -0.95 -0.95 1.6454 -1.6454
m
240 1.5 -0.5 -0.5 -0.866 0.866 -0.75 -0.75 1.299 1.299
o
300 1.2 0.5 -0.5 -0.866 -0.866 0.6 -0.6 -1.0392 -1.0392
We have
c
an 2 f ( x) cos
nx s.c
2[ y cos nx]
vtu
l
as the length of interval= 2l = 2 or
nx
bn 2 f ( x) sin 2[ y sin nx]
l
l=
2 y cos x 2(1.1)
a1 2[ y cos x] 0.367
6 6
2 y cos 2 x 2(0.3)
a2 2[ y cos 2 x] 0.1
6 6
ww
2 y sin x
b1 [ y sin x] 1.0392
6
2 y sin 2 x
b2 [ y sin 2 x] 0.0577
6
The first two harmonics are a1cosx+b1sinx and a2cos2x+b2sin2x. That is (-0.367cosx +
1.0392 sinx) and (-0.1cos2x – 0.0577sin2x)
2. Express y as a Fourier series upto the third harmonic given the following values :
x 0 1 2 3 4 5
y 4 8 15 7 6 2
The values of y at x=0,1,2,3,4,5 are given and hence the interval of x should be 0 x < 6.
The length of the interval = 6-0 = 6, so that 2l = 6 or l = 3.
The Fourier series upto the third harmonic is
m
a0 x x 2x 2x 3x 3x
y a1 cos b1 sin a2 cos b2 sin a3 cos b3 sin
2 l l l l l l
or
o
a0 x x 2x 2x 3x 3x
s.c
y a1 cos b1 sin a2 cos b2 sin a3 cos b3 sin
2 3 3 3 3 3 3
x
Put , then
3
a
y 0 a1 cos b1 sin a2 cos 2 b2 sin 2 a3 cos 3 b3 sin 3 ……… (1)
2 c
We prepare the following table using the given values :
vtu
x
x = y ycos ycos2 ycos3 ysin ysin2 ysin3
3
0 0 04 4 4 4 0 0 0
3 1800 07 -7 7 -7 0 0 0
ww
2 y 1
a0 2[ f ( x)] 2[ y ] (42) 14
6 3
2
a1 2[ y cos ] (8.5) 2.833
6
2
b1 2[ y sin ] (12.99) 4.33
6
m
2
a2 2[ y cos 2 ] (4.5) 1.5
6
2
b2 2[ y sin 2 ] (2.598) 0.866
6
o
2
a3 2[ y cos 3 ] (8) 2.667
6
s.c
b3 2[ y sin 3 ] 0
Usingthesein(1),we get
x x 2x 2x
y 7 2,833 cos (4.33) sin 1.5 cos 0.866 sin 2.667 cos x
3 3 3 3
c
This is the required Fourier series upto the third harmonic.
vtu
3. The following table gives the variations of a periodic current A over a period T :
Show that there is a constant part of 0.75amp. in the current A and obtain the amplitude
of the first harmonic.
Note that the values of A at t=0 and t=T are the same. Hence A(t) is a periodic function
ww
2
of period T. Let us denote t . We have
T
a0 2[ A]
2
a1 2 A cos t 2[ A cos ] (1)
T
2
b1 2 A sin t 2[ A sin ]
T
We prepare the following table:
2t
t A cos sin Acos Asin
T
0 0 1.98 1 0 1.98 0
m
T/2 1800 1.30 -1 0 -1.30 0
o
5T/6 3000 -0.25 0.5 -0.866 -0.125 0.2165
s.c
Total 4.5 1.12 3.0137
c 2 A4.5
a0 1.5
6 3
2 A cos 1.12
vtu
a1 0.3733
6 3
2 A sin 3.0137
b1 1.0046
6 3
The Fourier expansion upto the first harmonic is
a0 2t 2t
w.
A a1 cos b1 sin
2 T T
2t 2t
0.75 0.3733 cos 1.0046 sin
T T
The expression shows that A has a constant part 0.75 in it. Also the amplitude of the first
ww
o m
c s.c
UNIT-II
vtu
FOURIER TRANSFORMS
CONTENTS:
w.
Introduction
ww
o m
Introduction
FOURIER TRANSFORMS
c s.c
vtu
Fourier Transform is a technique employed to solve ODE’s, PDE’s,IVP’s, BVP’s
and Integral equations.
The subject matter is divided into the following sub topics :
FOURIER TRANSFORMS
w.
ww
1) f(x) and its derivative f x are continuous, or have only a finite number of
simple discontinuities in every finite interval, and
2) the integral f x dx exists.
-
Also, let be non - zero real parameter. The infinite Fourier Transform of f(x)
is defined by
m
fˆ F f x f x e ix dx
provided the integral exists.
o
just the Fourier Transform. The inverse Fourier Transform of f̂ denoted by
F-1 f̂ is defined by
s.c
F 1 fˆ f x
1 ˆ
2
f e ix d
Note : The function f(x) is said to be self reciprocal with respect to Fourier transform
if fˆ f .
Basic Properties
c
vtu
1. Linearity Property
For any two functions f(x) and (x) (whose Fourier Transforms exist) and any two
constants a and b,
F af x b x aF f x bF x
w.
Proof :
By definition, we have
F af x b x af x b x e ix dx
a f x e ix dx b x e ix dx
ww
aF f x bF x
In particular, if a = b = 1, we get
F f x x F f x F x
Again if a= -b = 1, we get
F f x x F f x F x
1
Ff x f̂
a a
Proof : By definition, we have
m
F f ax f ax e ix dx
(1)
Suppose a > 0. let us set ax = u. Then expression (1) becomes
i u du
F f ax f u e
a
o
a
1 ˆ
f (2)
a a
s.c
Suppose a < 0. If we set again ax = u, then (1) becomes
u
i du
F f ax f u e
a
a
1 i u
c f u e a du
a
1
fˆ (3)
vtu
a a
Expressions (2) and (3) may be combined as
1 ˆ
F f ax f
a a
This is the desired property
3. Shifting Properties
For any real constant ‘a’,
(i ) F f x a e ia fˆ
w.
(ii ) F eiax f x fˆ a
Proof : (i) We have
F f x fˆ f x e ix dx
ww
Hence, F f x a f x a e ix dx
Set x-a = t. Then dx = dt.Then,
F f x a f t e i (t a ) dt
f t e dt
= e i a i t
= e ia fˆ
ii) We have
f x e e dx
iax i x
m
F g x
F eiax f x
This is the desired result.
o
s.c
4. Modulation Property
If F f x fˆ ,
1
then, F f x cos ax fˆ a fˆ a
2
c where ‘a’ is a real constant.
Proof : We have
vtu
e iax e iax
cos ax
2
Hence
eiax e iax
F f x cos ax F f x
2
w.
2
1 ˆ
f a fˆ a , by using linearity and shift properties.
Note : Similarly
F f x sin ax 1
2
fˆ a fˆ a
Problems:
-a x
1. Find the Fourier Transform of the function f(x) e where a 0
e e ix dx e e ix dx
0 a x a x
0
Using the fact that x x, 0 x and x - x, - x 0, we get
F f x e ax e ix dx e ax e ix dx
0
0
e a i x dx e dx
0 a i x
m
0
e a i x 0 e a i x
a i a i 0
o
1 1
a i a i
s.c
2a
2
a
2
2. Find the Fourier Transform of the function
1, x a
f(x)
c 0, x a
where ‘a’ is a positive constant. Hence evaluate
vtu
sin a cos x
(i )
d
sin
(ii ) d
0
f ( x)e ix dx f ( x)e ix dx f ( x)e ix dx
a a
a a
e ix dx
a
a
ww
sin a
2
sin a
Thus F f x fˆ 2 (1)
Inverting f̂ by employing inversion formula, we get
1 sin a ix
f x 2 e d
2
1 sin a cos x i sin x
d
Here, the integrand in the first integral is even and the integrand in the second integral is
odd. Hence using the relevant properties of integral here, we get
sin a cos x
1
m
f ( x) d
or
o
sin a cos x
d f ( x )
s.c
, x a
0, x a
For x 0, a 1, this yields
sin
d
c
Since the integrand is even, we have
2
0
sin
d
vtu
or
sin
0 d 2
2 2
3. Find the Fourier Transform of f(x) e - a x where ' a' is a positive constant.
2
w.
x
Deduce that f(x) e 2 is self reciprocal with respect to Fourier Transform.
Here
ww
F f x e a x e ix dx
2 2
e a dx
2 2
x ix
i 2
2
ax 2
e
2 a 4 a
dx
2
i
2
ax
e 4a2
2a
e dx
i
Setting t ax - , we get
2a
2
dt
F f x e
2
4a2
e t
a
2
1
2 e t dt
2
e 4a2
a 0
1 2
2
m
ˆf e 4 a 2
2
a
This is the desired Fourier Transform of f(x).
2 2
o
For a 2 1 in f(x) e - a x
2
2
-x
s.c
2
we get f(x) e and hence,
2
f̂ 2 e 2
- x2 2
Also putting x in f(x) e , we get f( ) e - 2 2 .
by f̂ s or Fs f x . Thus
f̂ s Fs f x f x sin x dx
2 ˆ
f s sin x d
0
through the integral
Properties
m
aFs f x bFs x
This is the desired result. In particular, we have
Fs f x x Fs f x Fs x
and
o
Fs f x x Fs f x Fs x
s.c
(2) CHANGE OF SCALE PROPERTY
0
a a
1
f̂ s
a a
w.
s 2 s s
Proof : We have
Fs f x cos ax f x cos ax sin x dx
0
1
f x sin a x sin a xdx
2 0
2 f s a fˆs a , by using Linearity property.
1 ˆ
Problems:
0 a
m
a
cos x
0
1 cos a
o
e -ax
2. Find the Fourier sine transform of f(x)
s.c
x
e ax sin x dx
Here f̂ s
0 x
Differentiating with respect to , we get
d d e ax sin x dx
f̂ s
d 0
c d
ax
x
vtu
e
sin x dx
0 x
performing differentiation under the integral sign
ax
e
x cos x dx
0 x
e ax
2 a cos x sin x
w.
a
2
0
a
2
a 2
Integrating with respect to , we get
f̂ s
ww
1
tan c
a
But f̂ s 0 when 0
c=0
f̂ s tan 1
a
1, 0 1
0 f x sin xdx 2, 1 2
0, 2
Let () be defined by
1, 0 1
2, 1 2
m
0, 2
Given
f x sin xdx fˆ
s
o
0
s.c
f x sin x dx
2
0
sin x d 1 sin x d 2 sin x d
2 1 2
0
2 1 2
c
sin x
0
d 2 sin x d 0
1
2
1 cos x 2 cos 2 x
x
vtu
FOURIER COSINE TRANSFORMS
Let f(x) be defined for positive values of x. The integral f x cos x dx
0
2
f̂ c Fc f x f x cos xdx
0
The inverse Fourier Cosine Transform of f̂c is defined through
2
This is denoted by f x or Fc- 1 f̂c . Thus
ww
the integral fˆc cos x d .
0
2
f x Fc-1 fˆ fˆc cos x d
0
Basic Properties
If ' a' and ' b' are two constants, then for two functions f(x) and (x), we have
Fc af x b x aFc f x bFc x
m
1
Fc f ax f̂ c
a a
(3) Modulation property
o
If Fc f x f̂ c , then for a 0, we have
1
Fc f x cos ax f̂ c a f̂ c a
s.c
2
The proofs of these properties are similar to the proofs of the corresponding
properties of Fourier Sine Transforms.
Problems:
c
vtu
1) Find the cosine transform of the function
x, 0 x 1
f x 2 x , 1 x 2
0, x2
We have
w.
f̂ c f x cos xdx
0
0 1 2
ww
f̂ c x
2 x 1
2 2
0 1
2 cos cos 2 1
2
cos kx
2) Find the cosine transform of f(x) e-ax , a 0. Hence evaluate 0 x2 a2
dx
Here
f̂ c e ax cos xdx
0
e ax
2 a cos x sin x
a
2
0
Thus
m
a
f̂ c 2 2
a
Using the definition of inverse cosine transform, we get
2 a
f x 2
o
cos xd
0 a 2
s.c
or
ax cos x
e d
2a 0 2 a2
Given f x cos x dx f̂ c
0
2
f x cos xd
0
2 a
0
e cos xd
2 e
0 a 2 x 2 a cos x sin x
0
2a
a x2
2
o m
c s.c
vtu
UNIT III
Applications of Partial Differential Equations
w.
CONTENTS:
Introduction
ww
o m
c s.c
vtu
APPLICATION OF PARTIAL DIFFERENTIAL
EQUATIONS
w.
Introduction
A number of problems in science and engineering will lead us to partial differential
equations. In this unit we focus our attention on one dimensional wave equation ,one
dimensional heat equation and two dimensional Laplace’s equation.
ww
Later we discuss the solution of these equations subject to a given set of boundary
conditions referred to as boundary value problems.
Finally we discuss the D’Alembert’s solution of one dimensional wave equation.
m
d 2T 2
2 d X
c or X c
t 2 x 2 dt 2 dx 2
1 d 2T 1 d 2 X
Dividing by c2XT we have 2
c T dt 2 X dx 2
o
Equating both sides to a common constant k we have
1 d2X 1 d 2T
=k and 2 =k
s.c
X dx2 c T dt 2
d 2T
d2X c 2 kT 0
kX 0 and dt 2
dx2
D 2
k X 0 and D 2 c 2 k T 0
d2
dx
2 2
c
d2
Where D = 2 in the first equation and D = 2 in the second equation
dt
vtu
Case(i) : let k=0
AEs are m=0 amd m2=0 amd m=0,0 are the roots
Solutions are given by
T = c1e0 t c1 and X c2 x c3 e0 x c2 x c3
Hence the solution of the PDE is given by
U= XT= c1 c2 x c3
w.
2 2
T c '1e c p t andX c ' 2e px c '3e px
Hence the solution of the PDE is given by
2 2
u XT c '1ec p t .( c '2 e px c '3e px )
2 2
Or u(x,t) = c '1ec p t (A’ e px +B e px ) where c1’c2’=A’ and c1’c3’=B’
Case(iii): let k be negative say k=-p2
AEs are m+ c2p2=0 and m2+p2=0
m=- c2p2 and m=+ip
solutions are given by
2 2
T c ''1e c p t
and X c '' 2 cos px c ''3 sin px
m
2u 2 u
Consider 0
x 2 y 2
Let u=XY where X(x), Y=Y(y) e the solution of the PDE
Hence the PDE becomes
o
2 XY 2 ( XY )
0
x 2 y 2
s.c
d2 X d 2 (Y )
Y X 0 and dividing by XY we have
dx 2 dy 2
1 d X
2
1 d 2 (Y )
X dx 2 Y dy 2
Equating both sides to a common constant k we have
c
1 d X
2
1 d 2 (Y )
=k and =k
X dx 2 Y dy 2
vtu
Or (D2-k)X=0 and (D2+k)Y=0
d d
Where D = in the first equation and D = in the second equation
dx dy
EXAMPLES
m
1.Solve the wave equation utt=c2uxx subject to the conditions
u
u(t,0)=0 ,u(l,t)=0, x, 0 0 and u(x,0) =u0sin3( x/l)
t
o
n x n ct
Soln: u x, t bn sin cos
n 1 l l
s.c
Consider u(x,0) =u0sin3( x/l)
n x
u x, 0 bn sin
n 1 l
x n x
u0 sin 3 bn sin
l n 1 l
x u0 3 x
c x 2 x 3 x
3
u0 sin 3
4
x 1
l
sin
4
3 x
bn sin
l n 1
n x
l
vtu
3u0
sin sin b1 sin b2 sin b3 sin
4 l 4 l l l l
comparing both sides we get
3u u
b1 0 , b2 0 , b3 0 , b4 0 b5 0 ,
4 4
Thus by substituting these values in the expanded form we get
3u x ct u0 3 x 3 ct
w.
n x n ct
Soln: : u x, t bn sin cos
n 1 l l
Consider u(x,0)=f(x) then we have
n x
Consider u(x,0) = bn sin
n 1 l
n x
F(x) = bn sin
n 1 l
The series in RHS is regarded as the sine half range Fourier series of f(x) in (0,l) and
hence
n x
l
2
bn
l 0 f ( x) sin
l
dx
m
t x
100x/l
n x n x
l l
2 100 x 200
Soln: bn sin dx = 2 x sin dx
l 0 l l l 0 l
o
l
n x n x
x. cos sin
200
bn 2 l 1 l
s.c
2
l n / l n / l
0
200 1 200 1
n n 1
200 1
bn 2 . l cos n .
l n n n
Thus u ( x, t )
200 1
c
The required solution is obtained by substituting this value of bn
n 1 n 2 2 c 2t
n x
vtu
e sin
n 1 n l 2
l
u 2u
4.Obtain the solution of the heat equation c 2 2 given that u(0,t)=0,u(l,t)and
t x
u(x,0) =f(x)where
2Tx l
w.
l in 0 x
2
f ( x)
2T l x in l x l
l 2
n x
l
2
Soln: bn f ( x) sin dx
ww
l 0 l
2l
n x n x
l
2 2Tx 2Tx
bn sin dx (l x) sin dx
l 0 l l l l
l
2
2l
n x n x
l
4T
l 0
x sin dx (l x)sin dx
l l
l
2
8T n
bn sin
n
2 2
2
u 2u
5. Solve the heat equation with the boundary conditions u(0,t)=0,u(l,t)and
t x 2
u(x,0) =3sin x
m
2
Soln: u ( x, t ) e p t ( A cos px B sin px)............................(1)
Consider u(0,t)=0 now 1 becomes
2
0= e p t (A) thus A=0
o
Consider u(1,t)=0 using A=0 (1) becomes
2
0= e p t (Bsinp)
s.c
Since B≠0,sinp=0or p=n
n2 2c 2t
u ( x, t ) e ( B sin n x)
b e
n2 2c 2t
In general u ( x, t ) n sin n x
n 1
Consider u(x,0)= 3 sin n x and we have c
3 sin n x b1 sin x b2 sin 2 x b3 sin 3 x
vtu
Comparing both sides we get b1 3, b2 0, b3 0
We substitute these values in the expanded form and then get
2 t
u ( x, t ) 3e (sin x)
2u 2u
w.
u (0, y ) 0 gives( A) Ce py
De py
0, A 0
u ( , y ) 0 gives( B sin p ) Ce py
De py
0,
Since A=0,B≠0 and we must have
sin p =0,therefore p=n where n is a integer
u ( x, y ) ( B sin nx) Ce ny
De ny
The condition u(x,∞) =0 means that u→as y→∞
m
u ( x, y ) bn sin n xe ny
n 1
Consider u(x,0)=ksin2x and we have
u ( x, 0) bn sin nx
o
n 1
Ksin2x=b1sinx+b2sin2x+b3sin3x+…………….
s.c
Comparing both sides we get b1=0, b2=0, b3=0
Thus by substituting these values in the expanded form we get
u ( x, y ) k sin 2 xe2 y
v w
Since v=x+ct and w=x-ct, 1 and 1
x x
u u u u u
.(1) .(1)
x v w v w
2u u u u
ww
x 2
x x x v w
Again by applying chain rule we have,
2u u u v u u w
. .
x 2
v v w x w v w x
2 u 2 u 2u 2u 2u
.(1) 2
.(1)
x 2 v 2 vw wv w
2u 2u
But =
vw wv
2u 2 u 2u 2u
But 2
x 2 v 2 wv w2
u u v u w
Similarly . .
x v t w t
v w
Since v=x+ct and w=x-ct, c and c
t t
m
u u u u u u
.(c) .(c) , or c
t v w t v w
Again applying chain rule we have,
2u u u u v u u w
c . c v w . t
o
r 2
t t v w v w t w
2u 2u 2u 2 u 2u
c 2 .(c) c wv w2 .(c)
s.c
r 2 v vw
u2
u
2
u 2 u u
2 2 2
c2 2 c wv w2
t 2
v vw
2u 2 u 2u 2u
2
c 2 2
t 2 v wv w2 c
2u 2u 2u 2u 2u 2u
c2 2 2 2 = c2 2 2 2
vtu
v wv w v wv w
u 2
u
2
4 =0 or =0
wv wv
We solve this PDE by direct integration, writing it in the form,
u
0
w v
w.
u
Integrating w.r.t w treating v as constant we get f (v )
v
Now integrating w.r.t, we get u f (v)dv G ( w)
U=F(v)+G(w) where F(v)= f (v)dv
ww
EXAMPLES
1. Obtain the D’Alembert’s solution of the wave equation utt=c2uxx subject to the
u
conditions u(x,0)=f(x) and ( x, 0) 0
t
Soln: D’Alembert’s solution of the wave equation is given by
u(x,t)=F(x+ct0=G(x-ct)………………………………………..(1)
Consider u(x,0)=f(x) (10 becomes
u(x,0)=F(x)+G(x)
f(x)=F(x)+G(x)…………………………………………………….(2)
Differentiating partially wrt t we have
u
(x,t) =F’(x+ct).(c)+G’(x-ct).(-c)
t
m
u
(x,)=c[F’(x)-G’(x)]
t
0= c[F’(x)-G’(x)]
[F’(x)-G’(x)]=0 integrating wrt x we have
o
[F(x)-G(x)]=k
Where k is the constant of integration……………………………(3)
By solving simultaneously the equations,
s.c
[F(x)+G(x)]=f(x)
[F(x)-G(x)]=k
1 1
We obtain F(x)= f ( x) k andG( x) f ( x) k
2 2
1 1
Thus F(x+ct)= f ( x ct ) k and G(x-ct)= f ( x ct ) k
c
2 2
Substituting these in(10 we have
1 1
vtu
U(x,t)= f ( x ct ) k f ( x ct ) k
2 2
Thus the required solution is
1
u(x,t)= f ( x ct ) f ( x ct )
2
2. Obtain the D’Alembert’s solution of the wave equation utt=c2uxx given that
w.
u(x,0)=f(x)=l2-x2and ut(x,0)=0
1 2
u(x,t)= l ( x ct ) 2 l 2 ( x ct ) 2
2
1 2
2l 2 x 2 2c 2t 2
2
u(x,t)= l x 2 c 2t 2
2
3. . Obtain the D’Alembert’s solution of the wave equation utt=c2uxx given that
u(x,0)=asin2πx and
u
0 when t 0
t
m
a
u(x,t)= 2 cos 2 x 2 ct cos 2 x 2 ct
4
a
2 2 cos 2 x cos 2 ct
o
4
a
u(x,t)= 1 1cos 2 x cos 2 ct
2
c s.c
vtu
UNIT IV
w.
y ax b
y ax bx c
2
y ae
bx
y ax
b
Optimization :
Linear programming
m
Graphical method
Simplex method
o
c s.c
vtu
CURVE FITTING AND OPTIMIZATION
w.
curve is called the curve of best fit. The method of finding the curve of best fit is called
the curve fitting.
Where a and b are parameters to be determined; Yi is called the estimated value. The
Y x
given value i corresponding to i .
Let S yi Yi
2
(3)
y a bx
2
= i i
S = y a bx
2
(4)
m
i i
We determined a and b so that S is minimum (least). Two necessary conditions for this
S S
0 and 0
a b .
o
differentiate (4) w.r.t a and b partially
S
yi a bxi
a
s.c
0 yi a bxi
0= y a b x
i i
0= y na b x
i i
y na b x
i c i
or y na b x
vtu
S
2 yi a bxi x i
b
0 2 xi yi axi bxi2
0 = xi yi a xi b xi2
w.
x y n x b x
i i i
2
i
or xy a x b x 2
Let us take equation of parabola called parabola of best fit in the form
y a bx cx 2 (1)
2
yi a bxi cxi2
m
S y a bx cx
i i
2
i (4)
We determine a, b, c so that S is least (minimum).
The necessary condition for this are
o
S S S
0, 0& 0
a b c
diff (4) w.r.t ‘a’ partially
s.c
S
2 yi a bxi cxi2
a
0 2 yi a bxi cxi2
0 yi a bxi cxi2
c
0 yi a b xi c xi2
vtu
y a b x c x
i i
2
i
y na b x c x
i i
2
i
or y na b x c x 2
b
2 yi a bxi cxi2 xi
0 2 x y ax bx cx
i i i
2
i
3
i
0 x y ax bx cx
i i i
2
i
3
i
ww
0 xi yi a xi b xi2 c xi3
x y a x b x c x
i i i
2
i
3
i
or xy a x b x c x 2 3
S
c
2 yi a bxi cxi2 xi2
0 2 x y ax bx cx
2
i i
2
i
3
i
4
i
0 x y ax bx cx
2
i i
2
i
3
i
4
i
m
x y a x b x c x
2
i i
2
i
3
i
4
i
or x y a x b x c x
2 2 3 4
o
Hence the normal equation for second degree parabola are
y na b x c x 2
s.c
xy a x b x c x 2 3
x y a x b x c x
2 2 3 4
PROBLEMS:
x: 5 10 15 20 25
c
1) Fit a straight line y a bx to the following data
vtu
y : 16 19 23 26 30
(3)
x y x2 xy
5 16 25 80
10 19 100 190
ww
15 23 225 345
20 26 400 520
25 30 625 750
x y x 2
xy
75 =114 =1375 =1885
m
2) Fit equation of straight line of best fit to the following data
x: 1 2 3 4 5
o
y : 14 13 9 5 2
Solution:
s.c
Let y a bx (1)
Normal equation
y na b x (2)
xy a x b x
c 2
(3)
x y x2 xy
vtu
1 14 1 14
2 13 4 26
3 9 9 27
4 5 16 20
5 2 25 10
x y x 2
xy
w.
97 15a 56b
Solving above equations we get
a 18.2
b 3.2
(1) y 18.2 3.2 x
3) The equation of straight line of best fit find the equation of best fit
x: 0 1 2 3 4
y: 1 1.8 3.3 4.5 6.3
Solution: let y a bx (1)
Normal equation
y na b x (2)
xy a x b x 2
(3)
m
x y x2 xy
0 1 0 0
1 1.8 1 1.8
o
2 3.3 4 6.6
3 4.5 9 13.5
s.c
4 6.3 16 25.2
x y x xy 2
4) If p is the pull required to lift a load by means of pulley block. Find a linear
block of the form p=MW+C Connected p &w using following data
w.
: 50 70 100 120
p : 12 15 21 25
Compute p when W=150.
Solution: Given p=y & W=x
equation of straight line is
ww
:
let y a bx (1 )
Normal equations
y na b x (2)
xy a x b x 2
(3)
x p= y x2 xy
50 12 2500 600
70 15 4900 1050
m
100 21 10000 2100
120 25 144000 3000
x 10 y =16.9 x 2
=30 xy =47.1
(2) & (3)
o
73 4a 340b
6750 340 a 31800b
s.c
a 2.27
b 0.187
(1) y 2.27 0.187 x
put 150 c
y 30.32
vtu
5) Fit a curve of the form y ab
x
Solution: Consider
y ab x (1)
Take log on both side
w.
logy=log ab x
=loga+logb x
logy=loga+logb x
y A Bx (2) ; logy=Y y=e y
ww
Solving the normal equation (3) & (4) for a & b . Substitute these values in (1) we get
curve of best fit of the form y ab
x
x: 1 2 3 4 5 6 7 8
y : 1.0 1.2 1.8 2.5 3.6 4.7 6.6 9.1
Solution:
let y ab x (1)
Normal equations are
m
Y nA B x (2); A=loga
xY A x B x 2
(3) Y=logy, B=logb
x y Y=logy x2 xY
o
1 1.0 0 1 0
2 1.2 0.182 4 0.364
s.c
3 1.8 0.587 9 1.761
4 2.5 0.916 16 3.664
5 3.6 1.280 25 6.4
6 4.7 1.547 36 9.282
7 6.6 1.887 49 13.209
8
x 36
9.1
cY
2.208
=8.607 x
64
2
=204
17.664
xY =52.34
vtu
(1) & (2)
8.607 8 A 36 B
52.34 36 A 203 B
A 0.382
w.
B 0.324
then e A a 0.682
e B b 1.382
x: 1 1.5 2 2.5
y : 2.5 5.61 10.0 15.6
Solution:: Consider
let y ax b (1)
Normal equations are
Y nA b x (2); Y=logy
XY A X B X 2
(3) A=loga, X=logx
x y X= log x X2 Y log y XY
m
1 2.5 0 0 0.916 0
1.5 5.62 0.405 0.164 1.726 0.699
2 10.0 0.693 0.480 2.302 1.595
2.5 15.6 0.916 0.839 2.747 2.5 16
o
X=2.014 X 2
=1.483 Y=7.691 XY=4.81
s.c
(1) & (2)
7.691 4 A 2.014b
4.81 2.014 A 1.483b
A=0.916, e A a 2.499 2.5
b 1.999 2
(1) y 2.5 x
2
c
vtu
x: 1 2 3 4
y : 1.7 1.8 2.3 3.2
Sol:
y a bx cx 2 (1)
ww
Normal equation
y na b x c x (2) 2
xy a x b x c x 2 3
(3)
x y a x b x c x
2 2 3 4
(4)
x y x2 x3 x4 xy x2 y
1 1.7 1 1 1 1.7 1.7
2 1.8 4 8 16 3.6 7.2
3 2.3 9 27 81 6.9 20.7
4 3.2 16 64 256 12.8 51.2
x y 9 x 2
30 x 3
100 x 4
354 xy 25 x 2
y 80.8
m
(1), (3) & (4)
9 4a 10b 30c
25 10a 30b 100c
o
80.8 30a 100b 354c
a2
s.c
b -0.5
c 0.2
(1) y 2 - 0.5 x 0.2 x 2
x: 0 2 4
c
vtu
y : 8.12 10 31.82
Sol:
y aebx (1)
Normal equation
Y=nA+b x (2); Y=logy
xy A x b x 2
(3) A=loga
w.
x y Y=logy x2 xY
0 8.12 2.094 0 0
2 10 2.302 4 4.604
4 31.82 3..46 16 13.84
ww
x 6 Y=7.86 x 2
20 xY 18.444
(2) & (3)
7.856=3A+6b
18.444=6A+20b
A=1.935, a e A 6.924
b=0.341
(1) y 6.924e0..341 x
10) Fit a II degree parabola ax bx c to the least square method & hence
2
Sol:
y ax 2 bx c
m
(1)
y c bx ax 2
(1)
Normal equation
y nc b x a x (2) 2
o
xy c x b x a x2 3
(3)
x y c x b x a x
s.c
2 2 3 4
(4)
x y x2 x3 x4 xy x2 y
1 10 1 1 1 10 10
2 12 4 8 16 24 14
3
4
13
16
9
16
c 27
64
81
256
39
64
117
256
vtu
5 19 25 125 625 95 475
15 70 55 225 979 232 906
70 5c 15b 55a
232 15c 55b 225a
906 55c 225b 979a
w.
a 0.285
b 0.485
c 9.4
(1) y 0.285 x 2 0.485 x 9.4
ww
at x 6, y 22.6
OPTIMIZATION:
Optimization is a technique of obtaining the best result under the given conditions.
Optimization means maximization or minimization
LINEAR PROGAMMING:
Linear Programming is a decision making technique under the given constraints on the
condition that the relationship among the variables involved is linear. A general
relationship among the variables involved is called objective function. The variables
involved are called decision variables.
A set of real values xi which satisfies the constraints and also satisfies non negativity
constraints xi 0 is called feasible solution.
m
A set of real values xi which satisfies the constraints along with non negativity
restrictions and optimizes the objective function is called optimal solution.
o
An LPP can have many solutions.
s.c
If the optimal value of the objective function is infinity then the LPP is said to have
unbounded solutions. Also an LPP may not possess any feasible solution.
The extreme values of Z among these values corresponding the values of the decision
variables is required optimal solution of the LPP.
ww
PROBLEMS:
Let (1) and (2) represent the straight lines AB and CD respectively where we have
A = (20, 0), B = (0, 40) ; C = (90 , 0), D = (0,36)
We draw these lines in XOY plane.
o m
s.c
Shaded portion is the feasible region and OAED is the convex polygon. The point E
being the point of intersection of lines AB and CD is obtained by solving the equation:
2 x y 40 , 2 x 5 y 180. E ( x, y ) (2.5,35)
The value of the objective function at the corners of the convex polygin OAED are
tabulated. c Value of Z = 3x + 4y
Corner
vtu
O(0,0) 0
A(20, 0) 60
E(2.5, 35) 147.5
D(0,36) 144
Thus (Z ) Max 147.5 when x 2.5, y 35
w.
o m
On solving
x1 x 2 2000 , x1 x 2 1500, we get E (1000,500)
x1 x 2 1500 , x 2 600, we get F (900,600)
s.c
x1 2 x2 2000 , x2 600, we get G (800,600)
Also we have C = (1500 , 0), H= (0, 600)
The value of the objective function at the corners of the convex polygin OAED are
tabulated.
Corner
c Value of Z 3x1 5 x 2
vtu
O(0,0) 0
C(1500, 0) 4500
E(1000, 500) 5500
F(900, 600) 5700
G(800,600) 5400
x1 2 x 2 40 , 3 x1 x2 30, 34 x1 3 x2 60
x1 x2 x1 x 2 x1 x2
1.....(1) 1...........(2) 1.........(3)
40 20 10 30 15 20
Let (1) ,(2) and (3) represent the straight lines AB ,CD and EF respectively where we
have A = (40, 0), B = (0,20) ; C = (10 , 0), D = (0,30) ; E = (15,0), F = (0, 20)
We draw these lines in XOY plane.
m
Shaded portion is the feasible region and EAHG is the convex polygon. The point G
o
being the point of intersection of lines EF and CD. The point H being the point of
intersection of lines AB and CDis obtained by solving the equation:
s.c
The value of the objective function at the corners of the convex polygin OAED are
tabulated.
Corner Value of Z 3x1 5 x 2
A(15 , 0) 300
A(40, 0) 800
Thus ( Z ) MIN
c
H(4 , 18)
G (6, 12)
260
240
240 when x1 6, x 2 12
vtu
4) Show that the following LPP does not have any feasible solution.
Objective function for maximization:Z = 20x+30y.
Constraints: 3 x 4 y 24 , 7 x 9 y 63, x 0, y 0.
w.
SIMPLEX METHOD
Simplex method is an efficient algebraic method to solve a LPP by systematic procedure
and hence an algorithm can be evolved called the simplex algorithm.
In this method it is necessary that all the constraints in the inequality formn is converted
into equality form thus arriving at a system of algebraic equations.
m
If the constraint is involved with we add a non zero ariables s1 ( say ) 0 to the LHS to
make it an equality and the same variable is called slack variable.
o
LPP with all constraints being equalities is called a standard form of LPP.
s.c
the given objective function P is equivalent to maximizing –P under the same constraints
and Min.P = -(Max value of –P )
PROBLEMS:
Indicators -2 -4 0 0 0
(∆)
s1 3 1 1 0 22 R1 R2 R1
y 2/3 1 0 1/3 8
∆ -2 -4 0 0 0 R3 4 R2 R3
s1 7/3 0 1 -1/3 14
y 2/3 0 0 1/3 8
∆ 2/3 0 0 4/3 32 No negative indicators
Thus the maximum value of Z is 32 at x=0 and y=8
m
x 2 y 5 z 0.s1 1.s2 0.s 3 19
3x y 4 z 0.s1 0.s2 1.s 3 25
2 x 3 y z 0.s1 0.s2 0.s 3 P is the objective function
o
Solution by the simplex method is presented in the following table.
s.c
s1 1 3 2 1 0 0 11 11/3=3.33 3.33 is least, 3 is
s2 1 2 5 0 1 0 19 19/3=9.5 pivot s1 is replaced
3 1 4 0 0 1 35 25/1=25 by y. Also 1/3.R1
s3
Indicators -2 -3 -1 0 0 0 0
(∆)
y
s2
1/3
1
1
2
c 2/3
5
1/3
0
0
1
0
0
11/3
19 R2 2 R1 R2
vtu
s3 3 1 4 0 0 1 25 R3 R1 R3
∆ -2 -3 -1 0 0 0 0 R4 3R1 R4
Y 1/3 1 2/3 1/3 0 0 11/3 11/3÷1/3=11 8 is least, 8/3 is
s2 1/3 0 11/3 -2/3 1 0 35/3 35/3÷1/3=35 pivot s3 is replaced
s3 8/3 0 10/3 -1/3 0 1 64/3 64/3÷8/3=8 by x. Also 3/8.R3
w.
∆ -1 0 1 1 0 0 11
y 1/3 1 2/3 1/3 0 0 11/3 R1 1/ 3R3 R1
s2 1/3 0 11/3 -2/3 1 0 35/3 R2 1/ 3R3 R2
x 1 0 10/8 -1/8 0 3/8 8
∆ -1 0 1 1 0 0 1 R4 R3 R4
ww
y 0 1 1/4 3/8 0 - 1
1/8
s2 0 0 13/4 -5/8 1 - 9
1/8
x 1 0 10/8 -1/8 0 3/8 9
∆ 0 0 9/4 7/8 0 3/8 19 No negative
indicators
Solution: The given LPP is equivalent to maximizing the objective function –P subject
to the same constraints
That is –P=P’=-x + 3y - 2z is to be maximized
Let us introduce slack variables s1 , s2 , s3 to the inequalities to write them in the
m
following form.
3x y 2 z 1.s1 0.s2 0.s 3 7
2 x 4 y 0 z 0.s1 1.s2 0.s 3 12
o
4 x 3 y 8 z 0.s1 0.s2 1.s 3 10
x 3 y 2 z 0.s1 0.s2 0.s 3 P is the objective function
s.c
Solution by the simplex method is presented in the following table.
NZV x y z s1 s2 s3 Qty Ratio
s1 3 -1 2 1 0 0 7 7/-1=-7 3 is least, 4 is
s2 -2 4 0 0 1 0 12 12/4=3 pivot s2 is
-4 3 8 0 0 1 10 10/3=3.3 replaced by y.
s3 c Also 1/4.R2
Indicators 1 -3 2 0 0 0 0
vtu
(∆)
s1 3 -1 2 1 0 0 7 R1 R1 R2
y -1/2 1 0 0 1/4 0 3
s3 -4 3 8 0 0 1 10 R3 3R2 R3
∆ 1 -3 2 0 0 0 0 R4 3R2 R4
s1 5/2 0 2 1 1/4 0 10 10÷5/2=4 4 is least, 5/2 is
w.
y -1/2 1 0 0 1/4 0 3 R2 1/ 2 R1 R2
s3 -5/2 0 8 0 -3/4 1 1 R3 5 / 2 R1 R3
∆ -1/2 0 2 0 3/4 0 9 R4 1/ 2 R1 R4
x 1 0 4/5 2/5 1/10 0 4
y 0 1 2/5 1/5 3/10 0 5
s3 0 0 10 1 -1/2 1 11
∆ 0 0 12/5 1/5 4/5 0 11 No negative
indicators
Thus the maximum value of P is 19 at x = 8 and y = 1, z = 0
UNIT V
NUMERICAL METHODS - 1
CONTENTS:
m
Introduction
o
s.c
Regula –falsi method
c
Iterative methods of solution of a system of equation
vtu
Gauss –Seidel method
Relaxation method
NUMERICAL METHODS-1
Introduction:
Limitations of analytical methods led to the evolution of Numerical methods. Numerical
Methods often are repetitive in nature i.e., these consist of the repeated execution of the
same procedure where at each step the result of the proceeding step is used. This process
known as iterative process is continued until a desired degree of accuracy of the result is
obtained.
m
Solution of Algebraic and Transcendental Equations:
The equation f(x) = 0 said to be purely algebraic if f(x) is purely a polynomial in x.
o
If f(x) contains some other functions like Trigonometric, Logarithmic, exponential etc.
then f(x) = 0 is called a Transcendental equation.
s.c
Ex: (1) x4 - 7x3 + 3x + 5 = 0 is algebraic
(2) ex - x tan x = 0 is transcendental
m
Which is the first approximation
If f(x0) and f(x2) are opposite in sign then second approximation
x2 x0
x3 x0 f (x 0 )
f (x 2 ) f (x 0 )
o
This procedure is continued till the root is found with desired accuracy.
Poblems:
s.c
1. Find a real root of x3 - 2x -5 = 0 by method of false position correct to three
decimal places between 2 and 3.
Answer:
Let f(x) = x3 - 2x - 5 = 0
f(2) = -1
f(3) = 16
c
a root lies between 2 and 3
vtu
Take x0 = 2, x1 = 3
x0 = 2, x1 = 3
x1 x 0
Now x 2 x 0 f (x 0 )
f (x1 ) f (x 0 )
32
2 (1)
16 1
w.
= 2.0588
f(x2) = f(2.0588) = -0.3908
m
2. Find the root of the equation xex = cos x using Regula falsi method correct to
three decimal places.
Solution:
Let f(x) = cosx - xex
o
Observe
f(0) = 1
s.c
f(1) =cos1 - e = -2.17798
root lies between 0 and 1
Taking x0 = 0, x1 = 1
f(x0) = 1, f(x1) = -2.17798
x1 x 0
x2 x0 .f ( x 0 )
c f (x 1 ) f (x 0 )
1
0 (1) 0.31467
3.17798
vtu
f(x2) = f(0.31467) = 0.51987 +ve
Root lies between 0.31467 and 1
x0 = 0.31467, x1 = 1
f(x0) = 0.51987, f(x1) = -2.17798
1 0.31467
x 3 0.31467 (0.51987) 0.44673
2.17798 0.51987
w.
m
Let m be a root of f(x) = 0 near a.
f(m) = 0
We have by Taylor's series
( x a ) 2 ''
f ( x ) f (a ) ( x a ) f ' ( a ) f (a ) .....
o
2!
f (m) f (a ) (m a ) f ' (a ) .....
s.c
Ignoring higher order terms
f(m) = f(a) + (m - a) f' (a) = 0
f (a )
or m a '
f (a )
f (a )
or m a ' c
f (a )
Let a = x0, m = x1
vtu
f (x )
then x 1 x 0 ' 0 is the first approximation
f (x 0 )
f (x )
x 2 x 1 ' 1 is the second approximation
f (x 1 )
.
.
w.
.
f (x k )
x k 1 x k is the iterative formula for Newton Raphson Method
f ' (x k )
ww
1. Using Newton's Raphson Method find the real root of x log10 x = 1.2 correct to
four decimal places.
Answer:
Let f(x) = x log10 x - 1.2
f(1) = -1.2, f(2) = -0.59794, f(3) = 0.23136
x log e x 1 log e x
We have f ( x ) 1.2 f ' ( x )
log e 10 log e 10
log10 e log10 x
x k log10 x k 1.2
x k 1 x k
log10 e log10 x K
Let x0 = 2.5 (you may choose 2 or 3 also)
2.5 log10 2.5 1.2
x 1 2.5 2.7465
log10 e log10 2.5
2.7465 log 2.7465 1.2
x 2 2.7465 2.7406
m
log10 e log10 2.7465
Repeating the procedure
x 3 2.7406
x 2.7406 is the root of the given equation
o
2.Using Newton's Method, find the real root of xex = 2. Correct to 3 decimal places.
s.c
Answer:
Let f(x) = xex - 2
f(0) = -2
f(1) = e - 2 = 0.7182
Let x0 = 1
f' (x) = (x + 1) ex
We have
x k 1 x k k
c
x e xk 2
vtu
( x k 1) e x k
e2
x1 1 0.8678
2e
(0.8678 ) e 0.8678 2
x 2 0.8678 0.8527
(1.8678 ) e 0.8678
(0.8527 ) e 0.8527 2
w.
x 3 0.8527 0.8526
0.8527
(1.8527 ) e
x 0.8526, is the required root. Correct to 3 decimal places
3. Find by Newton's Method the real root of 3x = cosx + 1 near 0.6, x is in radians.
ww
Since x1 = x2
The desired root is 0.6071
4. Obtain the iterative formula for finding the square root of N and find 41
Answer:
Let x N
or x2 - N = 0
m
f(x) = x2 - N
f'(x) = 2x
Now
x2 N
o
x k 1 x k k
2x k
x N
s.c
xk k
2 2x k
1 N
i.e. x k 1 x k
2 xk
To find 41
Observe that 36 41
c
vtu
Choose x 0 6
1 41
x1 6 6.4166
2 6
1 41
x 2 6.4166 6.4031
2 6.4166
1 41
x 3 6.4031 6.4031
w.
2 6.4031
Since x2 = x3 = 6.4031
The value of 41 6.4031
5. Obtain an iterative formula for finding the p-th root of N and hence find (10)1/3
ww
81 / 3 101 / 3
i.e. 2 (10)1 / 3
Use x0 = 2, p = 3, N=10
2 3 10
x1 2 2.1666
3 (2 2 )
(2.1666) 3 10
m
x 2 2.1666 2.1545
3(2.1666) 2
(2.1545) 3 10
x 3 2.1545 2.1544
3 (2.1545) 2
o
(10)1 / 3 2.1544
s.c
6. Obtain an iterative formula for finding the reciprocal of p-th root of N. Find
(30)-1/5 correct to 3 decimal places.
Answer:
Let x -p = N
or x -p - N = 0
f(x) = x -p - N c
f'(x) = -px -p - 1
Now
vtu
p
xk N
x k 1 x k
p 1
p xk
1
sin ce (32)1 / 5 0.5
2
We use x0 = 0.5, p = 5, N = 30
(0.5) 5 30
w.
m
20
y = 1 [-18-3x + z ] ………… (2)
20
o
z = 1 [25 –2x + 3y ]
20
s.c
Let the initial approximations to the solution of the system (A) be
x 0, y 0, z 0
(0) (0) (0)
First Iteration:Using ( 2 )
x (1)
c 1 [ 17- y ( 0 ) +2z
(0)
]
20
x 1 [ 17- 0 + 2(0) ] = 0.8500
(1)
vtu
20
y
(1)
= 1 [-18-3x ( 1 ) +z
(0)
]
20
(1)
1 [ -18-3(0.8500 ) + 0 ]
w.
y = = -1.0275
20
(1) (1) (1)
z = 1 [25 –2x + 3y ]
ww
20
(1)
z = 1 [25 –2(0.8500) + 3(- 1.0275)]
20
= 1.0109
Second Iteration: Usining ( 2 )
x (2)
1 [ 17- y ( 1 ) +2z
(1)
]
20
20
= 1.0025
y
(2)
= 1 [-18-3x ( 2 ) +z
(1)
]
20
m
y
(2)
= 1 [ -18-3(1.0025 ) + 1.0109 ]
20
= - 0.99928
o
z
(2)
= 1 [25 –2x ( 2 ) + 3y
(2)
]
s.c
20
(2)
z = 1 [25 –2(1.0025) + 3(- 0.99928)]
20
= 0.9998 c
vtu
Third Iteration: Usining ( 2 )
x 1 [ 17- y
( 3) (2)
+2z
(2)
]
20
x ( 3)
1 [ 17- (- 0.99928)+ 2(0.9998) ]
20
w.
= 1.0000
20
(3)
y = 1 [ -18-3(1.0000) +0.9998 ]
20
= -1.0000
z
(3)
= 1 [25 –2x ( 3 ) + 3y
(3)
]
20
(3)
z = 1 [25 –2(1.00) + 3(-1.0000)]
20
= 1.0000
m
x =1.000, y = -1.0000 and z = 1.000
o
the following system of equations.
x + y +54z=110
27x +6 y - z = 85 …………(A)
s.c
6x+15y + 2z =72
Solution :. Rearranging the system of equations (A)
27x +6 y - z = 85
6x+15y + 2z =72 (B)
x + y +54z=110
dominant.
c
The above system equations is arranged such that, the system is diagonally
vtu
System (B) x = 1 [ 85-6 y +z ]
27
y = 1 [72-6x -2z ] (C)
15
z = 1 [110 –x -y ]
w.
54
Let the initial approximations to the solution of the system (A) be
x 1, y 0, z
(0) (0) (0)
0
ww
First Iteration:Using ( C )
x (1)
1 [ 85-6 y (0)
+z
(0)
]
27
x (1)
1 [ 85- 6 (0) +0] =3.148148
27
y
(1)
=
1 [72- 6x (1)
-2 z
(0)
] y
(1)
= 1 [72- 6(3.148148) -2 (0) ]
15 15
=3.54074
(1) (1) (1)
z = 1 [110 –x -y ]
54
m
z
(1)
= 1 [110 –3.148148 -3.54074 ]=1.913168
54
o
Second Iteration: Usining ( C )
x
(2)
1 [ 85-6 y ( 1 ) +z
(1)
]
s.c
27
x 1 [ 85- 6 (3.54074) +1.913168]
(2)
27
=2.432175
c
vtu
(2) (2) (1)
y = 1 [72- 6x -2 z ]
15
(2)
y = 1 [72- 6(2.432175) -2( 1.913168) ]
15
= 3.57204
w.
54
=1.925837
ert45t
x 1 [ 85-6 y
( 3) (2)
+z
(2)
]
27
27
=2.425689
m
y = -2 z ]
15
(3)
y = 1 [72- 6(2.425689) -2( 1.913168) ]
o
15
=3.57313
(3) (2) (2)
s.c
z = 1 [110 –x -y ]
54
(3)
z = 1 [110 –2.432175 -3.57204 ]
54
=1.925947 c
Answer after three iterations
vtu
x =2.425689, y = 3.57313 and z =
RELAXATION METHOD:
The method is illustrated for the following diagonally dominant system of three
w.
m
These integral values are called the increments in x1 , x2 , x3 denoted by x1 , x2 , x3
respectively. If the system possess exact solution then R1 , R2 , R3 becomes zero
simultaneously and the required solution will be the sum of all these increments.
i.e., x1 x1 , x2 x2 , x3 x3
o
When the system does not possess exact solution, we need to continue the process b y
s.c
magnifying the prevailing residuals on multiplication with 10. Later we divide by 10
to obtain the solution correct to one decimal place.
The process will be contined to meet the requirement of the solution to the desired
accuracy.
PROBLEMS:
c
1) Solve the following system of equations by relaxation method.
vtu
12 x1 x2 x3 31
2 x1 8 x2 x3 24
3 x1 4 x2 10 x3 58
Solution:
The given system of equations are diagonally dominant.
Let R1 12 x1 x2 x3 31
w.
R2 2 x1 8 x2 x3 24 be the residuals.
R3 3 x1 4 x2 10 x3 58,
Let x1 , x2 , x3 respectively represent the increments for x1 , x2 , x3 in the following
ww
relaxation table.
R1 , R2 , R3 are all zero and the exact solution of the given system is
x1 x1 2, x2 x2 4 1 3, x3 x3 6 2 4
Thus ( x1 , x2 , x3 ) = (2, 3, 4 ) is the solution of the given system of equations.
m
10 x 2 y 3 z 205
2 x 10 y 2 z 154
2 x y 10 z 120
o
Solution:
The given system of equations are diagonally dominant.
s.c
Let R1 10 x 2 y 3z 205
R2 2 x 10 y 2 z 154 be the residuals.
R3 2 x y 10 z 120,
Let x, y, z respectively represent the increments for x, y, z in the following
c
relaxation table.
vtu
x y z R1 R2 R3
0 0 0 -205 -154 -120
21 0 0 5 -196 -162
0 20 0 -35 4 -182
0 0 18 -89 -32 -2
9 0 0 1 -50 -20
w.
0 5 0 -9 0 25
0 0 3 -18 -6 5
2 0 0 2 -10 1
0 1 0 0 0 0
ww
R1 , R2 , R3 are all zero and the exact solution of the given system is
x x 32, y y 26, z z 21
Thus ( x, y, z ) = (32 , 26, 21 ) is the solution of the given system of equations.
Working procedure:
Suppose A is the given square matrix, we assume initially an eigen vector X 0 in a
simple for like [1, 0,0] or [0,1, 0] or [0, 0,1] or [1,1,1] and find the matrix
product AX 0 which will also be a column matrix.
m
1
We take out the largest element as the common factor to obtain AX 0 1 X .
1 1 2
We then find AX and again put in the form AX 2 X by normalization.
The iterative process is continued till two consecutive iterative values of λ and X
o
are same upto a desired degree of accuracy.
The values so obtained are respectively the largest eigen value and the
corresponding eigen vector of the given square matrix A.
s.c
Problems:
1) Using the Power method find the largest eigen value and the corresponding eigen
vector starting with the given initial vector.
2 0 1 c
0 2 0 given 1 0 0T
vtu
1 0 2
2 0 1 1 2 1
Solution : AX 0 2 0 0 0 2 0 X
0 1 1
2 0 1 1 2.93 1
AX 0
3
2 0 0 0 2.93 0 4 X 4
1 0 2 0.93 2.86 0.98
2 0 1 1 2.98 1
4
AX 0 2 0 0 0 2.98 0 5 X 5
1 0 2 0.98 2.96 0.99
m
2 0 1 1 2.99 1
AX 0 2 0 0 0 2.99 0 6 X 6
5
1 0 2 0.99 2.98 0.997
o
2 0 1 1 2.997 1
AX 0 2 0 0 0 2.997 0 7 X 7
6
s.c
1 0 2 0.997 2.994 0.999
Thus the largest eigen value is approximately 3 and the corresponding eigen vector is
[1 ,0, 1]’
2) Using the Power method find the largest eigen value and the
4 1 1
2 3 1
c
corresponding eigen vector starting with the given initial vector.
4 1 1
AX 2 3
1
1 0.93 5.72 5.86 0.98 2 X 2
Thus after five iterations the numerically largest eigen value is 5.994 and corresponding
eigen vector is [1, 0.999, -0,999]’
o m
c UNIT VI
s.c
vtu
NUMERICAL METHOD -2
CONTENTS:
Introduction
w.
Finite difference:
Numerical integration
o m
s.c
NUMERICAL METHODS-2
Finite Differences c
Let y = f(x) be represented by a table
vtu
x: x0 x1 x2 x3 …. xn
y: y0 y1 y2 y3 … yn
where x0, x1,x2….xn are equidistant. (x1 - x0 = x2 - x1 = x3 - x2 =….=xn - xn-1 = h)
We now define the following operators called the difference operators.
w.
y r y r 1 y r , r 0,1, 2,..., n 1
y 0 y1 y 0
y1 y 2 y1
. first forward differences
.
y n 1 y n y n 1
Now 2 y 0 (y 0 ) ( y1 y 0 )
y1 y 0 ( y 2 y1 ) ( y1 y 0 )
y 2 2 y1 y 0
||| ly 2 y1 y 3 2 y 2 y1
m
2 y r y r 2 2 y r 1 y r
Note : 3 y 0 y 3 3y 2 3y1 y 0
o
k y r y r k k C1 y r k 1 k C 2 y r k 2 .... (1) k C r
s.c
Difference Table
x y y 2y 3y 4y 5y
x0 y0
y0
x1 y1 2y0
c
vtu
y1 3y0
x2 y2 2y1 4y0
y2 3y0
x3 y3 2y2
w.
y3
x4 y4
Ex: The following table gives a set of values of x and the corresponding values ofy = f(x)
x: 10 15 20 25 30 35
y: 19.97 21.51 22.47 23.52 24.65 25.89
Form the difference table and find f (10), 2 f (10), 3 f (20), 4 f (15)
x y 2 3 4 5
10 19.97
1.54
15 21.51 -0.58
0.96 0.67
20 22.47 0.09 -0.68
1.05 -0.01 0.72
25 23.52 0.08 0.04
1.13 0.03
m
30 24.65 0.11
1.24
35 25.89
o
f (10) 1.54, 2 f (10) 0.58, 3 f (20) 0.03, 4 f (15) 0.04
Note: The nth differences of a polynomial of n the degree are constant.
s.c
Backward difference operator ()
Let y = f(x)
We define f(x) = f(x) - f(x - h)
i.e. y1 c
= y1 - y0 = ∆ y0
y2 = y2 - y1 = ∆ y1
vtu
y3 = y3 - y2 = ∆ y2
'
'
yn = yn - yn-1 = ∆ yn - 1
y r y r y r 1 y r 1
w.
Note:
1. f(x + h) = f(x + h) - f(x) = ∆ f(x)
2. 2 f(x + 2h) = (f(x + 2h))
ww
m
y2 3y3
X2 y2 2y3
y3
o
X3 y3
s.c
1. Form the difference table for
x 40 50 60 70 80 90
y 184 c 204
and find y (30), 2y (70), 5y (90)
226 250 276 304
vtu
Soln:
x y y 2y 3y 4y 5y
40 184
20
w.
50 204 2
22 0
60 226 2 0
24 0 0
ww
70 250 2 0
26 0
80 276 2
28
90 304
y (80) = 26, 2y (70) = 2, 5y (90) = 0
2. Given
x 0 1 2 3 4
f(x) 4 12 32 76 156
Construct the difference table and write the values of f (4), 2f (4), 3f (3)
x y y 2y 3y
0 4
m
8
1 12 12
20 12
o
2 32 24
s.c
44 12
3 76 36
80
4 156
c
3) Find the missing term from the table:
vtu
x 0 1 2 3 4
y 1 3 9 - 81
x u u 2u 3u
x1 8
m
x2 a a-8 -2a + 72 b + 3a - 200
x3 64 64 - a b + a - 128 -3b - a + 408
o
x4 b b - 64 -2b + 280
x5 216 216 -b
s.c
We carryout upto the stage where we get two entries ( 2 unknowns) and equate each of
those entries to zero. (Assuming) to be a polynomial of degree 2.
b + 3a - 200 = 0
c
-3b - a + 408 = 0 We get a = 24 b = 128
vtu
Interpolation:
The word interpolation denotes the method of computing the value of the function y =
f(x) for any given value of x when a set (x0, y0), (x1, y1),…(xn, yn) are given.
w.
Note:
Since in most of the cases the exact form of the function is not known. In such cases the
function f(x) is replaced by a simpler function (x) which has the same values as f(x) for
x0, x1, x2….,xn.
ww
u (u 1) 2 u (u 1) (u 2) 3
( x ) y 0 u y 0 y0 y 0 ....
2! 3!
u (u 1) (u 2) ...(u n 1) n
y0
n!
Note :
1. Newton forward interpolation is used to interpolate the values of y near the beginning
of a set of tabular values.
2. y0 may be taken as any point of the table but the formula contains those values of y
which come after the value chosen as y0.
o m
s.c
Problems:
1) The table gives the distances in nautical miles of the visible horizon for the given
c
heights in feet above the earths surface.
vtu
x = height 100 150 200 250 300 350 400
y = distance 10.63 13.03 15.04 16.81 18.42 19.90 21.27
x y 2 3 4 5 6
100 10.63
2.40
150 13.03 -0.39
2.01 0.15
ww
Choose x0 = 100
120 100
i) x 120, u 0.4
50
0.4 (0.4)(0.4 1)
f (120 ) 10.63 (2.40) (0.39)
1! 2!
m
(0.4) (0.4 1)(0.4 2)
(0.15)
3!
o
(0.4) (0.4 1) (0.4 2) (0.4 3) (0.4 4)
(0.02)
s.c
5!
(0.4) (0.4 1) (0.4 2) (0.4 3) (0.4 4) (0.4 5)
(0.02) 11.649
6!
218 200 18
ii) Let x = 218, x0 = 200, u c 0.36
50 50
0.36 (0.64)
f (218) 15.04 0.36(1.77 ) (0.16)
vtu
2
0.36 (0.64) (1.64)
(0.03) ...
6
= 15.7
w.
x x 0 1.85 1.8
Choose x 0 1.8, x 1.85 u 0.5
h 0 .1
(0.5)(0.5)
f (1.85) 6.049 (0.5) (0.637 ) (0.066)
2
(0.5)(0.5) (1.5)
(0.008)
m
6
= 6.359
o
s.c
3) Given sin 45o = 0.7071, sin 50o = 0.7660, sin 55o =0.8192, sin 60o = 0.8660.
Find sin 48o.
x y 2 3
45 0.7071
0.589
c
vtu
50 0.7660 -0.0057
0.0532 0.0007
55 0.8192 -0.0064
0.0468
w.
60 0.8660
x x0
x 48, x 0 45; h 5 u 0.6
h
x y 2 3 4
40 31
42
50 73 9
51 -25
m
60 124 -16 37
35 12
70 159 -4
o
31
s.c
80 190
(0.5) (0.5) 9 (0.5) (0.5) (1.5) ( 25)
f (45) 31 (0.5) (42)
2 3!
(0.5) (0.5) (1.5) (2.5)
(37) 47.8672 48
4!
c
f(45) - f(40) = 70 = Number of students who have scored between 41 and 45.
vtu
5) Find the interpolating polynomial for the following data:
f(0) = 1, f(1) = 0, f(2) = 1, f(3) = 10. Hence evaluate f(0.5)
y 2 3
x
0 1
w.
-1
1 0 2
1 6
2 1 8
ww
9
3 10
x0
u x
1
x ( x 1) x ( x 1) ( x 2)
f ( x ) 1 x ( 1) ( 2) 6 x 3 2x 2 1
2! 3!
x: 0 1 2 3 4
f(x) : 3 6 11 18 27
x y 2 3 4
0 3
3
m
1 6 2
5 0
2 11 2 0
7 0
o
3 18 2
9
s.c
4 27
x0
u x
1
x ( x 1) x ( x 1)
f ( x ) 3 x (3) ( 2) (0) 3 2x x 2
2 x!
c
Newton Gregory Backward Interpolation formula
vtu
u (u 1) 2 u (u 1) (u 2) 3
y y n u y n yn y n ....
2! 3!
x xn
where u
w.
1) The values of tan x are given for values of x in the following table. Estimate
tan (0.26)
ww
x y 2 3 4
0.10 0.1003
0.0508
0.15 0.1511 0.0008
0.0516 0.0002
0.20 0.2027 0.0010 0.0002
0.0526 0.0004
0.25 0.2553 0.0014
0.0540
0.30 0.3093
m
0.26 0.3
u 0.8
0.05
(0.8) (0.8) (0.2) (1.2)
f (0.26) 0.3093 (0.8)(0.054) (0.2) (0.0014) (0.0004) 0.2659
o
2 6
s.c
2) The deflection d measured at various distances x from one end of a cantilever is
given by the following table. Find d when x = 0.95
0.95 1
u 0.25 d 0.3308 when x 0.95
0 .2
x
0
d
0
c 2 3 4 5
vtu
0.0347
0.2 0.0347 0.0479
0.0826 -0.0318
0.4 0.1173 0.0161 0.0003
0.0987 -0.0321 -0.0003
0.6 0.2160 -0.016 0
0.0827 -0.032
w.
85 5674 40
688 -2
90 6362 38 4
726 2
95 7088 40
766
100 7854
m
Answer:
x xn
u 0.4
n
o
y = 7542
s.c
4) Find the interpolating polynomial which approximates the following data.
x 0 1 2 3 4
y -5 -10 -9 4 35
x
0
y
-5
c 2 3 4
vtu
-5
1 -10 6
1 6
2 -9 12 0
13 6
3 4 18
31
w.
4 35
x4
u
1
ww
18 ( x 4) ( x 3) ( x 2) (6)
f ( x ) 35 ( x 4) (31) ( x 4) ( x 3)
2! 3!
f(x) x 3 2x 2 6x - 5
m
( x 1 x 0 ) ( x 1 x 2 ) ( x 1 x 3 )...( x 1 x n )
( x x 0 ) ( x x 1 ) ( x x 3 )...( x x n )
f ( x 2 ) ....
( x 2 x 0 ) ( x 2 x 1 ) ( x 2 x 3 )...( x 2 x n )
o
( x x 0 ) ( x x 1 ) ( x x 2 )...( x x n 1 )
f ( x n ) is known as the lagrange's
( x n x 0 ) ( x n x 1 ) ( x n x 2 )...( x n x n 1 )
s.c
interpolation formula
f ( x 0 ) y 0
y1 y 0
x1 x 0
c
[ x 0 , x1 ]
vtu
y 2 y1
y1 [x 2 , x1 ]
x 2 x1
y n y n 1
y n 1 [ x n 1 , x n ]
x n x n 1
w.
[x 2 , x 1 ] [x1 , x 0 ]
[x 0 , x1 , x 2 ]
x2 x0
y 2 y1 [ x 3 , x 2 ] [ x 2 , x 1 ]
||ly 2 y1 [x 1 , x 2 , x 3 ]
x 3 x1 x 3 x1
y f ( x ) y 0 ( x x 0 ) y 0 ( x x 0 ) ( x x 1 ) 2 y 0 ( x x 0 ) ( x x 1 )( x x 2 ) 3 y 0
... ( x x 0 ) ( x x 1 ) ...( x x n ) n y 0
m
Note:Lagrange's formula has the drawback that if another interpolation value were
inserted, then the interpolation coefficients need to be recalculated.
Inverse interpolation: Finding the value of y given the value of x is called interpolation
o
where as finding the value of x for a given y is called inverse interpolation.
s.c
Since Lagrange's formula is only a relation between x and y we can obtain the inverse
interpolation formula just by interchanging x and y.
x
c
( y y1 ) ( y y 2 )....( y y n )
( y 0 y1 ) ( y 0 y 2 )...( y 0 y n )
.x 0
vtu
( y y 0 ) ( y y 0 ) ( y y 2 ) ( y y 3 )...( y y n )
x 1 ...
( y1 y 0 ) ( y1 y 2 ) ( y1 y 3 ) ...( y1 y n )
( y y 0 ) ( y y1 )...( y y n 1 )
... .x n
( y n y 0 ) ( y n y1 )...( y n y n 1 )
w.
( y y 0 ) ( y y1 ) ( y y 2 ) ( y y 3 ) ( y y 4 )
.... x4
( y 5 y 0 ) ( y 5 y1 ) ( y 5 y 2 )...( y 5 y 4 )
= 3.55
o m
2) Given the values
x: 5 7 11 13 17
s.c
f(x) : 150 392 1452 2366 5202
Evaluate f(9) using (i) Lagrange's formula (ii) Newton's divided difference formula.
i) Lagranges formula
c
vtu
(9 7) (9 11) (9 13) (9 17) (9 5) (9 11) (9 13) (9 17)
f (9) (150) .392
(5 7) (5 11) (5 13) (5 17) (7 5) (7 11) (7 13) (7 17)
(9 5) (9 7) (9 11) (9 13)
(5202) 810
(17 5) (17 7) (17 11) (17 13)
f(9) = 810
ww
ii)
5 150
121
7 392 24
265 1
11 1452 32 0
457 1
13 2366 42
709
17 5202
m
f(9) = 150 + 121 (9 - 5) + 24 (9 - 5) (9 - 7) + 1(9 - 5) (9 - 7) (9 - 11) = 810
3) Using i) Langranges interpolation and ii) divided difference formula. Find the
o
value of y when x = 10.
x: 5 6 9 11
s.c
y: 12 13 14 16
i) Lagranges formula
(10 6) (10 9) (10 11) (10 5)(10 9)(10 11)
y f (10) 12 13
(5 6) (5 9) (5 11)
c (6 5)(6 9)(6 11)
5 12
1
6 13 2 / 3 1
4 6
ww
1 2 1 27
3 15 6 90 3 / 10 1
11 5 6 6 20
9 14 2/3 2
5 15
2
1
2
11 16
1 1
f (10) 12 (10 5) (10 5)(10 6). (10 5)(10 6)(10 9)
6 20
44
m
3
o
4) If y(1) = -3, y(3) = 9, y(4) =30, y(6) = 132 find the lagranges interpolating
polynomial that takes the same values as y at the given points.
s.c
Given:
x 1 3 4 6
y -3 9 30 132
f (x)
c
( x 3) ( x 4) ( x 6)
(1 3)(1 4)(1 6)
. (3)
( x 1)( x 4)( x 6)
(3 1)(3 4)(3 6)
.9
vtu
( x 1)( x 3)( x 6) ( x 1)( x 3)( x 4)
.30 .132
(4 1)(4 3)(4 6) (6 1)(6 3)(6 4)
= x3 - 3x2 + 5x - 6
5) Find the interpolating polynomial using Newton divided difference formula for
w.
x y 2 3
0 2
1
1 3 4
9 1
2 12 9
45
5 147
o m
Numerical Integration:-
b
To find the value of I y dx numerically given the set of values ( xi , y i ) ,
s.c
a
3h
I y 0 y n 3 y1 y 2 y 4 y5 .... y n1 2 y3 y6 ..... y n3
8
when n is a multiple of 3.
3h
I y 0 5 y1 y 2 6 y 3 y 4 5 y 5 y 6 ......
10
when n is a multiple of 6.
Problems:
ww
rd 1
1 dx
1) Using Simpson’s rule evaluate by dividing the interval 0 , 1 into
0 1 x
2
3
4 equal sub intervals and hence find the value of correct to four decimal
places.
1
By data y
1 x2
Now we have the following table
x 0 1/4 1/2 3/4 1
1
y 1 16/17 4/5 16/25 1/2
1 x2
y0 y1 y2 y3 y4
m
rd
1
Simpson’s rule for n = 4 is given by
3
b
h
ydx 3 y y4 4 y1 y3 2 y2
o
0
a
1
1 1/ 4 1 16 16 4
dx 1 4 2. 0.7854
s.c
1 x 2
3 2 17 25 5
0
1
1
Thus 1 x
0
2
dx 0.7854
We must have, 0.7854 4(0.7854) 3.1416
4
Thus 3.1416
2) Given that
w.
th
3
Solution: Simpson’s rule for n = 6 is given by
8
m
4
1
xdx
3) Using Weddle’s rule evaluate 1 x 2
by taking seven ordinates and hence
o
0
find loge2
Solution: Let us divide [0,1] into 6 equal strips ( since seven ordinates)
s.c
1 0 1
length of each strip: h
6 6
1 2 1 3 1 4 2 5 6
The points of division are x 0, , , , , , 1
6 6 3 6 2 6 3 6 6
1
By data y
1 x2 c
Now we have the following table
x 0 1/6 1/3 1/2 2/3 5/6 1
vtu
x 0 6/37 3/10 2/5 6/13 30/61 1/2
y
1 x 2
y0 y1 y2 y3 y4 y5 y6
1
x 3(1/ 6)
1 x 2
dx 0 5(6 / 37) 3 /10 6(2 / 5) 6 /13 5(30 / 61) 1/ 2
0
10
1
x
ww
1 x
0
2
dx 0.3466
To deduce the value of loge2: We perform theoretical integration and equate the
resulting value to the numerical value obtained.
1
We must have, log e 2 0.3466 log e 2 2(0.3466) 0.6932
m
2
Thus log e 2 0.6932
o
c s.c
vtu
UNIT VII
NUMERICAL METHODS -3
w.
CONTENTS:
Numerical solution of PDE
ww
Numerical solution of
o m
c s.c
vtu
UNIT-VII
NUMERICAL METHODS-3
m
points or grid points.
o
c s.c
We write u(x,y) =u(ih,jk) and the finite difference approximation for the the partial
derivatives are put in the modified form
vtu
1
u x ui 1, j ui , j
h
1
u y ui , j ui 1, j
h
1
ux ui 1, j ui 1, j
2h
1
w.
u y ui , j 1 ui , j
k
1
u y ui , j ui , j 1
k
1
uy ui , j 1 ui , j 1
2k
ww
1
u xx 2 ui 1, j 2ui , j ui 1, j
h
1
u yy 2 ui , j 1 2ui , j ui , j 1
k
The substitution of these finite diference approximation into the given PDE converts the
PDE into a finite difference equation.
Now we discuss numerical solution of the three important PDE namely
1) One dimensional wave equation
2) One dimensional heat equation
m
u(l,t)=0……………………….(3)
and the initial conditions
u(x,0)=f(x)……………………(4)
ut(x,0)=0……………………(5)
o
We shall substitute the finite difference approximation for the partial derivatives
present in (1)
s.c
1 1
c 2 . 2 ui 1, j 2ui , j ui 1, j 2 ui , j 1 2ui , j ui , j 1
h k
2
h
c 2 ui 1, j 2ui , j ui 1, j 2 ui , j 1 2ui , j ui , j 1
k
h h c
Thus (6) reduces to the form
ui , j 1 = ui 1, j ui 1, j ui , j 1
ww
This is called the explicit formula for the solution of wave equation.
Examples
2u 2u
1.Solve the wave equation 4 subject to u=(0,t) =0,u(4,t)=0,ut(x,0)=0
t 2 x 2
and u(x,0)=x(4-x) by taking h=1,k=0.5 upto four steps
Soln: Below is the initial table wherein the first and last column are zero since
(0,t)=0=u(4,t)
o m
Now consider u(x,0)=x(4-x)
u1,0 u (1, 0) 3; u2,0 u (2,0) 4; u3,0 3
1
s.c
ui 1,0 ui 1,0
ui ,1
2
1 1
u1,1 u0,0 u2,0 0 4 2
2 2
Next consider 1 1
u2,1 u1,0 u3,0 3 3 3
2 2
1 c 1
u1,1 u0,0 u4,0 4 0 2
2 2
vtu
We now consider the explicit formula to find the remaining values in the table
m
t⁄ x 0 1 2 3 4
0 0 3 4 3 0
0.5 0 2 3 2 0
o
1 0 0 0 0 0
1.5 0 -2 -3 -2 0
s.c
2 0 -3 -4 -3 0
2u 2u
2. Solve given that u(x,0) =0; u(0,t)=0 ut(x,0)=0 and u(l,t)=100sin(πt)
t 2 x 2
in the range 0≤t≤1 by taking h=1/4
c
Soln: Comparing the wave equation c2uxx = utt with the equation uxx= utt we have
vtu
c2=1 or c=1
By data h=1/4,k=h/c=1/4
w.
ww
We have seen that the condition ut(x,0)=0 will lead us to the formula
1
ui , j ui 1,0 ui 1,0
2
1 1
u1,1 u0,0 u2,0 0 0 0
2 2
1 1
u2,1 u1,0 u3,0 0 0 0
2 2
1 1
u3,1 u2,0 u4,0 0 0 0
2 2
1
u4,1 u3,0 u5,0
2
Hence
u4,1 = u x4 , t1 u (1,1/ 4) 100sin( / 4) 0.707
(Second row of the table is completed)
We shall now conider the explicit formula to find the remaining values in the
table
m
ui , j 1 ui 1, j ui 1, j ui , j 1
u1,2 u0,1 u2,1 u1,0 0
u2,2 u1,1 u3,1 u2,0 0
o
u3,2 u2,1 u4,1 u3,0 70.7
u4,2 u3,1 u5,1 u4,0 is inapplicable
s.c
u4,2 u x4 , t2 u (1,1/ 2) 100sin( / 2) 100
(Third row of the table is completed)
u1,3 u0,2 u2,2 u1,1 0
0 0 0 0 0 0
0.25 0 0 0 0 70.7
0.5 0 0 0 70.7 100
.75 0 0 70.7 100 70.7
1 0 70.7 100 70.7 0
m
u(x,0)=f(x)……………………………………….(4)
we shall substitute the finite difference approximation for the partial derivatives
present in (1)
1 1
ui , j 1 ui , j c 2 2 ui 1, j 2ui , j ui 1, j
o
k h
2
kc
ui , j 1 ui , j 2 ui 1, j 2ui , j ui 1, j
h
s.c
2
kc
Taking 2 =a the above equation becomes
h
ui , j 1 ui , j aui 1, j 2aui , j aui 1, j
ui , j 1 aui 1, j (1 2a )ui , j aui 1, j …………………….(5)
c
This is called Schmidt explicit formula valid for 0<a<1/2
For convenience let us set 1-2a=0 or a=1/2
vtu
kc2
That is 2 =1/2
h
1
Thus (5) becomes ui , j 1 ui 1, j ui 1, j
2
This is called Bendre Schmidt formula .
EXAMPLES
w.
2u u
1) Find the numerical solution of the parabolic equation 2
x 2
t
When u(0,t)=0=u(4,t) and u(x,00=x94-x0 by taking h=1
Soln: the standard form of the one dimensional heat equation is ut=c2uxx and the
ww
o m
c s.c
vtu
In particular
1
ui ,1 ui 1,0 ui 1,0
2
1 1
u1,1 u0,0 u2,0 0 4 2
2 2
1 1
u2,1 u1,0 u3,0 3 3 3
w.
2 2
1 1
u3,1 u2,0 u4,0 4 0 2
2 2
(The second row in the table is completed)
1
Again ui ,2 ui 1,1 ui 1,1
ww
2
1 1
u1,2 u0,1 u2,1 0 3 1.5
2 2
1 1
u2,2 u1,1 u3,1 2 2 2
2 2
1 1
u3,2 u2,1 u4,1 3 0 1.5
2 2
(The third row in the table is completed)
1
Again ui ,3 ui 1,3 ui 1,2
2
1 1
u1,3 u0,2 u2,2 0 2 1
2 2
1 1
u2,3 u1,2 u3,2 1.5 1.5 1.5
2 2
1 1
u3,3 u2,2 u4,2 2 0 1
2 2
(Fourth row in the table is completed)
m
1
Again ui ,4 ui 1,3 ui 1,3
2
1 1
u1,4 u0,3 u2,3 0 1.5 0.75
o
2 2
1 1
u2,4 u1,3 u3,3 1 1 1
2 2
s.c
1 1
u3,4 u2,3 u4,3 1.5 0 0.75
2 2
(Fifth row in the table is completed)
1
Again ui ,5 ui 1,4 ui 1,4
2
1 c 1
u1,5 u0,4 u2,4 0 1 0.5
2 2
vtu
1 1
u2,5 u1,4 u3,4 0.75 0.75 0.75
2 2
1 1
u3,5 u2,4 u4,4 1 0 0.5
2 2
He last row in the table is completed)
Thus the required values 0f ui,j are tabulated
w.
t⁄ x 0 1 2 3 4
0 0 3 4 3 0
1 0 2 03 2 0
2 0 1.5 02 1.5 0
ww
3 0 1 701.5.7 1 0
4 0 0.75 1001 0.75 0
5 0 0.5 0.75 0.5 0
2u 2 u
0
x 2 y 2
o m
We shall substitute the finite difference approximation for the partial derivatives
,hence we have
s.c
1 1
u
2 i 1, j
2ui , j ui 1, j 2 ui , j 1 2ui , j ui , j 1 0
h h
ui 1, j ui 1, j ui , j 1 ui , j 1 4ui , j
1
ui , j ui 1, j ui 1, j ui , j 1 ui , j 1 ……………………(2)
4 c
This is called the standard five point formula. It may be observed that the value of
ui,j at any interior mesh point is the average of its values at four neighboring
vtu
points which is given in the figure below
w.
1
ui 1, j _ 1 ui 1, j 1 ui 1, j 1 ui 1, j 1 ……………………………(3)
ui , j
4
ww
Examples
1.solve Laplace’s uxx+uyy=0 for the following square mesh with boundary values
as shown below
m
u5 is located at the centre of the region.
o
1
u5 0 21 17 12.1 12.525 by S .F
4
Next we shall compute u7, u9, u1, u3by applying D.F
s.c
1
u7 0 12.525 0 12.1 6.15625
4
1
u9 12.1 21 12.525 9 13.65625
4
1
u1 0 17 0 12.525 7.38125
c
4
1
u3 12.525 18.6 17 21 17.28125
vtu
4
Finally we shall compute u2, u4, u6, u8 by applying S.F
1
u2 7.38125 17.28125 17 12.525 13.546875
4
1
u4 0 12.525 7.38125 6.15625 6.515625
4
w.
1
u6 12.525 21 17.28125 13.65625 16.115625
4
1
u8 6.15625 13.65625 12.525 12.1 11.109375
4
Thus, u1=7.38, u2=13.55 , u3=17.28, u4=6.25, u5=12.53, u6=16.12, u7=6.16,
ww
u8=11.11, u9=13.66,
m
Soln: we shall apply standard five point formula for u1, u2, u3, u4, to obtain a
system of equations
1
u1 20 u2 100 u3
o
4
1
u2 u1 0 100 u4
4
s.c
1
u3 30 u4 u1 0
4
1
u4 u3 0 u2 0
4
Now we have a system of equations to be solved
c
4u1 u2 u3 120 ……………………………(1)
u1 4u2 u4 100 ………………………….(2)
vtu
u1 4u3 u4 30 ……………………………..(3)
u2 u3 4u4 0 ……………………………..(4)
Let us eliminate u1 from (1) and (2);(20 and (3)
That is 15 u2 - u3 -4 u4 =520………………………..(5)
4 u2 -4 u3 =70 …………..(6)
we shall now eliminate u4 from (4) and (5)
w.
That is 14 u2 -2 u3 =520
Let us solve (6) and (7) : 2 u2 -2 u3 =35
14 u2 -2 u3 =520
Thus u2 =40.4, and u3 =22.9 hence from (1)
ww
3. solve the elliptic equation uxx+uyy=0 at the pivotal points for the following square
mesh
m
Soln: it is evident that the values at the boundary points on AB are respectively 200 and
100
o
1
Thus u1 300 u2 200 u3
4
s.c
1
u2 u1 100 100 u4
4
1
u3 400 u4 u1 400
4
1
u4 u3 200 u2 300
4 c
4u1 u2 u3 500 ……………………………(1)
u1 4u2 u4 200 ………………………….(2)
vtu
u1 4u3 u4 800 ……………………………..(3)
u2 u3 4u4 500 ……………………………..(4)
Thus by solving simultaneously we obtain the values at the pivotal points
4. Solve the elliptic partial differential equation for the following square mesh using
the 5 point difference formula by setting up the linear equations at the unknown
points P,Q,R,S
ww
The linear equations for the unknownfor the 5 point difference formula are
1
Thus P 1 Q 1 S
4
1
Q P 4 R 2
4
1
R S 5 5 Q
4
1
S 2 R 4 P
4
m
4P-Q-S=2……………………………(1)
-P+4Q-R=6…………………………(2)
o
-Q+4R-S=10………………………(3)
-P-R+4S=6…………………………(4)
s.c
Thus by solving we get P=2,Q=3,S=3,R=4
c
vtu
w.
UNIT VIII
ww
Introduction
Z-Transforms –Definition
Damping Rule
Shifting RuleTheorem
Inverse Z-Transforms
m
Power Series Method
o
Applications Of Z-Transforms To Solve Difference Equations
c s.c
vtu
w.
Introduction
The Z-transform plays an important role plays in the study of communications,
sample data control systems, discrete signal processing , solutions of difference
equations etc.
Definition
Let un = f(n) be a real-valued function defined for n=0,1,2,3,….. and un = 0 for n<0.
Then the Z-transform of un denoted by Z(un) is defined by
m
Z (un ) un z n (2)
The region of the Z-plane in which the series (1) or (2) converges is called the region of
convergence of the transform.
o
Properties of Z-transform
s.c
1. Linearity property
Consider the sequences {un} and {vn} and constants a and b. Then
aZ (un ) bZ (vn )
w.
2. Damping property
n
z
Z ( a un ) ( a un ) z
n n n
un
n0 n 0 a
z
u
a
Thus
z
Z ( a nun ) u
m
a
This is the result as desired. Here, we note that that if Z(un) = u (z ) , then
z
Z ( a nu n ) [u z ] Z Z = u
o
a a
Next,
s.c
Z (a nun ) (a nun ) z n un (az ) n
n0 n0
u (az )
Thus
c Z (a nun ) u (az )
This is the result as desired.
vtu
3. Shifting property
Z un k un k z n
n 0
ww
Z un k un k z n
nk
k
u0 z u1 z ( k 1) .......
Hence z k [u0 u1 z 1 ....... ]
z k un z n
n0
k
z u( z)
Thus
Z(un-k) = z-k u (z )
m
Proof :
Z u n k u n k z n
n0
o
z k u n k z ( k n ) z k u n k z ( k n ) , where m n k
n0 n 0
s.c
k 1
z k u n z n u n z n
n0 n0
= z k [u ( z ) u0 u1 z 1 u2 z 2 ...... uk 1 z ( k 1) ]
Particular cases :
c
vtu
In particular, we have the following standard results :
1. Z (un 1 ) z[u ( z ) u0 ]
2. Z (un 2 ) z 2 [u ( z ) u0 u1 z 1 ]
3. Z (un 3 ) z 3[u ( z ) u0 u1 z 1 u2 z 2 ] etc.
w.
1.Transform of an
By definition, we have
Z (a n ) a n z n
n0
n 2
a a a
1 .....
n 0 z z z
The series on the RHS is a Geometric series. Sum to infinity of the series is
1 z z
or Thus, Z (a n )
1 a za za
z
z
In particular, when a=1, we get Z(1) =
z 1
m
2. Transform of ean
Here
Z (e an ) Z (k n ) where k = ea
z z
o
z k z ea
Thus
z
s.c
Z (e an )
z ea
We have,
c
Z (n p ) n p z n
n 0
vtu
z n p 1 z ( n 1) n (1)
n 0
Also, we have by defintion
Z (n p 1
) n p 1 z n
n 0
Differentiating with respect to z, we get
w.
d
dz
d
Z (n p 1 ) n p 1 z n
dz n 0
n p 1 ( n) z ( n 1)
ww
n 0
Using this in (1), we get
d
Z (n p ) z [ Z (n p 1 )]
dz
Particular cases of Z (n p ) :-
1. For p = 1, we get
Z ( n) z
d
Z (1) z d z z 2
dz dz z 1 ( z 1)
Thus,
z
Z (n)
( z 1) 2
2. For p = 2, we get
m
dz
Thus,
z2 z
Z (n 2 )
( z 1)3
o
3. For p = 3, we get
z3 4z 2 z
s.c
Z ( n3 )
( z 1) 4
4. Transform of nan
By damping property, we have
z
Z (na n ) Z (n)Z Z
c a 2
( z 1) Z Z a
vtu
z , in view of damping
a az
z
2
( z a) 2
1
a
property
Thus,
az
Z (na n )
w.
( z a)2
5. Transform of n2an
We have,
z2 z
ww
Z (n 2 a n ) Z (n 2 ) Z Z 3
a
( z 1) Z Z
a
Thus,
az 2 a 2 z
Z (n 2 a n )
( z a )3
We have
e n e n
cosh n
2
1
Z (cosh n ) Z (e n e n )
2
m
1
2
Z (e n ) Z (e n ) , by using the linearity property
1 z z
2z e
z e
o
(e e )
z
z z e z e 2
2 z
s.c
2 z z (e e ) 1
z z (e e ) 1
2
z z cosh
2
z 2 z cosh 1
Next,
c
sinh n
e n e n
2
vtu
z 1 1
Z (sinh n )
2 z e
z e
z e e
2
2 z 2 z cosh 1
z sinh
2
z 2 z cosh 1
w.
We have
ein e in
ww
cos n
2
1
Z (cos n ) Z (ein e in )
2
1 z z
2 z e i
z e i
z 2 z (ein e in )
2
2 z z (ein e in ) 1
z[ z cos ]
z 2 z cos 1
2
m
Next,
ein e in
sin n
2i
o
1 z z
Z (sin n )
2i z e i
z e i
s.c
z e i e i
2
2i z 2 z cos 1
z sin
z 2 z cos 1
2
Examples :
c
vtu
Find the Z-transforms of the following :
n n
1 1
1. un
2 4
We have,
w.
1 n 1 n
Z (un ) Z
2 4
n n
1 1
Z Z
2 4
ww
z z 2z 4z
1 1 2z 1 4z 1
z z
2 4
2 z (8 z 3)
(2 z 1)(4 z 1)
1
2. un
n!
Here
m
3. un a n cos n
We have
z ( z cos )
o
Z (cos n )
z 2 z cos 1
2
s.c
z ( z cos )
Z (a n cos n ) 2
z 2 z cos 1 Z Z a
zz
cos
aa
2
z
c z
2 cos 1
a a
z ( z a cos )
vtu
2
z 2az a 2
1
4. un =
(n 2)!
1 1
Let us denote vn = , so that vn+2 = = un
(n 2)!
w.
n!
Here
1
Z (v n ) e z
Hence
ww
v
Z (un ) Z (vn 2 ) z 2 Z (vn ) v0 1 , by left shifting rule
z
1
1 1 1
z 2 e z .
0! z 1!
1 1
z 2 e z 1
z
z z
1. Z T1 1 2. Z T1 kn
z 1 z k
z kz
3. Z T1 2
n 4. Z T1 2
k nn
z 1 z k
m
z2 z kz 2 k 2 z
5. Z T1 3
n2 6. Z T1 3
k nn2
z 1 z k
o
z 3 4z 2 z kz 3 4k 2 z 2 k 3 z
7. Z T1 n
3
8. Z T1 k n
n 3
z 1 z k
4 4
s.c
z z2
9. Z T1 2 sin( n 2) 10. Z T1 2 cos(n 2)
z 1 z 1
c
Evaluation of inverse Z-transforms:
vtu
We obtain the inverse Z-transforms using any of the following three methods:
( I ) Power series Method:- This is the simplest of all the method of finding the inverse
Z-transform. If U (z) is expressed as the ratio of two polynomials which cannot be
factorized, we simply divide the numerator by the denominator and take the inverse Z-
transform of each term in the quotient.
Problems:
w.
1 2 1 3
z 1 z z ...
2 3
i.e, U ( z ) u n z n
n 1
0 for n 0
Thus un (1) n
otherwise
n
z
U ( z)
z 2z 1
2
z
2
z (1 2 z 1 z 2 )
m
z
z (1 1 z ) 2
2
1
1 1 z
2
o
z
1 2( 1 z ) 3( 1 z 2 ) 14 ( 1 z 3 )
1
s.c
z
1 1 1 1
U ( z ) 2 2 3 3 4 4
z z z z
(1) n 1 nZ n
n 1
Thus u n (1) n 1 n c
( II ) Partial fractions Method:- This method is similar to that of finding the inverse
vtu
Laplace transforms using partial fractions. The method consists of decomposing U ( z )
z
into partial fractions, multiplying the resulting expansion by z and then inverting the
same.
Problems:
2 z 2 3z
(1)
w.
( z 2)( z 4)
2 z 2 3z
We write U ( z ) as
( z 2)( z 4)
U ( z) 2z 3 A B
where A 1 B 11
ww
and
z ( z 2)( z 4) z 2 z 4 6 6
Therefore
1 z 11 z
U (z)
6 z2 6 z4
On inversion, we have
1
un (2) n (4)n
6
11
6
z 1 ( z z k ) k n
z 3 20 z
(2)
( z 2)3 ( z 4)
z 3 20 z
We write U ( z ) as
( z 2)3 ( z 4)
U ( z) z 2 20 A Bz Cz 2 D
z ( z 2) ( z 4)
3
( z 2) 3
z4
m
Multiplying throughout by ( z 2)3 ( z 4)
we get z 2 20 ( A Bz Cz 2 )( z 4) D( z 2)3 .
o
Comparing the coefficients of z in the above equation
we get A = 6, B=0, C = ½ and D = -½ .
Thus
6 0z 1 z2 1
s.c
U ( z) z 2 20 2
2
z ( z 2)3 ( z 4) ( z 2)3 z4
U ( z) z 2 20 6 0z 1 z2 1
2 2
z ( z 2)3 ( z 4) ( z 2)3 z4
c
1 12 z z 3 1 z 1 12 z 4 z 2 4 z 2 z 3 1 z
U (z) .
vtu
2 ( z 2)3 2 z 4 2 ( z 2)3 2 z 4
1 8 z 4 z 4 z 4 z z 1 z 1 z 4 z 4 z 8 z 4 z 1 z
2 2 3 3 2 2
2 ( z 2)3 2 z 4 2 ( z 2)3
2 z 4
1 z ( z 2) 2 4 z 2 8 z 1 z 1 z 2z2 4z 1 z
2
2 ( z 2)3 2 z 4 2z 2 ( z 2)3 2 z 4
w.
1
On inversion, we get un (2n 2.n2 2n ) 4n
2
2n1 n2 2n 22n1
ww
2( z 2 5 z 6.5)
(3)Find the inverse Z-transform of , for 2 z 3
( z 2)( z 3) 2
Splitting into partial fractions, we obtain
2( z 2 5 z 6.5) A B C
U ( z) where A B C 1
( z 2)( z 3) 2
z 2 z 3 ( z 3) 2
1 1 1
U ( z)
z 2 z 3 ( z 3) 2
m
2 13 z n (n 1) 13 z n
n 1 n n 1 n 2
z
n 1 n 0 n0
o
s.c
Difference Equations
INTRODUCTION
Difference equations arise in all situations in which sequential relation exists at various
discrete values of the independent variable. The need to work with discrete functions
c
arises because there are physical phenomena which are inherently of a discrete nature. In
control engineering, it often happens that the input is in the form of discrete pulses of
vtu
short duration. The radar tracking devices receive such discrete pulses from the target
which is being tracked. As such difference equations arise in the study of electrical
networks, in the theory of probability, in statistical problems and many other fields.
Just as the subject of difference equations grew out of differential calculus to
become one of the must powerful instruments in the hands of a practical mathematician
when dealing with continuous processes in nature, so the subject of difference equations
is forcing its way to the fore for the treatment of discrete processes. Thus the difference
equations may be thought of as the discrete counterparts of the differential equations.
w.
Definition
A difference equation is a relation between the differences of an unknown function at one
or more general values of the argument.
Eg: 1) yn 1 yn 2
ww
2) 2 yn 5yn 6 yn 0
3) 3 yn 3 2 yn 2yn yn x 2 are difference equations.
An alternative way of writing a difference equation is as follows:
Putting E 1 , we get
(1) may be written as,
( E 1) yn 1 yn 2
Eyn 1 yn 1 yn 2 [sin ce E r yn yn r ]
yn 2 yn 1 yn 2 (4)
(2) may be written as,
( E 1) 2 y n 5( E 1) y n 6 y n 0
( E 2 2 E 1) y n (5 E 5) y n 6 y n 0
y n 2 2 y n 1 y n 5 y n1 y n 0
y n 2 3 y n 1 2 y n 0 (5)
(3) may be written as
( E 1) 3 y n 3( E 1) 2 y n 2( E 1) y n y n x 2
m
( E 3 3E 2 3E 1) y n 3( E 2 2 E 1) y n 2( E 1) y n y n x 2
y n 3 3 y n 2 3 y n 1 y n 3 y n 2 6 y n 1 3 y n 2 y n 1 2 y n y n x 2
y n 3 6 y n 2 11 y n 1 5 y n x 2 (6)
o
The equations (4), (5) and (6) can also be written in terms of the operator E. i.e,
s.c
( E 2 E 1) y n 2
( E 2 3E 2) y n 0
( E 3 6 E 2 11E 5) y n x 2
Note: To find the order, the equation must be expressed in a form free of s . [because
the highest power of does not give the order of difference equation]
w.
(n 3) (n)
(6) is = 3
1
The order of a difference equation can also be obtained by considering the highest power
of the operator E involved in the equation.
A particular solution (or particular integral) is that solution which is obtained from the
general solution by giving particular values to the constants.
m
EQUATIONS
o
1) Take the Z-transform of both sides of the difference equations using the Z-transforms
formulae and the given conditions.
2) Transpose all terms without U (z ) to the right.
s.c
3) Divide by the coefficient of U (z ) , getting U (z ) as a function of z.
4) Express this function in terms of Z-transforms of known functions and take the inverse
Z-transform of both sides. This gives u n as a function of n which is the desired solution.
Problems:
c
(1) Using the Z-transform, solve u n 2 4u n 1 3u n 3 n with u 0 0, u1 1
We note that If Z (u n ) U ( z ), then Z (u n 1 ) z U ( z ) u 0 ,
vtu
Z (u n 2 ) z 2 U ( z ) u 0 u1 z 1
Also Z (2 n ) z
( z 2)
Taking the Z-transforms of both sides of the above difference equation, we get
z 2 U ( z ) u 0 u1 z 1 4 zU ( z ) u 0 3U ( z ) z
( z 3)
Using the given conditions, it reduces to
w.
U ( z )( z 2 4 z 3) z z
( z 3)
U ( z) 1 1
z ( z 1)( z 3) ( z 3)( z 1)( z 3)
3 1 1 1 5 1
ww
,
8 z 1 24 z 3 12 z 3
on breaking into partial fractions, then
3 z 1 z 5 z
U ( z)
8 z 1 24 z 3 12 z 3
On inversion, we obtain
3 z 1 1 z 5 1 z
u n Z 1 Z Z
8 z 1 24 z 3 12 z 3
3 1 5
(1) n 3 n (3) n
8 24 12
m
Since y 0 0, and y1 0, we have Y ( z )( z 6 z 9) z
2
( z 2)
Y ( z) 1 1 1 1 5
Or , on splitting into partial
z ( z 2)( z 3) 2
25 z 2 z 3 ( z 3) 2
o
fractions.
1 z z z
Or Y ( z ) 5
s.c
25 z 2 z 3 ( z 3) 2
On taking inverse Z-transform of both sides, we obtain
yn
1 1 z
25
Z z 2 Z 1 z z 3 53 Z 1 ( z 3 z3) 2
1 az
1 n
2 (3) n 53 n(3) n c Z 2
na n
25 ( z a)
vtu
w.
ww
om
c s.c
vtu
w.
ww