Combined

You might also like

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

Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH 242]

Module 1: Iterative Techniques and Interpolation

Lecture 1: Approximation and Errors, Intermediate Value Theorem


1
Amity Institute of Applied Sciences

Text:
• Rajaraman V, “Computer Oriented Numerical Methods”, Pearson Education
• Gerald & Wheatley, “Applied Numerical Analyses”, Addison Wesley.
• Jain, Iyengar and Jain, “Numerical Methods for Scientific and Engineering
Computations”, New Age Int.
• Grewal B S, “Numerical methods in Engineering and Science”, Khanna
Publishers, Delhi.
• G. Hadley, Linear Programming, Narosa Publishing House, New Delhi, 2002

2
Amity Institute of Applied Sciences

References:
• T Veerarajan, T Ramachandran, “Theory and Problems in Numerical Methods,
TMH
• Pradip Niyogi, “Numerical Analysis and Algorithms”, TMH.
• Francis Scheld, ” Numerical Analysis”, TMH.
• Sastry S. S, “Introductory Methods of Numerical Analysis”, Pearson
Education.
• Gupta C.B., Vijay Gupta, “Introduction to Statistical Methods”, Vikas
Publishing.
• Goyal, M, “Computer Based Numerical and Statistical Techniques”, Firewall
Media, New Delhi.
• Kantiswarup and Gupta, “Operation Research”, S. Chand, New Delhi. 3
Amity Institute of Applied Sciences

Course Objectives:

By the end of the semester, the students will be able to deal with
the techniques of numerical analysis and optimization, which
gives the solution to applied problem when ordinary analytical
method fails.

4
Amity Institute of Applied Sciences

Learning Outcomes:

Upon successful completion of this module, the student will be


able to
• find the Error in a series approximation
• solve transcendental equations using numerical methods
• apply the iterative methods to solve the simultaneous equations
and algebraic equations.

5
Errors Amity Institute of Applied Sciences
In numerical analysis the error may occur at any stage of the process of solving a problem.
The most common formula to find error is given by
Error = True value - Approximate value
Types of errors
(i) Inherent Errors: Inherent errors are the errors that pre exist in the problem statement itself
before its solution is obtained. Inherent errors exist because the data being approximate or
due to the limitations of the calculations using digital computers. Inherent errors cannot be
removed completely, but can be minimized.
(ii) Rounding Errors: It occurs from the process of rounding off the numbers during the
computations i.e., it occur when a fixed number of digits are used to represent exact
numbers.
These errors can be reduced however by
(a) Changing the calculation procedures so as to avoid subtraction of nearly equal numbers
or division by a small number.
(b) Retaining atleast one more significant digit at each step and rounding off at last step.
(iii) Truncation errors: They are caused by using approximate results or on replacing an
6
infinite process by a finite one.
Amity Institute of Applied Sciences

when we calculate the sin e of an angle by u sin g the series


x3 x5 x7
sin x  x     .......    A, then we use only finite number of terms
3! 5 ! 7 !
x3 x5
of the series, sin x  x    A / , Then an errorgiven by A  A / is called truncation error.
3! 5!
(iv) Absolute, Re lative and Percentageerrors:
If X E is the exact or true value of a quantity and X A is the approximat e value then, errorsare given by
XE  XA XE  XA
Absolute error  X E  X A , Re lative error  and % error  100
XE XE

7
Amity Institute of Applied Sciences

Error in a seriesapproximat ion


The error resultedin approximat ing an inf inite seriesis evaluated by the remainder
of the seriesafter n term. Further if in advance the required accuracy is known then
itwould bepossible to find the value of n i.e., the number of terms required so that
the seriesgivesthe needed accuracy.
(i) Taylor ' s seriesapproximat ion
The errorappeared in a seriesapproximat ion can be evaluated by u sin g the remainder
after n terms. The taylor seriesabout x  a is given by
( x  a ) 2 // ( x  a ) n 1 n 1
f ( x )  f (a )  ( x  a )f (a ) 
/
f ( x )  ......  f (x)  R n (x)
2! ( n  1) !
(x  a)n n
where R n ( x )[remainder term ]  f ( ) , a    x.
n!

8
Amity Institute of Applied Sciences

(ii) Exponential series


x2 x3 x n 1 x n x
e  1 x 
x
  ......   R n ( x ), where R n ( x )  e , 0    1.
2! 3! ( n  1) ! n!
Example :
Compute the %errorin the time period T  2 l g , for l  1m if the errorin the
measurement of l  0.01.
Solution :
1 1
Since T  2 l g , taking log, we have log T  log 2 log l  g
2 2
T 1 l T 1 l 0.01
   percentage errorin T   100   100   100  0.5%
T 2 l T 2 l 2 1

9
Amity Institute of Applied Sciences
1 x 
3 5
x x
Example : Use the seriesloge    2 ( x    .......), to compute the value of log(1.2)
1 x  3 5
correctto seven decimal places and find the number of terms retained.
1 x
Solution : Let  1.2  x  1 / 11,
1 x
2 n 1
 1 
2 n 1 2 
  
2 x 11
If we retain n terms then, ( n  1) th term 
2n  1 2n  1
2 n 1
 1 
2 
for seventh decimal accuracy  
11 1
  10 7
2n  1 2
( 2n  1) 112 n 1  4  107  n  3.
hence retaining the first three terms of the given series, we get
x3 x5 1
loge (1.2)  2( x   ) at ( x  )  0.1823215.
3 5 11
10
Amity Institute of Applied Sciences

Thank you

11
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 2: Bisection Method


1
Bisection Method Amity Institute of Applied Sciences

Intermediate Value Theorem:


An equation f(x)=0, where f(x) is a real continuous
function, has at least one root between xa and xb if f(xa)
f(xb) < 0.
f(x)

Xa
x
Xb

Figure 1 At least one root exists between the two points if the function is
real, continuous, and changes sign.
2
Amity Institute of Applied Sciences
f(x)

x
Xb
Xa

Figure 2 If function f x does not change sign between two


points, xa and xb then roots of the equation f x  0 may
still exist between the two points.
3
Method for Bisection Method
Amity Institute of Applied Sciences
Step 1
Choose xl and xu as two guesses for the root such that f(xl) f(xu) < 0, or
in other words, f(x) changes sign between xl and xu. This is demonstrate
in given figure
f(x)

xl
x
xu

4
Amity Institute of Applied Sciences

Step 2
Estimate the root, xm of the equation f (x) = 0 as the
mid point between xl and xu as
f(x)

xl  xu
xm =
2

xl xm
x
xu

5
Amity Institute of Applied Sciences

Step 3
Now check the following

a) If f x l f x m   0 , then the root lies between xl and xm; then xl = xl


; xu = xm.

b) If f x l f x m   0 , then the root lies between xm and xu; then xl =


xm; xu = xu.

c) If f x l f x m   0 , then the root is xm. Stop the algorithm if this is


true.
6
Amity Institute of Applied Sciences

Step 4 xl  xu
Find the new estimate of the root xm =
2
Repeated the process until, we get the root of the equation upto its
accuracy.
We can also find the absolute relative approximate
error x new  x old
a  100
m m
new
x
where m

xmold  previous estimate of root

xmnew  current estimate of root


Amity Institute of Applied Sciences

Advantages
1. Always convergent
2. The root bracket gets halved with each iteration - guaranteed.

Drawbacks
1. Slow convergence
2. If one of the initial guesses is close to the root, the
convergence is slower

8
Drawback Example (continued) Amity Institute of Applied Sciences

• If a function f(x) is such that it just touches the x-axis it will be


unable to find the lower and upper guesses.

f x   x 2
f(x)

9
Drawback Example (continued) Amity Institute of Applied Sciences

The function changes sign but root does not


exist f(x)

f x  
1
x x

10
Amity Institute of Applied Sciences

Example: Find a root of the equation x 3  x  11 0


using bisection method correct to three decimal places.
Solution. Let f ( x )  x 3
 x  11
f (0)   11, f (1)  1  1  11  11
f ( 2)  8  2  11  5 , f (3)  27  3  11 13
Since f ( 2)  0 & f (3)  0 i.e. root lies between 2 and 3.
23
Ist approximat ion : x1   2.5
2
Now f ( x1 )  f (2.5)  (2.5) 3  2.5  11 2.125 i.e.  ve
The root lies between 2 and 2.5
2  2.5
IInd approximat ion : x 2   2.25
2
Now f ( x 2 )  f (2.25)  (2.25) 3  2.25  11  1.8594 i.e.  ve
The root lies between 2.25 and 2.5 11
Amity Institute of Applied Sciences

2.25  2.5
IIIrd approximat ion : x 3   2.375
2
Now f ( x 3 )  f ( 2.375)  ( 2.375)  2.375  11 0.021 i.e.  ve
3

The root lies between 2.25 and 2.375


Re peating this process, the successiveapproximat ion are
x 4  2.3125 , x 5  2.34380 , x 6  2.3594, x 7  2.3672,
x 8  2.3711, x 9  2.3730, x10  2.374, x11  2.3735, x12  2.37375
so root lies between 2.3735and 2.37375. Hence root of the given
eq. is 2.373, because the digit ' s in the three decimal of places is same.

12
Amity Institute of Applied Sciences

13
Amity Institute of Applied Sciences

14
Amity Institute of Applied Sciences

15
Amity Institute of Applied Sciences

Thank You

16
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 3: Method of False position


1
Method of false position or Regula-Falsi Method
or Method of Interpolation Amity Institute of Applied Sciences

This is the oldest method of finding the real root of an equation


f(x) = 0 and closely resembles the Bisection Method. Here we
choose two points x0 and x1 such that f(x0) and f(x1) are of
opposite sign f(x)

i.e. the graph of y = f(x) crosses the x-axis A [ x0, f(x0 ) ]

between these points ( see figure)


This indicates that a root lies between
x0 and x1 consequently f(x0) f(x1) < 0. X
X3 X2
1
x
X0 P(x)

B [ x1, f(x1 ) ]
2
Amity Institute of Applied Sciences
Method of false position

Equation of the chord joining the points


A [ x0, f(x0 )] B [ x1, f(x1 )] is
f ( x1 )  f ( x0 )
y  f ( x0 )  ( x  x0 )
x1  x0
The method consists in replacing the curve AB by means
of the chord AB and taking the points of intersection
of the chord with the x-axis as an approximation to the root.

3
Amity Institute of Applied Sciences
Method of false position

So the abscissa of the point where the chord cuts


the x-axis ( y=0) is given by
which is an approximation of the root.
x1  x 0
x2  x0  f (x 0 )
f ( x1 )  f ( x 0 )

4
Amity Institute of Applied Sciences

Example: Find a root of the equation cos x  x e x using the Regula-falsi


method correct to four decimal places.
Solution: Let f ( x )  cos x  x e x  0 so that
f (0)  1  ve , f (1)  cos1  e   2.17798(  ve )
180 o
[ Where 1r  ( ) ]

i.e. , the root lies between 0 and 1.
taking x 0  0, x 1  1, f ( x 0 )  1 and f ( x 1 )   2.17798
in the regula falsi method, we get
x1  x 0 1
x2  x0  f (x 0 )  0  1  0.31467
f ( x1 )  f ( x 0 )  2.17798 1
Now f ( 0.31467)  0.51987  ve
the root lies between 0.31467and 1
5
Amity Institute of Applied Sciences

Taking x 0  0.31467, x1 1, f ( x 0 )  0.51987and f ( x1 )   2.17798


in the regula falsi method, we get
1  0.31467
x 3  0.31467  0.51987 0.44673
 2.17798 0.51987
Now f ( 0.44673)  0.20353  ve
the root lies between 0.44673and 1.
Re peating this process, the successiveapproximat ions are
x 4  0.49402, x 5  0.50995, x 6  0.51520, x 7  0.51692,
x 8  0.51748, x 9  0.51767, x10  0.51775 etc.
Hence the root is 0.5177correctto four decimal places.
6
Amity Institute of Applied Sciences

7
Amity Institute of Applied Sciences

8
Amity Institute of Applied Sciences

Thank you

9
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH 242]

Module 1: Iterative Techniques and Interpolation

Lecture 4: Newton Raphson Method


1
Amity Institute of Applied Sciences
NEWTON-RAPHSON METHOD OR SUCCESSIVE SUBSTITUTION METHOD
By this method, we get closer approximation of the root of an equation if we already know its approximate root.

f(x)

f(xi )
x i1 = x i -
f(xi)
x f x 
i, i
f ' (x i )

f(xi-1)


xi+2 xi+1 xi X

Figure 1: Geometrical illustration of the Newton-Raphson method.


2
Amity Institute of Applied Sciences

AB
f(x)
tan(   
AC
f (x i )
f(xi) B
f ' ( xi ) 
x i  x i 1

The Newton Raphson formula or


Newton ' s iterationformula is given by
C  A X
f (x i )
xi+1 xi x i 1  x i 
f ( x i )
Figure 2 : Derivation of the Newton-Raphson method.
3
Amity Institute of Applied Sciences

Example: Using Newton Raphson Method, find the real root of x log 10 x  1.2  0
correct to 5 decimal places.
Solution: Let f ( x )  x log x  1.2
10

f (1)  0  1.2   1.2  ve


f ( 2)  2 log10 2  1.2  0.5980
f (3)  3 log10 3  1.2  3  0.4771 1.2  0.2313
so a root of f ( x )  0 lies between 2 and 3. Let us take x 0  2
1
Also f ( x )  log10 x  x. log10 e  log10 x  0.43429
/

x
 Newton ' s iterationformula gives
f (x i ) 0.43429x i  1.2
x i 1  x i  /  , i  0,1, 2, 3 .......
f (x i ) log10 x i  0.43429 4
Amity Institute of Applied Sciences

put i  0 , the first approximat ion is


0.43429x 0  1.2 0.43429 2  1.2 0.86858 1.2
x1     2.81
log10 x 0  0.43429 log10 2  0.43429 0.3010  0.43429
Similarly putting i  1, 2, 3, 4 we get
0.43429 2.81 1.2
x2   2.741
log10 2.81  0.43429
0.43429 2.741 1.2
x3   2.74064
log10 2.741 0.43429
0.43429 2.74064 1.2
x4   2.74065
log10 2.74064 0.43429
0.43429 2.74065 1.2
x5   2.74065 , clearly x 4  x 5
log10 2.74065 0.43429
Hence the root is 2.7406correctto five decimal places.
5
Amity Institute of Applied Sciences

Example : Use Newton’s Method to find the cube root of 24 upto four decimal places.
Solution: Let x  k N or x k  N  0
taking f ( x )  x k  N , we have f / ( x )  k x k 1
f (x i ) x ik  N
Then Newton ' s formula gives x i 1  x i  /  xi 
f (x i ) k x ik 1
1 N
x i 1  [ ( k  1) x i  k 1 ]
k xi
1 24
Taking N  24, k  3, we have x i 1  [ 2 x i  2 ], i  0,1, 2, 3....
3 xi
Since an approximat e value of ( 24)1 3  ( 27)1 3 , we take x 0  3
1 24 1 24
Then x1  [ 2 x 0  2 ]  [6  ]  2.88889
3 x0 3 9
Similarly x 2  2.88451, x 3  2.8845, sin ce x 2  x 3 upto 4 decimal places
We take (24)1 3  2.8845
6
Amity Institute of Applied Sciences
Advantages and Drawbacks of Newton Raphson Method

Advantages
• Converges fast (quadratic convergence), if it converges.
• Requires only one guess
Drawbacks – Division by Zero
Division by zero
For the equation f x   x 3  0.03x 2  2.4 106  0 the Newton-Raphson method
reduces to x 3i  0.03x i2  2.4  106
x i 1  x i 
3x i2  0.06x i
For x0  0 or x0  0.02 , the denominator will equal to zero.
Amity Institute of Applied Sciences

Thank you
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 5: Jacobi Iterative Method


1
Iterative Methods of solution Amity Institute of Applied Sciences
Jacobi’s iteration method / Method of simultaneous correction
Consider the equations
a 1 x  b1 y  c1 z  d1 

a 2 x  b2 y  c2 z  d 2  ...(1)
a 3 x  b 3 y  c3 z  d 3 

If a1 , b2 , c3 are large as compared to other coefficient, then solving
these for x, y, z respectively, the system can be written in the form

x  k 1  l1 y  m1 z 

y  k 2  l2 x  m 2 z  ...( 2)
z  k 3  l3 x  m 3 y 
 2
Amity Institute of Applied Sciences

Let us starts with the initial approximations x0 , y0 , z0 ( each = 0) for the


values of x, y, z. Substituting these on the right, we get the first
approximations
x1  k1 , y1  k 2 , z1  k 3
Substituting these on the right-hand side of (2), the second
approximation are given by
x 2  k1  l1 y1  m1 z1 

y 2  k 2  l 2 x1  m 2 z1  ...( 3)
z 2  k 3  l 3 x1  m 3 y1 

This process is repeated till the difference between two consecutive
approximation is negligible. 3
Amity Institute of Applied Sciences

Note: Condition for using the iterative methods is that the coefficients in the leading
diagonal are large compared to the other. If are not so, then on interchanging the
equation we can make the leading diagonal dominant diagonal.

Example : Solve by Jacobi' s iteration Method


20 x  y  2 z  17, 3 x  20 y  z   18 , 2 x  3 y  20 z  25
Solution
20 x  y  2 z  17 ...(1)  x  [17  y  2 z ] / 20
3 x  20 y  z   18 ...( 2)  y  [  18  3 x  z ] / 20
2 x  3 y  20 z  25 ...( 3)  z  [ 25  2 x  3 y ] / 20
We start frominitial apporximat ion x 0  y 0  z 0  0. 4
Amity Institute of Applied Sciences
First Approximat ion
x1  [17  y 0  2 z 0 ] / 20  x1  17 / 20  0.85
y1  [  18  3 x 0  z 0 ] / 20  y1  18 / 20  0.9
z1  [ 25  2 x 0  3 y 0 ] / 20  z1  25 / 20  1.25
Second Approximat ion
x 2  [17  y1  2 z1 ] / 20  x 2  [17  (0.9)  2(1.25)] / 20  1.02
y 2  [  18  3 x1  z1 ] / 20  y 2  [18  3(0.85)  1.25] / 20  0.965
z 2  [ 25  2 x1  3 y1 ] / 20  z 2  [25  2(0.85)  3( 0.9)] / 20  1.1515
Re peating this processwe get the successiveapproximat ions are
x 3  1.0134, y 3   0.9954, z 3  1.0032
x 4  1.0009, y 4   1.0018, z 4  0.9953
x 5  1.0000, y 5   1.0002, z 5  0.9996
x 6  1.0000, y 6   1.0000, z 6  1.0000
 x  1, y  1, z  1 5
Amity Institute of Applied Sciences

6
Amity Institute of Applied Sciences

7
Amity Institute of Applied Sciences

8
Amity Institute of Applied Sciences

Thank you

9
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 6: Gauss Seidal Method


1
Amity Institute of Applied Sciences

Gauss-Seidal Iteration method:


This is the modification of Jacobi iteration method.
Consider the equations
a 1 x  b1 y  c1 z  d1 

a 2 x  b2 y  c2 z  d 2  ...(1)
a 3 x  b 3 y  c3 z  d 3  
If a1 , b2 , c3 are large as compared to other coefficient, then solving these for x, y, z
respectively, the system can be written in the form
x  k 1  l1 y  m1 z 

y  k 2  l2 x  m 2 z  ...( 2)
z  k 3  l3 x  m 3 y 

2
Amity Institute of Applied Sciences

Let us starts with the initial approximations y0,z0 (each = 0) for


the values of y, z. Substituting these in first equation we get
x = k1 , then put x = k1 and z = z0 in second equation. After
getting new value of x = k1 and y = k2 , put these value in third
equation.
i.e. as soon as new approximation for an unknown is found, it is
immediately used in next step.

Note: This method is also known as Method of successive correction.


In this method, the latest values of the unknowns are used in each step.

3
Amity Institute of Applied Sciences

Example : Solve by Gauss  Seidel iteration Method


20 x  y  2 z  17, 3 x  20 y  z   18 , 2 x  3 y  20 z  25
Solution
20 x  y  2 z  17 ...(1)  x  [17  y  2 z ] / 20
3 x  20 y  z   18 ...( 2)  y  [  18  3 x  z ] / 20
2 x  3 y  20 z  25 ...( 3)  z  [ 25  2 x  3 y ] / 20
We start from initial apporximat ion y 0  z 0  0.

First Approximat ion


x1  [17  y 0  2 z 0 ] / 20  x1 17 / 20  0.85
y1  [  18  3 x1  z 0 ] / 20  y1  [18  3(0.85)] / 20  1.0275
z1  [ 25  2 x1  3 y1 ] / 20  z1  [25  2(0.85)  3(1.0275)] / 20  1.0109
4
Amity Institute of Applied Sciences

Second Approximat ion


x 2  [17  y1  2 z1 ] / 20  x 2  [17  (1.0275)  2(1.0109)] / 20  1.0025
y 2  [  18  3 x 2  z1 ] / 20  y 2  [18  3(1.0025)  1.0109] / 20  0.9998
z 2  [ 25  2 x 2  3 y 2 ] / 20  z 2  [25  2(1.0025)  3(0.9998)] / 20  0.9998
Re peating this processwe get the successiveapproximat ions are
Third approximat ion
x 3  [17  y 2  2 z 2 ] / 20  x 3  1.0000
y 3  [  18  3 x 3  z 2 ] / 20  y 3  1.0000
z 3  [ 25  2 x 3  3 y 3 ] / 20  z 3  1.0000
The values in the 2nd and 3rd iterationsbeing practically the same, we can stop.
Hence the solutionis x  1, y  1, z  1.
5
Amity Institute of Applied Sciences

6
Amity Institute of Applied Sciences

7
Amity Institute of Applied Sciences

8
Amity Institute of Applied Sciences

Thank you

9
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 7: Finite Differences and Difference tables


1
Amity Institute of Applied Sciences

Finite Differences:

Forward differences
The differences y1  y 0 , y 2  y1 , ..... y n  y n 1 when denoted by y 0 , y1 , .....y n 1
respectively are called the first forward differences, where  is the forward difference
operator. Thus the forward differences are y r  y r 1  y r
Similarly the sec ond forward differences are define by 2 y r  y r 1  y r
p 1 p 1
In general  y r   y r 1   y r defines the pth forward differences.
p

2
Amity Institute of Applied Sciences

Forward difference Table


Value of x Value of y 1st diff . 2nd diff . 3rd diff . 4 th diff .
x0 y0
y 0
x0  h y1 2 y 0
y1 3 y 0
x 0  2h y2 2 y1 4 y 0
y 2 3 y1
x 0  3h y3 2 y 2
y 3
x 0  4h y4
3
Amity Institute of Applied Sciences

Backward differences
The differences y1  y 0 , y 2  y1 , ..... y n  y n 1 when denoted by y1 , y 2 , .....y n
respectively are called the first backward differences, where  is the backward difference
operator. Thus the backward differences are y r  y r  y r 1
Similarly the sec ond backward differences are define by  2 y r  y r  y r 1
In general  p y r   p 1 y r   p 1 y r 1 defines the pth backward differences.

4
Amity Institute of Applied Sciences

Backward difference Table


Value of x Value of y 1st diff . 2nd diff . 3rd diff . 4 th diff .
x0 y0
y1
x0  h y1 2 y2
y 2 3 y3
x 0  2h y2  2 y3 4 y4
y 3 3 y4
x 0  3h y3 2 y4
y 4
x 0  4h y4
5
Amity Institute of Applied Sciences

Central differences
The differences y1  y 0 , y 2  y1 , ..... y n  y n 1 when denoted by y1/ 2 , y 3 / 2 , .....y n 1/ 2
respectively are called the first central differences, where  is the central difference
operator. Thus the central differences are y r 1/ 2  y r  y r 1
Similarly the sec ond central differences are define by  2 y1  y 3 / 2  y1/ 2
 2 y 2  y 5 / 2  y 3 / 2 ..... and third central difference 3 y 3 / 2   2 y 2   2 y1 and so on.
Amity Institute of Applied Sciences

Central difference Table


Value of x Value of y 1st diff . 2nd diff . 3rd diff . 4 th diff .
x0 y0
y1 / 2
x0  h y1  2 y1
y 3 / 2 3 y 3 / 2
x 0  2h y2 2 y2 4 y2
y 5 / 2 3 y 5 / 2
x 0  3h y3 2 y3
y 7 / 2
x 0  4h y4

7
Examples Amity Institute of Applied Sciences
1. Evaluate  tan 1 x
 xhx  1  h 
Solution :  tan 1 x  tan 1 ( x  h )  tan 1 x  tan 1    tan  2 
1  ( x  h ) x  1  hx  x 
 5x  12 
2. Evaluate 2  2  , int erval of differencing being unity ( i.e. h  1)
 x 5x  6
 5x  12   5x  12   2 3 
Solution : 2  2   2    2    ( by partial fraction)
 x 5x  6  ( x  2)(x  3)   x  2 x 3
  2   3     1 1   1 1 
           2    3   
  x  2   x  3     x 3 x 2  x  4 x  3 
  1 1   1 1 
  2    3    
  x3 x 2  x  4 x  3 
 1 1   1 1   1 1   1 1 
 2      3    
 x  4 x  3   x  3 x  2   x  5 x  4   x  4 x  3 
solve further by taking LCM 8
Amity Institute of Applied Sciences
Example : Find mis sin g term in the table x : 2 3 4 5 6
y : 45.0 49.2 54.1 .... 67.4
Solution :
x y y 2 y 3 y 4 y
2 45.0  y 0
4 .2
3 49.2  y1 0. 7
4 .9 a  59.7
4 54.1  y 2 a  59.0 240.2  4a
a  54.1 180.5  3a
5 a (let)  y 3 121.5  2a
67.4  a
6 67.4  y 4 9
Amity Institute of Applied Sciences

Since four entry were given in table therefore4 y  0


Hence 240.2  4a  0  a  60.05

Another method ( Operator Method )

As only four entriesare given , thereforey  f ( x ) can be represented by a third deg ree polynomial.
 3 y  cons tan t or 4 y  0 i.e. (E  1) 4 y  0
By u sin g Binomial exp ension (E 4  4E 3  6E 2  4E  1) y  0
i.e. y 4  4 y 3  6 y 2  4 y1  y 0  0
67.4  4(a )  6(54.1)  4(49.2)  45.0  0  a  60.05

10
Amity Institute of Applied Sciences

Thank you

11
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 8: Other Difference Operators


1
Amity Institute of Applied Sciences

2
Amity Institute of Applied Sciences

3
Amity Institute of Applied Sciences

4
Amity Institute of Applied Sciences

5
Amity Institute of Applied Sciences

Thank you

6
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 9: Relation between operators


1
Relation between operators
(i)   E  1
sin ce y x  y x  h  y x  Ey x  y x
 y x  Ey x  y x  (E  1) y x
  E 1
(ii ) E  e hD
2
h
Since Ef ( x )  f ( x  h )  f ( x )  hf / ( x )  f // ( x )  .......( By Taylor exp ansion )
2!
h2 2 (hD ) 2
Ef ( x )  f ( x )  hDf ( x )  D f ( x )  .......  [1  hD   ......] f ( x )
2! 2!
x2 x3
E f (x)  e f (x)  E  e
hD hD
[ sin ce e  1  x 
x
  ....., Maclaurin exp ansion ]
2 ! 3!

2
(iii )   1  E 1
sin ce y x  y x  y x  h  y x  E 1 y x
 y x  (1  E 1 ) y x
  1  E 1

(iv )   E1/ 2  E 1/ 2


 y x  y x  h / 2  y x h / 2
 y x  E1/ 2 y x  E 1/ 2 y x
 y x  (E1/ 2  E 1/ 2 ) y x
  E1/ 2  E 1/ 2

3
( v)   (E1/ 2  E 1/ 2 ) / 2
 y x  ( y x  h / 2  y x h / 2 ) / 2
 y x  (E1/ 2 y x  E 1/ 2 y x ) / 2
 y x  (E1/ 2  E 1/ 2 ) y x / 2
  (E1/ 2  E 1/ 2 ) / 2

4
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 10: Differences of a polynomial, Missing Term technique


1
Differences of a polynomial
The nth difference s of a polynomial of the nth deg ree are cons tan t and
all higher order difference s are zero .
Let the polynomial of the nth deg ree in x , be
n 1 n 2
f ( x )  a x  bx
n
cx  .......kx  l
f ( x )  f ( x  h )  f ( x )
 [a ( x  h ) n  b( x  h ) n 1  c ( x  h ) n  2  .......k ( x  h )  l]
 a x n  bx n 1  c x n  2  .......kx  l
 a[( x  h ) n  x n ]  b[( x  h ) n 1  x n 1 ]  .....  kh

2
 a[( x  h ) n  x n ]  b[( x  h ) n 1  x n 1 ]  .....  kh
 a n h x n 1  b / x n  2  c / x n 3  .....  k / x  l / ...(1)
where : b / , c / , .....l / are new cons tan t coefficien ts.
Thus the first difference s of a polynomial of nth deg ree is a polynomial of
deg ree (n  1).
Similarly 2 f ( x )  [ f ( x  h )  f ( x )]  f ( x  h )  f ( x )
 anh [( x  h ) n 1  x n 1 ]  b / [( x  h ) n  2  x n  2 ]  ....  k / h
 a n (n  1)h 2 x n  2  b // x n 3  c // x n  4  .....  k // x ...(2) [ by (1) ]

3
the sec ond difference s represent a polynomial of deg ree (n  2).
Continuing the process, for the nth difference s we get a polynomial
of deg ree zero
i.e. n f ( x )  a n (n  1) (n  2)........3.2.1 h n  a n!h n
Example : Evaluate 3[ (1  x )(1  2x )(1  3x )]
Solution : 3[ (1  x )(1  2 x )(1  3x )]  3 [1  6x  11x 2  6x 3 ]
 3 [1]  63[ x ]  113 [ x 2 ]  63 [ x 3 ]
 6 ( 3!)  3 ( x n )  0 for n  3
 36
4
Missing Term technique
Example : Find mis sin g term in the table x : 2 3 4 5 6
y : 45.0 49.2 54.1 .... 67.4
Solution :
x y y 2 y 3 y 4 y
2 45.0  y 0
4.2
3 49.2  y1 0.7
4.9 a  59.7
4 54.1  y 2 a  59.0 240.2  4a
a  54.1 180.5  3a
5 a (let )  y 3 121.5  2a
67.4  a
6 67.4  y 4
5
Since four entry were given in table therefore  y  0 4

Hence 240.2  4a  0  a  60.05


Another method ( Operator Method )
As only four entries are given , therefore y  f ( x ) can
be described by a third deg ree polynomial .
 3 y  cons tan t or 4 y  0 i.e. (E  1) 4 y  0
By applying Binomial Expansion ( E 4  4E 3  6E 2  4E  1) y  0
i.e. y 4  4 y 3  6 y 2  4 y1  y 0  0
67.4  4(a )  6(54.1)  4(49.2)  45.0  0  a  60.05
6
Example : Find the mis sin g value in the following data :
x : 45 50 55 60 65
y : 3 .0 ... 2 .0 ...  2 .4
Solution :
x y y 2 y 3 y
45 3 .0
a 3
50 a 5  2a
2a 3a  b  9
55 2 .0 ba4
b2 3.6  a  3b
60 b  0. 4  2 b
 2 .4  b
65  2. 4
7
sin ce only three entry are given
 y 0  0 and  y1  0
3 3

i.e. 3 a  b  9 and a  3 b  3.6


solving these , we get a  2.925 and b  0.225

8
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 11: Newton’s Forward Difference formula


1
Interpolation with equal spaced interval
Newton ' s forward int erpolation formula

Let the function y  f ( x ) takes the value y 0 , y1 , y 2 , ......correspond ing to the values
x 0 , x 0  h, x 0  2h, ...... of x. Suppose it is required to evaluate f ( x ) for x  x 0  ph,
where p is any real number .
Since E p f ( x )  f ( x  ph ) y p  f ( x 0  ph )  E p f ( x 0 )  (1  ) p y 0 { E  1  }
 p (p  1) 2 p (p  1)( p  2) 3 
y p  1  p      .............. y 0 [ u sin g Binomial theorem ]
 2! 3! 
p (p  1) 2 p (p  1)( p  2) 3
i.e. y p  y 0  py 0   y0   y 0  ..............
2! 3!
It is called Newton ' s forward int erpolation formula .
2
Example: The table gives the distance in nautical miles of the visible horizon for the give heights in
feet above the earth’s surface :
x=heights : 100 150 200 250 300 350 400
y=distance : 10.63 13.03 15.04 16.81 18.42 19.90 21.27
Find the values of y when x= 160 ft.
Solution :
x 160
Since x  160, lies near starting of the table , therefore u sin g forward int erpolation formula
p (p  1) 2 p (p  1)( p  2) 3
y p  y 0  py 0   y0   y 0  ..............
2! 3!
where x  x 0  ph ,
x  x 0 160  150
Now taking x 0  150, h  50 , p    0.2
h 50

3
x y y 2 y 3 y 4 y 5 y 6 y
100 10.63
2.40
150( x 0 ) 13.03( y 0 )  0.39
2.01(y 0 ) 0.15
200 15.04  0.24(2 y 0 )  0.07
1.77 0.08(3 y 0 ) 0.02
250 16.81  0.16  0.05( 4 y 0 ) 0.02( 6 y n )
1.61 0.03 0.04( 5 y n  5 y 0 )
300 18.42  0.13  0.01( 4 y n )
1.48 0.02( 3 y n )
350 19.90  0.11( 2 y n )
1.37(y n )
400 ( x n ) 21.27( y n )
4
From the above table
p (p  1) 2 p (p  1)( p  2) 3
y p  y 0  py 0   y0   y 0  ..............
2! 3!
0.2(0.2  1) 0.2(0.2  1)(0.2  2)
 13.03  0.2(2.01)  (0.24)  (0.08)
2! 3!
0.2(0.2  1)(0.2  2)(0.2  3) 0.2(0.2  1)(0.2  2)(0.2  3)(0.2  4)
 (0.05)  (0.04)
4! 5!
 13.46 nautical miles

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 12: Newton’s Backward Difference formula


1
Interpolation with equal spaced interval
Newton ' s Backward int erpolation formula

Let the function y  f ( x ) takes the value y 0 , y1 , y 2 , ......correspond ing to the values
x 0 , x 0  h, x 0  2h, ...... of x. Suppose it is required to evaluate f ( x ) for x  x n  ph,
where p is any real number .
Since E p f ( x )  f ( x  ph ) y p  f ( x n  ph )  E p f ( x n )  (1  )  p y n { E 1  1  }
 p (p  1) 2 p (p  1)( p  2) 3 
y p  1  p      .............. y n [ u sin g Binomial theorem ]
 2! 3! 
p (p  1) 2 p (p  1)( p  2) 3
i.e. y p  y n  py n   yn   y n  ..............
2! 3!
It is called Newton ' s backward int erpolation formula .

2
Example: The table gives the distance in nautical miles of the visible horizon for the give heights in
feet above the earth’s surface :
x=heights : 100 150 200 250 300 350 400
y=distance : 10.63 13.03 15.04 16.81 18.42 19.90 21.27
Find the values of y when x= 410 ft.
Solution :

3
x y y 2 y 3 y 4 y 5 y 6 y
100 10.63
2.40
150( x 0 ) 13.03( y 0 )  0.39
2.01(y 0 ) 0.15
200 15.04  0.24(2 y 0 )  0.07
1.77 0.08(3 y 0 ) 0.02
250 16.81  0.16  0.05( 4 y 0 ) 0.02( 6 y n )
1.61 0.03 0.04( 5 y n  5 y 0 )
300 18.42  0.13  0.01( 4 y n )
1.48 0.02( 3 y n )
350 19.90  0.11( 2 y n )
1.37(y n )
400 ( x n ) 21.27( y n )
4
x  410
Since x  410, lies in end of the table , therefore u sin g backward int erpolation formula
p (p  1) 2 p (p  1)( p  2) 3 p (p  1)( p  2)( p  3) 4
y p  y n  py n   yn   yn   y n ..............
2! 3! 4!
where x  x n  ph ,
x  x n 410  400
Now taking x n  410, h  50 , p    0.2
h 50
From the above table
0.2(0.2  1) 0.2(0.2  1)(0.2  2)
y p  21.27  (0.2)1.37  (0.11)  (0.02)  ...
2! 3!
 21.53 nautical miles

5
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation


Lecture 13: Central Difference Interpolation
Gauss Forward central Difference formula
1
Central difference interpolation formula
Newton forward and backward formula which are applicable for interpolation near the beginning and
the end of the table. Now we shall develop central difference formula which is best suited for
interpolation near the middle of the table.
Central difference Table
Value of x Value of y 1st diff . 2nd diff . 3rd diff . 4 th diff .
x 0  2h y 2
( y  2 ) y 3 / 2
x0  h y 1 (2 y  2 ) 2 y 1
( y 1 )y 1/ 2 (3 y  2 )3 y 1/ 2
x0 y0 ( 2 y 1 ) 2 y 0 ( 4 y  2 ) 4 y 0
( y 0 )y1/ 2 (3 y 1 ) 3 y1/ 2
x0  h y1 (2 y 0 ) 2 y1
( y1 )y 3 / 2
x 0  2h y2

2
Gauss forward interpolation formula

Gauss forward int erpolation formula


p (p  1) 2 (p  1)p(p  1) 3 (p  1)p(p  1)( p  2) 4
y p  y 0  py 0   y 1   y 1   y  2  .......
2! 3! 4!
where x  x 0  ph

3
Example : Find f(22) and from the Gauss forward formula
x y y 2 y 3 y 4 y 5 y
20 354( y 1 )
 22(y 1 )
25 332( y 0 )  19(2 y 1 )
 41(y 0 ) 29(3 y 1 )
30 291 ( y1 ) 10 (2 y 0 )  37(4 y 1 )
 31 8 45
35 260 ( y 2 ) 2 8
 29 0
40 231 2
 27
45 204

4
Taking x 0  25, h  5, we have to find the value of f ( x ) for x  22
x  x0 22  25
i.e. , for p     0.6
h 5
Gauss forward int erpolation formula
p (p  1) 2 (p  1)p(p  1) 3 (p  1)p(p  1)( p  2) 4
y p  y 0  py 0   y 1   y 1   y  2  .......
2! 3! 4!
 0.6(0.6  1) (0.6  1)( 0.6)( 0.6  1)
 332  (0.6)( 41)  (19)  (29)
2! 3!
y p  332  28.2  9.12  1.856  352.936

5
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 14: Gauss Backward Central Difference formula


1
Central difference interpolation formula
Newton forward and backward formula which are applicable for interpolation near the beginning and
the end of the table. Now we shall develop central difference formula which is best suited for
interpolation near the middle of the table.
Central difference Table
Value of x Value of y 1st diff . 2nd diff . 3rd diff . 4 th diff .
x 0  2h y 2
( y  2 ) y 3 / 2
x0  h y 1 (2 y  2 ) 2 y 1
( y 1 )y 1/ 2 (3 y  2 )3 y 1/ 2
x0 y0 ( 2 y 1 ) 2 y 0 ( 4 y  2 ) 4 y 0
( y 0 )y1/ 2 (3 y 1 ) 3 y1/ 2
x0  h y1 (2 y 0 ) 2 y1
( y1 )y 3 / 2
x 0  2h y2

2
Gauss backward interpolation formula

Gauss Backward int erpolation formula


(p  1)p 2 (p  1)p(p  1) 3 (p  2)( p  1)p(p  1) 4
y p  y 0  py 1   y 1   y 2   y  2  .......
2! 3! 4!
where x  x 0  ph

3
Example : Find f(31) from the Gauss backward formula
x y y 2 y 3 y 4 y 5 y
20 354( y  2 )
 22(y  2 )
25 332( y 1 )  19(2 y  2 )
 41( y 1 ) 29(3 y  2 )
30 291 ( y 0 ) 10 (2 y 1 )  37( 4 y  2 )
 31 (y 0 )  8 (3 y 1 ) 45 (5 y  2 )
35 260 ( y1 ) 2( 2 y 0 ) 8 ( 4 y 1 )
 29 ( y1 ) 0 (3 y 0 )
40 231 ( y 2 ) 2 (2 y1 )
 27 ( y 2 )
45 204 ( y 3 )

4
Gauss Backward int erpolation formula
(p  1)p 2 (p  1)p(p  1) 3 (p  2)( p  1)p(p  1) 4
y p  y 0  py 1   y 1   y 2   y  2  .......
2! 3! 4!
where x  x 0  ph
x  x 0 31  30
Taking x 0  30, x  31, h  5, p    0.2
h 5
(0.2  1)0.2 (0.2  1)0.2(0.2  1)
y p  291  (0.2)( 41)  (10)  (29)
2 6
(0.2  2)(0.2  1)0.2(0.2  1)
 (37)  .
24
y  293(approx.)

5
6
7
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 15: Lagrange’s Interpolation


1
Interpolation with unequal intervals
Lagrange’s Interpolation:

If y  f ( x ) takes the value y 0 , y1 , ...., y n correspond ing to x  x 0 , x1 , ...., x n then


( x  x1 )( x  x 2 ).....( x  x n ) ( x  x 0 )( x  x 2 ).........( x  x n )
f (x)  y0  y1
( x 0  x1 )( x 0  x 2 ).......( x 0  x n ) ( x1  x 0 )( x1  x 2 ).......( x1  x n )
( x  x 0 )( x  x1 )............( x  x n 1 )
 ...............  yn
( x n  x 0 )( x n  x1 )..........( x n  x n 1 )
This is known Lagrange formula for unequal int ervals .

2
Example : Given the values x : 5 7 11 13 17
f ( x ) : 150 392 1494 2366 5202
evaluate f (9), u sin g Lagrange formula .
Solution : The Lagrange formula is given by
( x  x1 )( x  x 2 )( x  x 3 )( x  x 4 ) ( x  x 0 )( x  x 2 )( x  x 3 )( x  x 4 )
f (x)  y0  y1
( x 0  x1 )( x 0  x 2 )( x 0  x 3 )( x 0  x 4 ) ( x1  x 0 )( x1  x 2 )( x1  x 3 )( x1  x 4 )
( x  x 0 )( x  x1 )( x  x 3 )( x  x 4 ) ( x  x 0 )( x  x1 )( x  x 2 )( x  x 4 )
 y2  y3
( x 2  x 0 )( x 2  x1 )( x 2  x 3 )( x 2  x 4 ) ( x 3  x 0 )( x 3  x1 )( x 3  x 2 )( x 3  x 4 )
( x  x 0 )( x  x1 )( x  x 2 )( x  x 3 )
 y4
( x 4  x 0 )( x 4  x1 )( x 4  x 2 )( x 4  x 3 )
Taking x 0  5, x1  7, x 2  11, x 3  13, x 4  17, y 0  150, y1  392, y 2  1492,
y 3  2366, y 4  5202 and putting x  9, in above formula , we get f (9)  810
3
4
5
6
7
8
9
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 1: Iterative Techniques and Interpolation

Lecture 16: Newton Divided difference formula


1
Interpolation with unequal intervals

Newton Divided difference formula


Divided difference s
If ( x 0 , y 0 ), ( x1 , y1 ), ( x 2 , y 2 ),......... be given then the first divided difference for
y1  y 0
the arg uement , x 0 , x1 is define by the relation x 0 , x1   ,
x1  x 0
y 2  y1 y  y2
Similarly x1 , x 2   and x 2 , x 3   3 etc.
x 2  x1 x3  x2

The sec ond divided difference for x 0 , x1 , x 2 is defined as x 0 , x1 , x 2  x1 , x 2   x 0 , x1 


x2  x0

The third difference is x 0 , x1 , x 2 , x 3  x1 , x 2 , x 3   x 0 , x1 , x 2 


and so on.
x3  x0

2
Newton Divided difference formula

Newton Divided difference s is given by


f ( x )  f ( x 0 )  ( x  x 0 ) x 0 , x1   ( x  x 0 )( x  x1 ) x 0 , x1 , x 2 
 ( x  x 0 )( x  x1 )( x  x 2 ) x 0 , x1 , x 2 , x 3   ( x  x 0 )( x  x1 )( x  x 2 )( x  x 3 ) x 0 , x1 , x 2 , x 3 , x 4 .....
Example : Given the values
x : 5 7 11 13 17
f ( x ) : 150 392 1494 2366 5202
evaluate f (9), u sin g Newton divided difference formula .
Solution : u sin g Newton divided difference formula
f (9)  150  (9  5)  121  (9  5)(9  7)  24  (9  5)(9  7)(9  11)  1
f (9)  810
The divided difference table is given in next slide
3
x y 1st divi . diff . 2nd divi . diff . 3rd divi . diff .
5 150

x 0 , x1   392  150  121


75
7 392 x 0 , x1 , x 2   265  121  24
11  5
x1 , x 2   1452  392  265 32  24
1
11  7 13  5
11 1452 x1 , x 2 , x 3   457  265  32
13  7
x 2 , x 3   2366  1452  457 42  32
1
13  11 17  7
13 2366 x 2 , x 3 , x 4   709  457  42
17  11
x 3 , x 4   5202  2366  709
17  13
17 5202
4
5
6
7
8
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical Differentiation and Integration

Lecture 1: Introduction to Numerical Differentiation


1
Amity Institute of Applied Sciences

Text:
• Rajaraman V, “Computer Oriented Numerical Methods”, Pearson Education
• Gerald & Wheatley, “Applied Numerical Analyses”, Addison Wesley.
• Jain, Iyengar and Jain, “Numerical Methods for Scientific and Engineering
Computations”, New Age Int.
• Grewal B S, “Numerical methods in Engineering and Science”, Khanna
Publishers, Delhi.
• G. Hadley, Linear Programming, Narosa Publishing House, New Delhi, 2002
• N. P. Bali, Engineering Mathematics, University Science Press, New Delhi,
2015

2
Amity Institute of Applied Sciences

References:
• T Veerarajan, T Ramachandran, “Theory and Problems in Numerical Methods,
TMH
• Pradip Niyogi, “Numerical Analysis and Algorithms”, TMH.
• Francis Scheld, ” Numerical Analysis”, TMH.
• Sastry S. S, “Introductory Methods of Numerical Analysis”, Pearson
Education.
• Gupta C.B., Vijay Gupta, “Introduction to Statistical Methods”, Vikas
Publishing.
• Goyal, M, “Computer Based Numerical and Statistical Techniques”, Firewall
Media, New Delhi.
• Kantiswarup and Gupta, “Operation Research”, S. Chand, New Delhi. 3
Amity Institute of Applied Sciences

Learning Outcomes:

Upon successful completion of this numerical differentiation


technique, students will be able to
• to develop ways to approximate the derivatives of the function
y=f(x), when only data points are given.

4
Amity Institute of Applied Sciences

Numerical Differentiation:
It is the method of computing the derivatives of an explicitly
unknown function, with given discrete set of data points ( xi , yi ) : i  1, 2, ...., n.
For differentiating numerically, we first determine an
interpolating polynomial and then compute the approximate
derivative at the given point.

5
Amity Institute of Applied Sciences

If the given values of xi ' s are equally spaced then

• Newtons forward interpolation formula is used to find the


derivative near the beginning of the table.
• Newtons backward interpolation formula is used to find the
derivative near the end of the table.

6
Amity Institute of Applied Sciences

If the given values of xi ' s are not equally spaced then

• We may find f(x) using Newton’s divided difference formula or


Lagranges interpolation formula and then differentiate it as
many times as needed.

7
Amity Institute of Applied Sciences

Thanks

8
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical Differentiation and Integration

Lecture 2: Derivatives using Newton’s Forward Difference formula


1
2
3
4
5
Amity Institute of Applied Sciences

 Newton’s forward difference interpolation formula is

u (u  1) 2 u (u  1)(u  2) 3
y  y0  uy0   y0   y0   (1)
2! 3!
where
( x  a)
u (2)
h

Differentiating eqn. (1) with respect to u, we get


dy 2u  1 2 3u 2  6u  2 3
 y0   y0   y0   (3)
du 2 6
6
Amity Institute of Applied Sciences

Differentiating eqn. (2) with respect to x, we get


du 1
 (4)
dx h

We now that

dy dy du 1  2u  1  2  3u 2  6u  2  3 
 .  y0     y 0  
 
  y 0  (5)
dx du dx h  2   6  

Evaluating at x=a, i.e. u=0 in eqn. (5) we get


 dy  1 1 2 1 3 1 4 1 5 
   y   y   y   y   y   (6)
h 
0 0 0 0 0
 dx  x  a  2 3 4 5 

7
Amity Institute of Applied Sciences

Differentiating eqn. (5) with respect to x, we get


d2y d  dy  d  dy  du
     
dx 2 dx  dx  du  dx  dx
 2  6u 2  18u  11  4 1

1
  y 0  u  13
y 0  
 
  y 0  
h   12  h
1  2  6u 2  18u  11  4 
 2   y0  u  1 y0  
3
 
  y0   (7)
h   12  
Evaluating at x=a, i.e. u=0, we get
 d2y  1  2 11 4 
 
 dx 2    y  3
y   y  (8)
h2  
0 0 0
  x a  12 

8
Amity Institute of Applied Sciences

dy
Ex: Find dx
at x=0.1 from the following table.

x: 0.1 0.2 0.3 0.4


y: 0.9975 0.9900. 0.9776 0.9604

9
Amity Institute of Applied Sciences

Sol: Difference table

x y y 2 y 3 y
0.1 .9975 -.0075 -.0049 .0001
0.2 .9900 -.0124 -.0048
0.3 .9776 -.0172
0.4 .9604

Here a=0.1, h=0.1, y0  .9975


 dy  1 1 1 
    y0  2 y0  3 y0 
 dx  x  0.1 h 2 3 
1  1 1 
  .0075  ( .0049 )  ( 0.0001)   .050167
0.1 
 2 3 
10
Amity Institute of Applied Sciences

11
Amity Institute of Applied Sciences

12
Amity Institute of Applied Sciences

Newtons forward differentiation interpolation formula is

dy dy du 1  2u  1  2  3u 2  6u  2  3 
 .  y0     y 0  
 
  y 0 
dx du dx h  2   6  

13
Amity Institute of Applied Sciences

Ex: Find dy d2y at x=1.1 by considering the following table


and
dx dx 2

x: 1.0 1.2 1.4 1.6 1.8 2.0


y: 0.0 0.1280 .5540 1.2960 2.4320 4.000

14
Amity Institute of Applied Sciences

Sol: Difference table

x y y 2 y 3 y 4 y 5 y
1.0 0.0 .1280 .298 .018 .06 -.01
1.2 0.1280 .4260 .316 .078 -.04
1.4 0.5540 .7420 .394 .038
1.6 1.2960 1.1360 .432
1.8 2.4320 1.5680
2.0 4.000

( x  a ) 1.1  1.0 1
At x=1.1, u  
h 0.2 2
15
Amity Institute of Applied Sciences

  2u  1  2  3u 2  6u  2  3  2u 3  9u 2  11u  3  4 
 y 0     y 0  
 
  y 0  
 
  y 0
dy 1  2   6   12  

dx h  5u 4  40u 3  105u 2  100u  24  5 
    y0 
   
  120  
dy
 066724
dx x 1.1

d2y 1  2  6u 2  18u  11  4  2u 3  12u 2  21u  10  5 


2
 2  y0  u  1 y0  
3
 y0    y0 
dx h   12   12  

d2y
 8.13125
dx 2 x 1.1
16
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical Differentiation and Integration

Lecture 3: Derivatives using Newton’s Backward Difference


formula
1
Amity Institute of Applied Sciences

 Newton’s backward difference interpolation formula is

u (u  1) 2 u (u  1)(u  2) 3
y  yn  uyn   yn   yn   (1)
2! 3!
where
( x  xn )
u (2)
h

Differentiating eqn. (1) with respect to u, we get


dy 2u  1 2 3u 2  6u  2 3
 yn   yn   yn   (3)
du 2 6
Source : Engineering Mathematics, 2
Amity Institute of Applied Sciences

Differentiating eqn. (2) with respect to x, we get


du 1
 (4)
dx h

We now that

dy dy du 1  2u  1  2  3u 2  6u  2  3 
 .  yn    y n  
 
 y n  (5)
dx du dx h  2   6  

Evaluating at x  xn, i.e. u=0 in eqn. (5) we get


 dy  1 1 1 1 
   yn   2 yn   3 yn   4 yn   (6)
 dx  x  xn h 2 3 4 

Source : Engineering Mathematics, 3


Amity Institute of Applied Sciences

Differentiating eqn. (5) with respect to x, we get


d2y d  dy  d  dy  du
     
dx 2 dx  dx  du  dx  dx
 2  6u 2  18u  11  4 1

1
 y n  u  1 3
y n  
 
 y n  
h   12  h
1  2  6u 2  18u  11  4 
 2  y n  u  1 y n  
3
 
 y n   (7)
h   12  
Evaluating at x  xn , i.e. u=0, in eqn. (7) we get
 d2y  1  2 11 4 
 
 dx 2    y   3
y   y   (8)
h2  
n n n
  x  xn  12 

Source : Engineering Mathematics, 4


Amity Institute of Applied Sciences

Source : Higher Engineering 5


Amity Institute of Applied Sciences

Source : Higher Engineering 6


Amity Institute of Applied Sciences

Source : Higher Engineering 7


Amity Institute of Applied Sciences

Ex: The distance covered by an athlete for the 50m race is given
by the following table:
Time 0 1 2 3 4 5 6
(sec)
Distance 0 2.5 8.5 15.5 24.5 36.5 50
(metre)

Determine the speed of the athlete at t=5s.

Source : Higher Engineering 8


Amity Institute of Applied Sciences

Sol: Difference table:

x y y 2 y 3 y 4 y 5 y 5 y
0 0 2.5 3.5 -2.5 3.5 -3.5 1
1 2.5 6 1 1 0 -2.5
2 8.5 7 2 1 -2.5
3 15.5 9 3 -1.5
4 24.5 12 1.5
5 36.5 13.5
6 50

Source : Higher Engineering 9


Amity Institute of Applied Sciences

Speed is given as
 dy  1 1 1 1 1 
   yn   2 yn   3 yn   4 y n   5 yn 
 dx  x 5 h 2 3 4 5 
1 1 1 1 1 
 12  .3  .1  .0  .( 3.5) 
1 2 3 4 5 
 13.13 m / s

Source : Higher Engineering 10


Amity Institute of Applied Sciences

Source : Higher Engineering 11


Amity Institute of Applied Sciences

Source : Higher Engineering 12


Amity Institute of Applied Sciences

Source : Higher Engineering 13


Amity Institute of Applied Sciences

Source : Higher Engineering 14


Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical Differentiation and Integration

Lecture 3: Derivatives using Newton Divided difference formula,


Derivatives using Lagrange’s Formula
1
Amity Institute of Applied Sciences

For unequally spaced values of the argument


i. Newton’s divided difference formula is
f ( x)  f ( x0 )  ( x  x0 ) f ( x0 , x1 )  ( x  x0 )( x  x1 ) f ( x0 , x1 , x2 )  ( x  x0 )( x  x1 )
( x  x2 ) f ( x0 , x1 , x2 , x3 )  
(1)

f ' ( x) is given by
f ' ( x)  f ( x0 , x1 )  [2 x  ( x0  x1 )] f ( x0 , x1 , x2 )  [3x 2  2 xx0  x1  x2 
 ( x0 x1  x1 x2  x2 x0 )] f ( x0 , x1 , x2 , x3 ) (2)

2
Amity Institute of Applied Sciences

ii. Lagrange’s interpolation formula is


( x  x1 )( x  x2 )  ( x  xn ) ( x  x0 )( x  x2 )  ( x  xn )
f ( x)  f ( x0 )  f ( x1 )  
( x0  x1 )( x0  x2 )  ( x0  xn ) ( x1  x0 )( x1  x2 )  ( x1  xn )
(3)

f ' ( x) can be obtained by differentiating f(x) in eqn (3).

3
Amity Institute of Applied Sciences

Ex: Find dy
at x=3.5 andd2y at x=4 by considering the following
dx dx 2
values:
f(0)=2, f(1)=3, f(2)=12, f(5)=147.

4
Amity Institute of Applied Sciences

Sol: Divided difference table:


x f(x)
0 2 1 4 1
1 3 9 9
2 12 45
5 147

Newton divided difference formula is


f ( x )  f ( x0 )  ( x  x0 ) f ( x0 , x1 )  ( x  x0 )( x  x1 ) f ( x0 , x1 , x2 )  ( x  x0 )( x  x1 )
( x  x2 ) f ( x0 , x1 , x2 , x3 )
 x3  x 2  x  2
5
Amity Institute of Applied Sciences

f ' ( x)  3x 2  2 x  1
f ' ' ( x)  6 x  2
f ' (3.5)  42.75, f ' ' (4)  26

6
Amity Institute of Applied Sciences

dy
Ex: Compute at x=1.5 for the following data using Lagranges
dx
Interpolation formula.
x 0 1 3
y 1 3 55

Sol: Using Lagranges interpolation formula


( x  1)( x  3) ( x  0)( x  3) ( x  0)( x  1)
f ( x)  .1  .3  .55
(0  1)( 0  3) (1  0)(1  3) (3  0)(3  1)


1 2
3
x  4x  3  2

3 2
x  3x   
55 2
6
x x 

7
Amity Institute of Applied Sciences

f ' ( x)  2 x  4  2 x  3  2 x  1
1 3 55
3 2 6
f ' (1.5)  18

8
Amity Institute of Applied Sciences

Example : Given the values


x : 5 7 11 13 17
f ( x ) : 150 392 1494 2366 5202
evaluate f / (9), u sin g Newton divided difference formula .
Solution : By Newton Divided difference s formula
f ( x )  f ( x 0 )  ( x  x 0 ) x 0 , x1   ( x  x 0 )( x  x1 ) x 0 , x1 , x 2 
 ( x  x 0 )( x  x1 )( x  x 2 ) x 0 , x1 , x 2 , x 3 
 ( x  x 0 )( x  x1 )( x  x 2 )( x  x 3 ) x 0 , x1 , x 2 , x 3 , x 4   .....
f / ( x )  x 0 , x1   (2 x  x 0  x1 ) x 0 , x1 , x 2  [3x 2  2 x ( x 0  x1  x 2 )
 ( x 0 x1  x1x 2  x 2 x 0 )] x 0 , x1 , x 2 , x 3   [4 x 3  3x 2 ( x 0  x1  x 2  x 3 )
 2 x ( x 0 x1  x1x 2  x 2 x 3  x 0 x 3  x 3 x1  x 0 x 2 )
 ( x 0 x1x 2  x1x 2 x 3  x 0 x 2 x 3  x 0 x1x 3 )]x 0 , x1 , x 2 , x 3 , x 4   ......
9
Amity Institute of Applied Sciences

f / ( x )  x 0 , x1   (2 x  x 0  x1 ) x 0 , x1 , x 2  [3x 2  2 x ( x 0  x1  x 2 )
 ( x 0 x1  x1x 2  x 2 x 0 )] x 0 , x1 , x 2 , x 3   [4 x 3  3x 2 ( x 0  x1  x 2  x 3 )
 2 x ( x 0 x1  x1x 2  x 2 x 3  x 0 x 3  x 3 x1  x 0 x 2 )
 ( x 0 x1x 2  x1x 2 x 3  x 0 x 2 x 3  x 0 x1x 3 )]x 0 , x1 , x 2 , x 3 , x 4   ......
f / (9) 121  (2  9  5  7)( 24)  [3  9  2  9(5  7  11)  (5  7  7 11  5 11)](1)
f / (9)  121  144  [27  414  167]  45

Divided difference table given in next slide .

10
11
Amity Institute of Applied Sciences
x y 1st divi . diff . 2nd divi . diff . 3rd divi . diff .
5 150

x 0 , x1   392  150  121


75
7 392 x 0 , x1 , x 2   265  121  24
11  5
x1 , x 2   1452  392  265 32  24
1
11  7 13  5
11 1452 x1 , x 2 , x 3   457  265  32
13  7
x 2 , x 3   2366  1452  457 42  32
1
13  11 17  7
13 2366 x 2 , x 3 , x 4   709  457  42
17  11
x 3 , x 4   5202  2366  709
17  13
17 5202
12
Amity Institute of Applied Science

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical differentiation and Integration

Lecture 5 Numerical Integration


1
Motivation Amity Institute of Applied Science
Numerical Integration Amity Institute of Applied Science

The numerical evaluation of an integral is known as numerical integration.


Numerical Integration Amity Institute of Applied Science

• The objective of numerical integration is to solve


𝒙𝒏
the problem: I = 𝒙 𝒇 𝒙 𝒅𝒙 without doing the
𝟎
calculation analytically.
Numerical Integration Amity Institute of Applied Science

The process of finding or evaluating a definite integral


𝑥𝑛
I= 𝑥0
𝑓 𝑥 𝑑𝑥 from a set of tabulated values of the
integrand f(x), is known as numerical integration.
If it is applied to the integration of a function of a single
variable then this process is known quadrature.
To evaluate this integral we subdivide the given interval
of integration into a large number of subintervals of
equal width h.
Amity Institute of Applied Science

Quadrature formula for equal interval


• Newton cote’s Quadrature Formula

• In Newton-Cote Methods, the function is approximated by a


polynomial of order n.

• Computing the integral of a polynomial is easy.


Amity Institute of Applied Science

Newton-Cote’s Quadrature Formula


𝑏
• Let I = 𝑎
𝑦𝑑𝑥 , where y takes the values 𝑦0 , 𝑦1 , 𝑦2 ,…𝑦𝑛 for x = 𝑥0 , 𝑥1 , 𝑥2 ,…., 𝑥𝑛 .

𝑏−𝑎
• Let the interval (a,b) be divided into n equal sub intervals, each of width h =
𝑛
𝑥0 +𝑛ℎ
so that 𝑥0 = a, 𝑥1 = 𝑥0 + h, 𝑥2 = 𝑥0 +2h,.., 𝑥𝑛 = 𝑥0 + nh = b ∴ I = 𝑥0
𝑓 𝑥 𝑑𝑥

• Since any x is given by x = 𝑥0 + rh and dx = hdr


𝑛
∴I=h 0
𝑓 𝑥0 + 𝑟ℎ 𝑑𝑟
Newton cote’s Quadrature Amity Institute of Applied Science
𝑛 𝑟(𝑟−1) 2 𝑟(𝑟−1)(𝑟−2) 3
I=h 0
𝑦0 + 𝑟∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ 𝑑𝑟
2! 3!
{ using Newton’s forward interpolation formula}

𝑟2 1 𝑟3 𝑟2 1 𝑟4
I = h 𝑟𝑦0 + ∆𝑦0 + − ∆2 𝑦0 + − 𝑟 3 + 𝑟 2 ∆3 𝑦0 + ⋯
2 2 3 2 6 4

𝑛 𝑛(2𝑛−3) 2 𝑛(𝑛−2)2 3
I = nh 𝑦0 + ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ ..(1)
2 12 24
Amity Institute of Applied Science
Amity Institute of Applied Science
Amity Institute of Applied Science
Newton cote’s Quadrature Amity Institute of Applied Science
 It is assumed that the value of a function f defined on [a,b] is known at
equally spaced points 𝑥𝑖 for I = 0,1,2,…,n, where 𝑥0 = a and 𝑥𝑛 = b.

 Equation (1) is known as general quadrature formula and is known as


Newton- cote’s quadrature formula.

 They are named after Isaac Newton and Roger Cotes.

 Newton–Cotes formulae can be useful if the value of the integrand at


equally spaced points is given.
Amity Institute of Applied Science
Different values of n leads to different formulas

n Polynomial Formula

1 Linear Trapezoidal

2 Quadratic Simpson 1/3

3 Cubic Simpson 3/8


Application of Numerical integration
Amity Institute of Applied Science

It helps to
• Find the area.
• Locate the centroid.
• Find the arc length of a graph.
• Find the surface area of a solid.
• Find the volume of a solid figure.
• Solve for the work done.
• Solve the moment of inertia.
Numerical integration Amity Institute of Applied Science

Numerical integration is carried by the numerical


methods and they are of three types:
Trapezoidal rule
Simpson’s 1/3 rule
Simpson’s 3/8 rule
Amity Institute of Applied Science

THANK
YOU
Amity Institute of Applied Science

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical differentiation and Integration

Lecture 6 Trapezoidal Rule


1
Amity Institute of Applied Science

Trapezoidal Rule
The Trapezoidal rule to estimate areas
underneath a curve
Trapezoidal Rule Amity Institute of Applied Science

we know that general quadrature formula is

𝑥0 +𝑛ℎ 𝑛 𝑛(2𝑛−3) 2 𝑛(𝑛−2)2 3


I= 𝑥0
𝑓 𝑥 𝑑𝑥 = nh 𝑦0 + ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ ..(1)
2 12 24

Putting n = 1 in above equation and taking the curve y = f (x) between the points
(𝑥0 , 𝑦0 ) and (𝑥1 , 𝑦1 ) as a straight line i.e., as polynomial of degree one so that
difference of order high than one vanish, we get
𝑥0 +ℎ 1 1
I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 1.h 𝑦0 + ∆𝑦0 =h 𝑦0 + (𝑦1 −𝑦0 )
2 2
h
= 𝑦0 + 𝑦1
2
Similarly for next interval (𝑥0 + h, 𝑥0 + 2h), we get
Trapezoidal Rule Amity Institute of Applied Science

𝑥0 +2ℎ h
I= 𝑥0 +ℎ
𝑓 𝑥 𝑑𝑥 = 𝑦1 + 𝑦2
2
𝑥0 +3ℎ h
I= 𝑥0 +2ℎ
𝑓 𝑥 𝑑𝑥 = 𝑦2 + 𝑦3
2
…………. ………….
…………. ………….
𝑥0 +𝑛ℎ h
I = 𝑥 +(𝑛−1)ℎ 𝑓 𝑥 𝑑𝑥 = 𝑦𝑛−1 + 𝑦𝑛
0 2
Now adding above integrals
𝑥0 +𝑛ℎ h
I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 𝑦0 + 2(𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−1 ) + 𝑦𝑛
2
Notation Amity Institute of Applied Science

• Where 𝑥0 = initial value of x,


• 𝑦0 = initial value of y,
• 𝑥𝑛 = final value of x,
• 𝑦𝑛 = final value of y,
• h = interval distance,
• h = 𝑏−𝑎 /𝑛
• n = no. of intervals.
Trapezoidal rule Amity Institute of Applied Science

• It is applicable for equal intervals.


• The error is of order ℎ2 .
• The accuracy can be improved by increasing the no. of
intervals & by decreasing the value of h.
• In this rule, y(x) is a linear function of x.
• In general, trapezoidal rule is less accurate when
compared with Simpson's rule.
Amity Institute of Applied Science

Graphical depicition of Trapezoidal Rule


The trapezoidal rule is equivalent to approximating the area
of the trapezoid under the straight line connecting f(a) and
f(b) in fig. below.
Amity Institute of Applied Science

Advantages of Trapezoidal Rule


• There are many alternatives to the trapezoidal rule, but
this method deserves attention because of
• Its ease of use
• Powerful convergence properties
• Straightforward analysis
Example Amity Institute of Applied Science

5 2
Evaluate y = 1
1+𝑥 𝑑𝑥
𝑏−𝑎 5−1
Solution: h = = = 1
𝑛 4
2
Here f(x) = 1+𝑥
1
Trapezoidal Rule = [ {f(1)+f(5)}+2{f(2)+f(3)+f(4)}]
2
1 1
= [ (2)+(26) +2{5+10+17}] = [ 92] = 46
2 2
Example Amity Institute of Applied Science
5.2
Find the integral of y = 4
logx 𝑑𝑥 by Trapezoidal Rule.
Solution. Divide the interval (4, 5.2) into six parts.
𝑏−𝑎 5.2−4 1.2
h= = = = 0.2
𝑛 6 6

Here 𝑦0 = 1.38629, 𝑦1 = 1.43508 , 𝑦2 = 1.48160, 𝑦3 = 1.52605


𝑦4 = 1.56861, 𝑦5 = 1.60943 , 𝑦6 = 1.64865.
Example Amity Institute of Applied Science

5.2 ℎ
y= 4
logx 𝑑𝑥 = 𝑦0 +2(𝑦1 + 𝑦2 +𝑦3 +𝑦4 + 𝑦5 )+ 𝑦6
2
0.2
= [1.38629 + 2(1.43508+1.48160+1.52605+1.56861+1.60943)+1.64865]
2
= 0.1[18.27648] = 1.827648
Practice Questions Amity Institute of Applied Science

11
1. Find 1
𝑓(𝑥)𝑑𝑥 , where f(x) is given by the following
table, using trapezoidal rule.

1.5 𝑥
2. Compute y = 0
𝑒 𝑑𝑥 by Trapezoidal Rule.
𝜋
3. Find the approximate value of integral 0
2 𝑠𝑖𝑛𝑥 𝑑𝑥.
1
4. Evaluate 0
(4𝑥− 3𝑥 2 )𝑑𝑥 by taking 10 subintervals
using Trapezoidal Rule.
Amity Institute of Applied Science
Amity Institute of Applied Science
Amity Institute of Applied Science
Amity Institute of Applied Science

THANK
YOU
Amity Institute of Applied Science

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical differentiation and Integration

Lecture 7 Simpson 1/3 Rule


1
Simpson's One Third Rule Amity Institute of Applied Science
Using the general quadrature formula, we know that

𝑥0 +𝑛ℎ 𝑛 𝑛(2𝑛−3) 2 𝑛(𝑛−2)2 3


I= 𝑥0
𝑓 𝑥 𝑑𝑥 = nh 𝑦0 + ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ ..(1)
2 12 24

This rule can be obtained by putting n = 2 in general quadrature formula and


taking the curve y = f (x) through (𝑥0 , 𝑦0 ) (𝑥1 , 𝑦1 ) and (𝑥2 , 𝑦2 ) as polynomial
of degree two and neglecting the third and higher order differences, we get
Simpson's One Third Rule Amity Institute of Applied Science

𝑥0 +2ℎ 2 2(4−3) 2
𝑥0
𝑓 𝑥 𝑑𝑥 = 2h 𝑦0 + ∆𝑦0 + ∆ 𝑦0
2 12
2ℎ 1
= 6𝑦0 + 6(𝑦1 − 𝑦0 ) + (𝑦2 − 2𝑦1 + 𝑦0 )
6 6

= (𝑦0 +4𝑦1 + 𝑦2 )
3
𝑥0 +4ℎ ℎ
Similarly 𝑥 +2ℎ 𝑓 𝑥 𝑑𝑥 = (𝑦2 +4𝑦3 + 𝑦4 )
0 3
𝑥0 +𝑛ℎ

𝑓 𝑥 𝑑𝑥 = (𝑦𝑛−2 +4𝑦𝑛−1 + 𝑦𝑛 )
𝑥0 +(𝑛−2)ℎ 3
Adding the above integrals we get
𝑥0 +𝑛ℎ
Simpson's One Third Rule Amity Institute of Applied Science

𝑓 𝑥 𝑑𝑥 = (𝑦0 +𝑦𝑛 ) + 4(𝑦1 +𝑦3 + ⋯ 𝑦𝑛−1 ) + 2(𝑦2 + 𝑦4 + ⋯ 𝑦𝑛−2 )
𝑥0 3

𝑥0 +𝑛ℎ
𝑥0
𝑓 𝑥 𝑑𝑥 =


(𝑦0 +𝑦𝑛 ) + 4(𝑠𝑢𝑚 𝑜𝑓 𝑜𝑑𝑑 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠) + 2(𝑠𝑢𝑚 𝑜𝑓 𝑒𝑣𝑒𝑛 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠)
3
Notation Amity Institute of Applied Science

Where…
𝑥0 = initial value of x,
𝑦0 = initial value of y
𝑥𝑛 = final value of x,
𝑦𝑛 = final value of y,
h = interval distance,
h = 𝑏−𝑎 /𝑛
n = no. of intervals.
Simpson's one-third (1/3) rule Amity Institute of Applied Science

• It is applicable for even intervals.


• The error is of order ℎ4 .
• In this rule, y(x) is a polynomial of degree 2.
• It uses 3 data points.
Amity Institute of Applied Science

Graphical depicition of simpson’s 1/3 Rule


It consists of taking the area under
a parabola connecting three points.
Examples Amity Institute of Applied Science

Ex. The speed,v meters per second, of a car, t seconds after it


starts, is shown in the following table:
t 0 12 24 36 48 60 72 84 96 108 120

v 0 3.60 10.08 18.90 21.60 18.54 10.26 5.40 4.50 5.40 9.00

Using Simpson’s rule, find the distance travelled by the car in 2


minutes.
Solution Amity Institute of Applied Science
Example Amity Institute of Applied Science

Ex.
Sol. Contd.. Amity Institute of Applied Science
Practice Questions Amity Institute of Applied Science

1.Evaluate using simpson’s 1/3 Rule.(Take n = 6)

6 𝑑𝑥
2. Using Simpson’s one third rule, find 0 (1−𝑥)2
.

3. A soild of revolution is formed by rotating about the x-axis, the


area between the x-axis, the line x = 0 and x = 1 and a curve
through the points with the following coordinates:
Amity Institute of Applied Science

THANK
YOU
Amity Institute of Applied Science

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical differentiation and Integration

Lecture 8 Simpson’s 3/8 Rule


1
Simson 3/8 rule Amity Institute of Applied Science
Using General quadrature formula

𝑥0 +𝑛ℎ 𝑛 𝑛(2𝑛−3) 2 𝑛(𝑛−2)2 3


I= 𝑥0
𝑓 𝑥 𝑑𝑥 = nh 𝑦0 + ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ ..(1)
2 12 24

Putting n = 3 in above equation and taking the curve y = f (x) between the points
(𝑥0 , 𝑦0 ), (𝑥1 , 𝑦1 ), (𝑥2 , 𝑦2 ) and (𝑥3 , 𝑦3 ). Since, the polynomial is of degree three, fourth
difference onward terms vanish, and we get

𝑥0 +3ℎ 3 3 2 1 3
I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 3h 𝑦0 + ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
2 4 8
𝑥0 +3ℎ
Simson 3/8 rule
3 3 1
Amity Institute of Applied Science

I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 3h 𝑦0 + ∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0
2 4 8
3 3 1
= 3h 𝑦0 + (𝑦1 −𝑦0 ) + (𝑦2 −2𝑦1 + 𝑦0 ) + (𝑦3 − 𝑦2 +3𝑦1 − 𝑦0 )
2 4 8
3h
= 𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3
8

𝑥0 +6ℎ 3h
Similarly 𝑥0 +3ℎ
𝑓 𝑥 𝑑𝑥= 𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 and so on.
8
Simson 3/8 rule Amity Institute of Applied Science
𝑥0 +𝑛ℎ
3h
𝑓 𝑥 𝑑𝑥= 𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛
𝑥0 +(𝑛−3)ℎ 8

Adding all such expression from 𝑥0 to 𝑥0 + 𝑛ℎ, where n is a multiple of 3, we


obtain,

𝑥0 +𝑛ℎ
3h
𝑓 𝑥 𝑑𝑥 = (𝑦0 +𝑦𝑛 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + ⋯ + ⋯ + 𝑦𝑛−2 + 𝑦𝑛−1
𝑥0 8
+ 2(𝑦3 + 𝑦6 + ⋯ + 𝑦𝑛−3 )

Note: To apply this formula, number of subintervals should be a multiple of 3


Simpson's 3/8 Rule Amity Institute of Applied Science

Note: To apply Simpson’s 3/8 Rule


– An odd number of points are required.
– The error is of order ℎ5
– In this rule, y(x) is a polynomial of degree 3.
– It is applicable for the intervals which is multiple of 3.
– It uses four data points.
Example Amity Institute of Applied Science
Example Amity Institute of Applied Science
Example Amity Institute of Applied Science

Ex.Use Simpson's rule for evaluating


Amity Institute of Applied Science

Graphical depiction of Simpson’s 3/8 Rule


It consists of taking the area under
a cubic equations connecting four
points.
Practice Questions Amity Institute of Applied Science
6 𝑒𝑥
1. Evaluate 0 1+𝑥
dx approximately using Simson’s 3/8 rule of integration.
6 1
2. Evaluate 0 1+𝑥 2
dx by using Simson’s 3/8 rule of integration.
4 𝑥 2 3
3. Evaluate 0
𝑒 dx by simpson’s rule; Given that e =2.72, 𝑒 = 7.39, 𝑒 =
20.09, 𝑒 4 = 54.6 and compare it with the actual value.
𝜋
4. Evaluate 0
2
𝑒 𝑠𝑖𝑛𝑥 dx, correct to four decimal places.
Amity Institute of Applied Science

THANK
YOU
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical Solution of Ordinary Differential Equations

Lecture 1: Introduction
1
Numerical Solution of Ordinary Differential Equations

Why numerical solutions?


• For many of the differential equations we need to solve in the real
world, there is no "nice" algebraic solution. That is, we can't solve it
using the techniques like separation of variables, integrable
combinations, or using an integrating factor, or other similar means.

• As a result, we need to resort to using numerical methods for


solving such DEs. The concept is similar to the numerical
approaches we saw in an earlier integration chapter (Trapezoidal
rule, Simpson’s Rule).
2
Numerical Solution of Ordinary Differential
Equations
• Even if we can solve some differential equations algebraically, the
solutions may be quite complicated and so are not very useful. In
such cases, a numerical approach gives us a good approximate
solution.
• So, we resort to numerical methods that will allow us to
approximate solutions to differential equations. There are many
different methods that can be used to approximate solutions to a
differential equation.
• We are going to look at one of the oldest and easiest to use here.
This method was originally devised by Euler and is called, oddly
enough, Euler’s Method.
3
Euler’s Method
• Euler's method is a numerical tool for approximating values for
solutions of differential equations.
• Euler's Method assumes our solution is written in the form of
a Taylor’s Series.
• That is, we'll have a function of the form:

• This gives us a reasonably good approximation if we take plenty of


terms, and if the value of h is reasonably small.
• For Euler's Method, we just take the first 2 terms only.
4
The General Initial Value Problem

• We are trying to solve problems that are presented in the


following way:

5
Euler’s Method

6
Euler’s Method

7
Euler’s Method

8
Thank You

9
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical Solution of Ordinary Differential Equations

Lecture 2: Euler’s Method


1
Example 1
Q1:
Find the solution (value of y) at x=3.

Sol:

2
Example 1

3
Example 1

4
Example 1

5
Example 1

6
Example 1

7
Example 1

8
Example 2
Q2:
Find the approximate value of y(1)

Sol:

9
Example 2

10
Example 2

11
Example 2

12
Thank You

13
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 2: Numerical Solution of Ordinary Differential Equations

Lecture 4: Problems on Runge Kutta Method


1
Example 1
Q1:

Sol:

2
Example 1

3
Example 1

4
Example 1

5
Example 1

6
Runga Kutta Method
• We are using Runga kutta Method formula as:

• But in some books, notations are different:

7
Example 2
Example : Apply Runge  Kutta method to find an approximat e value of y when x  0.2
given that dy dx  x  y with y(0) 1.
Solution : Here x 0  0, y 0  1, h  0.2, f ( x, y)  x  y
Calculate successive ly k1  h f ( x 0 , y 0 )  0.2f (0,1)  0.2(0  1)  0.2000
h k1
k 2  h f ( x 0  , y 0  )  0.2f (0.1,1.1)  0.2400
2 2
h k
k 3  h f ( x 0  , y 0  2 )  0.2f (0.1,1.12)  0.2440
2 2
k 4  h f ( x 0  h, y 0  k 3 )  0.2f (0.2,1.244)  0.2888
1 1
k  (k1  2 k 2  2 k 3  k 4 )  (0.2  2  0.24  2  0.244  0.2888)  0.2468
6 6
Hence y( x 0  h )  y 0  k  y(0.2)  1.2468
8
Example 3
Q3: Using Runge kutta method of 4th order, solve dy/dx = y2 – x2 / y2 +x2 with y(0) = 1 at x= 0.2, 0.4

Sol: f(x,y) = dy/dx = y2 – x2 / y2 +x2

To find y(0.2) :
Here , x0 = 0, y0 = 1 , h=0.2

K1 = hf (x0, y0) K2 = hf (x0 + h/2, y0 + k1/2)


= 0.2 f(0,1) = 0.2000 = 0.2 f (0.1, 1.1) = 0.19672

K3 = hf (x0 + h/2, y0 + k2/2) K4 = hf (x0 + h, y0 + k3)


= 0.2 f (0.1, 1.09836) = 0.1967 = 0.2 f (0.2, 1.1967) = 0.1891

K = 1/6 ( k1 + 2k2 + 2k3+ k4) = 1/6([ 0.2 + 2(0.19672) +2 (0.1967) + 0.1891] = 0.19599

Hence, y(0.2) = y0 + k = 1.196


9
Example 3
To find y(0.4)

Here , x1 = 0.2, y1 = 1.196 , h=0.2

K1 = hf (x1, y1) K2 = hf (x1 + h/2, y1 + k1/2)


= 0.2 f(0.2,1.196) = 0.1891 = 0.2 f (0.3, 1.2906) = 0.1795

K3 = hf (x1 + h/2, y1 + k2/2) K4 = hf (x1 + h, y1 + k3)


= 0.2 f (0.3, 1.2858) = 0.1793 = 0.2 f (0.4, 1.3753) = 0.1688

K = 1/6 ( k1 + 2k2 + 2k3+ k4) = 1/6([ 0.1891 + 2(0.1795) +2 (0.1793) + 0.1688] = 0.1792

Hence, y(0.4) = y1 + k = 1.196 + 0.1792 = 1.3752


10
Thank You

11
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 3: Probability and Probability Distributions

Lecture 1: Conditional probability & Baye’s theorem


1
Amity Institute of Applied Sciences

Course Objectives:

The applications of this course includes business and


engineering problems involving probability, probability
distribution and curve fitting.

2
Amity Institute of Applied Sciences

Learning Outcomes:

Upon successful completion of this module, the student will be


able to
•Students will be able to analyze and solve various concepts
related to probability and probability distributions

3
Amity Institute of Applied Sciences

Basic Concepts of Probability


• Trial and events: The experiment is called trials and the possible outcomes
are known as events or cases.
Example: Tossing of a coin is a trial and the running up of the head or tail is
an event.
• Exhaustive events: The total no of all possible outcomes in any trial is known
as exhaustive events or exhaustive cases.
Example: In tossing a coin, there are two exhaustive cases , head and tail.
• Favorable events or cases: The total number of possible outcomes in which
specified event happens then these specified events are known as Favorable
event or cases. 4
Amity Institute of Applied Sciences
Example: In a throw of two dice , the number of cases favorable to getting a sum 6
is 5 , i.e. (1,5);(2,4); (3,3);(4,2);(5,1)
• Mutually exclusive events: If the happening of one event cancels the happening
of other event.
Example: In tossing a coin , then events are head and tail are mutually exclusive,
since if the outcome is head then the possibility of getting tail in the same trial
ruled out.
• Equally likely events: Events are said to be equally likely if there is no reasons
to expect any one in preference to any other.
Example: In throwing a die ,all the six faces are equally likely to come.
• Independent & dependent events: Two or more events are said to be
independent if the happening or non happening of any one does not depend (or
is not affected) by the happening or non happening of any other . Otherwise they
5
are said to be dependent .
Amity Institute of Applied Sciences

Definition of Probability
Probability that the event E will happen is given by
p=P(E)= favorable number of cases = m/n
exhaustive number of cases
where ‘n’ is exhaustive, mutually exclusive and equally likely cases and ‘m’ of them
are favorable cases to the happening of event E.
Probability that the event E will not happen is given by
q=P(1-E)= unfavorable number of cases = (n-m)/n
exhaustive number of cases
where ‘n’ is exhaustive, mutually exclusive and equally likely cases and ‘m’ of them
are unfavorable cases to the happening of event E. Also p+q=1.
6
Amity Institute of Applied Sciences

Q1. A bag contains 7 white, 6 red and 5 black balls. Two balls are drawn
at random. Find the probability that they will both be white.
Sol. Total number of balls=7+6+5=18
Out of 18 balls, two balls are drawn at random in ways.
Therefore exhaustive number of cases= =153.
Out of 7 white balls, two balls are drawn at random in ways.
Therefore favorable number of cases= =21.
Thus, probability of getting two white balls=21/153= 7/51 Ans.

7
Amity Institute of Applied Sciences

Random Experiments: Whose results can not be predicated before hand is


known as Random Experiments.
Example: Tossing a coin, Rolling a die, balls taking out from an urn.
Sample Space: The set of all possible outcomes of a random experiment is
called Sample Space and it is denoted by S.
Example : If we are tossing a coin then the outcomes are Head(H) and
Tail(T).
So sample space S={H,T}
Sample Points : The element of sample space S are called Sample points.

8
Amity Institute of Applied Sciences

Conditional Probability
• Statement: Let A and b be two events associated with the same sample space
of a random experiment. Then the probability of happening of an event A
when it is given that event B has already happened is called conditional
probability denoted by P(A/B).
• We define

9
Amity Institute of Applied Sciences

Q2. A dice is thrown twice and sum of numbers appeared is observed to


be 6. What is the conditional probability that the number 4 has appeared
at least once?
Sol. Consider the events- A: number 4 has appeared at least once
B: sum of numbers appearing is 6

Therefore, P(A/B)=2/6/5/6=2/5 Ans.


10
Amity Institute of Applied Sciences

Q3. Data on the readership of a certain magazine show that the proportion of male
readers under 35 is 0.40 and over 35 is 0.20. If the proportion of readers under 35 is
0.70, find the proportion of subscribers that are ‘females over 35 years’. Also
calculate the probability that a randomly selected male subscriber is under 35 years
of age.
Sol. Consider the events- A: reader of magazine is a male
B: reader of magazine is over 35 years of age
(i) The proportion of subscribers that are female over 35 years is:

11
Amity Institute of Applied Sciences
Q3. Contd… (ii) The probability that a randomly selected male subscriber is under 35
years is:

Q4. If the probability that a communication system will have high fidelity is 0.81 and
the probability that it will have high fidelity and selectivity is 0.18. What is the
probability that a system with high fidelity will also have selectivity?
Sol. Consider A: event that represent a communication system will have high fidelity
: event that represent high fidelity and selectivity
Thus, the probability that a system with high fidelity will also have selectivity is given by

12
Amity Institute of Applied Sciences

Baye’s Theorem
• Statement: Let S be the sample space and let E1, E2, …, En be ‘n’
mutually exclusive events associated with a random experiment . If A be
the common event which occurs with E1, E2, …, En , then

• P(Ei/A)= P(Ei)P(A/Ei)
[P(E1)P(A/E1)+ P(E2)P(A/E2)+…..+ P(En)P(A/En)]
where i=1,2,…,n

13
Amity Institute of Applied Sciences

Q5. Bag A contains 2 white, 1 black and 3 red balls, bag B contains 3 white, 2 black
and 4 red balls and bag C contains 4 white, 3 black and 2 red balls. One bag is
selected at random and 2 balls are drawn at random. If the selected balls happen to
be red and black, what is the probability that both balls come from bag B?
Sol. Consider the events-E1: bag A is selected; E2= bag B is selected; E3= bag C is
selected. Let event A: two balls drawn at random are red and black.
Then P(E1)=P(E1)=P(E1)=1/3.

P(A/E1)=

P(A/E2)= and P(A/E3)=


3
14
Amity Institute of Applied Sciences

• Q5 Contd…
Then
• P(E2/A)= P(E2)P(A/E2)
[P(E1)P(A/E1)+ P(E2)P(A/E2)+P(E3)P(A/E3)]
= 20
53

15
Source: Applied Mathematics IV by Dr Hari Arora
16
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 3: Probability and Probability Distributions

Lecture 4: Binomial Distribution


1
Amity Institute of Applied Sciences

Binomial Distribution
Amity Institute of Applied Sciences

1.The prefix ‘Bi’ means two or twice. A binomial


distribution can be understood as the probability of a
trial with two and only two outcomes. It is a type of
distribution that has two different outcomes namely,
‘success’ and ‘failure’ (a typical Bernoulli trial).
2. It is applicable to discrete random variables only.
3. The origin of Binomial distribution can be traced
back to Bernoulli’s trial.
Amity Institute of Applied Sciences

A binomial experiment has the following properties:

 The experiment has n identical trials.


 The trials are independent of each other.
 Two outcomes are possible on each trial – one trial is termed a
success and the other is termed a failure.
 The probability of a success occurring on each trial is p. This
probability p is the same on each trial.
 Since the outcome must either be a success or failure, a failure is the
complement of a success and the probability of a failure is 1-p.
(Some texts refer to this probability as q, that is, q=1-p).
Amity Institute of Applied Sciences

In a Binomial distribution, the probability of getting x successes in


n trials is given by
𝑃(𝑋 = 𝑥) = 𝑛𝐶𝑥 𝑞𝑛−𝑥 𝑝𝑥, where 𝑞 = 1 – 𝑝
 𝑛𝐶 is the number of ways of choosing x objects from a collection of n
x
objects (see permutations and combinations).
 𝑛 = the number of trials
 𝑥 = 0, 1, 2, … 𝑛
 𝑝 = the probability of success in a single trial
 𝑞 = the probability of failure in a single trial
 (i.e. 𝑞 = 1 − 𝑝)
Amity Institute of Applied Sciences

Example

Solution
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences

Example

Solution
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences

Example

Solution
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
MEAN OF A BINOMIAL DISTRIBUTION

The probability function for a binomial random variable is


𝑃(𝑋 = 𝑥) = 𝑛𝐶𝑥 𝑞𝑛−𝑥 𝑝𝑥, where 𝑞 = 1 – 𝑝
This is the probability of having x successes in a series of n independent trials when
the probability of success in any one of the trials is p. If X is a random variable with
this probability distribution then 𝐸(𝑋) (mean) is given by

Let us understand and derive it with the help of a table.


Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences

STANDARD DEVIATION OF A BINOMIAL DISTRIBUTION


STANDARD DEVIATION OF A BINOMIAL DISTRIBUTION
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences

Example
If the mean and variance of a binomial distribution are 4 and 2, respectively. Then, find
the probability of at least 7 successes.
Solution

Here, 𝑚𝑒𝑎𝑛 = 4 and 𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 = 2

⇒𝑛𝑝 = 4 and 𝑛𝑝𝑞=2

So, 𝑛𝑝𝑞/𝑛𝑝=2/4 ⇒ 𝑞=1/2


Amity Institute of Applied Sciences

Then, 𝑝 = 1 − 𝑞 = 1 − 1/2 = 1/2


Mean = 𝑛𝑝 = 4
so, 𝑛 = 8
∴𝑃(𝑋 = 𝑟) = 𝑛𝐶𝑟 𝑞𝑛−𝑟 𝑝𝑟
= 8𝐶𝑟 (1/2)8 [∵𝑝 = 𝑞 = 1/2]
The required probability of at least 7 successes is

𝑃(𝑋 ≥ 7) = 𝑃(𝑋 = 7) + 𝑃(𝑋 = 8)

= (8𝐶7 + 8𝐶8 )(1/2)8


= 9/256
Amity Institute of Applied Sciences

Example

Solution

𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 3: Probability and Probability Distributions

Lecture 3: Mean and Variance of Random Variables


1
Amity Institute of Applied Sciences

Random Variables

A random variable is a rule that assigns a numerical value to each possible outcome of a
probabilistic experiment.

 We denote a random variable by a capital letter (such as “X”)


 Examples of random variables:
• r.v. X: the age of a randomly selected student in this online class.
• r.v. Y: the number of assignment completed in the past week.
Amity Institute of Applied Sciences

Discrete or Continuous Random Variable


• A discrete r.v. can take only distinct, separate values.
• A continuous random variable is one which takes an infinite number of possible
values. Continuous random variables are usually measurements. Examples include
height, weight, the amount of sugar in an orange, the time required to run a mile.
• A continuous random variable is not defined at specific values. Instead, it is defined
over an interval of values, and is represented by the area under a curve (in advanced
mathematics, this is known as an integral). The probability of observing any single
value is equal to 0, since the number of values which may be assumed by the random
variable is infinite.
Amity Institute of Applied Sciences

• If a random variable is a discrete variable, its probability distribution is called


a discrete probability distribution (Binomial Distribution).
Ex- An example will make this clear. Suppose you flip a coin two times. This
simple statistical experiment can have four possible outcomes: HH, HT, TH, and TT.
Now, let the random variable X represent the number of Heads that result from this
experiment. The random variable X can only take on the values 0, 1, or 2, so it is a
discrete random variable. The probability distribution for this statistical experiment
appears below.
• If a random variable is a continuous variable, its probability distribution is called
a continuous probability distribution.
Amity Institute of Applied Sciences

Ex- Consider the probability density function shown in the graph below. Suppose we
wanted to know the probability that the random variable X was less than or equal to a.
The probability that X is less than or equal to a is equal to the area under the curve
bounded by a and minus infinity - as indicated by the shaded area.
Amity Institute of Applied Sciences

Expected value
Discrete case:

E( X )   x p(x )
all x
i i

Continuous case:

E( X )   x p(x )dx
all x
i i
Amity Institute of Applied Sciences

Empirical Mean is a special case of Expected Value

Sample mean, for a sample of n subjects: =


n

x i n


i 1 1
X  xi ( )
n i 1 n
The probability (frequency) of each person in the sample is 1/n.
We also call E[X] the expected value or mean of X. Since the expected value is
determined by the probability distribution of X only, we also speak of the expectation or
mean of the distribution.
Amity Institute of Applied Sciences

Example
Let X be the discrete random variable that takes the values 1, 2, 4, 8, and 16, each with
probability 1/5. Compute the expectation of X.
Solution
E[ X ]   ai P( X  ai )   ai p( ai )
i i
Amity Institute of Applied Sciences

The variance Var(X) of a random variable X is the number


Var ( X )  E[( X  E[ X ]) 2 ]
Standard deviation:
std  Var ( X )
An alternative expression for the variance. For any random variable X,

Var ( X )  E[ X 2 ]  E[ X ]2
E[ X 2 ] is called the second moment of X.

We can derive this equation from:


 
Var ( X )  E[( X  E [ X ]) ]   ( x  E[ X ] ) f ( x )dx   ( x 2  2 xE[ X ]  ( E[ X ]) 2 ) f ( x )dx
2 2

 
  
  x f ( x )dx  2E[ X ]  xf ( x )dx  ( E[ X ])  f ( x )dx  E[ X 2 ]  2( E[ X ]) 2  ( E [ X ]) 2
2 2

  

 ( E[ X 2 ])  ( E[ X ]) 2
Amity Institute of Applied Sciences

Example
Let X takes the values 2, 3, and 4 with probabilities 0.1, 0.7, and 0.2. Find the Variance and mean.

Solution
Var ( X )  E[( X  E[ X ]) 2 ]

Var ( X )  E[ X 2 ]  E[ X ]2
Amity Institute of Applied Sciences

E[ X ]   ai P( X  ai )   ai p( ai )
i i

𝐸 𝑋 = 2 × 0.1 + 3 ×0.7+4×0.2 = 3.1


Amity Institute of Applied Sciences

Example
Let X be uniform U(a, b). Then f(x)= 1/(b-a) for x in [a, b] and zero outside this interval.
Find the mean and variance.
Solution

E[ X ]   xf ( x )dx



1 b2  a 2 b  a
b b
1 1 2 1 
E ( X )   xf ( x )dx   x dx   x   
 a
ba  2 b  a a 2 b  a 2

(b  a ) 2
Var ( X )  E ( X )  E ( X ) 
2 2

12
Amity Institute of Applied Sciences

Example
Consider the rolling of a fair six-sided die, with X the number on the
uppermost face. Find the mean and variance.
Solution
We know that the probability function of 𝑋 is
1
𝑃 𝑥 = , 𝑥 = 1,2,3,4,5,6
6
1 1 1 1 1 1
𝑀𝑒𝑎𝑛 = 1 × + 2 × + 3 × + 4 × + 5 × + 6 × = 3.5
6 6 6 6 6 6
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 3: Probability and Probability Distributions

Lecture 34: Normal Distribution


1
Amity Institute of Applied Sciences

Normal Distribution

2
Amity Institute of Applied Sciences

Properties of Normal Distribution

3
Amity Institute of Applied Sciences

4
Amity Institute of Applied Sciences

Standard Form of Normal Distribution

5
Amity Institute of Applied Sciences

Area under Standard Normal Curve

6
Amity Institute of Applied Sciences

7
Amity Institute of Applied Sciences

8
Amity Institute of Applied Sciences

9
Amity Institute of Applied Sciences

10
Amity Institute of Applied Sciences

11
Amity Institute of Applied Sciences

12
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 3: Probability and Probability Distributions

Lecture 33: Poisson Distribution


1
Amity Institute of Applied Sciences

Poisson Distribution

2
Amity Institute of Applied Sciences

Recurrence Formula for Poisson Distribution

Mean of Poisson Distribution

3
Amity Institute of Applied Sciences

Variance of Poisson Distribution

4
5
Amity Institute of Applied Sciences

6
Amity Institute of Applied Sciences

7
Amity Institute of Applied Sciences

8
9
Amity Institute of Applied Sciences

Number of Deaths Expected Frequency Theoretical Frequency


(r) N.P(r)
0 121.306 121
1 60.653 61
2 15.163 15
3 2.527 3
4 0.3159 0
Answer.

10
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 4: Dispersion, Curve fitting and Principle of least square

Lecture 6: Curve Fitting, Method of Least Squares, Fitting of straight lines

1
Amity Institute of Applied Sciences

PRINCIPLE OF LEAST SQUARE

 The process of finding the equation of the “curve of best fit”


which may be most suitable for predicting the unknown values
is known as curve fitting.

 The method of least squares is probably the most systematic


procedure to fit a unique curve through the given points.

2
To FIT UP A PARABOLA

…(i)
According to the principle of least squares,

is minimum … (ii)
Amity Institute of Applied Sciences

 There are three equations in three unknown a, b and c. Solving them


simultaneously, the best values of a, b and c are obtained.
 By putting the values of a, b and c in (i) the best fitting parabola is obtained for
given set of values.
5
Amity Institute of Applied Sciences

Example :
Fit a parabola y = a x2 + b x + c to the following data taking x as independent variable.

6
Amity Institute of Applied Sciences

7
Change of Origin and Scale
 Sometimes the given data is so large that the calculation becomes
very tedious.

 If the values are equally spaced, then the size of data can be
reduced by assuming some origin for x and y.
Example :
Fit a straight line to the following data:

x: 71 68 73 69 67 65 66 67
y: 69 72 70 70 68 67 68 64
Thank you

14
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 4: Dispersion, Curve fitting and Principle of least square

Lecture 5: Curve Fitting, Method of Least Squares, Fitting of straight lines

1
Amity Institute of Applied Sciences

PRINCIPLE OF LEAST SQUARE

The process of finding the equation of the “curve of best fit” which
may be most suitable for predicting the unknown values is known
as curve fitting.

The method of least squares is probably the most systematic


procedure to fit a unique curve through the given points.

2
Amity Institute of Applied Sciences

3
Amity Institute of Applied Sciences

 Some of the errors e1, e2 , e3, …en will be positive and others
negative.
 In finding the total errors, the errors are added.
 In addition, some negative and some positive errors may cancel
and, in some cases, sum of all the errors may be zero.
 Make all the errors positive by squaring
Sum = e12+ e22+…+ en2
 The curve of the best fit is that for which this sum is minimum.
 This is called the principle of least square
METHOD OF LEAST SQUARES
Amity Institute of Applied Sciences

7
Amity Institute of Applied Sciences

8
Amity Institute of Applied Sciences

Example:

Find a relation of the form y = a bx for the following data by the method of
least squares:

x 2 3 4 5 6
y 8.3 15.4 33.1 65.2 127.4

9
Solution: The curve to be fitted is y = a bx

Taking log on both


log y= log a + x log b …(1)
On putting
Y =log y
A= log a
and B= log b

The equation (1) becomes


Y=A+B x …(2)
Amity Institute of Applied Sciences

11
Amity Institute of Applied Sciences

12
Amity Institute of Applied Sciences

Example:

Answer: y = 1 + 1.9 x

13
Thankyou

14
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 4:Dispersion
Lecture 2:Mean deviation and its coefficient, Standard deviation

1
Amity Institute of Applied Sciences

Mean deviation
• In statistics and mathematics, the deviation is a measure which is used to
find the difference between the observed value and the expected value of
a variable.
• In simple words, the deviation is the distance from the centre point.
• Similarly, the mean deviation is used to calculate how far the values fall
from the middle of the data set.

Source : Higher Engineering Mathematics, B.S. Grewal 2


Amity Institute of Applied Sciences

Mean Deviation Definition


The mean deviation is defined as a statistical measure which is used to
calculate the average deviation from the mean value of the given data
set. The mean deviation of the data values can be easily calculated
using the below procedure.
Step 1: Find the mean value for the given data values
Step 2: Now, subtract mean value form each of the data value given
(Note: Ignore the minus symbol)
Step 3: Now, find the mean of those values obtained in step 2

3
Amity Institute of Applied Sciences

Mean Deviation Formula


The formula to calculate the mean deviation for the given data set is
given below.
Mean Deviation = [Σ |X – µ|]/N
Here,
Σ represents the addition of values
X represents each value in the data set
µ represents the mean value of the data set
N represents the number of data values
|| represents the absolute value, which ignores the “-” symbol
Book Reference Engineering Mathematics by N. P. Bali
4
Amity Institute of Applied Sciences

Mean Deviation for Frequency Distribution


To present the data in the more compressed form we group it and
mention the frequency distribution of each such group. These
groups are known as class intervals. Grouping of data is possible in
two ways:
1.Discrete Frequency Distribution
2.Continuous Frequency Distribution

The procedure for finding mean deviation for continuous frequency


is similar to that of discrete, the only difference is we take the mid
value of the intervals.
5
Amity Institute of Applied Sciences

Mean deviation formula: If the data set consists of values x1,x2,


x3………xn each occurring with a frequency of f1, f2… fn respectively,
then the mean deviation from the average a (usually mean or median)

M.D

Book Reference Engineering Mathematics by N. P. Bali


6
Amity Institute of Applied Sciences

Example 1:
Determine the mean deviation for the data values 5, 3,7, 8, 4, 9.
Solution:
First, find the mean for the given data:
Mean, µ = ( 5+3+7+8+4+9)/6
µ = 36/6
µ =6
Therefore, the mean value is 6.

7
Amity Institute of Applied Sciences

Now calculate |xi- µ |, so the obtained data set is 1, 3, 1, 2, 2, 3.


find the mean value for the obtained data set
Therefore, the mean deviation is
= (1+3 + 1+ 2+ 2+3) /6
= 12/6
=2
Hence, the mean deviation for 5, 3,7, 8, 4, 9 is 2.

8
Amity Institute of Applied Sciences

Example 2:
In a foreign language class, there are 4 languages and the frequencies of
students learning the language and the frequency of lectures per week is
given as:
(Calculate the mean deviation about the mean for the given data.)
Language Sanskrit Spanish French English
No. of
6 5 9 12
students(xi)
Frequency
of 5 7 4 9
lectures(fi) 9
Amity Institute of Applied Sciences

So the M.D.=70.64/25

10
Amity Institute of Applied Sciences

Mean deviation about a median


• The mean deviation about the median is similar to the mean
deviation about mean.
• Instead of calculating the mean for the given set of data values,
find the median value by arranging the data values in the
ascending order and then find the middle value (ungrouped
data).
• For grouped data use the formula for median.
• After finding the median, now subtract the median from each
data value, and finally, take the average
11
Amity Institute of Applied Sciences

Mean deviation about median for grouped data: we need to find out the
median of the given set of data with the help of cumulative frequency, which
is given as-

Where, l is the lower limit of the median class.


f is the frequency of median class,
h is the width of class and,
C is the cumulative frequency of the preceding class.
The median class is the one whose cumulative frequency is just greater
than N/2 12
Amity Institute of Applied Sciences

Ex: Find the mean deviation about median for the given data.
Cumulative
Class Frequency Mid-Point |xi − M| fi|xi − M|
Frequency

5-15 5 5 10 17.42 87.1

15-25 9 14 20 7.42 66.78

25-35 7 21 30 2.58 18.06

35-45 3 24 40 12.58 37.74

45-55 8 32 50 22.58 180.64

32 390.32
13
Amity Institute of Applied Sciences

Since N/2 = 16. Therefore the class 25−35 is the median class.
Using the formula of median ⇒25 + ((16 − 14)/7) × 10 = 27.42
The mean deviation about median = 390.32/32 = 12.19

14
Amity Institute of Applied Sciences

Coefficient of Mean Deviation:


A relative measure of dispersion based on the mean deviation is
called the coefficient of the mean deviation or the coefficient of
dispersion. It is defined as the ratio of the mean deviation to the
average used in the calculation of the mean deviation.

15
Amity Institute of Applied Sciences

Standard deviation:
• It is a measure of the amount of variation or dispersion of a set of
values.
• A low standard deviation indicates that the values tend to be close to
the mean of the set, while a high standard deviation indicates that the
values are spread out over a wider range.
• Standard deviation may be abbreviated SD, and is most commonly
represented by the Greek letter sigma σ, for the population standard
deviation, or the Latin letter s, for the sample standard deviation.
• The standard deviation is the square root of variance.

16
Amity Institute of Applied Sciences

1. Calculation of Standard Deviation for ungrouped data

(i) Direct Method

(ii) Mean method

(iii) Assumed Mean method

(iv) Step deviation method

2. Calculation of Standard deviation for continuous frequency distribution

(i) Mean method

(ii) Assumed Mean method

(iii) Step deviation method


17
Amity Institute of Applied Sciences

18
Amity Institute of Applied Sciences

19
Amity Institute of Applied Sciences

Ex: The number of televisions sold in each day of a week are 13,
8, 4, 9, 7, 12, 10.
Find its standard deviation.
Solution

20
Amity Institute of Applied Sciences

Mean method
Another convenient way of finding standard deviation is to use the
following formula.
Standard deviation (by mean method) σ =
If di = xi – are the deviations, then

21
Amity Institute of Applied Sciences

Ex: The amount of rainfall in a particular season for 6 days are given as
17.8 cm, 19.2 cm, 16.3 cm, 12.5 cm, 12.8 cm and 11.4 cm. Find its
standard deviation.
Solution Arranging the numbers in ascending order we
get, 11.4, 12.5, 12.8, 16.3, 17.8, 19.2.
Number of observations n = 6

22
Amity Institute of Applied Sciences

23
Amity Institute of Applied Sciences

Assumed Mean method(A is the assumed mean)

24
Amity Institute of Applied Sciences

Calculation of Standard deviation for grouped data


Mean method

25
Amity Institute of Applied Sciences

Ex: 48 students were asked to write the total number of hours per
week they spent on watching television. With this information find the
standard deviation of hours spent for watching television.

Solution:

26
Amity Institute of Applied Sciences

27
Amity Institute of Applied Sciences

Assumed Mean Method

28
Amity Institute of Applied Sciences

Shortcut method (or) Step deviation method


To make the calculation simple, we provide the following formula.
Let A be the assumed mean, xi be the middle value of the ith class
and c is the width of the class interval.

29
Amity Institute of Applied Sciences

Ex: Marks of the students in a particular subject of a class are given below.
Find its standard deviation.

Solution: Let the assumed mean, A = 35, c = 10

30
Amity Institute of Applied Sciences

31
Amity Institute of Applied Sciences

Some more examples(mixed)

Find the mean, standard deviation for the following data:


57, 64, 43, 67, 49, 59, 44, 47, 61, 59
Solution:
Given,
57, 64, 43, 67, 49, 59, 44, 47, 61, 59
Number of data values = 10
Mean = (57 + 64 + 43 + 67 + 49 + 59 + 61 + 59 + 44 + 47)/10
= 55
32
Amity Institute of Applied Sciences

Standard deviation=

33
Amity Institute of Applied Sciences

Standard deviation for (grouped)frequency


distribution
Example : Thirty farmers were asked how many farm workers
they hire during a typical harvest season. Their responses were:
4, 5, 6, 5, 3, 2, 8, 0, 4, 6, 7, 8, 4, 5, 7, 9, 8, 6, 7, 5, 5, 4, 2, 1, 9, 3, 3,
4, 6, 4

34
Amity Institute of Applied Sciences

35
Amity Institute of Applied Sciences

To calculate the mean:

To calculate the standard deviation:

36
Amity Institute of Applied Sciences

Ex: 220 students were asked the number of hours per week they spent
watching television. With this information, calculate the mean and
standard deviation of hours spent watching television by the 220 students.
Number of students
Hours
10 to 14 2
15 to 19 12
20 to 24 23
25 to 29 60
30 to 34 77
35 to 39 38
40 to 44 8
37
Amity Institute of Applied Sciences

38
Amity Institute of Applied Sciences

standard deviation.

(Calculation of mean used in table)

39
Amity Institute of Applied Sciences

Thankyou

40
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 4: Dispersion

Lecture 3: Moments about a point, mean and origin, Relations of Moments


1
Amity Institute of Applied Sciences

Moments
• Moment word is very popular in mechanical sciences.
• In science moment is a measure of energy which generates the
frequency.
• In Statistics, moments are the arithmetic means of first, second,
third and so on, i.e. rth power of the deviation taken from either
mean or an arbitrary point of a distribution.

Source : Higher Engineering Mathematics, B.S. Grewal 2


Amity Institute of Applied Sciences

Three types of moments are:

1. Moments about arbitrary point

2. Moments about mean : (Note: When actual mean is in fraction,


moments are first calculated about an arbitrary point and then
converted to moments about the actual mean. )

3. Moments about origin

3
Amity Institute of Applied Sciences

Moments about Arbitrary Point:


For Ungrouped Data: If x1,x2,x3….xn are the n observations of a
variable x , then their moments about an arbitrary point A are

4
Amity Institute of Applied Sciences

5
Amity Institute of Applied Sciences

For Grouped Data: If x1,x2,x3….xn are the n observations (or


mid values of a class interval )of a variable x with frequencies
f1,f2,f3….., then their moments about an arbitrary point A are

6
Amity Institute of Applied Sciences

7
Amity Institute of Applied Sciences

Moments about Origin

8
Amity Institute of Applied Sciences

Moment about origin :For grouped data:

9
Amity Institute of Applied Sciences

Moment about mean: For grouped data:

10
Amity Institute of Applied Sciences

11
Relation between moment about origin and moment about mean

12
Amity Institute of Applied Sciences

Example 1: For the following distribution calculate first four moments


about mean

Solution: First we construct the following frequency distribution for


calculation of moments(take A=20)

13
Amity Institute of Applied Sciences

Marks x f d=(x- fd
20)/5
5 4 -3 -12 36 -108 324
10 10 -2 -20 40 -80 160
15 20 -1 -20 20 -20 20
20 36 0 0 0 0 0
25 16 1 16 16 16 16
30 12 2 24 48 96 192
35 2 3 6 18 54 162
⅀fd=-6
14
Amity Institute of Applied Sciences

Similarly other two moments are -52.5 and 5462.5.


Now using the relations we have

= -52.5 + 40.05 - 0.054 = -12.504

15
Amity Institute of Applied Sciences

Practice questions
1. The first four moments of a distribution about the value 5 of a variable
are 1, 10, 20 and 25. Find the central moments. Ans: 1,10,20,25
2. For the following distribution, find central moments
Class 1.5-2.5 2.5-3.5 3.5-4.5 4.5-5.5 5.5-6.5
Frequency 1 3 7 3 1

Ans:

16
Thanks

17
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 4: Dispersion

Lecture 1: Quartiles, Quartile deviation and its coefficient


1
Amity Institute of Applied Sciences

Course Objectives:
By the end of the semester, the students will be able to deal with
the techniques of numerical analysis and optimization, which
gives the solution to applied problem when ordinary analytical
method fails.

2
Amity Institute of Applied Sciences

Learning Outcomes:

Upon successful completion of this module, the student will be


able to understand the concept of
• Quartiles, Quartile deviation and its coefficient
• Mean deviation and its coefficient, Standard deviation
• Moments about a point, mean and origin, Relations of
Moments
• Skewness and Kurtosis
3
Amity Institute of Applied Sciences

Dispersion
• In statistics, dispersion (also called variability, scatter, or spread)
is the extent to which a distribution is stretched or squeezed.

• Common examples of measures of statistical dispersion are


the variance, standard deviation and interquartile range.

• Dispersion is contrasted with location or central tendency, and


together they are the most used properties of distributions.
Source : Higher Engineering Mathematics, B.S. Grewal 4
Amity Institute of Applied Sciences

Examples of dispersion measures include:

•Standard deviation
•Interquartile range (IQR)
•Range
•Mean absolute difference (also known as Gini mean absolute
difference)
•Median absolute deviation (MAD)
•Average absolute deviation (or simply called average deviation)
•Distance standard deviation
5
Amity Institute of Applied Sciences

6
Amity Institute of Applied Sciences

Quartiles:
Definition: Quartiles are values that divide your data into quarters.
However, quartiles aren’t shaped like pizza slices; Instead they divide
your data into four segments according to where the numbers fall on
the number line.
The four quarters that divide a data set into quartiles are:
• The lowest 25% of numbers.
• The next lowest 25% of numbers (up to the median).
• The second highest 25% of numbers (above the median).
• The highest 25% of numbers.
7
Amity Institute of Applied Sciences

1st Quarter 2nd Quarter 3rd Quarter 4th Quarter

• A set of numbers (-3,-2,-1,0,1,2,3) divided into four quarters.

• As quartiles divide numbers up according to where their


position is on the number line, you have to put the numbers
in order before you can figure out where the quartiles are.

8
Amity Institute of Applied Sciences

Example: Divide the following data set into quartiles: 2, 5, 6, 7, 10,


22, 13, 14, 16, 65, 45, 12.
Step 1: Put the numbers in order: 2, 5, 6, 7, 10, 12 13, 14, 16, 22, 45,
65.
Step 2: Count how many numbers there are in your set and then
divide by 4 to cut the list of numbers into quarters. There are 12
numbers in this set, so you would have 3 numbers in each quartile.
2, 5, 6, | 7, 10, 12 | 13, 14, 16, | 22, 45, 65

9
Amity Institute of Applied Sciences

Why do we need quartiles in statistics?

The main reason is to perform further calculations, like


the interquartile range, which is a measure of how the data is
spread out around the mean.

10
Amity Institute of Applied Sciences

Upper Quartile and Lower Quartile


• The upper quartile (sometimes called Q3) is the number dividing
the third and fourth quarter.
• The upper quartile can also be thought of as the median of the
upper half of the numbers.
• The upper quartile is also called the 75th percentile.
• It splits the lowest 75% of data from the highest 25%.
• Similarly, the lower quartile value is the median of
the lower half of the data.

11
Amity Institute of Applied Sciences

Quartile Deviation :
• The difference between the upper quartile Q3
and the lower quartile Q1 is called the inter quartile range.

• The difference Q3-Q1 divided by 2 is called semi-inter quartile


range or the quartile deviation.

• Coefficient of quartile deviation: A relative measure of dispersion


based on the quartile deviation is known as the coefficient of
quartile deviation. It is characterized as

12
Amity Institute of Applied Sciences

Quartile for ungrouped data: Arrange the data in ascending order, then
Qi=(i⋅(n+1)/4)th value of the observation, where i=1,2,3

Ex1: Calculate Quartile-1, from the following data


3,13,11,11,5,4,2
Solution: Arranging Observations in the ascending order, We get :
2,3,4,5,11,11,13
Here, n=7
Q1=((n+1)/4)th value of the observation=(8/4)th value of the observation
=2nd value of the observation =3
13
Amity Institute of Applied Sciences

Ex: 2. Calculate Quartile-2, from the following data


85,96,76,108,85,80,100,85,70,95

Solution: Arranging Observations in the ascending order, We get :


70,76,80,85,85,85,95,96,100,108
Here, n=10
Q2=(2(n+1)/4)th value of the observation=(2(11/4))th value of the
observation
=(5.5)th value of the observation=5th observation +0.5[6th-5th]
=85+0.5[85-85]=85+0.5(0)=85+0
=85
Try finding out Q3 for previous examples 14
Amity Institute of Applied Sciences

Ex3: A random sample of 15 patients yielded the following data


on the length of stay (in days) in the hospital.
5, 6, 9, 10, 15, 10, 14, 12, 10, 13, 13, 9, 8, 10, 12.
Find quartiles.
Solution
The formula for ith quartile is
Qi= Value of (i(n+1)4)th observation, i=1,2,3
where n is the total number of observations.
Arrange the data in ascending order
5, 6, 8, 9, 9, 10, 10, 10, 10, 12, 12, 13, 13, 14, 15

15
First Quartile Q1
The first quartile Q1 can be computed as follows:

Thus, 25 % of the patients had length of stay in the hospital


less than or equal to 9 days.
16
Amity Institute of Applied Sciences

Second Quartile Q2
The second quartile Q2 can be computed as follows:

Thus, 50 % of the patients had length of stay in the hospital less


than or equal to 10 days. Similarly find Q3. Also find quartile
17
deviation and its coefficient.
Amity Institute of Applied Sciences

Ex: Blood sugar level (in mg/dl) of a sample of 20 patients admitted to


the hospitals are as follows:
75,89,72,78,87, 85, 73, 75, 97, 87, 84, 76,73,79,99,86,83,76,78,73.
Find the value of Q1, Q2 and Q3.
(Try Yourself)
Ans: 75, 78.5, 84.75

18
Amity Institute of Applied Sciences

Quartile formula for grouped data


For discrete frequency distribution, the formula for ith quartile is
Qi=(i(N)/4)th value, i=1,2,3
where,
•N is total number of observations.
For continuous frequency distribution, the formula for ith quartile is

19
Amity Institute of Applied Sciences

where,
•l is the lower limit of the ith quartile class
•N=∑f total number of observations
•f frequency of the ith quartile class
•F< cumulative frequency of the class previous to ith quartile class
•h is the class width

20
Amity Institute of Applied Sciences

Ex: A class teacher has the following data about the number of
absences of 35 students of a class. Compute five number
summary for the following frequency distribution.
No.of days (x) 2 3 4 5 6
No. of Students
1 15 10 5 4
(f)

Solution

21
Amity Institute of Applied Sciences

Quartiles
The formula for ith quartile is
Qi=(i(N)/4)th value, i=1,2,3
where N is the total number of observations.
First Quartile Q1 can be calculated using quartile
formula for grouped data as below

22
Amity Institute of Applied Sciences

The cumulative frequency just greater than or equal to 8.75 is 16.


The corresponding value of X is the 1st quartile.
That is, Q1=3 days.
Thus, 25 % of the students had absences less than or equal to 3 days.
Similarly calculate Q2 and Q3

23
Amity Institute of Applied Sciences

Ex: The following table gives the amount of time (in minutes) spent on the
internet each evening by a group of 56 students. Compute five number
summary for the following frequency distribution. Find the Quartile
deviation also.
Time spent on
10-12 13-15 16-18 19-21 22-24
Internet (x)
No. of students
3 12 15 24 2
(f)

Solution
Let X denote the amount of time (in minutes) spent on the internet.
Here the classes are inclusive. To make them exclusive type subtract
0.5 from the lower limit and add 0.5 to the upper limit of each class. 24
Amity Institute of Applied Sciences

The formula for ith quartile is Qi=(i(N)/4)th value, i=1,2,3


where N is the total number of observations.
25
Amity Institute of Applied Sciences

First Quartile Q1 can be calculated using quartile formula for grouped


data as below

The cumulative frequency just greater than or equal to 14 is 15. The


corresponding class 12.5−15.5 is the 1st quartile class.

26
Amity Institute of Applied Sciences

Thus
•l=12.5, the lower limit of the 1st quartile class
•N=56, total number of observations
•f=12, frequency of the 1st quartile class
•F<=3, cumulative frequency of the class previous to 1st quartile
class
•h=3, the class width

27
Amity Institute of Applied Sciences

Thus, 25 % of the students spent less than or equal to 15.25 minutes


on the internet. Similarly Q2=18.1 min and Q3=20 min.
28
Also Quartile deviation can be calculated using the formula (Q3-Q1)/2
Amity Institute of Applied Sciences

Merits of Quartile Deviation:

1. It can be easily calculated and simply understood.


2. It does not involve much mathematical difficulties.
3. As it takes middle 50% terms hence it is a measure better than
Range and Percentile Range.
4. It is not affected by extreme terms as 25% of upper and 25% of
lower terms are left out.
5. Quartile Deviation also provides a short cut method to calculate
Standard Deviation using the formula 6 Q.D. = 5 M.D. = 4 S.D.
6. In case we are to deal with the center half of a series this is the
best measure to use.
29
Amity Institute of Applied Sciences

Demerits or Limitation Quartile Deviation:

1. As Q1 and Q3 are both positional measures hence are not capable of


further algebraic treatment.
2. Calculation are much more, but the result obtained is not of much
importance.
3. It is too much affected by fluctuations of samples.
4. 50% terms play no role; first and last 25% items ignored may not
give reliable result.

30
Amity Institute of Applied Sciences

5. If the values are irregular, then result is affected badly.


6. We can’t call it a measure of dispersion as it does not show the
scatterness around any average.
7. The value of Quartile may be same for two or more series or
Q.D. is not affected by the distribution of terms between Q1 and
Q3 or outside these positions.
So going through the merits and demerits, we conclude that
Quartile Deviation cannot be relied on blindly. In the case of
distributions with high degree of variation, quartile deviation has
less reliability.
31
Thankyou

32
Amity Institute of Applied Sciences

B.Tech. [IV Semester]


APPLIED MATHEMATICS-IV
[MATH242]

Module 4: Dispersion

Lecture 4: Skewness and Kurtosis


1
Amity Institute of Applied Sciences

Skewness
It is the degree of distortion from the symmetrical bell curve or the normal
distribution. It measures the lack of symmetry in data distribution. It
differentiates extreme values in one versus the other tail. A symmetrical
distribution will have a skewness of 0.
There are two types of Skewness: Positive and Negative
Positive Skewness means when the tail on the right side of the distribution
is longer or fatter. The mean and median will be greater than the mode.
Negative Skewness is when the tail of the left side of the distribution is
longer or fatter than the tail on the right side. The mean and median will be
less than the mode.
2
Amity Institute of Applied Sciences

3
Amity Institute of Applied Sciences

Kurtosis
Kurtosis is all about the tails of the distribution — not the peakedness or flatness.
It is used to describe the extreme values in one versus the other tail.
Mesokurtic: This distribution has kurtosis statistic similar to that of the normal distribution.
It means that the extreme values of the distribution are similar to that of a normal distribution
characteristic. This definition is used so that the standard normal distribution has a kurtosis of
three.

Leptokurtic (Kurtosis > 3): Distribution is longer, tails are fatter. Peak is higher and sharper
than Mesokurtic, which means that data are heavy-tailed or profusion of outliers.

Platykurtic: (Kurtosis < 3): Distribution is shorter, tails are thinner than the normal
distribution. The peak is lower and broader than Mesokurtic, which means that data are light-
tailed or lack of outliers.
4
Amity Institute of Applied Sciences

5
Amity Institute of Applied Sciences

Pearson’s Beta And Gamma Coefficients


Karl Pearson defined the following four coefficients, based upon the
first four central moments:
It is used as measure of skewness. For a symmetrical distribution, β1
β is defined as
1 shall be zero. Karl Pearson’s coefficient of skewness ϒ1 which is the
square root of β1

β2 measures kurtosis and it is defined by

Coefficient of kurtosis ϒ2 is defined as


Source : Engineering Mathematics, N.P. Bali
6
Amity Institute of Applied Sciences

Example 1: For the following distribution calculate first four moments

about mean and also find ᵦ , ᵦ , γ and γ :


1 2 1 2

Solution: We have already calculated moments for the same example in


previous slides. So now we will find the skewness and kurtosis

7
Amity Institute of Applied Sciences

=2.7499

8
Amity Institute of Applied Sciences

Thankyou

You might also like