Numerical Methods & Probability Theory (20A54402) : Lecture Notes
Numerical Methods & Probability Theory (20A54402) : Lecture Notes
Numerical Methods & Probability Theory (20A54402) : Lecture Notes
PROBABILITY THEORY
(20A54402)
LECTURE NOTES
Prepared by:
DR. B. NAGABHUSHANAM REDDY, Professor
Department of H &S
Accredited By NAAC, NBA( EEE, ECE & CSE) & ISO: 9001-2015 Certified Institution
UNIT 1
COURSE B. TECH
SEMESTER 2-2
2. PREREQUISITES
Students should have knowledge on
1. Students should have knowledge on Numerical Techniques
2. Students should have knowledge on Probability Theory
3. SYLLABUS
UNIT I
Solution of Algebraic & Transcendental Equations:
4. COURSE OUTCOMES
1|N M P T - U N I T - I
5. Co-PO / PSO Mapping
NMPT PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 P10 PO11 PO12 PSO1 PSO2
CO1 3
6. LESSON PLAN
2|N M P T - U N I T - I
8. LECTURE NOTES
if f ( x ) is a polynomial in x.
non-negative integer.
𝑥3
Eg: (i) 𝑓(𝑥) = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 −𝑥 = 0 (𝑖𝑖) 𝑓(𝑥) = 𝑒 5𝑥 − +3 =0
2
Note: The roots of an equation are the abscissae of the points where the graph
y = f ( x ) cuts the x-axis.
Direct method:
3|N M P T - U N I T - I
1.1. Bisection method:
(i) Suppose we know an equation of the form f ( x ) = 0 has exactly one real
root between two real numbers x0 , x1 .The number is chosen such that
f ( x0 ) and f ( x1 ) will have opposite sign.
(ii) Let us bisect the interval x0 , x1 into two half intervals and find the mid
x +x
point x2 = 0 1 . If f ( x2 ) = 0 then x2 is a root.
2
(iii) If f ( x1 ) and f ( x2 ) have same sign then the root lies between x0 and x2.
(iv) The interval is taken as [𝑥0 , 𝑥2 ]. Otherwise the root lies in the interval x2 , x1 .
(v) Next calculate x 3 , x4, x5---,until two consecutive iterations are equal.
Then we stop the process after getting desired accuracy.
PROBLEMS
𝑓(0) > 0
Sol Let 𝑓(𝑥) = 𝑥 3 − 5𝑥 + 1. We note that 𝑎𝑛𝑑
𝑓(1) < 0
Consider x0 = 0 and x1 = 1
x0 + x1 1
x2 = = ( 0 + 1) = 0.5
2 2
f ( x2 ) = f ( 0 : 5 ) = −1.375 0 and f ( 0 ) 0
4|N M P T - U N I T - I
We have the root lies between 0 and 0.5
0 + 0.5
Now x3 = = 0.25
2
𝑥0 +𝑥3 1
𝑥4 = = 2 (0 + 0.25) = 0.125
2
We have f ( x4 ) = 0.37495 0
x3 + x4 1
x5 = = ( 0.125 + 0.25) = 0.1875
2 2
1
x6 = ( x5 + x3 )
2
1
= ( 0.1875 + 0.25 )
2
= 0.21875
Sol Let f ( x ) = x3 − 4 x − 9
Consider x0 = 2 and x1 = 3
x0 + x1
By Bisection method x2 = = 2.5
2
1 2.5+3
The second approximation is 𝑥3 = 2 (𝑥1 + 𝑥2 ) = = 2.75
2
1
x4 = ( x2 + x3 ) = 2.625
2
1 1
Fourth approximation is𝑥5 = 2 (𝑥3 + 𝑥4 ) = 2 (2.75 + 2.625) = 2.6875
6|N M P T - U N I T - I
1.2. False Position Method ( Regula – Falsi Method)
In the false position method we will find the root of the equation f ( x ) = 0 Consider
two initial approximate values x0 and x1 near the required root so that
f ( x0 ) and f ( x1 ) have different signs. This implies that a root lies between x0 and x1 .
The curve f ( x ) crosses x- axis only once at the Point x2 lying between the
points 𝑥0 𝑎𝑛𝑑𝑥1 . Consider the point A = ( x0 , f ( x0 ) ) and B = ( x1 , f ( x1 ) ) on the graph
and suppose they are connected by a straight line. Suppose this line cuts x-axis
at𝑥2 . We calculate the value of f ( x2 ) at the point. If f ( x0 ) and f ( x2 ) are of
opposite signs, then the root lies between x0 and x2 and value x1 is replaced by x2
Otherwise the root lies between x2 and x1 and the value of x0 is replaced by
𝑥2 .Another line is drawn by connecting the newly obtained pair of values. Again
the point here cuts the x-axis is a closer approximation to the root. This process is
repeated as many times as required to obtain the desired accuracy. It can be
observed that the points
7|N M P T - U N I T - I
Let A = ( x0 , f ( x0 ) ) and B = ( x1 , f ( x1 ) ) be the points on the curve y = f ( x ) Then the
𝑦−𝑓(𝑥0 ) 𝑓(𝑥1 )−𝑓(𝑥0 )
equation to the chord AB is = − − − − − −(1)
𝑥−𝑥0 𝑥1 −𝑥0
At the point C where the line AB crosses the x – axis, where 𝑓(𝑥) = 0 𝑖𝑒, 𝑦 = 0
x1 − x0
From (1), we get x = x0 − f ( x0 ) → --------------(2)
( 2)
f ( x1 ) − f ( x0 )
x is given by (2) serves as an approximated value of the root, when the interval in
which it lies is small. If the new value of x is taken as x2 then (2) becomes
( x1 − x0 ) f x
x2 = x0 − ( 0)
f ( x1 ) − f ( x0 )
x f ( x1 ) − x1 f ( x0 )
= 0 → ( 3) -------------(3)
f ( x1 ) − f ( x0 )
x0 and x2 ( or ) x2 and x1
x1 f ( x2 ) − x2 f ( x1 )
is given by x3 =
f ( x2 ) − f ( x1 )
8|N M P T - U N I T - I
This will in general, be nearest to the exact root. We continue this procedure till
the root is found to the desired accuracy
The iteration process based on (3) is known as the method of false position
The successive intervals where the root lies, in the above procedure are named
as
( x0 , x1 ) , ( x1 , x2 ) , ( x2 , x3 ) etc
xi −1 f ( xi ) − xi f ( xi −1 )
Also xi +1 =
f ( xi ) − f ( xi −1 )
PROBLEMS:
x1 − x0
x2 = x0 − f ( x0 )
f ( x1 ) − f ( x0 )
2 − 1.8
= 1.8 − ( −1.3)
4 + 1.3
=1.849
the root lies between x2 and x1 and the second order approximation of the root is
9|N M P T - U N I T - I
x1 − x2
x3 = x2 − . f ( x2 )
f ( x1 ) − f ( x2 )
2 − 1.849
= 1.8490 − ( −0.159 )
0.159
= 1.8548
= −0.019
So that f ( x3 ) and f ( x2 ) are of the same sign. Hence, the root does not lie between
x2 and x3 .But f ( x3 ) and f ( x1 ) are of opposite signs. So the root lies between
2 − 1.8548
= 1.8548 − × (−0.019)
4 + 0.019
= 1.8557
2. Find out the roots of the equation x 3 − x − 4 = 0 using False position method
Sol. Let f ( x ) = x 3 − x − 4 = 0
Since f (1) and f ( 2 ) have opposite signs the root lies between 1 and 2
x0 f ( x1 ) − x1 f ( x0 )
By False position method x2 =
f ( x1 ) − f ( x0 )
x2 =
(1 2 ) − 2 ( −4 )
2 − ( −4 )
2 + 8 10
= = = 1.666
6 6
10|N M P T - U N I T - I
f (1.666 ) = (1.666 ) − 1.666 − 4
3
= −1.042
1.666 2 − 2 ( −1.042 )
x3 = = 1.780
2 − ( −1.042 )
f (1.780 ) = (1.780 ) − 1.780 − 4
3
= −0.1402
1.780 2 − 2 ( −0.1402 )
x4 = = 1.794
2 − ( −0.1402 )
f (1.794 ) = (1.794 ) − 1.794 − 4
3
= −0.0201
1.794 2 − 2 ( −0.0201)
x5 = = 1.796
2 − ( −0.0201)
f (1.796 ) = (1.796 ) − 1.796 − 4 = −0.0027
3
1.796 2 − 2 ( −0.0027 )
x6 = = 1.796
2 − ( −0.0027 )
The Newton- Raphson method is a powerful and elegant method to find the
root of an equation. This method is generally used to improve the results obtained by
the previous methods.
11|N M P T - U N I T - I
Let x0 be an approximate root of f ( x ) = 0 and let x1 = x0 + h be the correct root
which implies that f ( x1 ) = 0 . We use Taylor’s theorem and expand
f ( x1 ) = f ( x0 + h ) = 0
f ( x0 ) + hf 1 ( x0 ) = 0
f ( x0 )
h=−
f 1 ( x0 )
x1 = x0 + h
f ( x0 )
= x0 −
f 1 ( x0 )
PROBLEMS:
12|N M P T - U N I T - I
xi 3 − 3xi − 5 2 xi 3 + 5
xi +1 = xi − = , i = 0,1, 2.... (1)
3 ( xi 2 − 1) 3 ( xi 2 − 1)
2 x03 + 5 16 + 5 21
x1 = = = = 2.3333
3 ( x0 − 1) 3 ( 4 − 1) 9
2
2 ( 2.3333) + 5
3
2 x13 + 5
x2 = = = 2.2806
3 ( x12 − 1) 3 ( 2.3333)2 − 1
2𝑥23 + 5 2 × (2.2806)3 + 5
𝑥3 = = = 2.2790
3(𝑥23 − 1) 3[(2.2806)2 − 1]
2 × (2.2790)3 + 5
𝑥4 = = 2.2790
3[(2.2790)2 − 1]
Here f ' ( x ) = 2 x
By Newton-Raphson technique
f ( xi ) xi 2 − N
xi +1 = xi − = xi −
f 1 ( xi ) 2 xi
13|N M P T - U N I T - I
1 N
xi +1 = xi +
2 xi
Using the above iteration formula the square root of any number N can be
found to any desired accuracy. For example, we will find the square root of
N = 24 .
1 24 1 23.04 + 24 47.04
𝑥1 = (4.8 + )= ( )= = 4.9
2 4.8 2 4.8 9.6
1 24 1 24.01 + 24 48.01
x2 = 4.9 + = = = 4.898
2 4.9 2 4.9 9.8
1 24 1 23.9904 + 24 47.9904
x3 = 4.898 + = = = 4.898
2 4.898 2 4.898 9.796
b) Reciprocal:-
1
Let f ( x ) = − N = 0 where N is the number whose reciprocal is to be found
x
−1
The solution to f ( x ) is then 𝑥 = 𝑁 . Also, f 1 ( x ) =
1
x2
1
(𝑥 − 𝑁)
𝑖
𝑥𝑖+1 = 𝑥𝑖 − = 𝑥𝑖 (2 − 𝑥𝑖 𝑁)
−1⁄𝑥𝑖2
14|N M P T - U N I T - I
x1 = 0.045 ( 2 − 0.045 22 )
= 0.045 ( 2 − 0.99 )
= 0.0454 (1.01) = 0.0454
x2 = 0.0454 ( 2 − 0.0454 22 )
= 0.0454 ( 2 − 0.9988 )
= 0.0454 (1.0012 ) = 0.04545
x3 = 0.04545 ( 2 − 0.04545 22 )
= 0.04545 (1.0001) = 0.04545
= 0.04545(2 − 0.99998)
= 0.04545(1.00002)
= 0.0454509
By Newton’s Rule
f ( x0 )
First approximation x1 = x0 −
f 1 ( x0 )
0.7183
= 1− = 0.8679
5.4366
f ( x1 ) = 0.0672 f 1 ( x1 ) = 4.4491
15|N M P T - U N I T - I
f ( x1 )
The second approximation x2 = x1 −
f 1 ( x1 )
0.0672
= 0.8679 −
4.4491
= 0.8528
Definition: Consider the system of m linear equations in n unknowns x1, x2 ,………,xn as given
below:
a11 x1 + a1 2 x 2 + .............. + a1 n x n = b1
a 21 x1 + a 2 2 x 2 + .............. + a 2 n x n = b2
……………………………………………………….
ai 1 x1 + ai 2 x 2 + .............. + ai n x n = bi
……………………………………………………….
a m1 x1 + a m 2 x 2 + .............. + a m n x n = bm
The number aij’s are known as coefficient and b1 , b2 , …………….bm are constants. An
ordered n-tuple (x1, x2 ,………,xn ) satisfying all the equations simultaneously is called a
solution of system.
Non-Homogeneous system:
The above system of linear non Homogeneous equations can be written in Matrix form as
AX=B
Augmented Matrix:
By reducing [A /B] into its row echelon form the existence and uniqueness of solution
AX = B exists.
NOTE:
Given a system, we do not know in general whether it has a solution or not .If there is at
least one solution , then the system is said to be consistent .If does not have any solution
then the system is inconsistent.
Gauss Jordan Method: In Gauss Jordan method augmented matrix [A/B] can be reduced
to identity matrix and column matrix by elementary row operations. Finally last column
gives solutions of given linear system.
17|N M P T - U N I T - I
1 1 2 4 1 0 0
2 − 1 3 9 = 0 1 0
[A/ B] =
3 − 1 − 1 2 0 0 1
For Non Homogeneous System, The system AX = B is consistent i.e it has a solution.
NOTE: Find the rank A and rank [A /B] by reducing the augmented matrix [A /B] to
Echelon form by elementary row operations. Then the matrix A will be reduced to Echelon
form.
Example 1: Find whether the following equations are consistent, if so solve them
1 1 2 x 4
2 − 1 3 y
Solution: The given equations can be written in the matrix form as = 9
3 − 1 − 1 z 2
1 1 2 4
2 − 1 3 9
The Augmented matrix [A/ B] =
3 − 1 − 1 2
1 1 2 4
0 − 3 − 1 1
[A / B] =
0 − 4 − 7 − 10
18|N M P T - U N I T - I
1 1 2 4
0 − 3 − 1 1
[A / B] =
0 0 − 17 − 34
∴ Rank of A = Rank of [A B]
i.e. ( A) = ( AB )
1 1 2 x 4
0 − 3 − 1 y
= 1
0 0 − 17 z − 34
R3← R3/(-17)
1 1 2 x 4
0 − 3 − 1 y 1
=
0 0 1 z 2
1 1 0 x 0
0 − 3 0 y 3
=
0 0 1 z 2
1 0 0 x 1
0 1 0 y − 1
=
0 0 1 z 2
19|N M P T - U N I T - I
x 1
y
= − 1
z 2
Then solution set X=
∴ x = 1, y = -1 , z = 2 is the solution.
Example 2: Using Gauss Jordan method solve linear equations given below
x + 2y+ 2z = 2; 3x - 2y - z = 5: 2x - 5y + 3z = -4; x + 4y + 6z = 0.
1 2 2 2
3 − 2 − 1 x
i.e. y = 5
2 − 5 3 − 4
z
1 4 6 0
1 2 2 2
3 − 2 − 1 5
The Augmented matrix [A/ B] =
2 − 5 3 − 4
1 4 6 0
1 2 2 2
0 − 8 − 7 − 1
[A /B] =
0 − 9 − 1 − 8
0 2 4 − 2
1 2 2 2
0 − 8 − 7 − 1
[A/B] =
0 0 55 − 55
0 0 9 −9
20|N M P T - U N I T - I
1 2 2 2
0 − 8 − 7 − 1
[A /B]
0 0 1 − 1
0 0 1 − 1
Applying R4 → R4 -R3
1 2 2 2
0 − 8 − 7 − 1
[A /B]
0 0 1 − 1
0 0 0 0
i.e. ( A) = ( AB )
1 2 2 2
0 − 8 − 7 x − 1
y
We have =
0 0 1 − 1
z
0 0 0 0
Apply R1-2R3,R2+7R3
1 2 0 4
0 − 8 x
0 y
− 8
=
0 0 1 − 1
z
0 0 0 0
1 0 0 2
0 x
1 0 y
1
0 0 1 = − 1
z
0 0 0 0
21|N M P T - U N I T - I
∴ x = 2 , y = 1 , z = -1 is the solution.
(i) a1 x+b1y+c1z=d1
a2x+b2y+c2z=d2
a3x+b3y+c3z=d3
(ii) If a1,b2, c3 are large as compared with other coefficients , then solve them for x,y,z
respectively .
1
Y = 𝑏2 (d2-a2x-c2z)
1
Z= 𝑐3 (d3-a3x-b3y)
(iii) First iteration: We can calculate first iteration values in the following equations
1
X1 = 𝑎1 (d1-b1y0+c1z0)
1
Y1 = 𝑏2 (d2-a2x1-c2z0)
1
Z1= 𝑐3 (d3-a3x1-b3y1)
1
Y2= 𝑏2 (d2-a2x2-c2z1)
1
Z2= 𝑐3 (d3-a3x2-b3y2)
------------------------------------
--------------------------------------
First take initial values zeroes as new approximation for an un known value found, it is
immediately used in next step. We continued these processes up to two successive
22|N M P T - U N I T - I
iterations are approximately equal. This procedure is called as Gauss Siedal iteration
method.
PROBLEMS:
2x+10y+z=13----(2)
2x+2y+10z=14---(3)
1
From (1) x=10 (12-y-z)
1
From (2) y= 10 (13-2x-z)
1
From (3) z = 10 (14-2x-2y)
1 1
First iteration: X1 = 10 (12-y0-z0)= 10 (12-0-0) = 1.2
1 1
Y1 = (13-2x1-z0) = (13-2(1.2)-0)=1.06
10 10
1 1
Z1= 10 (14-2x1-2y1) = 10 (14-2(1.2)-2(1.06)) =0.948
1 1
Second iteration: X2 = 10 (12-y1-z1)= 10 (12-1.2-1.06) = 0.999
1 1
Y2 = 10 (13-2x2-z1) = 10 (13-2(0.999)-0.948)=1.005
1 1
Z2= 10 (14-2x2-2y2) = 10 (14-2(0.999)-2(1.005)) =0.999
1 1
Third iteration: X3 = 10 (12-y2-z2)= 10 (12-1.005-0.999) = 1
1 1
Y3 = 10 (13-2x3-z2) = 10 (13-2(1)-0.999)=1
1 1
Z3= 10 (14-2x3-2y3) = 10 (14-2(1)-2(1)) =1
1 1
Fourth iteration: X4 = 10 (12-y3-z3)= 10 (12-1-1) = 1
1 1
Y4= 10 (13-2x4-z3) = 10 (13-2(1)-1)=1
1 1
Z4= 10 (14-2x4-2y4) = 10 (14-2(1)-2(1)) =1
Since third and fourth iterations are equal then desired set of solutions are
23|N M P T - U N I T - I
X=1, y=1 , z=1
9. Practice Quiz
1. Newton’s iterative formula for finding the Cube root of a number N is xn+1 = [b ]
1 N
2 x n + 2
3 x n
a)
1 N
2 x n + 3
3 x n
b)
1 N
2 x n − 2
3 x n
c)
1 N
2 x n − 3
3 x n
d)
f (x n )
x n +1 = x n +
f 1 (x n )
a)
f (x n )
x n +1 = x n −
f 1 (x n )
b)
f 1 (x n )
x n +1 = x n +
c) f (x n )
f 1 (x n )
x n +1 = x n −
d) f (x n )
24|N M P T - U N I T - I
a)
x 2 − log x − 1.2 = 0
b) x + 2 x + x + 1 = 0
3 2
c) cos x = xe
x
d) xe − 1 = 0
x
a)
x 2 − log x = 1.2
b) x + 2 x + x + 1 = 0
3 2
c) x − 3 x − 5 = 0
3
d) x − 5 x + 1 = 0
3
5. Using the false position method, the formula for the approximate root of the equation
f ( x ) = 0 is…………. [a ]
af ( b ) − bf ( a )
x=
f (b ) − f ( a )
a)
bf ( b ) − af ( a )
x=
f (b ) − f ( a )
b)
af ( b ) + bf ( a )
x=
f (b ) + f ( a )
c)
bf ( b ) + af ( a )
x=
f (b ) + f ( a )
d)
6. If the root of the equation x 3 − 6 x + 4 = 0 lies between 0 & 1, then the first
a)0.55555
b)0.4444
c)0.77777
d)0.66666
a) Constant
25|N M P T - U N I T - I
b) 0
c) Polynomial of first degree
d) Polynomial of (n – 1)th degree
10. Assignments
S.No Question BL CO
26|N M P T - U N I T - I
(0.64)(1) − (1)(−0.0979)
X1= = 0.672
1 − (−0.0979)
Write formula for Newton-Raphson method.
4 f (x ) 1 1
Sol. xi +1 = xi − 1 i
f ( xi )
State the order of convergence and convergence condition for
NR method?
5 Sol: The order of convergence is 2 1 1
2
Condition of convergence is f ( x) f 11 ( x) f 1 ( x)
Develop an algorithm using Newton-Raphson method, to find
the square root of a positive number.
Sol. The square root of the a positive number N is the root of
the equation. x 2 − N = 0
6 f ( x) = x 2 − N , f 1 ( x) = 2 x 1 1
By Newton-Raphson technique, we have
f (x ) x2 − N 1 N
xi +1 = xi − 1 i = xi − i = xi +
f ( xi ) 2 xi 2 xi
Write merits and demerits of Newton-Raphson method.
Sol. Merits: 1. In this method convergence is quite fast provided
the starting value is close to the desired root.
2. It is single point iteration method and it can be used
for solving
algebraic and transcendental equations. It can also
7 be used when the roots are complex. 1 1
Demerits: 1. It is not applicable to find the approximated
values of a reaped root.
2. The method should not be used in case where
the graph of the function when it crosses the x axis is nearly
horizontal.
.
S.No Question BL CO
Find and approximate value of the real root of 𝑥 3 − 𝑥 − 1 = 0 using
1 1 1
Bisection method
2 Fi Find real root of the equation 𝑥𝑙𝑜𝑔10 (𝑥) = 1.2 using false position method. 1 1
Fit root of equation 𝑥 3 − 4𝑥 − 9 = 0 using Bisection method in four
3 1 1
stages.
Fin Find by Iteration method , the real root between 0 and 1 of the equation
4 1 1
𝑥 3 − 6𝑥 + 4 = 0 correct to five decimal places
27|N M P T - U N I T - I
Find the root of the equation 𝑥𝑠𝑖𝑛𝑥 + 𝑐𝑜𝑥 = 0. Using Newton-Raphson
5 1 1
method.
Test the system by Gauss Jordan method 2𝑥 + 𝑦 + 5𝑧 = 4; 3𝑥 − 2𝑦 + 2𝑧 =
6 3 1
2; 5𝑥 − 8𝑦 − 4𝑧 = 1 solve them.
Solve the following system in matrix form and solve by Gauss-seidal method,
7 4 x − y − z = 3;−2 x + 6 y + z = 9;− x + y + 7 z = −6 .
3 1
Reference Books:
1. B.V.Ramana, “Higher Engineering Mathematics”, Mc Graw Hill publishers.
2. Alan Jeffrey, “Advanced Engineering Mathematics”, Elsevier.
28|N M P T - U N I T - I
COURSE MATERIAL
UNIT 2
COURSE B.TECH
SEMESTER 2-2
2. PREREQUISITES
Students should have knowledge on
1. Students should have knowledge on Numerical Techniques
2. Students should have knowledge on Probability Theory
3. SYLLABUS
UNIT II
Interpolation:
4. COURSE OUTCOMES
At the end of the course, the student will be able to
1|N M P T - U N I T - I I
5. Co-PO / PSO Mapping
NMPT PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 P10 PO11 PO12 PSO1 PSO2
CO1 3
6. LESSON PLAN
2|N M P T - U N I T - I I
8. LECTURE NOTES
Interpolation
Introduction:-
f ( x ) is single valued and continuous and is known explicitly then the values of f ( x )
for certain values of x like x0 , x1 ,.........xn can be calculated. The problem now is if we
x : x0 x1 x2 ........ xn
y : y0 y1 y2 ........ yn
then it is possible to find a simple function say f ( x ) such that f ( x ) and ( x ) agree at
using this n ( xi ) for other value of x, not defined by (1) the error is to be determined
y ( x ) − n ( x ) = L n +1 ( x )
3|N M P T - U N I T - I I
Where n +1 ( x ) = ( x − x0 ) ......... ( x − xn ) → ( 3) and L to be determined such that the
y ( x1 ) − n ( x1 )
Clearly L = → ( 4)
n +1 ( x1 )
y n +1 ( )
y n +1
( ) − L ( n + 1)! = 0 Which implies that L =
( n + 1)!
y n+1 ( )
y ( x ) − n ( x ) =
1 1
n+1 ( x1 )
( n + 1)!
n +1 ( x )
This can be written as y ( x ) − n ( x ) = y n +1 ( )
( n + 1)!
1. Introduction:-
In this chapter, we introduce what are called the forward, backward and
central differences of a function y = f ( x ) . These differences and three standard
examples of finite differences and play a fundamental role in the study of differential
calculus, which is an essential part of numerical applied mathematics
4|N M P T - U N I T - I I
2. Forward Differences:-
The first forward differences of the first forward differences are called second forward
differences and are denoted by 2 y0 , 2 y1...... that is
2 y0 = y1 − y0
2 y1 = y2 − y1
In general 2 yr = yr +1 − yr r = 0,1, 2....... similarly, the nth forward differences are
n yr = n −1 yr +1 − n −1 yr r = 0,1, 2.......
While using this formula for n = 1 , use the notation 0 yr = yr and we have
n yr = 0n = 1, 2...... and r = 0, 2,......... the symbol n is referred as the nth forward
difference operator.
The forward differences are usually arranged in tabular columns as shown in the
following table called a forward difference table
5|N M P T - U N I T - I I
Values Values First Second Third differences Fourth
of x of y differences differences differences
xo y0
y0 = y1 − y0
x1 y1 2 y0 = y1 − y0
y1 = y2 − y1 3 y0 = 2 y1 − 2 y0
x2 y2 2 y1 = y2 − y1 4 y0 = 3 y1 − 3 y0
y2 = y3 − y2 3 y1 = 2 y2 − 2 y1
x3 y3 2 y2 = y3 − y2
X4 y4 = y 4 − y3
x y = f ( x) y 2 y 3 y 4 y
1 1
7
2 8 12
19 6
3 27 18 0
37 6
4 64 24 0
61 6
5 125 30
91
6 216
Then, y1 = y1 − y0 , y2 = y2 − y1 , y3 = y3 − y2 ,.... are called the first backward differences
6|N M P T - U N I T - I I
In general yr = yr − yr −1 , r = 1, 2,3......... → (1)
The symbol is called the backward difference operator, like the operator , this
operator is also a linear operator
Comparing expression (1) above with the expression (1) of section we immediately
note that yr = yr −1 , r = 0,1, 2....... → ( 2 )
The first backward differences of the first background differences are called
second differences and are denoted by 2 y2 , 2 y3 − − − 2 r − − − −
In general 2 yr = yr − yr −1 , r = 2,3..... → ( 3) similarly, the nth backward differences are
x Y y 2 y 3 y
x0 y0
y1
=y1-y0
x1 y1 2 y2
y2 =y2-y1 ∇3 𝑦3
x2 y2 2 y3
y3 =y3-y2
x3 y3
7|N M P T - U N I T - I I
6. Central Differences:-
yr −1/2 = yr − yr −1 → (1)
The symbol is called the central differences operator. This operator is a linear
operator comparing expressions (1) above with expressions earlier used on forward
and backward differences we get
The first central differences of the first central differences are called the second
central differences and are denoted by y1 , y2 ...
2 2
2 yn = yn +1/2 − yn −1/2 → ( 3)
Higher order central differences are similarly defined. In general the nth central
differences are given by
n yr = 0 for all n 1
8|N M P T - U N I T - I I
7. Central Difference Table
x0 y0 y 2y 3y 4y
y1/2
x1 y1 2 y1
y2/2 3 y3/2
x2 y2 2 y2 4 y2
y5/2 3 y5/2
x3 y3 2 y3
y7/2
x4 y4
E
x
ample: Given f ( −2 ) = 12, f ( −1) = 16, f ( 0 ) = 15, f (1) = 18, f ( 2 ) = 20 from the central
difference table and write down the values of y3/2 , y0 and y7/2 by taking x0 = 0
2 3
x y = f ( x) y 2y 3y 4y
-2 12
4
-1 16 -5
-1 9
0 15 4 -14
3 -5
1 18 -1
9|N M P T - U N I T - I I
2
2 20
This shows that the effect of E is to shift the functional value y r to the next higher value
Generalizing E y = yr + n
n r
We have y0 = y1 − y0
= Ey0 − y0 = ( E − 1) y0
= E − y ( or ) E = 1 +
y0 = y1 − y0
= Ey0 − y0 = ( E − 1) y0
= E − y ( or ) E = 1 +
3 y0 = ( E − 1) y0 = ( E 3 − 3E 2 + 3E − 1) y0
3
= y3 − 3 y2 + 3 y1 − y0
−1
Inverse operator E −1 is defined as E yr = yr −1
−n
In general E yn = yr − n
10|N M P T - U N I T - I I
We can easily establish the following relations
i) 1 − E −1
iii) =
2
( E + E −1/2 )
1 1/2
iv) = E = E1/2
1
v) 2 1 + 2
4
Differential Operator-Definition The operator D is defined as Dy ( x ) = y ( x )
x
h2 11 h3
Using Taylor’s series we have, y ( x + h ) = y ( x ) + hy1 ( x ) + y ( x ) + y111 ( x ) + − − − −
2! 3!
h 2 D 2 h3 D 3
Eyx = 1 + hD + + + − − − − yX = ehD . yx
2! 3!
n f ( x ) is constant
Proof:
h is the step- length, we know the formula for the first forward difference
f ( x ) = f ( x + h ) − f ( x ) = a0 ( x + h ) + a1 ( x + h ) + − − − − + an −1 ( x + h ) + an
n n −1
− a0 x n + a1 x n −1 + − − − − + an −1 x + an
11|N M P T - U N I T - I I
n ( n − 1) n −2 2
= a0 x n + n.x n −1h + x .h + − − − − x n +
2!
a1 x n −1 + ( n − 1) x n − 2 .h +
( n − 1)( n − 2 ) x n−3 .h 2 + − − − − x n−1 +
2!
− − − − − − + an −1h
= a0 nhx n −1 + b2 x n − 2 + b3 x n −3 + − − − − +bn −3 x + bn − 2
Now
2 f ( x ) = f ( x )
= a0 nh.x n −1 + b2 x n − 2 + b3 x n −3 + − − − − +bn −1 x + bn − 2
= a0 nh ( x + h ) − x n −1 + b2 ( x + h ) − x n − 2 + − − − + bn −1 ( x + h ) − x
n −1 n−2
= a0 n(
n −1)
h 2 x n − 2 + c3 x n −3 + − − − − − + cn − 4 x + cn −3
which is constant
Note:-
polynomial of degree n
Example:-
1. Form the forward difference table and write down the values of f (10 ) ,
12|N M P T - U N I T - I I
x 10 15 20 25 30 35
Sol.
x Y y 2 y 3 y 4 y 5 y
10 19.97f(10)
1.54∆𝒇(𝟏𝟎)
0.96 0.67
1.13 0.03
30 24.65f(30) 0.11
1.24
35 25.89f(35)
We note that the values of x are equally spaced with step- length h = 5
y0 = f ( x0 ) = 19.97
y1 = f ( x1 ) = 21.51
-----------------------
-----------------------
y5 = f ( x5 ) = 25.89
y5 = f ( x5 ) = 25.89
13|N M P T - U N I T - I I
From table
2. Evaluate
( i ) cos x
( ii ) 2 sin ( px + q )
( iii ) n eax +b
ph 1
2 sin ( px + q ) = 2sin sin ( px + q ) + ( + ph )
2 2
2
ph 1
= 2sin sin px + q + ( + ph )
2 2
14|N M P T - U N I T - I I
( iii ) eax+b = ea( x +h)+b − eax +b
= e( (e )
ax + b ) ah −1
2 e ax +b = ( e ) − ( e
ax + b ah
− 1)( e ax +b )
= ( e − 1) ( e )
ah 2 ax + h
= ( e − 1) e
ah 2 ax + b
Sol. To prove this result, we start with the right hand side. Thus
n ( n − 1)
x − n x − 1 + x − 2 + − − − − − + ( −1) x − n
n
2
n ( n − 1) −2
= x − nE −1 x + E x + − − − − − + ( −1) E − n x
n
2
n ( n − 1) −2
E + − − − − − + ( −1) E − n x = (1 − E −1 ) x
n
= 1 − nE −1 +
n
2
( E − 1) n
n n
1
= 1 − n =
E E
n
= n x = n E −n x
E
X 0 1 2 3 4
Y 1 3 9 - 81
15|N M P T - U N I T - I I
Sol. Consider y0 = 0
4
x Y ∆ ∆2 ∆3 ∆4
0 1 2 4 x-19 124-4x=0
1 3 6 x-15 105-3x
2 9 X-9 90-2x
3 X 81-x
4 81
4 y0 − 4 y3 + 5 y2 − 4 y1 + y0 = 0 124-4x=0— x=124/4=31
81 − 4 y3 + 54 − 12 + 1 = 0 y3 = 31
From the given data we can conclude that the given function is y = 3x . To find
y = f ( x ) = b 0 + b1 ( x − x0 ) + b2 ( x − x0 )( x − x1 ) + b3 ( x − x0 )( x − x1 )( x − x2 ) + − − −
+bn ( x − x0 )( x − x1 ) − − − − ( x − xn −1 ) → (1)
This polynomial passes through all the points xi; yi for i = 0 to n. there fore, we
at x = x0 , y0 = b0
at x = x1 , y1 = b0 + b1 ( x1 − x0 )
at x = x2 , y2 = b0 + b1 ( x2 − x0 ) + b2 ( x2 − x0 )( x2 − x1 ) → (1)
16|N M P T - U N I T - I I
x0 , x0 + h, x0 + 2h, x0 + 3h − − − − x0 + xh
y0 = b0
y1 = b0 + b1h
y2 = b0 + b1 2h + b2 ( 2h ) h
y3 = b0 + b1 3h + b2 ( 3h )( 2h ) + b3 ( 3h )( 2h ) h
.....................................
.....................................
yn = b0 + b1 ( nh ) + b2 ( nh )( n − 1) h + − − − + bn ( nh ) ( n − 1) h ( n − 2 ) h → ( 3)
y1 − b0 y1 − y0 y0
b1 = = =
h h h
y − b − b 2h (y − y )
b2 = 2 0 2 1 = y2 − y0 − 1 0 2h
2h h
y2 − y0 − 2 y1 − 2 y0 y2 − 2 y1 + y0 2 y0
= = =
2h 2 2h 2 2h 2
2 y0
b2 =
2!h 2
3 y0 4 y0 n y0
b3 = , b4 = − − − − − bn =
3!h3 4!h 4 n !h n
y 2 y0
y = f ( x ) = y0 + 0 ( x − x0 ) + ( x − x0 )( x − x1 )
h 2!h 2
3 y0
+ ( x − x0 )( x − x1 )( x − x2 ) + − − − +
3!h3
n y0
+ ( x − x0 )( x − x1 ) − − − ( x − xn −1 ) → ( 3)
n !h n
17|N M P T - U N I T - I I
Then
x − x1 = x − ( x 0 + h ) = ( x − x0 ) − h
= ph − h = ( p − 1) h
x − x2 = x − ( x1 + h ) = ( x − x1 ) − h
= ( p − 1) h − h = ( p − 2 ) h
............................................
x − xi = ( p − i ) h
............................................
x − xn −1 = p − ( n − 1) h
x − x0
p=
Equation (3) becomes for h
p ( p − 1) p ( p − 1)( p − 2 )
y = f ( x ) = f ( x0 + ph ) = y0 + py0 + 2 y0 + 3 y0 + − − − − +
2! 3!
p ( p − 1)( p − 2 ) − − − − ( p − ( n − 1) ) n
y0 → ( 4 )
n!
If we consider
yn ( x ) = a0 + a1 ( x − xn ) + a2 ( x − xn )( x − xn −1 ) + a3 ( x − xn )( x − xn −1 )( x − xn −2 ) + − − − − ( x − xi )
and impose the condition that y and yn ( x ) should agree at the tabulated
points xn , xn − 1,......x2 , x1 , x0
We obtain
p ( p + 1)
yn ( x ) = yn + pyn + 2 yn + − − −
2i
p ( p + 1) − − − − p + ( n − 1)
n yn + − − −− → ( 6 )
n!
x − xn
Where p =
h
18|N M P T - U N I T - I I
This uses tabular values of the left of y n . Thus this formula is useful formula is useful
If y = f ( x ) is the exact curve and y = n ( x ) is the interpolating curve, then the error
Error = f ( x ) − n ( x ) =
( x − x0 )( x − x1 ) − − − − ( x − xn ) f n+1 → 7
( ) ( )
( n + 1)!
p ( p − 1)( p − 2 ) ....... ( p − n )
f ( x ) − n ( x ) = n +1 f ( )
( n + 1)!
x − x0
Where p =
h
p ( p + 1)( p + 2 ) ....... ( p + n ) x − xn
f ( x ) − n ( x ) = h n+1 y n+1 f ( ) Where p =
( n + 1)! h
Examples:-
1. Find the melting point of the alloy containing 54% of lead, using appropriate
interpolation formula
Percentage of
50 60 70 80
lead(p)-X
Temperature
205 225 248 274
( Qc ) -Y
19|N M P T - U N I T - I I
Sol. The difference table is
X Y 2 3
50=X0 205=Y0
20=∆𝒀𝟎
60 225 3=∆𝟐 Y0
23 0=∆𝟑 Y0
70 248 3
26
80 274
x0 + ph = 24, x0 = 50, h = 10
50 + p (10 ) = 54 ( or ) p = 0.4
p ( p − 1) p ( p − 1)( p − 2 )
f ( x0 + ph ) = y0 + py0 + 2 y0 + 3 y0 + − − −
2! n!
0.4 ( 0.4 − 1) ( 0.4 )( 0.4 − 1)( 0.4 − 2 )
f ( 54 ) = 205 + 0.4 ( 20 ) + ( 3) + (0)
2! 3!
= 205 + 8 − 0.36
= 212.64
2. Using Newton’s forward interpolation formula, and the given table of values
20|N M P T - U N I T - I I
Obtain the value of f ( x ) when x = 1.4
Sol.
x y = f ( x) 2 3 4
1.1 0.21
0.48
0.56 0
0.64 0
0.72
1.9 2.61
11
− 1
1 22
f (1.4 ) = 0.69 + 0.56 + 0.08
2 2!
= 0.69 + 0.28 − 0.01 = 0.96
21|N M P T - U N I T - I I
3. The population of a town in the decimal census was given below. Estimate the
population for the 1895
Population
46 66 81 93 101
of y
X Y 2 3 4
1891=x0 46=y0
20∆𝑦0
-
1901 66
5∆2 𝑌0
15 2
1911 81 -3 -3
12 -1
1921 93 -4
1931 101
y (1895 ) = 46 + ( 0.4 )( 20 ) +
( 0.4 )( 0.4 − 1) −
( −5 )
6
( 0.4 − 1) 0.4 ( 0.4 − 2 )
+ ( 2)
6
+
( 0.4 )( 0.4 − 1)( 0.4 − 2 )( 0.4 − 3)
24
= 54.45 thousands
2.3. Gauss’s Interpolation Formula:- We take x0 as one of the specified of x that lies
around the middle of the difference table and denote x0 − rh by x − r and the
22|N M P T - U N I T - I I
X Y y 2 y 3 y 4 y 5 y
x−4 y−4
x1 y1 y0 2 y −1 3 y −2 4 y−3 5 y −4
x2 y2 y1 2 y0 3 y −1 4 y−2 5 y −3
x3 y3 y2 2 y1 3 y0 4 y −1 5 y −2
x4 y4 y3 2 y2 3 y1 4 y0 5 y −1
By using the expressions (1) and (2), we now obtain two versions of the following
Newton’s forward interpolation formula
p ( p − 1) 2 p ( p − 1)( p − 2 ) 3
y p = [ y0 + p ( y0 ) +
2!
( y0 ) +
3!
y0
p ( p − 1)( p − 2 )( p − 3) 4
+ ( 3)
y0 + − − −−] →-----------------3
4!
23|N M P T - U N I T - I I
Here y p is the value of y at x = x p = x0 + ph ,P= (x-x0 )/h
p ( p − 1) 2 p ( p − 1)( p − 2 ) 3
y p = [ y 0 + p ( y 0 ) +
2!
( y −1 + 3 y −1 ) +
3!
y −1
p ( p − 1)( p − 2 )( p − 3) 4
+ 4 y−1 + y−1 + 5 y−1 + − − −− ]
4!
p ( p − 1) 2 p ( p + 1)( p − 1) 3
y p = [ y 0 + p ( y0 ) +
2!
( y−1 ) +
3!
y−1
p ( p + 1)( p − 1)( p − 2 ) 4
+
4!
( y−1 ) + − − −−]
p ( p − 1) 2 ( p + 1) p ( p − 1) 3 y
y p = [ y 0 + p ( y 0 ) + y−1 + −1
2! 3!
( p + 1)( p − 1) p ( p − 2 ) 4 y + − − −−] →-----------------4
+
4!
( −2 ) ( 4)
y0 = y1/2 , 2 y−1 = 2 y0 , 3 y−1 = 3 y1/2 , 4 y−2 = 4 y0 and so on. Accordingly the formula
p ( p − 1) 2 ( p + 1) p ( p − 1) 3 y
y p = [ y0 + p y1/2 + y0 + 1/2
2! 3!
( p + 1)( p − 1) p ( p − 2 ) 4 y + − − −−] →-----------------5
+ 0 ( 5)
4!
Let us substitute for y0 , y0 , y0 ----- from (1) in the formula (3), thus we obtain
2 3
24|N M P T - U N I T - I I
p ( p − 1) 2 ( p − 1) p ( p − 2 ) 3 y + 4 y +
y p = [ y0 + p ( y−1 + 2 y−1 ) + ( y−1 + 3 y−1 ) + ( −1 −1 )
2! 3!
( p − 1)( p − 2 ) p ( p − 3) 4 y + 5 y + − − −−]
4!
( −1 −1 )
( p + 1) p
( y ) + (
p + 1) p ( p − 1) 3 ( p + 1) p ( p − 1)( p − 2 ) 4 y + − − −−]
= [ y0 + p ( y−1 ) +
2!
2
−1
3!
y−1 +
4!
( −1 )
( p + 1) p 2 y ( p + 1) p ( p − 1)
y p = [ y0 + p ( y−1 ) +
2!
−1 +
3!
( y3
−1 + 4 y−2 )
( p + 1) p ( p − 1)( p − 2 )
+
4!
( 4
y−2 + 5 y−2 ) + − − −−]
y = f ( x ) = a0 ( x − x1 )( x − x2 ) ...... ( x − xn ) + a1 ( x − x0 )( x − x2 ) ......... ( x − xn ) +
a2 ( x − x0 )( x − x1 ) ....... ( x − xn ) + ........ + an ( x − x0 )( x − x1 ) ...... ( x − xn−1 ) → (1)
f ( x0 )
a0 =
( x − x1 )( x0 − x2 ) .... ( x0 − xn )
25|N M P T - U N I T - I I
Putting x = x1 in (1) we get, f ( x1 ) = a1 ( x − x0 )( x1 − x2 ) − − − − ( x1 − xn )
f ( x1 )
a1 =
( x1 − x0 )( x1 − x2 ) .... ( x1 − xn )
f ( x2 )
a2 =
( x2 − x0 )( x2 − x1 ) ...... ( x2 − xn )
f ( xn )
get an =
( xn − x0 )( xn − x1 ) − − − − ( xn − xn−1 )
f ( x) =
( x − x1 )( x − x2 ) ....... ( x − xn ) f x + ( x − x0 )( x − x2 ) ..... ( x − xn )
( )
( x0 − x1 )( x0 − x2 ) ......... ( x0 − xn ) 0 ( x1 − x0 )( x1 − x2 ) .... ( x1 − xn )
f ( x1 ) +
( x − x0 )( x − x1 )( x − x2 ) ..... ( x − xn ) + ..... f x + ( x − x0 )( x − x1 ) ..... ( x − xn−1 ) f x
( 2) ( )
( x2 − x0 )( x2 − x1 ) ...... ( x2 − xn ) ( xn − x1 )( xn − x2 ) ..... ( xn − xn−1 ) n
Examples:-
x 0 1 2 4 5 6
f ( x) 1 14 15 5 6 19
Sol. Given x0 = 0, x1 = 1, x2 = 2, x3 = 4, x5 = 6, x4 = 5
f ( x0 ) = 1, f ( x1 ) = 14, f ( x2 ) = 15, f ( x3 ) = 5, f ( x4 ) = 6, f ( x5 ) = 19
26|N M P T - U N I T - I I
f ( x) =
( x − x1 )( x − x2 )( x − x3 )( x − x4 )( x − x5 ) f x
( )
( x0 − x1 )( x0 − x2 )( x0 − x3 )( x0 − x4 )( x0 − x5 ) 0
( x − x0 )( x − x2 )( x − x3 )( x − x4 )( x − x5 ) f x
+ ( )
( x1 − x0 )( x1 − x2 )( x1 − x3 )( x1 − x4 )( x1 − x5 ) 1
( x − x0 )( x − x1 )( x − x3 )( x − x4 )( x − x5 ) f x
+ ( )
( x2 − x0 )( x2 − x1 )( x2 − x3 )( x2 − x4 )( x2 − x5 ) 2
−−−−−−−−−−−−−−−−−−−−
−−−−−−−−−−−−−−−−−−−−
( x − x0 )( x − x1 ) ( x − x2 )( x − x3 )( x − x4 ) f x
( )
( x5 − x0 )( x5 − x1 )( x5 − x2 )( x5 − x3 )( x5 − x4 ) 5
Here x = 3 then
f ( 3) =
( 3 − 1)( 3 − 2 )( 3 − 4 )( 3 − 5 )( 3 − 6 ) 1 +
( 0 − 1)( 0 − 2 )( 0 − 4 )( 0 − 5 )( 0 − 6 )
( 3 − 0 )( 3 − 2 )( 3 − 4 )( 3 − 5 )( 3 − 6 ) 14 +
(1 − 0 )(1 − 2 )(1 − 4 )(1 − 5 )(1 − 6 )
( 3 − 0 )( 3 − 1)( 3 − 4 )( 3 − 5 )( 3 − 6 ) 15 +
( 2 − 0 )( 2 − 1)( 2 − 4 )( 2 − 5 )( 2 − 6 )
( 3 − 0 )( 3 − 1)( 3 − 2 )( 3 − 5 )( 3 − 6 ) 5 +
( 4 − 0 )( 4 − 1)( 4 − 2 )( 4 − 5 )( 4 − 6 )
( 3 − 0 )( 3 − 1)( 3 − 2 )( 3 − 4 )( 3 − 6 ) 6 +
( 5 − 0 )( 5 − 1)( 5 − 2 )( 5 − 4 )( 5 − 6 )
( 3 − 0 )( 3 − 1)( 3 − 2 )( 3 − 4 )( 3 − 5) 19
( 6 − 0 )( 6 − 1)( 6 − 2 )( 6 − 4 )( 6 − 5)
12 18 36 36 18 12
= − 14 + 15 + 5 − 6 + 19
240 60 48 48 60 40
= 10
f(3)=10
27|N M P T - U N I T - I I
2. Find f ( 3.5 ) using Lagrange method of 2nd and 3rd order degree polynomials.
x1 2 3 4
f ( x) 1 2 9 28
n
f ( x ) = f ( xk )
( x − x0 ) ....... ( x − xk −1 )( x − xk +1 )( x − xn )
k =0 ( xk − x0 ) ....... ( xk − xk −1 ) ....... ( xk − xn )
f ( x) =
( x − x1 )( x − x2 )( x − x3 ) f x +
( )
( x0 − x1 )( x0 − x2 )( x0 − x3 ) 0
( x − x0 )( x − x2 )( x − x3 ) f x +
( )
( x1 − x0 )( x1 − x2 )( x1 − x3 ) 1
( x − x0 )( x − x1 )( x − x3 ) f x +
( )
( x2 − x0 )( x2 − x1 )( x2 − x3 ) 2
( x − x0 )( x − x1 )( x − x2 ) f x +
( )
( x3 − x0 )( x3 − x1 )( x3 − x2 ) 3
f ( 3.5) =
( 3.5 − 2 )( 3.5 − 3)( 3.5 − 4 ) 1 + ( 3.5 − 1)( 3.5 − 3)( 3.5 − 4 ) 2 +
() ( )
(1 − 2 )(1 − 3)(1 − 4 ) ( 2 − 1)( 2 − 3)( 2 − 4 )
=16.625
f ( x) =
( x − 2 )( x − 3)( x − 4 ) ( x − 1)( x − 3)( x − 4 )
(1) + ( 2)
−6 2
( x − 1)( x − 2 )( x − 4 ) 9 + ( x − 1)( x − 2 )( x − 3) 28
+ ( ) ( )
( −2 ) 6
(x 2
− 5x + 6) ( x − 4)
+ ( x − 4 x + 3) ( x − 4 )
(x 2
− 3x + 2 ) (x 2
− 3x + 2 )
= 2
+ ( x − 4 )( 9 ) + ( x − 3)( 28)
−6 −2 6
28|N M P T - U N I T - I I
x3 − 9 x 2 + 26 x − 24 3 x3 − 7 x 2 + 14 x − 8 x3 − 6 x 2 + 11x − 6
= + x − 8 x + 9 x − 12 +
2
(9) + ( 28)
−6 −2 6
− x3 + 9 x 2 − 26 x + 24 + 6 x3 − 48 x 2 + 114 x − 72 − 27 x3 + 189 x 2 − 378 x + 216 + 308 x + 28 x3 − 168 x 2 − 168
=
6
6 x3 − 18 x 2 + 18 x
= f ( x ) = x3 − 3x 2 + 3x
6
1. Find y(25), given that y20 = 24,y24 = 32, y28 = 35 ,y32 = 40 using Gauss forward
difference formula :
Solution: Given
X
20 24 28 32
Y 24 32 35 40
By Gauss Forward difference formula
p ( p − 1) 2 ( p + 1) p ( p − 1) 3 y
y p = [ y 0 + p ( y 0 ) + y−1 + −1
2! 3!
( p + 1)( p − 1) p ( p − 2 ) 4 y + − − −−] → 4
+
4!
( −2 ) ( )
X Y y 2 y 3 y
20=x-1 24=y-1
29|N M P T - U N I T - I I
By gauss forward interpolation Formula
0.25)(0.25−1) (0.25+1)(0.25)(0.25−1)
We get y(25) = 32 +0.25(3) + ( )(−5) + (7) = 32 +0.75
2 6
Y(25) = 32.945.
2. Example:
Use Gauss Backward interpolation formula to find f(32) given that f(25) = 0.2707,
f(30) = 0.3027, f(35) =0 .3386 , f(40) =0 .3794.
X Y y 2 y 3 y
25=x-2 0.2707=y-2
y−1 2 y −1
= 0.0359, 3 y −2
= 0.0049, = 0.0010, xp = 32 p = (xp- x0 )/h = (32-35)/5 = -0.6
( p + 1) p 2 y ( p + 1) p ( p − 1)
y p = [ y0 + p ( y−1 ) +
2!
−1 +
3!
( y
3
−1 + 4 y−2 )
( p + 1) p ( p − 1)( p − 2 )
+
4!
( 4
y−2 + 5 y−2 ) + − − −−]
30|N M P T - U N I T - I I
2.5 Stirling’s Formula:
p ( p − 1) 2 ( p + 1) p ( p − 1) 3 y
y p = [ y 0 + p ( y 0 ) + y−1 + −1
2! 3!
( p + 1)( p − 1) p ( p − 2 ) 4 y + − − −−] → 4
+
4!
( −2 ) ( )
( p + 1) p 2 y ( p + 1) p ( p − 1)
y p = [ y0 + p ( y−1 ) +
2!
−1 +
3!
( y3
−1 + 4 y−2 )
( p + 1) p ( p − 1)( p − 2 )
+ ( 4
y−2 + 5 y−2 ) + − − −−]
4! ----(5)
𝑋−𝑋0
Y=f(x) is a function with data (xi, yi) with P= , where h=x1-x0 then Bessel’s formula is
ℎ
defined as follows
1
𝑃(𝑃−1) ∆2 𝑌0+∆2 𝑌−1 (𝑃− )𝑃(𝑃−1) 𝑃(𝑃−1)(𝑃+1)(𝑃−2) ∆4 𝑌−2+∆4 𝑌−1
Y(X)= Y0+P∆𝑌0 + [ ]+ 2
∆3 Y-1 + [ ]+−−−
2! 2 3! 4! 2
Examples:
31|N M P T - U N I T - I I
𝑋−𝑋0 1.22−1.2
Sol. Chose X0=1.2 is origin and length h=0.1 and P= = =0.2
ℎ 0.1
Next we construct central difference table by using above data and evaluate required
value by Stirling’s formula
X Y y 2 y 3 y 4 y
x 0 5 10 15 20 25 30
F(x) 0 0.0875 0.1763 0.2679 0.364 0.4663 0.5774
Examples:
𝑥−𝑥0 1.95−2.0
Sol. Choose the origin at X0 =2.0, given h=0.1 and P= = =-0.5
ℎ 0.1
Next by using Bessel’s formula and central difference table we can evaluate the required
solution
32|N M P T - U N I T - I I
X Y y 2 y 3 y 4 y 5 y
x3 =2.3 y3 =4.491 y2 =0.494 2 y1 =-0.04 3 y0 =-0.502 4 y−1 =-1 5 y−2 =-1.503
(−0.5)(−0.5−1)(−0.036+0.462) (−0.5−0.5)(−0.5)(−0.5−1)(−0.5−2)(0.503−1)
Y(1.95) = 3.391+(-0.5)(0.072) + +
2.2 24.2
Y(1.95) = 3.3629
9. Practice Quiz
a.
( p + 1) p 2 y ( p + 1) p ( p − 1)
y p = [ y0 + p ( y−1 ) +
2!
−1 +
3!
( y
3
−1 + 4 y−2 )
( p + 1) p ( p − 1)( p − 2 )
+
4!
( 4
y−2 + 5 y−2 ) + − − −−]
b. y+y0
33|N M P T - U N I T - I I
c. y0
d. None
a. Newton formula
b. Gauss formula
c. Lagrange’s formula
d. Bessel’s formula
a.∆
b. ∇
c. ∪
1
yr = yr +1/2 + yr −1/2
d. 2
a. ∆= 𝐸
b. ∇= 𝐸
c. ∆= 𝐸 − 1
d. ∆= 𝐸 + 1
x 0 1 2 3 4
Y 1 3 9 - 81
34|N M P T - U N I T - I I
a. 10
b. 19
c. 27
d. 0
a. 1 − E −1
b. E1/2 − E −1/2
c. =
2
( E + E −1/2 )
1 1/2
1
d. 2 1 + 2
4
a. 1 − E −1
b. E − E
1/2 −1/2
c. =
2
( E + E −1/2 )
1 1/2
1
d. 2 1 + 2
4
−1
a. 1 − E
b. E − E
1/2 −1/2
c. = ( E + E −1/2 )
1 1/2
2
35|N M P T - U N I T - I I
1
d. 2 1 + 2
4
a. 1 − E −1
b. E1/2 − E −1/2
c. =
2
( E + E −1/2 )
1 1/2
1
d. 2 1 + 2
4
−1
a. 1 − E
b. E1/2 − E −1/2
c. = ( E + E −1/2 )
1 1/2
2
d. E = ehD
10. Assignments
S.No Question BL CO
Using Newton’s forward interpolation formula, and the given table of
values.
1 X 1.1 1.3 1.5 1.7 1.9 1 2
F(X) 0.21 0.69 1.25 1.89 2.61
Obtain the value of 𝑓(𝑥) 𝑤ℎ𝑒𝑛 𝑥 = 1.4
Use Gauss back ward interpolation formula to find 𝑓(32) given
2 1 2
that 𝑓(25) = 0.2707, 𝑓(30) = 0.3027, 𝑓(35) = 0.3386, 𝑓(40) = 0.3794.
Evaluate 𝑓(10) given 𝑓(𝑥) = 168,192,336 𝑎𝑡 𝑥 = 1,7,15 respectively. Use
3 5 2
Lagrange interpolation.
Apply Bessel’s formula to obtain f ( 25) given
4 1 2
f (20 ) = 2854 , f (24 ) = 3162 , f (12 ) = 3544 , f (12 ) = 3992 .
Apply Stirling’s formula to obtain f (35) given
5 1 2
f (20 ) = 512 , f (30 ) = 439 , f (40 ) = 346 , f (50 ) = 243 .
36|N M P T - U N I T - I I
11. Part A- Question & Answers
S.No Question& Answers BL CO
Distinguish between interpolation and extrapolation
Sol. Interpolation: It is the estimation for some such values 4
1 which lie inside the given Values. 2
Extrapolation: It is the estimation for some such values
which lie outside the given Values.
Write relation between E and .
Sol. f ( x) = f ( x + h) − f ( x) Forward Definition
2 1 2
= Ef ( x) − f ( x) Shift Definition
= ( E − 1) f ( x)
Prove that (1 + )(1 − ) = 1
3 Sol. We know that (1 + ) = E , (1 − ) = E −1 5 2
−1
(1 + )(1 − ) = EE =1
−1
Evaluate tan x
Sol. tan −1 x = tan −1 ( x + h) − tan −1 x
4 5 2
x+h−x
−1 h
= tan = tan −1
1 + ( x + h) x 1 + x + hx
2
Evaluate e x if h=1.
Sol. We know that e x = e x + h − e x
5 5 2
= e x +1 − e x
= (e − 1)e x
Evaluate 10 (1 − ax)(1 − bx 2 )(1 − cx 3 )(1 − dx 4 ) .
Sol. Let f ( x) = 10 (1 − ax)(1 − bx 2 )(1 − cx 3 )(1 − dx 4 )
6 f(x) is a polynomial of degree 10 and the coefficient of x10 is 5 2
abcd.
10 (1 − ax)(1 − bx 2 )(1 − cx 3 )(1 − dx 4 ) = abcd10 x10 = abcd 10! .
Write Newton-Gregory forward interpolation formula.
Sol.
7 1 2
p( p − 1) 2 p( p − 1)( p − 2) 3
y = y 0 + py 0 + y0 + y0 + − − − − − − − −
2! 3!
Write Newton-Gregory backward interpolation formula.
Sol.
8 1 2
p( p + 1) 2 p( p + 1)( p + 2) 3
y = y n + py n + yn + yn + − − − − − − − − −
2! 3!
State Langrage’s interpolation formula.
Sol. Let x1,x2,x3-------------xn be the values of x which are not equally
9 1 2
spaced and y1,y2,y3------yn be the Corresponding values of y.
Thus Lagrange’s interpolation formula is
37|N M P T - U N I T - I I
( x − x 2 )( x − x3 ) − − − −( x − x n )
y= y1 +
( x1 − x 2 )( x1 − x3 ) − − − −( x1 − x n )
( x − x1 )( x − x3 ) − − − −( x − x n )
y 2 + --------+
( x2 − x1 )( x 2 − x3 ) − − − −( x 2 − x n )
( x − x1 )( x − x 2 ) − − − −( x − xn −1 )
yn .
( xn − x1 )( x n − x 2 ) − − − −( x n − x n −1 )
Write Stirling’s Formula
∆𝑌−1+∆𝑌0 𝑃2 [𝑃(𝑃 2 −1)]
10 Sol. Y(x) = y0 + P [ ] + 2 ∆2 Y-1 + 1 2
2 3!
∆3 𝑌−2+∆3 𝑌−1 𝑃 2 (𝑃 2 −1)
[ ]+ ∆ 𝑌 -2 +---∞
4
2 4!
38|N M P T - U N I T - I I
A Apply Stirling’s formula to obtain f (35) given
10 f (20 ) = 512 , f (30 ) = 439 , f (40 ) = 346 , f (50 ) = 243 . 1 2
Reference Books:
1. B.V.Ramana, “Higher Engineering Mathematics”, Mc Graw Hill publishers.
2. Alan Jeffrey, “Advanced Engineering Mathematics”, Elsevier.
39|N M P T - U N I T - I I
COURSE MATERIAL
UNIT 3
COURSE B.TECH
SEMESTER 2-2
2. PREREQUISITES
Students should have knowledge on
1. Students should have knowledge on Numerical Techniques
2. Students should have knowledge on Probability Theory
3. SYLLABUS
UNIT III
Numerical Integration & Solution of Initial value problems to Ordinary
differential equations
Numerical Integration: Trapezoidal rule – Simpson’s 1/3 Rule – Simpson’s
3/8 Rule Numerical solution of Ordinary Differential equations: Solution
by Taylor’s series-Picard’s Method of successive Approximations-
Modified Euler’s Method-Runge-Kutta Methods.
4. COURSE OUTCOMES
After the completion of course, students will be able to
1. Apply numerical methods to solve algebraic and transcendental
equations
2. Derive interpolating polynomials using interpolation formulae
3. Solve differential and integral equations numerically
4. Apply Probability theory to find the chances of happening of
events.
5. Understand various probability distributions and calculate their
statistical constants.
1|N M P T - U N I T - I I I
5. Co-PO / PSO Mapping
NMPT PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 P10 PO11 PO12 PSO1 PSO2
CO1 3 3
CO2 3 3
CO3 3 3
CO4 3 3
CO5 3 3
6. LESSON PLAN
2|N M P T - U N I T - I I I
7. ACTIVITY BASED LEARNING
1. To Solve Ordinary Differential Equations by using Numerical
Techniques
8. LECTURE NOTES
3.1 Numerical Integration
This is the most popular and widely used numerical integration
formula. It forms the basis for a number of numerical integration
methods.
3.2 Trapezodial Rule
𝑥 ℎ
=> ∫𝑥 𝑛 𝑓(𝑥) 𝑑𝑥 = 2 [𝑆𝑢𝑚 𝑜𝑓 𝑓𝑖𝑟𝑠𝑡 𝑎𝑛𝑑 𝑙𝑎𝑠𝑡 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠 + 2 ×
0
𝑇ℎ𝑒 𝑟𝑒𝑚𝑎𝑖𝑛𝑖𝑛𝑔 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠]
First divide the interval [x0 , xn ] into n sub-intervals with the length of
interval h, then substitute all values of y and simply which gives the
𝑥
value of ∫𝑥 𝑛 𝑓(𝑥) 𝑑𝑥
0
Problems
1
1. Evaluate ∫0 x 3 dx with five sub-intervals by Trapezodial rule
b−a 1−0
Sol: Here a = 0, b = 1, n = 5 and h = n
= 5
= 0.2
Trapezodial rule
𝑥𝑛 ℎ
∫𝑥0 𝑓(𝑥) 𝑑𝑥 = 2 [(𝑦0 + 𝑦5 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 )]
1 0.2
∫0 x 3 dx = 2
[(0 + 1) + 2(0.008 + 0.064 + 0.216 + 0.512)]
= 0.26
3|N M P T - U N I T - I I I
𝜋
2. Solve ∫0 𝑡 sin 𝑡 𝑑𝑡 using the Trapezodial rule
π
Sol: Divide the interval [0, π] into 6 parts each of width h = 6
𝜋 2𝜋 3𝜋 4𝜋 5𝜋
t 0 𝜋
6 6 6 6 6
Y=t sin t 0 0.2618 0.9069 1.5708 1.8138 1.309 0
Trapezodial rule
𝑛𝑥 ℎ
∫𝑥0 𝑓(𝑥) 𝑑𝑥 = 2 [(𝑦0 + 𝑦5 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 )]
1 π
∫0 x 3 dx = 12 [(0 + 0) + 2(0.2618 + 0.9069 + 1.5708 + 1.8138 + 1.309)]
=3.07
3.3 Simpson’s 1/3 Rule:
This is another popular method. Here the function f(x) is
approximated by a second order polynomial
Then
𝑥𝑛
ℎ
∫ 𝑓(𝑥) 𝑑𝑥 = [(𝑦 + 𝑦𝑛 ) + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ ⋯ + 𝑦𝑛−1 )
3 0
𝑥0
+ 2(𝑦2 + 𝑦4 + 𝑦6 + ⋯ ⋯ + 𝑦𝑛−2 )]
First divide the interval [x0 , xn ] into n(even) sub-intervals with the
length of interval h, then substitute all values of y and simply which
𝑥
gives the value of ∫𝑥 𝑛 𝑓(𝑥) 𝑑𝑥.
0
21
1. Find the value of ∫1 x dx by Simpson’s 1/3 rule.
Sol: Divide the interval [1, 2] into 8 parts each of width h = 0.125
1
The values of f(x) = x are given below
4|N M P T - U N I T - I I I
Then by Simpsons 1/3 rule
𝑥𝑛
ℎ
∫ 𝑓(𝑥) 𝑑𝑥 = [(𝑦 + 𝑦8 ) + 4(𝑦1 + 𝑦3 + 𝑦5 + 𝑦7 ) + 2(𝑦2 + 𝑦4 + 𝑦6 )]
3 0
𝑥0
2
1 0.125
∫ 𝑑𝑥 = [(1 + 0.5) + 4(0.8888 + 0.7272 + 0.6153 + 0.5333)
𝑥 3
1
+ 2(0.8 + 0.6666 + 0.5714)]
= 0.6931
6 1
2. Evaluate ∫0 dx by Simpson’s 1/3 rule.
1+x
x 0 1 2 3 4 5 6
1
Y=f(x) = 1+x 1 0.5 0.3333 0.25 0.2 0.1666 0.1428
=1.9659
3.4 Simpson’s 3/8 Rule:
This is another popular method. Here the function f(x) is
approximated by a second order polynomial
Then
𝑥𝑛
3ℎ
∫ 𝑓(𝑥) 𝑑𝑥 = [(𝑦0 + 𝑦𝑛 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + ⋯ ⋯ + 𝑦𝑛−1 )
8
𝑥0
+ 2(𝑦3 + 𝑦6 + 𝑦9 + ⋯ ⋯ + 𝑦𝑛−2 )]
5|N M P T - U N I T - I I I
First divide the interval [x0 , xn ] into n(even) sub-intervals with the
length of interval h, then substitute all values of y and simply which
𝑥
gives the value of ∫𝑥 𝑛 𝑓(𝑥) 𝑑𝑥.
0
6 1
1. Evaluate ∫0 1+x2 dx by Simpson’s 1/3 rule.
x 0 1 2 3 4 5 6
1
Y=f(x) = 1+x2 1 0.5 0.2 0.1 0.0588 0.0385 0.0027
=1.3571
1
2. Evaluate ∫0 √1 + x 4 dx using Simpson’s 3/8 rule
1
Sol: Sol: Divide the interval [0, 1] into 6 parts each of width h = 6
1 2 3 4 5
x 0 1
6 6 6 6 6
6|N M P T - U N I T - I I I
2
1 1
∫ 𝑑𝑥 = [(1 + 1.4142) + 3(1.0004 + 1.0062 + 1.0943 + 1.2175)
𝑥 3
1
+ 2(1.0301)]
=1.0894
The methods will yield the solution in one of the two forms:
7|N M P T - U N I T - I I I
3.4 TAYLOR’S SERIES METHOD
To find the numerical solution of the differential equation
dy
= f ( x, y ) →(1)
dx
With the initial condition y ( x0 ) = y0 →(2)
( x − x0 ) ( x − x0 ) 2 ( x − x0 ) n n
y ( x) = y ( x0 ) +
y ( x0 ) +
y ( x0 ) + ............ + y ( x0 ) →(3)
1 2! n!
In equ3, y ( x0 ) is known from I.C equ2. The remaining coefficients
y( x0 ), y( x0 ),......... y n ( x0 ) etc are obtained by successively differentiating
equ1 and evaluating at x0 . Substituting these values in equ3, y ( x) at
any point can be calculated from equ3. Provided h = x − x0 is small.
x2 xn
y ( x) = y (0) + x. y(0) + y(0) + ...... + y n (0) + ........ →(4)
2! n!
1. Using Taylor’s expansion evaluate the value of y − 2 y = 3e x , y (0) = 0 ,
at a) x = 0.2
b) Compare the numerical solution obtained with exact
solution .
Sol: Given equation can be written as 2 y + 3e x = y, y (0) = 0 x0=0, y0=0
x2 x3 x4 x5
y ( x) = y (0) + xy(0) + y(0) + y(0) + y(0) + y(0) + ....
2! 3! 4! 5!
Substituting the values of y (0), y(0), y(0), y(0),..........
9 2 21 3 45 4 93 5
y ( x) = 0 + 3 x + x + x + x + x + ........
2 6 24 120
9 2 7 3 15 4 31 5
y ( x) = 3 x + x + x + x + x + ........ → equ1
2 2 8 40
Now put x = 0.1 in equ1
9 7 15 31
y (0.1) = 3(0.1) + (0.1) 2 + (0.1)3 + (0.1) 4 + (0.1)5 = 0.34869
2 2 8 40
Now put x = 0.2 in equ1
9 7 15 31
y (0.2) = 3(0.2) + (0.2) 2 + (0.2)3 + (0.2) 4 + (0.2)5 = 0.811244
2 2 8 40
9 7 15 31
y (0.3) = 3(0.3) + (0.3)2 + (0.3)3 + (0.3)4 + (0.3)5 = 1.41657075
2 2 8 40
Analytical Solution:
dy
The exact solution of the equation = 2 y + 3e x with y (0) = 0 can be
dx
found as follows
dy
− 2 y = 3e x Which is a linear in y.
dx
Here P = −2, Q = 3e x
pdx −2 dx
I.F = = = e −24
e e
y = −3e x + ce 2 x where x = 0, y = 0 , 0 = −3 + c c = 3
9|N M P T - U N I T - I I I
y = 3e0.4 − 3e0.2 = 0.811265
put x = 0.3
y = 3e0.6 − 3e0.3 = 1.416577
x2 x3 x4
y ( x) = y (0) + xy(0) + y(0) + y(0) + y(0) + ...
2! 3! 4!
Substituting the values of y (0), y(0), y(0),.....
2 x3 x3
y ( x) = 0 + x(0) + 0 + + 0 + ........ = + (Higher order terms are
3! 3
neglected)
(0.4)3 0.064
y (0.4) = = = 0.02133
3 3
3. Solve y = x − y 2 , y (0) = 1 using Taylor’s series method and compute
y(0.1),y(0.2)
Sol: Given that y = x − y 2 , y (0) = 1
Here y0 = 1 , x0 = 0
10|N M P T - U N I T - I I I
y( x) = x − y 2 , y(0) = 0 − y (0) 2 = 0 − 1 = −1
y( x) = 1 − 2 y. y, y(0) = 1 − 2. y (0) y(0) = 1 − 2( −1) = 3
y( x) = 1 − 2 yy − 2( y) 2 , y(0) = −2. y (0). y(0) − 2.( y(0)) 2 = −6 − 2 = −8
y( x) = −2. y. y − 2. y. y − 4. y. y, y(0) = −2. y (0). y(0) − 6. y(0). y(0) = 16 + 18 = 34
x 1 x 2 11 x3 111
y(x) = y(0) + y (0) + y (0) + y (0) + …..
1! 2! 3!
Substituting the value of y(0), y1(0), y11(0),…..
3 2 8 3 34 4
y(x) = 1 – x + x - x + x +…..
2 6 24
3 2 4 3 17 4
y(x) = 1 – x + x - x + x +….. →(1)
2 3 12
now put x = 0.1 in (1)
3 4 17
y(0.1) = 1 – 0.1 + (0.1)2 + (0.1)3 + (0.1)4 + …..
2 3 12
= 0.91380333 ~ 0.91381
Similarly put x = 0.2 in (1)
3 4 17
y(0.2) = 1 – 0.2 + (0.2)2 - (0.2)3 + (0.2)4 + …..
2 3 12
= 0.8516.
4. Solve y1 = x2 – y, y(0) = 1, using Taylor’s series method and
compute y(0.1), y(0.2), y(0.3) and y(0.4) (correct to 4 decimal
places).
YI(x) = x2 – y, yI(0) = 0 – 1 = -1
y(0.1) = 1 – 0.1 + + - + ….
2 6 24
= 1 – 0.1 + 0.005 + 0.01666 – 0.0000416 -0.905125 ~ 0.9051
(4 decimal places)
Now put x = 0.2 in eq (1),
y(0.2) = 1 – 0.2 + + -
2 6 64
= 1 – 0.2 + 0.02 + 0.001333 – 0.000025
= 1.021333 – 0.200025
= 0.821308 ~ 0.8213 (4 decimals)
Similarly y(0.3) = 0.7492 and y (0.4) = 0.6897 (4 decimal places).
dy
5. Solve -1 = xy and y(0) = 1 using Taylor’s series method and
dx
compute y(0.1).
dy
Sol. Given that - 1 = xy and y(0) = 1
dx
dy
Here = 1 + xy and y0 = 1, x0 = 0.
dx
Differentiating repeatedly w.r.t ‘x’ and evaluating at x0 = 0
yI(x) = 1 + xy, yI(0) = 1+0(1) = 1 .
H.W
Note: We know that the Taylor’s expansion of y(x) about the point x0
in a power of (x – x0)is.
( x − x0 ) I ( x − x0 ) 2 II ( x − x0 )3 III
y(x) = y(x0) + y (x0) + y (x0) + y (x0) + … →(1)
1! 2! 3!
Or
( x − x0 ) I ( x − x0 ) 2 II ( x − x0 )3 III
y(x) = y0 + y0 + y0 + y0 + …..
1! 2! 3!
13|N M P T - U N I T - I I I
If we let x – x0 = h. (i.e. x = x0 + h = x1) we can write the Taylor’s
series as
h I h2 II h3 III h4 IV
y(x) = y(x1) = y0 + y0 + y0 + y0 + y0 + ….
1! 2! 3! 4!
h I h2 II h3 III h IV IV
i.e. y1 = y0 + y0 + y0 + y0 + y0 + ….. →(2)
1! 2! 3! 4!
Similarly expanding y(x) in a Taylor’s series about x = x1. We will
get.
h I h 2 II h3 III h 4 IV
y2 = y1 + y1 + y1 + y1 + y1 + ……. →(3)
1! 2! 3! 4!
Similarly expanding y(x) in a Taylor’s series about x = x2 We will
get.
h I h 2 II h3 III h 4 IV
y3 = y 2 + y2 + y2 + y2 + y2 + …... →(4)
1! 2! 3! 4!
In general, Taylor’s expansion of y(x) at a point x= xn is
h I h 2 II h3 III h 4 IV
yn+1 = yn + yn + yn + yn + yn + ….. →(5)
1! 2! 3! 4!
8. Solve y1 = x-y2, y(0) = 1 using Taylor’s series method and evaluate
y(0.1), y(0.2) by step size h=0.1.
Sol: Given y1 = x – y2 →(1)
and y(0) = 1 →(2)
Here x0 = 0, y0 = 1.
Differentiating (1) w.r.t ‘x’, we get.
yII = 1 – 2yyI →(3)
yIII = -2(y. yII + (yI)2) → (4)
yIV = -2[y. yIII + yI. yII + 2yI. yII] →(5)
14|N M P T - U N I T - I I I
y0IV = -2[3(-1) (3) + (1) (-8)] = -2(-9 -8) = 34.
Take h=0.1
Step1: By Taylor’s series, we have
h I h 2 II h3 III h 4 IV
y1 = y0 + y0 + y0 + y0 + y0 + ….. →(6)
1! 2! 3! 4!
on substituting the values of y0, y0I , y0II , etc in equ (6) we get
15|N M P T - U N I T - I I I
Sol: Given y1 = y2 + x →(1)
and y(0) = 1 →(2)
Here x0 = 0, y0 = 1.
Differentiating (1) w.r.t ‘x’, we get
y II = 2y yI + 1 →(3)
y IV = 2[y y III + yI y II + 2 yI y II ]
= 34
Take h = 0.1.
Step1: By Taylor’s series expansion, we have
h I h 2 II h3 III h 4 IV
y(x1) = y1 = y0 + y0 + y0 + y0 + y0 + …. →(6)
1! 2! 3! 4!
on substituting the values of yo, y0I , y0II etc in (6),we get
16|N M P T - U N I T - I I I
= 12.5831
y1IV = 2y1 y1III + 6 y1I y1II = 2(1.116749) (12.5831) + 6(1.3471283) (4.0088)
= 60.50653
By Taylor’s expansion
h I h 2 II h3 III h 4 IV
y(x2) = y2 = y1 + y1 + y1 + y1 + y1 + ….
1! 2! 3! 4!
y(0.2) = y2 = 1.116749 + (0.1) (1.3471283)
(0.1) 2 (0.1)3 (0.1) 4
+ (4.0088) + (12.5831) + (60.50653)
2 6 24
y2 = 1.116749 + 0.13471283 + 0.020044 + 0.002097 + 0.000252
= 1.27385
y(0.2) = 1.27385
Step3: Let us find y(0.3),we start with (x2,y2) as the starting value.
Here x2 = x1 + h = 0.1 + 0.1 =0.2 and y2 = 1.27385
Putting these values of x2 and y2 in eq (1), (3), (4) and (5),
we get
y2I = y22 + x2 = (1.27385)2 + 0.2 = 1.82269
10. Solve y1= x2 – y, y(0) = 1 using Taylor’s series method and evaluate
y(0.1),y(0.2),y(0.3) and y(0.4) (correct to 4 decimal places)
Sol: Given y1= x2 – y →(1)
and y(0) = 1 →(2)
Here x0 = 0, y0 = 1
Differentiating (1) w.r.t ‘x’, we get
yII = 2x – y1→(3)
yIII = 2- yII →(4)
yIV = -yIII →(5)
put x0 = 0, y0 = 1 in (1),(3),(4) and (5), we get
y0I = x02 - y0 = 0-1 = -1,
18|N M P T - U N I T - I I I
y11 = x12 - y1 = (0.1)2 – 0.905125 = -0.895125
h I h2 II h3 III h 4 IV
y(x2) = y2 = y1 + y1 + y1 + y1 + y1 +….
1! 2! 3! 4!
(0.1) 2
y(0.2) = y2 = 0.905125 + (0.1)(-0.895125) + (1.09125)
2
(0.1)3 (0.1) 4
+ (1.095125) + (-0.904875)+….
6 24
y(0.2) = y2 = 0.905125 – 0.0895125 + 0.00547562 + 0.000150812
= 0.8212351 ~ 0.8212 (4 decimal places)
Step3: Let us find y(0.3), we start with (x2,y2) as the starting value
Here x2 = x1 + h = 0.1+ 0.1 = 0.2 and y2 = 0.8212351
Putting these values of x2 and y2 in (1),(3),(4), and (5) we get
y 12 = x22 - y2 = (0.2)2 – 0.8212351= 0.04 – 0.8212351 = - 0.7812351
Step4: Let us find y(0.4), we start with (x3,y3) as the starting value
19|N M P T - U N I T - I I I
Here x3 = x2 + h = 0.2+ 0.1 = 0.3 and y3 = 0.749150
(0.1) 2 (0.1)3
y(0.4) = y4 = 0. 749150 + (0.1)(-0.65915) + (1.25915) +
2 6
(0.1) 4
(0.74085) + (-0.74085)+….
24
Problems
20|N M P T - U N I T - I I I
𝑑𝑦
1. Find the value of y for x=0.4 by Picard’s method, given that 𝑑𝑥 =
𝑥 2 + 𝑦 2 , 𝑦(0) = 0.
𝑑𝑦
Sol: Given 𝑑𝑥 = 𝑥 2 + 𝑦 2 , 𝑦(0) = 0
x
By Picard’s method y (n) = y0 + ∫x n f(x, y (n−1) ) dx, n = 1, 2, 3, ⋯
0
𝑑𝑦 𝑦−𝑥
Sol: Given 𝑑𝑥 = 𝑦+𝑥 , 𝑦(0) = 1
x x 𝑦−𝑥
By Picard’s method y (n) = y0 + ∫x n f(x, y (n−1) ) dx = y0 + ∫0 dx
0 𝑦+𝑥
y (1) = 1 − x + 2log(1 + x)
x 1−x+2log(1+x)−x
Second approximation is y (2) = 1 + ∫0 dx
1−x+2log(1+x)+x
21|N M P T - U N I T - I I I
Put x=0.1, we get
y1 = y0 + h f(x0,y0) where h = x1 – x0
Similarly at x = x2 , y2 = y1 + h f(x1,y1),
22|N M P T - U N I T - I I I
y(1.5) = 4 = y1
y2 = y1 + h f(x1,y1)
y(2) = 7.875
(II) h = 0.25 x0 = 1,y0 = 2 x1 = 1.25, x2 = 1.50, x3 = 1.75, x4
=2
Taking n = 0 in (1), we have
y1 = y0 + h f(x0,y0)
i.e. y(x1) = y1 = 2 + (0.25) f(1,2) = 2 + (0.25) (3 + 1) = 3=y(1.25)
y(x2) = y2 = y1 + h f(x1,y1)
= 3 + (0.25)[3(1.25)2 + 1]
= 4.42188
y2=y(1.5) = 4.42188
Taking n = 2 in (1), we have
i.e. y(x3) = y3 = y2+h f(x2,y2)
= 4.42188 + (0.25) f(1.5,2)
= 4.42188 + (0.25) [3(1.5)2 + 1]
= 6.35938
y(x4) = y4 = y3 + h f(x3,y3)
y(x4)= 8.90626=y(2)
Note that the difference in values of y(2) in both cases (i.e. when h =
0.5 and when h = 0.25).The accuracy is improved significantly when h
is reduced to 0.25 (Example significantly of the eqn is y = x3 + x and
with this y(2) = y2 = 10
y1 = 1.1 = y(0.1),
y2 = y(0.2) = 1.22
y3 = y(0.3) = 1.362
y1 = x + y
dy/dx-y=x
P=-1,Q=x
I.F.=e^int(Pdx)=e^int(-dx)=e^-x
Sol. Y(I.F.)=int(Q(i.f.)dx+c
Y(e^-x)=int(xe^-x)dx+c=e^-x(-x-1)+c
24|N M P T - U N I T - I I I
Solution y=-x-1+ce^x
1=-0-1+c
C=2
0
X X1=0.1 X2=0.2 X3=0.3
Euler 1 1.22
1.1 1.362
y(numerical)
Linear 1 1.3428
1.11034 1.3997
y(analytical)
dy
5. Given that = xy ,y(0) = 1 determine y(0.1),using Euler’s
dx
method. h =0.1
25|N M P T - U N I T - I I I
dy
Sol: The given differentiating equation is = xy, y(0) = 1 ,a = 0,b=0.1
dx
b−a 0.1
i.e. h = = = 0.02
5 5
Euler’s algorithm is yn+1 = yn + h f(xn,yn) →(1)
From (1) form = 0, we have
y1 = y0 +h f(x0,y0)
= 1 + (0.02) f(0,1)
= 1 + (0.02) (0)
=1
Next we have x1 = x0 + h = 0 + 0.02 = 0.02
From (1), form = 1,we have
y2 = y1 + h f(x1,y1)
= 1 + (0.02) f(0.02,1)
= 1 + (0.02) (0.02)
= 1.0004
Next we have x2 = x1 + h = 0.02 + 0.02 =0.04
From (1), form = 2,we have
y3 = y2 + h f(x2,y2)
= 1.004 + (0.02) (0.04) (1.0004)
= 1.0012
Next we have x3 = x2 + h = 0.04 + 0.02 =0.06
From (1), form = 3,we have
y4 = y3 + h f(x3,y3)
= 1.0012 + (0.02) (0.06) (1.00012)
= 1.0024.
Next we have x4 = x3 + h = 0.06 + 0.02 =0.08
From (1), form = 4,we have
26|N M P T - U N I T - I I I
y5 = y4 + h f(x4,y4)
= 1.0024 + (0.02) (0.08) (1.00024)
= 1.0040.
Next we have x5 = x4 + h = 0.08 + 0.02 =0.1
When x = x5, y~y5
y = 1.0040 when x = 0.1
2y
6. Solve by Euler’s method y1 = given y(1) = 2 and find y(2).
x
dy
7. Given that = 3x2 + y, y(0) = 4. Find y(0.25) and y(0.5) using
dx
Euler’s method
dy
Sol: given = 3x2 + y and y(0) = 4.
dx
Here f(x,y) = 3x2 + y , x0 = 0, y0 = 4
Consider h = 0.25
Euler’s algorithm is yn+1 = yn + h f(xn,yn) →(1)
From (1), for n = 0, we have
y1 = y0 + h f(x0,y0)
= 2 + (0.25)[0 + 4]
=2+1
=3
Next we have x1 = x0 + h = 0 + 0.25 = 0.25
When x = x1, y1~ y
y1 = 3 when x1 = 0.25
From (1), for n = 1, we have
y2 = y1 + h f(x1,y1)
= 3 + (0.25)[3.(0.25)2 + 3]
= 3.7968
Next we have x2 = x1 + h = 0.25 + 0.25 = 0.5
When x = x2, y ~ y2
y = 3.7968 when x = 0.5.
27|N M P T - U N I T - I I I
dy y−x
8. Solve first order differential equation = , y(0) = 1 and
dx y+x
estimate y(0.1) using Euler’s method (5 steps).h=0.02
Ans: 1.0928
dy
9. Use Euler’s method to find approximate value of solution of
dx
= y-x + 5 at x = 2-1 and 2-2with initial contention y(0.2) = 1
( i −1)
It is given by y (i )k +1 = yk + h / 2 f ( xk , yk ) + f ( xk +1 ,1)k +1 , i = 1, 2....., ki = 0,1.....
Working rule :
i)Modified Euler’s method
( i −1)
y (i )k +1 = yk + h / 2 f ( xk , yk ) + f ( xk +1 ,1)k +1 , i = 1, 2....., ki = 0,1.....
ii) When i = 1 y 0 k +1 can be calculated from Euler’s method
( )
We get y1(1) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1(i −1) ……………………… (3)
Taking i=1, 2, 3...k+1 in eqn (3), we get
y1( ) = y0 + h / 2 f ( x0 , y0 ) (By Euler’s method)
0
(
y1(1) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1( 0)
)
(
y1( 2) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1(1)
)
------------------------
( )
y1( k +1) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1( k )
If two successive values of y1( k ) , y1( k +1) are sufficiently close to one
another, we will take the common value as y2 = y ( x2 ) = y ( x1 + h )
28|N M P T - U N I T - I I I
We use the above procedure again
1) using modified Euler’s method find the approximate value of x
when x = 0.3 given that dy / dx = x + y and y ( 0 ) = 1
Here f ( x, y ) = x + y, x0 = 0, and y0 = 1
( )
yk +1(i ) = yk + h / 2 f ( xk + yk ) + f xk +1 , yk +1(i −1) → (1)
( )
yk +1(i ) = y0 + h / 2 f ( x0 + y0 ) + f x1 , y1(i −1) → ( 2 )
when i = 1 in eqn (2)
(
y1(i ) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1( 0)
)
(0)
First apply Euler’s method to calculate y = y1
1
y1( 0) = y0 + h f ( x0 , y0 )
= 1+(0.1)f(0.1)
= 1+(0.1)
= 1.10
(
y1(1) = y0 + 0.1/ 2 f ( x0 , y0 ) + f x1 , y1( 0)
)
= 1+0.1/2[f(0,1) + f(0.1,1.10)
= 1+0.1/2[(0+1)+(0.1+1.10)]
= 1.11
When i=2 in eqn (2)
(
y1( 2) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1(1)
)
29|N M P T - U N I T - I I I
= 1+0.1/2[f(0.1)+f(0.1,1.11)]
= 1 + 0.1/2[(0+1)+(0.1+1.11)]
= 1.1105
(
y1(3) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1( 2)
)
= 1+0.1/2[f(0,1)+f(0.1 , 1.1105)]
= 1+0.1/2[(0+1)+(0.1+1.1105)]
= 1.1105
Since y1( 2) = y1(3)
y1 = 1.1105
( )
y2(i ) = y1 + h / 2 f ( x1 , y1 ) + f x2 , y2( i −1) → ( 3) i = 1,2,3,4,…..
For i = 1
(
y2(1) = y1 + h / 2 f ( x1 , y1 ) + f x2 , y2( 0)
)
y2( ) is to be calculate from Euler’s method
0
y2( ) = y1 + h f ( x1 , y1 )
0
= 1.1105 +0.1/2[0.1+1.1105+0.2+1.2316]
= 1.2426
(
y2( 2) = y1 + h / 2 f ( x1 , y1 ) + f x2 y2(1)
)
= 1.1105 + 0.1/2[f(0.1 , 1.1105) , f(0.2 . 1.2426)]
= 1.2432
( )
y2(3) = y1 + h / 2 f ( x1 , y1 ) + f x2 y2( 2)
= 1.1105+0.1/2[f(0.1,1.1105)+f(0.2 , 1.2432)]
= 1.1105+0.1/2[1.2105+1.4432)]
= 1.1105 + 0.1(1.3268)
= 1.2432
Hence y2 = 1.2432
Step:3
( )
y3(1) = y2 + h / 2 f ( x2 , y2 ) + f x3 , y3(i −1) → ( 4 )
For i = 1 ,
( )
y3(1) = y2 + h / 2 f ( x2 , y2 ) + f x3 , y3( 0)
y3(
0)
is to be evaluated from Euler’s method .
y3( ) = y2 + h f ( x2 , y2 )
0
= 1.2432+(0.1)(1.4432)
= 1.3875
= 1.2432 + 0.1/2[1.4432+1.6875]
31|N M P T - U N I T - I I I
= 1.2432+0.1(1.5654)
= 1.3997
( )
y3( 2) = y2 + h / 2 f ( x2 , y2 ) + f x3 , y3(1)
= 1.2432+0.1/2[1.4432+(0.3+1.3997)]
= 1.4003
( )
y3(3) = y2 + h / 2 f ( x2 , y2 ) + f x3 , y3( 2)
= 1.2432 + 0.1(1.5718)
= 1.4004
( )
y3( 4) = y2 + h / 2 f ( x2 , y2 ) + f x3 , y3(3)
= 1.2432 + 0.1/2[1.4432+1.7004]
= 1.2432+(0.1)(1.5718)
= 1.4004
dy
2 . Find the solution of = x-y , y(0)=1 at x =0.1 , 0.2 ,0.3 , 0.4 and 0.5
dx
. Using modified Euler’s method
dy
Sol . Given = x-y and y(0) = 1
dx
Here f(x,y) = x-y , x0 = 0 and y0 = 1
Consider h = 0.1 so that
x = 0.1 , x2 = 0.2 , x3 =0.3 , x4 = 0.4 and x5 = 0.5
The formula for modified Euler’s method is given by
32|N M P T - U N I T - I I I
yk +1( ) = yk + h / 2 f ( xk , yk ) + fxk +1 , yk +1( → (1)
i i −1)
K
=
0
K=1
K=2
33|N M P T - U N I T - I I I
0.3(i=1) = -0.6371 ½(-0.6371- 0.8371+(0.1)(-
0.4734) 0.555)=0.7816
K =3
K=4
3. Find y(0.1) and y(0.2) using modified Euler’s formula given that
dy/dx=x2-y,y(0)=1
[consider h=0.1,y1=0.90523,y2=0.8214]
34|N M P T - U N I T - I I I
[h=0.1, y1=1.9804, y2=1.9238]
5. Given y1 = x+siny, y(0)=1 compute y(0.2) and y(0.4) with h=0.2 using
modified Euler’s
method
[y1=1.2046, y2=1.4644]
K2 = h (xi+h, yi+k1)
For i= 0,1,2-------
K2 = h (xi+h/2, y0+k1/2)
K3 = h (xi+h, yi+2k2-k1)
For i= 0,1,2-------
K2 = h (xi+h/2, yi+k1/2)
K3 = h (xi+h/2, yi+k2/2)
K4 = h (xi+h, yi+k3)
For i= 0,1,2-------
35|N M P T - U N I T - I I I
dy
1. Using Runge-Kutta method of second order, find y ( 2.5 ) from =
dx
x+ y
x , y(2)=2 , h = 0.25 .
dy x+ y
Sol: Given = , y(2) = 2 .
dx x
x+ y
Here f(x, y) = , x0 = 0 , y0=2 and h = 0.25
x
yi +1 = yi + 1/ 2 ( k1 + k2 ) , k1 − hf ( xi + h, yi + k1 ) , i = 0,1.... → (1)
Step -1:-
1
We have y1 = y0 + ( k1 + k2 )
2
f (x0,y0 )=f(2,2)=2+2/2=2
k2= hf (x0+h,y0+k1)=(0.25)f(2.25,2.5)
=(0.25)(2.25+2.5/2.25)=0.528
y1=y(2.25)=2+1/2(0.5+0.528)
=2.514
Step2:
i=1 in (1)
x1=2.25,y1=2.514,and h=0.25
36|N M P T - U N I T - I I I
y2=y1+1/2(k1+k2)
=(0.25)[2.25+2.514/2.25]=0.5293
=(0.25)[2.5+2.514+0.5293/2.5]
=0.55433
y2 = y (2.5)=2.514+1/2(0.5293+0.55433)
=3.0558
(i)second order (ii)third order (iii)fourth order for the diff eqn
y1+y=0,y(0)=1
f(x,y) = -y, x0 = 0, y0 = 1
x1 = x0+h = 0.1,
x2 = x1+h = 0.2
Second order:
y1 = y0+1/2(k1+k2)
y1=y(0.1)=1+1/2(-0.1-0.09)=1-0.095=0.905
37|N M P T - U N I T - I I I
y =0.905 when x=0.1
Step2:
y2 = y(x2)= y1+1/2(k1+k2)
Where k1 = h f ( x1 , y1 ) =(0.1)f(0.1,0.905)=(0.1)(-0.905)=-0.0905
y2 = y(0.2)=0.905+1/2(-0.0905-0.08145)
Third order
Step1:
y1 = y0 + 1/ 6 ( k1 + 4k2 + k3 )
and k3 = h f((x0+h,y0+2k2-k1)
38|N M P T - U N I T - I I I
Step2:
y2 = y1+1/6(k1+4k2+k3)
and k3 = h f((x1+h,y1+2k2-k1)=(0.1)f(0.2,0.905+2(0.08975)+0.0905= -
0.082355
hence y2 = 0.905+1/6(-0.0905+4(-0.085975)-0.082355)=0.818874
fourth order:
step1:
=-0.090475
Hence y1=1+1/6(-0.1)+2(-0.095)+2(0.09525)-0.090475)
39|N M P T - U N I T - I I I
=1+1/6(-0.570975)+1-0.951625 = 0.9048375
Step2:
y2 = y1+1/6(k1+2k2+2k3+k4)
k4 =h f(x1+h,y1+k3)=(0.1)f(0.2,0.86517)
= -0.08186517
Hence y2 = 0.09048375+1/6(-0.09048375-2(0.08595956)-2(0.08618577)-
0.08186517
=0.9048375-0.0861065
=0.818731
Step1:
40|N M P T - U N I T - I I I
y1=y0+1/6 (k1+2k2+2k3+k4)
k1=hf(x0,y0)=(0.1)f(1,1.5)=(0.1) [12+(1.5)2]=0.325
k2= hf (x0+h/2,y0+k1/2)=(0.1)f(1+0.05,1.5+0.325)=0.3866
and k3=hf((x0+h/2,y0+k2/2)=(0.1)f(1.05,1.5+0.
3866/2)=(0.1)[(1.05)2+(1.6933)2]
=0.39698
k4=hf(x0+h,y0+k3)=(0.1)f(1.0,1.89698)
=0.48085
Hence
1
y1 = 1.5 + 0.325 + 2 ( 0.3866 ) + 2 ( 0.39698 ) + 0.48085
6
= 1.8955
Step2:
y2 = y1+1/6(k1+2k2+2k3+k4)
k1=hf(x1,y1)=(0.1)f(0.1,1.8955)=(0.1) [12+(1.8955)2]=0.48029
and k3=hf((x1+h/2,y1+k2/2)=(0.1)f(1.5,1.8937+0.58743)
=(0.1)[(1.05)2+(1.6933)2]
=0.611715
k4=hf(x1+h,y1+k3)=(0.1)f(1.2,1.8937+0.610728)
=0.77261
41|N M P T - U N I T - I I I
y =2.5043 where x = 0.2
Ans:1.15607
Ans: 2.4214
6. Apply the 4th order R-K method to find y ( 0.2 ) and y ( 0.4 ) for one
dy
equation 10 = x 2 + y 2 , y ( 0 ) = 1 take h = 0.1 Ans. 1.0207, 1.038
dx
7. using R-K method, estimate y(0.2) and y(0.4) for the eqn dy/dx=y2-
x2/ y2+x2,y(0)=1,h=0.2
Ans:1.19598,1.3751
Take h=0.1
x1=0.1, x2=0.2
Step1
y1=y0+1/6 (k1+2k2+2k3+k4)
k2= hf (x0+h/2,y0+k1/2)=(0.1)f(0.05,1.05)=0.11
42|N M P T - U N I T - I I I
and k3=hf((x0+h/2,y0+k2/2)=(0.1)f(0.05,1+0. 11/2)=(0.1)[(0.05)
+(4.0.11/2)]
=0.1105
k4=h f (x0+h,y0+k3)=(0.1)f(0.1,1.1105)=(0.1)[0.1+1.1105]
=0.12105
1
Hence y1 = y ( 0.1) = 1 + ( 0.1 + 0.22 + 0.240 + 0.12105)
6
y = 1.11034
Step2:
y2=y1+1/6(k1+2k2+2k3+k4)
=0.1320857
=0.1326382
k4=h f(x1+h,y1+k3)=(0.1)f(0.2,1.11034+0.1326382)
(0.1)(0.2+1.2429783)=0.1442978
Hence y2=1.11034+1/6(0.121034+0.2641714+0.2652764+0.1442978
=1.11034+0.1324631 =1.242803
43|N M P T - U N I T - I I I
Ans:1.7278
10. Using Runge-kutta method of order 4,compute y(2.5) for the eqn
dy/dx = x+y/x, y(2)=2 [hint h = 0.25(2 steps)]
Ans:3.058
9. Practice Quiz
xn
a)
h
y 0 + 2( y1 + y 2 + − − − − + y n −1 ) + y n
2
b) hy 0 + 2( y1 + y 2 + − − − = y n −1 ) + y n
c)
h
y 0 + ( y1 + y 2 + − − − − − + y n −1 ) + y n
2
d) hy 0 + 3( y1 + y 2 + − − − − − + y n −1 ) + y n
2. To apply Simpson’s 1/3rd and 3/8th rules both the interval must be
divided into minimum of _________ intervals. [c ]
a) 10
b) 12
c) 6
d) 4
a) y =
h
y0 + 4 y1 + y 2
3
b) y =
3h
y0 + 4 y1 + y 2
8
c) y =
4
y0 + 2 y1 + y 2
3
44|N M P T - U N I T - I I I
d) y =
3h
y0 + 2 y1 + y 2
8
4
1
4. To evaluate 1+ x
0
2
dx for h = 1, we take n = [c]
a) 2
b) 3
c) 4
d) 5
1
5. In the case of Simpson’s rule, the number of sub-intervals must be
3
[b ]
a) Small
b) Even
c) Odd
d) Larger
9
6. In Trapezoidal rule, if the interval of f ( x ) dx is divided into 7 equal
2
a) 2
b) ½
c) 1
d) 3/2
x2 x3 x4
a) x + + + + ................
2 3 4
x2 x3 x4
b) x − + − + ................
2 3 4
45|N M P T - U N I T - I I I
x2 x3 x4
c) x + x + + + + ................
2 3 4
d) x − x 2 + x 3 − x 4 + .......... ......
dy
8. If = x + y , y = 1 at x = 1 , using picard method the first
dx
approximation is [ b ]
a) 1 + x
x2
b) 1 + x +
2
c) 1 − x − x
2
d) none.
1
a) y = y 0 + ( K1 + K 2 )
2
K1 + K 2
b) y1 =
2
1
c) y1 = y 0 − ( K1 + K 2 )
2
d) none
a) Taylors series
b) Eulers method
c) Picards
d) none
46|N M P T - U N I T - I I I
10. Assignments
S.No Question BL CO
𝜋
Solve ∫0 𝑡 sin 𝑡 𝑑𝑡 using the Trapezodial rule
1 3 3
1
2 Evaluate ∫0 √1 + x 4 dx using Simpson’s 3/8 rule 5 3
Solve y1= x2 – y, y(0) = 1 using Taylor’s series method and evaluate
3 3 3
y(0.1),y(0.2),y(0.3) and y(0.4) (correct to 4 decimal places)
dy
Find the solution of = x-y , y(0)=1 at x =0.1 , 0.2 ,0.3 , 0.4 and 0.5 .
4 dx 1 3
Using modified Euler’s method
Apply the 4th order R-K method to find an approximate value of y
5 3 3
when x=1.2 in steps of 0.1,given that y1 = x2+y2,y (1)=1.5
method
iii) K=0, 1……… gives number of iteration. i = 1, 2...
(
We get y1(1) = y0 + h / 2 f ( x0 , y0 ) + f x1 , y1(i −1)
)
State Euler’s formula
It is the simplest one-step method and it is less
accurate. Hence it has a limited application.
dy
Consider the differential equation = f(x,y) →(1)
dx
6 1 3
With y(x0) = y0→(2)
yn+1 = yn + h f(xn,yn)
K3 = h (xi+h/2, yi+k2/2)
K4 = h (xi+h, yi+k3)
Explain Picard’s method
8
C
dy
consider the differential equation = f(x, y) 5 3
dx
48|N M P T - U N I T - I I I
Given that y = y0 for x = x0
x
Then y (n) = y0 + ∫x n f(x, y (n−1) ) dx, n = 1, 2, 3, ⋯
0
dy
Solve the equation = x 2 + y 2 for x = 0.4 given that
dx
y = 0 when x = 0 by Taylor’s series method
dy
Sol: Given that = x 2 + y 2 and y = 0 when x = 0 i.e.
dx
y (0) = 0
Here y0 = 0 , x0 = 0
x2 x3 x4
y ( x) = y (0) + xy(0) + y(0) + y(0) + y(0) + ...
2! 3! 4!
Substituting the values of y (0), y(0), y(0),.....
2 x3 x3
y ( x) = 0 + x(0) + 0 + + 0 + ........ = + (Higher order
3! 3
terms are neglected)
(0.4)3 0.064
y (0.4) = = = 0.02133
3 3
x
By Picard’s method y (n) = y0 + ∫x n f(x, y (n−1) ) dx = y0 +
0
49|N M P T - U N I T - I I I
x 𝑦−𝑥
∫0 dx
𝑦+𝑥
y (1) = 1 − x + 2log(1 + x)
6 1
2 Evaluate ∫0 dx by Simpson’s 1/3 rule 5 3
1+x
1
3 Evaluate ∫0 √1 + x 4 dx using Simpson’s 3/8 rule 5 3
5 dy 5 3
that = xy ,y(0) = 1, h =0.1
dx
50|N M P T - U N I T - I I I
𝑑𝑦
method, given that 𝑑𝑥 = 𝑥 2 + 𝑦 2 , 𝑦(0) = 0.
dy
Find the solution of = x-y , y(0)=1 at x =0.1 ,
dx
7 0.2 ,0.3 , 0.4 and 0.5 . Using modified Euler’s 1 3
method
dy y−x
Solve first order differential equation = ,
dx y+x
8 3 3
y(0) = 1 and estimate y(0.1) using Euler’s method
(5 steps).h=0.02
51|N M P T - U N I T - I I I
16. Prescribed Text Books and Reference Books:
Text Books:
1. B. S. Grewal, Higher Engineering Mathematics, 44/e, Khanna
Publishers, 2017.
2. Erwin Kreyszig, Advanced Engineering Mathematics, 10/e, John Wiley
& Sons, 2011.
3. Ronald E. Walpole “Probability and Statistics for Engineers and
Scientists”, PNIE
Reference Books:
1. B.V.Ramana, “Higher Engineering Mathematics”, Mc Graw Hill
publishers.
2. Alan Jeffrey, “Advanced Engineering Mathematics”, Elsevier.
52|N M P T - U N I T - I I I
COURSE MATERIAL
UNIT IV
COURSE II B. TECH
SEMESTER 2-2
BTECH_EEE/ME-SEM 22
TABLE OF CONTENTS – UNIT IV
S. NO CONTENTS PAGE
1 COURSE OBJECTIVES 1
2 PREREQUISITES 1
3 SYLLABUS 1
4 COURSE OUTCOMES 1
5 CO - PO/PSO MAPPING 1
6 LESSON PLAN 2
7 ACTIVITY BASED LEARNING 2
8 LECTURE NOTES
4.1 Introduction and Basic concepts of Probability 3
4.2 Axiomatic Definition 6
4.3 Addition theorem on Probability 14
4.4 Conditional probability 17
4.5 Multiplication law of Probability 17
4.6 Bayes Theorem 23
4.7 Random Variables 30
9 PRACTICE QUIZ 36
10 ASSIGNMENTS 38
11 PART A QUESTIONS & ANSWERS (2 MARKS QUESTIONS) 39
12 PART B QUESTIONS 41
13 PRESCRIBED TEXT BOOKS & REFERENCE BOOKS 42
BTECH_EEE/ME-SEM 22
1. COURSE OBJECTIVES
2. PREREQUISITES
Students should have knowledge on
• Basic Mathematics & Calculus
• Permutations and combinations
3. SYLLABUS
UNIT IV: Probability theory
Probability, probability axioms, addition law and multiplicative law of probability,
conditional probability, Baye’s theorem, random variables (discrete and continuous),
probability density functions, properties, mathematical expectation.
4. COURSE OUTCOMES
After the completion of course, students will be able to
1. Apply numerical methods to solve algebraic and transcendental equations
2. Derive interpolating polynomials using interpolation formulae
3. Solve differential and integral equations numerically
4. Apply Probability theory to find the chances of happening of events.
5. Understand various probability distributions and calculate their statistical constants.
NMPT PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 P10 PO11 PO12 PSO1 PSO2
CO1 3 3
CO2 3 3
CO3 3 3
CO4 3 3
CO5 3 3
1|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
6. LESSON PLAN
Lecture
Weeks Topics to be covered References
No.
T1, R1
9 Introduction of Random Variables
T1, R1
12 Problems on Discrete Random Variables
2|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
8. LECTURE NOTES
4.1 INTRODUCTION
Suppose a coin is tossed. The toss may result in the occurrence of 'Head' or in the
occurrence of 'Tail'. Here, the chances of head and tail are equal. In other words, the
probability of occurrence of head is ½ and the probability of occurrence of tail is ½
Thus, Probability is a numerical measure which indicates the chance of occurrence.
RANDOM EXPERIMENT:
A deterministic experiment, when repeated under the same conditions, results in the
same outcome. It has a unique outcome.
Random experiment is an experiment which may not result in the same outcome when
repeated under the same conditions. It is an experiment which does not have a unique
outcome.
For example:
SAMPLE SPACE
The set of all possible outcomes of a random experiment is the Sample space.
The sample space is denoted by S. The outcomes of the random experiment (elements
of the sample space) are called sample points or outcomes or cases.
A sample space with finite number of outcomes is a finite sample space. A sample
space with infinite number of outcomes is an infinite sample space.
3|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
Ex1. While throwing a die, the sample space is
Ex3. Consider the toss of a coin successively until a head is obtained. Let the number
EVENT:
Even is a subnet of the sample space. Events are denoted by A, B, C etc.
• An event which does not contains any outcome is a null event (impossible event).
It is denoted by Φ.
• An event which has only one outcome is an ELEMENTARY EVENT OR SIMPLEEVENT.
• An event which has more than outcome is a compound event.
• An event which contains all the outcomes is equal to the sample and it is called
sure event or certain event.
Ex.1. While throwing a die, A= {2,4,6} is an event. It is the event that the throw results in
an even number. Here, A is a compound event.
Ex.2. While tossing two coins, A={TT} is an event. It is the event that the toss results in
two tails. Here, A is a simple event.
The outcomes which belong to an event are said to be favourable to that event. The
event happens whenever the experiment results in a favourable outcome. Otherwise,
the event does not happen
While throwing a die, the event A = {2,4,6} has three favourable outcomes, namely,
2,4 and 6. Where the throw results in 2,4 or 6, event A occurs.
COMPLEMENT OF AN EVENT:
Let A be an event. Then, Complement of A is the event of non-occurrence of A. It
is the event constituted by the outcomes which are not favourable to A. The
complement of A is denoted by A or Ā or Ac.
4|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
While throwing a die, If A = {2,4,6}, its complement is A = {1,3,5}. Here, A is the
event that throw result in an even number. A is the event that throw does not result in
an even number. That is, A is the event that throw result in an odd number.
5|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
Ex.1. While throwing a die, the six outcomes together are exhaustive. But here, if any
one of these outcomes is left out, the remaining five outcomes are not exhaustive.
Ex.2. While throwing a die, events A = {2,4, 6}, B = {3, 6} and C = {1,5,6} together are
exhaustive.
CLASSICAL DEFINITION:
Let a random experiment have ‘n’ equally likely, mutually exclusive and
exhaustive outcomes. Let ‘m’ of these outcomes be favorable to an event A. Then,
probability of A is —
Number of favourable outcomes m
P(A) = =
Total number of outcomes n
(i) The outcomes are equally likely, mutually exclusive and exhaustive.
Consider a random experiment with sample space S. Associated with this random
experiment, many events can be defined. Let for every event A, a real number P(A) be
assigned. Then, P(A) is the probability of event A, if the following axioms are satisfied.
Axiom 1: P(A) ≥ 0
Axiom 2: P(S) = 1, S being the sure event or Sample space.
Axiom 3: For two mutually exclusive events A and B,
P(A∪B) = P(A) + P(B)
Note that the third axiom can be generalised for any number of mutually exclusive
events.
6|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
RESULT 1:
P(A) is a value between 0 and 1. That is, 0 < P(A) < 1.
Proof:
Let a random experiment have ‘n’ equally likely, mutually exclusive and
exhaustive outcomes. Let ‘m’ of these outcomes be favourable to event A.
m
Then P(A) = = n
Here, the least possible value of m is 0. Also, the highest possible value of m is n.
And so, 0 m n.
0 𝑚 𝑛
≤ ≤𝑛
𝑛 𝑛
⇒ 0 ≤ 𝑝(𝐴) ≤ 1
Thus, P(A) is a value between 0 and 1.
RESULT 2:
P(A') = 1 - P(A). That is, P(A) = 1 - P(A').
Proof:
In a random experiment with n equally likely, mutually exclusive and exhaustive
outcomes, if m outcomes are favourable to event A, the remaining (n-m) outcomes
are favourable to the complementary event A'. Therefore,
𝑛−𝑚 𝑛 𝑚
P(A1) = =𝑛− = 1 − 𝑃(𝐴)
𝑛 𝑛
7|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
(ii) Event B has 3 favourable outcomes, namely, 2, 4 and 6.
∴P [even number] = P(B) = m/n = 3/6= ½
(iii) Event C has 2 favourable outcomes, namely, 3 and 6
P [multiple of 3] = P(C)= m/n = 2/6 = 1/3
2. A bag contains 3 white, 4 red and 2 green balls. One ball is selected at random
from the bag. Find the probability that the selected ball is
(i) white (ii) non-white (iii) white or green.
Sol: The bag totally has 9 balls. Since the ball drawn can be any one of them, there
are 9 equally likely, mutually exclusive and exhaustive outcomes. Let events A, B
and C be
A: selected ball is white
B: selected ball is non-white
C: selected ball is white or green
(i) There are 3 white balls in the bag. Therefore, out of the 9 outcomes, 3 are
favourable to event A.
∴P [white ball] = P(A) = 3/9 = 1/3
(ii) Event B is the complement of event A. Therefore,
∴ P (non-white ball) = P(B) = 1 - P(A) = 1 – 1/3 = 2/3
(iii) There are 3 white and 2 green balls in the bag. Therefore, out of 9 outcomes, 5
are either white or green.
∴ P [white or green ball] = P(C) = 5/9
3. One card is drawn from a well-shuffled pack of playing cards. Find the probability
that the card drawn (i) is a Heart (ii) is a King (iii) belongs to red suit (iv) is a King or a
Queen (v) is a King or a Heart.
Sol:
A pack of playing cards has 52 cards. There are four suits, namely, Spade, Club, Heart
and Diamond (Dice). In each suit, there are thirteen denominations - Ace (1), 2, 3, 10,
Jack (Knave), Queen and King.
8|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
A card selected at random may be any one of the 52 cards. Therefore, there are 52
equally likely, mutually exclusive and exhaustive outcomes. Let events A, B, C, D and
E be —
A: selected card is a Heart
B: selected card is a King
C: selected card belongs to a red suit.
D: selected card is a King or a Queen
E: selected card is a King or a Heart
(i) There are 13 Hearts in a pack. Therefore, 13 outcomes are favourable to event A.
∴ P [Heart] = P(A) =13/52 = ¼
(ii) There are 4 Kings in a pack. Therefore, 4 outcomes are favourable to event B.
∴ P[King] = P(B)=4/52 =1/13
(iii) There are 13 Hearts and 13 Diamonds in a pack. Therefore, 26 outcomes are
favorable to event C.
∴ P [Red card] = P(C) =26/52 = ½
(iv) There are 4 Kings and 4 Queens in a pack. Therefore, 8 outcomes are favourable
to event D.
∴ P [King or Queen] = P(D) = 8/52 = 2/13
(v) There are 4 Kings and 13 Hearts in a pack. Among these, one card is Heart-King.
Therefore, (4+13-1) = 16 outcomes are favourable to event E.
∴ P [King or Heart] = P(E) =16/52 = 4/13
4. A bag contains 8 tickets which are marked with the numbers 1,2, 3, .. 8. Find the
probability that a ticket drawn at random from the bag is marked with (i) an even
number (ii) a multiple of 3.
Sol: The selection can be any one of the eight numbers. Therefore, there are 8
equally likely, mutually exclusive and exhaustive outcomes. Let events A and B be—
A: selected number is even.
B: selected number is a multiple of 3.
(i) Four of the selections, namely, 2, 4, 6 and 8 are favourable to event A.
∴ P [even number] = P(A) = 4/8 = ½
9|NMPT-UNIT-IV
BTECH_EEE/ME – SEM22
(ii) Two of the selections, namely, 3 and 6 are favourable to event B.
∴ P [multiple of 3] = P(B) = 2/8 = ¼.
5. A fair coin is tossed twice. Find the probability that the tosses result in
(i) two heads (ii) at least one head.
Sol: The sample space is 5 = (HH, HT, TH, TT}, There are four equally likely, mutually
exclusive and exhaustive outcomes. Let events A and B be—
A: the tosses result in 2 heads
B: the tosses result in at least one head.
(i) One outcome, HH is favourable to event A.
∴ P [two heads] = P(A) = ¼
(ii) 3 outcomes HH, HT and TH are favourable to event B.
∴ P [at least one head] = P(B) = ¾
6. Two fair dice are rolled. Find the probability that (i) both the dice show
number 6 (ii) the sum of numbers obtained is 7 or 10 (iii) the sum of
the numbers obtained is less than 11 (iv) the sum is divisible by 3.
Sol: The sample space is S= {(1,1), (1, 2), (1,3)…… (1,6)
(2,1), (2, 2), (2,3) .... (2,6)
……………………………..
(6,1), {6, 2), (6, 3)…. (6,6)}
There are 6x6 = 36 equally likely, mutually exclusive and exhaustive outcomes.
Let events A, B, C and D be —
A: both the dice show number 6
B: sum of the numbers obtained is 7 or 10
C: sum of the numbers obtained is less than 11.
D: sum of the numbers obtained is divisible by 3.
(i) One outcome, namely, (6, 6) is favourable to event A.
∴P [6 on both the dice] = P(A) = 1/36
10 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
(ii) Nine outcomes, namely, (6,1), (5,2), (4, 3), (3,4), (2,5), (1,6), (6, 4), (5, 5) and (4,6)
are favourable to event B.
∴P [sum is 7 or 10] = 9/36 = ¼
(iii) The complement of event C is— C': sum is 11 or 12.
Event C' has three favourable outcomes, namely, (6,5), (5, 6) and (6, 6).
P [sum is less than 11] = 1 – P [sum is 11 or 12]
= 1-3/36= 1-1/12 = 11/12
The sum is divisible by 3 if it is 3, 6, 9 or 12. Therefore, the outcomes favourable to
event D are (2, 1), (1, 2), (5,1), (4,2), (3,3), (2, 4), (1,5), (6, 3), (5, 4), (4, 5), (3, 6) and
(6, 6). Thus, 12 outcomes are favourable.
P [sum is divisible by 3] = 12/36 = 1/3.
7. A box has 5 white, 4 red and 3 green balls. Two balls are drawn at random from
the box. Find the probability that they are (i) of the same colour (ii) of different
colours.
Sol: The box totally has 12 balls. A random draw of two balls has 12C2 equally likely,
mutually exclusive and exhaustive outcomes. Let events A and B be—
A: the balls drawn are of the same colour
B: the balls drawn are of different colours.
(i). Events happens when the drawn balls are both white or both red or both green.
Out of 12C2 selections, 5C2 selections are both white,4C2 selections are both red
And 3C2 selections are both green. Thus, 5C2+4C2 + 3C2 outcomes are
Favourable to event A.
5𝐶2 +4 𝐶2 +3 𝐶2
P [balls of same colour] = 12𝐶2
10+6+3 19
= = 66 = 0.2879
66
11 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
8. Two cards are drawn at random from a pack of cards. Find the probability that (i)
both are Spades (ii) both are Kings (iii) one is Spade and the other is a Heart (v)
the cards belong to the same suit (v) the cards belong to different suits.
Sol:
A random draw of 2 cards from a pack of 52 cards has 52C2 equally likely, mutually
exclusive and exhaustive outcomes. Let events A, B, C, D and E be—
A: both the cards drawn are Spades
B: both the cards drawn are Kings.
C: the cards drawn are one Spade and one Heart.
D: the cards belong to the same suit.
E: the cards belong to different suits.
(i) Since there are 13 Spades in a pack, event A has 13C2 favourable outcomes.
13𝐶 13×6 1
Therefore, P [both spades] = 52𝐶2 = 26×51 = 17
2
(ii) Since there are 4 Kings in a pack, event B has 4C2 favourable outcomes.
4𝐶2 2×6 1
Therefore, P [both Kings] = = =
52𝐶2 26×51 221
(iii) Here, one card should be a Spade and the other should be a Heart.
From 13 Spades, one Spade can be had in 13C1 ways. From 13 Hearts, one Heart
can be had in 13C1 ways. Thus, 13C1 X 13C1 outcomes are favourable to event C.
13𝐶1 ×13 𝐶1
Therefore, P [a Spade and a Heart] = 52𝐶2
13×13 13
= 26×51 = 102
(iv) Here, the cards should be 2 Spades or 2 Clubs or 2 Hearts or 2 Diamonds. There
are 13 cards of each suit. In each case, a selection of two cards can be made in
13C2 ways. Thus, totally the number of favourable cases is 13C2 + 13C2 + 13C2 + 13C2.
13𝐶2 +13 𝐶2 +13 𝐶2 +13 𝐶2
P [cards of same suit] = 52𝐶2
4×78 4
= 26×51 = 17
12 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
9. A bag has 9 tickets marked with numbers 1, 2, 3,……9. Two tickets are drawn at
random from the bag. Find the probability that both the numbers drawn are
(i) even (ii) odd.
Sol:
There are 9C2 equally likely, mutually exclusive and exhaustive outcomes. Let events
A and B be
A: both the selected numbers are even.
B: both the selected numbers are odd.
(i) Out of 9 numbers, 4 numbers, namely, 2,4,6 and 8 are even. Therefore, 4C2
selections will have two even numbers. Therefore,
4𝐶
P [both even] = P(A) = 9𝐶2 = 6/36 = 1/6
2
(ii) Out of 9 numbers, 5 numbers, namely, 1,3,5,7 and 9 are odd. Therefore, 5C2
selections will have two odd numbers. Therefore,
5𝐶2
P [both odd] = P(B) = = 10/36 = 5/18
9𝐶2
10. A bag contains 3 red, 4 green and 3 yellow marbles. Three marbles are randomly
drawn from the bag. What is the probability that they are of (i) the same colour
(ii) different colours (one of each colour)?
Sol: There are 10C3 equally likely, mutually exclusive and exhaustive outcomes. Let
events A and B be
A: Selected marble are of the same colour.
B: Selected marbles are of different colours
(i)The marbles drawn should be 3 red or 4 green or 3 yellow.
Therefore, 3C3 + 4C3 + 3C3 outcomes are favourable to events A, Therefore,
3𝐶3 +4 𝐶3 +3 𝐶3 1+4+1 1
P [marbles of the same colour] = = = 20
10𝐶3 120
(ii) The marbles should be one of each colour. Therefore, 3C1 x3C1 x 3C1 outcomes
are favourable. Therefore,
3𝐶1 +4 𝐶1 +3 𝐶1 3
P [marbles of different colours] = =
10𝐶3 10
13 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
4.3 ADDITION THEOREM ON PROBABILITY
14 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
3. In a college, there are five lecturers. Among them, three are doctorates. If a
committee consisting three lecturers is formed, what is the probability that at least
two of them are doctorates?
Sol:
From the five lecturers, three lecturers can be selected in 5C3 ways. Thus, there
are 5C3 equally likely, mutually exclusive and exhaustive outcomes. Let events A and
B be —
A: Two of the selected lecturers are doctorates.
B: All the three selected lecturers are doctorates.
Then, events have 3C2 x 2C1 favourable outcomes. And, event B has 3C3 favourable
outcomes. Here, events A and B are mutually exclusive.
.'. P [at least two doctrates] = P [two or three doctrates]= 𝑃(𝐴 ∪ 𝐵)
3𝐶2 ×2 𝐶1 3𝐶
= 𝑃(𝐴) + 𝑃(𝐵) = + 5𝐶3
5𝐶3 3
3×2 1 7
= + 10 = 10 = 0.7
10
15 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
5. If from a pack of cards, a single card is drawn. What is the probability that it is
either a spade or a king?
Sol: P (A) = P (a spade card) =12/52=1/4
P (B) = P (a king card) =4/52
P (either a spade or a king card) = P (A or B)
= P (A) + P (B) – P (A ∩ 𝐵)
= (12/52) +(1/52) -(12/ (52*52))
= 4/13
6. A person is known to hit the target in 3 out of 4 shots, whereas another person is
known to hit the target in 2 out of 3 shots. Find the probability of the targets being
hit at all when they both persons try.
Sol: The prob. that the first person hit the target = P (A) = 3/4
The prob. that the second person hit the target = P (B) = 2/3
The two events are not mutually exclusive, since both persons hit the same target.
P (A or B) =P (A) + P (B) – P (A ∩ B)
=3/4+2/3-(6/12)
=11/12
16 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
4.4 CONDITIONAL PROBABILITY
Two events are said to be independent when the actual happening of one
does not influence in any way the happening of the other. Events which are not
independent are called dependent events.
Note: Two events A and B are independent if and only if P(A∩B) = P(A). P(B)
17 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
1. A bag contains 8 white and 10 black balls. Two balls are drawn in
succession. What is the prob. that first is white and second is black?
Sol: Total no. of balls = 8 + 10 = 18
P (drawing one white ball from8 balls) = 8/18
P (drawing one black ball from 10 balls) = 10/18
P (drawing first white & second black) =10*8/ (18*18)
= 80/324
2. Two persons A & B appear in an interview for 2 vacancies for the same
post. The probability of A’s selection is1/7 and that of B’s selection is1/8.
What is the probability that, i) both of them will be selected?
ii) none of them will be selected.
Sol: P (A selected) =1/7
P (B selected) =1/8
P (A will not be selected) = 1-(1/7) = 6/7
P (B will not be selected) = 1-(1/8) =7/8
18 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
(i)The unconditional probability of drawing a heart is ---
P(B) = 13/52 = ¼
(ii) The conditional probability of drawing a heart given that it is red card is-----
𝑃(𝐴∩𝐵) 13⁄52
P(B/A) = =26⁄ = 1⁄2
𝑃(𝐴) 52
4. A fair coin is tossed thrice. What is the probability that all the three tosses result in
heads?
Sol:
Let events A, B, and C be------
A: the first toss results in head
B: the second toss results in head.
C: the third toss results in head.
Then, P(A) = P(B) =P(C) = ½
Since A, B, and C are results of three different tosses, they are independent.
Therefore, probability that all the three tosses result in head is ---
P [ 3 heads] = P(A∩B∩C) = P(A). P(B). P(C)
1 1 1 1
=2×2×2=8
5. Two fair dice are rolled. If the sum of the numbers obtained is 4, find the
probability that the numbers obtained on both the dice are even-
19 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
Event (A∩B) has 1 favourable outcome, namely, (2,2).
6. A box has 1 red and 3 white balls. Balls are drawn one after one from the box. Find
the probability that the two balls drawn would be red if
a. the ball drawn first is returned to the box before the second draw is made.
(Draw with replacement).
b. the ball drawn first is not returned before the second draw is made. (Draw
without replacement).
Sol: Let A: the first ball drawn is red
B: the second ball drawn is red.
Draw with replacement:
Here, P(A) =1/4 Also, since the first ball- is returned before the second draw is made,
P(B|A) =1/4
∴P [Two balls are red] = P(A∩B)
= P(A). P (B|A)
= 1/4 * 1/4 =1/16
Draw without replacement:
Here, Since the first ball drawn is not returned before the second draw is made,
P(B|A) = 0/4
.'. P [Two balls are red} = P(A∩B)
= P(A). P(B|A)
= ¼ * 0/4 = 0
7. The probability that a contractor will get a plumbing contract is 2/3 and probability
that he will not get an electrical contract is 5/9. If the probability of getting at least
one of these contracts is 4/5, what is the probability that he will get both?
20 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
Then, P(A) = 2/3, P(B`) = 5/9 and P(A∪B) = 4/5
Therefore,
8. A can solve 90 percent of the problems given in a book and B can solve 70
percent. What is the probability that at least one of them will solve a problem
selected at random?
Sol: event A: student A solve the problem
event B: student B solve the problem.
P (at least one solves the problem) = 1-P (none solve the problem)
= 1 − 𝑃(𝐴 ∩ 𝐵)
= 1 − 𝑃(𝐴). 𝑃(𝐵)
= 1 − (0.10)(0.30)
= 0.97
The probability that a trainee will remain with a company 0.6, The probability that
an employee earns more ten Rs.10,000 per year 0.5. The probability an employee
is trainee who remained with the company or who earn more then Rs.10,000 per
year is 0.7. What is the probability earn more than Rs.10,000 per year given that
he is a trainee who stayed with the company?
21 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
We need to find
Sol:
10. A box contains 4 green and 6 white bolls another box contains 7 green and 8
white bolls. Two bolls are transferred from box 1 to box 2 and then a boll is drawn
from box 2. What is the probability that it is white?
Sol:
22 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
11. Probabilities of Husband’s and wife’s selection to a post are 1/5 and 1/7
respectively, what is the probability that.
(i) Both of them will be selected.
(ii) Exactly one of them will be selected
(iii) None of them will be selected
Sol:
1
event A: selection of Husband P(A) = 5
1
event B: selection of Husband P(B) = 7
Proof:
Given E1 , E2 , E3 , . . . . En are n mutually exclusive
i. e. , Ei ∩ Ej = ϕ for i ≠ j
i. e. , E1 ∪ E2 ∪ E3 ∪. . .∪ En = S
A= A∩S
= A ∩ (E1 ∪ E2 ∪ E3 ∪. . .∪ En )
= (A ∩ E1 ) ∪ (A ∩ E2 ) ∪ (A ∩ E3 ) ∪. . .∪ (A ∩ En )
23 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
P(A) = P((A ∩ E1 ) ∪ (A ∩ E2 ) ∪ (A ∩ E3 ) ∪. . .∪ (A ∩ En ))
By Axiom-III
E P(Ei ∩A)
P ( i⁄A) = P(A)
A
P(Ei )P( ⁄E )
E
P ( i⁄A) = i
P(A)
A
P(Ei )P( ⁄E ),
E
P ( i⁄A) = P(A∩E )+P(A∩E )+P(A∩Ei )+.+P(A∩E ).
1 2 3 n
A
P(Ei )P( ⁄E )
E
P ( i⁄A) = ∑ 𝑃(𝐴∩E )i
i
A
P(𝐸𝑖 )(P( ⁄𝐸 ),
𝐸
P ( 𝑖⁄A) = 𝑛 𝑖
(By the definition of Conditional Probability)
∑𝑖=1 P(Ei )P(A⁄𝐸 )
𝑖
PROBLEMS:
1. In a certain college, 25% of boys and 10% of girls are studying mathematics. The girls
constitute 60% of the students. (a) What is the probability that mathematics is being
studied? (b) If a student is selected at random and is found to be studying
mathematics, Find the probability that the student is a girl? © a boy?
40 2
Sol: Given P(Boy) = P(B) =100 = 5
60 3
P(Girl) = P(G) =100 = 5
25 1
P(M⁄B) = =
100 4
10 1
P(M⁄G) = =
100 10
3 1 2 1 5
= 5 × 10 + 5 × 4 = 25
24 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
By Bayes theorem, probability of mathematics student is a girl
3 1
P(G)P(M⁄G) × 3
P(G⁄M) = = 5 10
5 = 10
P(G)P(M⁄G)+P(B)P(M⁄B)
25
M 2 1
P(B)P( ⁄B) × 1
P(B⁄M) = = 5 4
5 =2
P(G)P(M⁄G)+P(B)P(M⁄B)
25
2. The chance that doctor A will diagnose a disease x correctly is 60%. The chance
that a patient will die by his treatment after correct diagnosis is 40% and the chance
of death by wrong diagnosis is 70%. A patient of doctor A, who had disease x died.
What is the probability that his disease was diagnosed correctly?
Sol: Let E1be the event that “disease x is diagnosed correctly by doctor A” and
By Bayes theorem
E
P(E1 )P ( 2⁄E )
E 1
P ( 1⁄E ) =
2 E ̅1 )P (E2⁄ )
P(E1 )P ( 2⁄E ) + P(E ̅1
1 E
0.6×0.4 6
= 0.6×0.4+0.4×0.7 = 13
3. Of the three men, the chances that a politician, a business man or an academician
will be appointed as a vice-chancellor (V.C) of a university are 0.5, 0.3, 0.2
respectively. Probability that research is promoted by these persons if they are
appointed as VC are 0.3, 0.7, 0.8 respectively. Determine the probability that
research is promoted. If research is promoted, what is the probability that VC is an
academician?
25 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
Then P(A)=0.5, P(B)=0.3, P(C)=0.2
=0.52
P(C)P(R⁄C)
P(C⁄R) =
P(C)P(R⁄C)+P(B)P(R⁄B)+P(A)P(R⁄A)
0.16 4
= 0.15+0.21+0.16 = 13 = 0.3077
Sol: Let the probabilities of business man going to hotels X, Y, Z be receptively P(X),
P(Y), P(Z).
20 50 30
Then P(X) = 100 = 0.2, P(Y) = 100 = 0.5, P(Z) = 100 = 0.3
Let E be the event that the hotel room has faulty plumbing. Then the probabilities
that hotels X, Y, Z have faculty plumbing are
5 4 8
P(E⁄X) = 100 = 0.05, P(E⁄Y) = 100 = 0.04, P(E⁄Z) = 100 = 0.08,
The probability that the business man’s room having faulty plumbing is assigned to
hotel z
P(Z)P(E⁄Z)
P(z⁄E) =
P(Z)P( ⁄Z)+P(Y)P(E⁄Y)+P(X)P(E⁄X)
E
0.3×0.08 4
= =
0.3×0.08+0.5×0.04+0.2×0.05 9
26 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
5. There are two boxes, in box I, 11 cards are there numbered 1 to 11 and in box II, 5
cards are there numbered 1 to 5. A box is chosen and a card is drawn. If the card
shows an even number, then another card is drawn from the same box. If card
shows an odd number another card is drawn from the other box. Find the
probability that they are from box I?
Sol:
For this box is choosen and a card is picked, if the first card is even then the second
card is also picked from the same box and the card is also even.
Let E1be the event that both the cards are from box I
1 5 4 1
P(E1 ) = ( ) ( ) =
2 11 10 11
Let E2 be the event that both the cards are from box II. Then
1 2 1 1
P(E2 ) = ( )( ) =
2 5 4 20
1 1 31
∴ P(E) = P(E1 ) + P(E2 ) = + =
11 20 220
Then a box is choosen, first card is odd and second card is picked from another box
and that is also odd
27 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
Let 𝐸1 be the event that the first card odd from box I and second card is odd from
box II.
1 6 3 9
P(E1 ) = ( )( ) =
2 11 5 55
Let E2 be the event that first card is odd from box II and second card is odd from
box I
1 3 6 9
Then P(E2 ) = 2 (5) (11) = 55
9 9 18
∴ P(E) = P(E1 ) + P(E2 ) = + =
55 55 55
1 5 4 1
The probability that both cards from box I are even = 2 (11) (10) = 11
1 2 1 1
The probability that both cards from box II are even = 2 (5) (4) = 20
The Probability that if both cards are even then they are from box I
1 5 4 1
( )( ) 20
2 11 10 11
1 5 4 1 2 1 = 1 1 = 31
( )( )+ ( )( ) +
2 11 10 2 5 4 11 20
6. Two bolts are drawn from a box containing 4 good and 6 bad bolts. Find the
probability that the second bolt is good if the first one is found to be bad.
Sol: Since in the problem it is given that “probability that the second bolt is good, if the
first one is bad”, we have to understand that the two bolts are drawn in succession
(Without replacement).
6
Probability that the first bolt is found to be bad = 10
4
Probability that the bolt drawn now, is found to be good = 9
6 4 4
P (first is bad and second is good)= 10 × 9 = 15
28 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
7. In a factory, machine A produce 40% of the output and machine B produces 60%.
On the average, 9 items in 1000 produced by A are defective and 1 item in 250
produced by B is defective. An item drawn at random from a day’s output is
defective. What is the probability that it was produced by A or B?
Sol:
Similarly
1
P(D⁄B) = Probability that items produced by B are defective = 250 = 0.004
0.4×0.009 0.0036
= 0.4×0.009+0.6×0.004 = = 0.6
0.006
0.6×0.004 0.0024
= 0.4×0.009+0.6×0.004 = = 0.4
0.006
29 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
1
4.7 RANDOM VARIABLE
Suppose two fair coins are tossed. Here, the sample space is 5 = {TT, TH, HT,
HH} Suppose each of the four sample points in this sample space, a number is
assigned as follows.
Sample point TT TH HT HH
Number 0 1 1 2
Here, the assigned numbers indicate the number of heads obtained in each case.
Let 'the number of heads' be denoted by X. Then, X is a function on the sample
space. It takes the values 0,1 and 2 with probabilities —
P[X=0] = P [no head] = ¼
P[X=1] = P [one head] = ½
P[X=2] = P [two head] = ¼
Here, X is called Random variable or Variate.
Random variable is a function which assigns a real number to every
sample point in the sample space. The set of such real values is the range of the
random variable.
There are two types of random variable, namely, Discrete random variable and
Continuous random variable.
A Variable X which takes values x1, x2, ….xn with probabilities p1,p2,….pn is
a Discrete random variable. Here, the value x1, x2, ….xn from the range of the
random variable.
Ex1. Let X denote the number of heads obtained while tossing two fair coins. Then, X
is a random variable which takes the values 0,1 and 2 wit respective probabilities ¼,
½ and ¼. Here, X is a discrete random variable.
Ex. 2. Let X denote the number obtained while throwing a fair die. Then, X is a
discrete random variable taking values 1, 2, 3, 4, 5 and 6 with probability 1/6 each.
30 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
Ex. 3. Let X denote the weight of apples. Then, X is a continuous random variable.
PROBABILITY DISTRIBUTION
A systematic presentation of the values taken by a random variable and the
corresponding probabilities is called probability distribution of the random variable.
Let X be a discrete random variable. And let p(x) be a function such that
p(x) = P[X=x]. Then, p(x) is the probability mass function of X if it satisfies following
conditions.
(i)p(x) ≥0 for all x
(ii)∑p(x) = 1
A similar function is defined for a continuous random variable X. It is called
probability density function (p.d.f.). It is denoted by f(x).
MATHEMATICAL EXPECTATION:
Let X be a discrete random variable with probability mass function p(x). Then,
mathematical expectation of X is E(X) = ∑x. p(x)
31 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
1. Two fair coins are tossed once. Find the mathematical expectation of the number
of heads obtained.
Sol: Let X denote the number of heads obtained. Then, X is a random variable which
takes the values 0, 1 and 2 with respective probabilities ¼, ½ and ¼ and That is,
x 0 1 2
p(x) ¼ ½ ¼
The mathematical expectation of the number of head is
1 1 1
𝐸(𝑋) = ∑ 𝑥. 𝑝(𝑥) = 0 × + 1 × + +2 × = 1
4 2 4
Note:
1. For a random variable X, the Arithmetic Mean is E(X).
2. For a random variable X, the Variance is
Var(X) = E[X-E(X)]2
= E(X2)- [E(X)]2
The Standard Deviation is the square – root of the variance.
2. A bag has 3 white and 4 red balls. Two balls are randomly drawn from the bag.
Find the expected number of white balls in the draw.
Sol: Let X denote the number of white balls obtained in the draw. Then, X is a
random variable which takes the values 0, 1 and 2 with respective probabilities –
4𝐶2 2
P (x=0) = P [both red] = =
7𝐶2 7
3𝐶2 ×4 𝐶1 4
P (x=1) = P [one white & one red] = =7
7𝐶2
3𝐶 1
P (x=2) = P [both white] = 7𝐶2 = 7
2
2 4 1 6
𝐸(𝑋) = ∑ 𝑥. 𝑝(𝑥) = 0 × 7 + 1 × 7 + 2 × 7 = 7
32 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
3. A Random Variable ‘X’ has the following values of ‘X’
x 0 1 2 3 4 5 6 7
P(x) 0 k 2k 2k 3k K2 2K K+7K2
2
Sol:
(i) If X is a random variable, then ∑ 𝑃(𝑥𝑖 ) = 1
𝑃(𝑥 = 0) + 𝑃(𝑥 = 1) + 𝑃(𝑥 = 2) + 𝑃(𝑥 = 3) + 𝑃(𝑥 = 4) + 𝑃(𝑥 = 5) + 𝑃(𝑥 = 6) +
𝑃(𝑥 = 7) = 1
0 + 𝑘 + 2𝑘 + 2𝑘 + 3𝑘 + 𝑘 2 + 2𝑘 2 + 7𝑘 2 + 𝑘 = 1
10𝑘 2 + 9𝑘 − 1 = 0
1
𝑘 = 10 , −1
1
∴ 𝑘 = 10 (Since probability is positive)
4. Two dice are thrown, let X assign to each of (a, b) in S the maximum of its numbers
i.e., X (a, b) = max (a, b). Find the probability distribution and also find the mean
and variance of the distribution.
Sol: If we throw two dice maximum number could be 1, 2, 3, 4, 5, 6,
∴ 𝑋 = {1, 2, 3, 4, 5, 6}
If we throw two dice then the sample has 36 events
33 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
1 3 5 7
𝑃(𝑥 = 1) = 36 , 𝑃(𝑥 = 2) = 36, 𝑃(𝑥 = 3) = 36, 𝑃(𝑥 = 4) = 36,
9 11
𝑃(𝑥 = 5) = 36, 𝑃(𝑥 = 6) = 36
1 3 5 7 9 11 161
Mean= 𝐸(𝑋) = ∑ 𝑥. 𝑝(𝑥) = 1 × 36 + 2 × 36 + 3 × 36 + 4 × 36 + 5 × 36 + 6 × 36 = = 4.47
36
distribution.
∞
Sol: We know that ∫−∞ 𝑓(𝑥)𝑑𝑥 = 1
∞
∫−∞ 𝑐𝑒 −|𝑥| 𝑑𝑥 = 1
∞
2 ∫0 𝑐𝑒 −|𝑥| 𝑑𝑥 = 1 since the function is Even.
∞
2 ∫0 𝑐𝑒 −𝑥 𝑑𝑥 = 1
𝑒 −𝑥
2𝑐[ −1 ]∞
0 =1
−2𝑐[𝑒 −∞ − 𝑒 −0 ] = 1
−2𝑐[0 − 1] = 1
−2𝑐[0 − 1] = 1
2𝑐 = 1
1
∴𝑐=2
∞
Mean=∫−∞ 𝑥𝑓(𝑥)𝑑𝑥
∞
= ∫−∞ 𝑥 𝑐𝑒 −|𝑥| 𝑑𝑥
∞
= 𝑐 ∫−∞ 𝑥 𝑒 −|𝑥| 𝑑𝑥 = 0 since 𝑥 𝑒 −|𝑥| is odd function
34 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
∞
= 2 ∫0 𝑥 2 𝑐𝑒 −x 𝑑𝑥 Since 𝑥 2 𝑒 −|𝑥| is even function
1 ∞
= 2. 2 ∫0 𝑥 2 𝑒 −x 𝑑𝑥
= [−𝑥 2 𝑒 −x − 2𝑥𝑒 −x − 2𝑒 −x ]∞
0
= [0 − (−2)] = 2
∞
Sol: (i) We know that ∫−∞ 𝑓(𝑥)𝑑𝑥 = 1
∞
∫0 𝑘𝑥𝑒 −𝜆𝑥 𝑑𝑥 = 1
𝑒 −𝜆𝑥 𝑒 −𝜆𝑥 ∞
𝑘[𝑥 − 1. ] =1
−𝜆 𝜆2 0
1
𝑘 [0 − (− 𝜆2 )] = 1
𝑘 = 𝜆2
∞
(ii) Mean=∫−∞ 𝑥𝑓(𝑥)𝑑𝑥
∞
= ∫0 𝑥𝑘𝑥𝑒 −𝜆𝑥 𝑑𝑥
∞
= ∫0 𝑘𝑥 2 𝑒 −𝜆𝑥 𝑑𝑥
𝑒 −𝜆𝑥 𝑒 −𝜆𝑥 𝑒 −𝜆𝑥 ∞
= 𝑘[𝑥 2 − 2𝑥. −2 ]
−𝜆 𝜆2 𝜆3 0
2
= 𝑘 [0 − (− 𝜆3 )]
2 2
= 𝜆2 . 𝜆3 = 𝜆
35 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
9. Practice Quiz
2
B) 7
1
C) 365
2
D) 365
2. If a card is drawn from a well shuffled packet 53 cards, then the probability that it is
spade (or) queen is [ B ]
17
A) 52
4
B) 13
13 4
C) 52 + 51
D) None
1
B) 4
3
C) 4
D) None
4. A bag contains 3 red balls, 4 white balls and 7 black balls. The probability of drawing
A) 𝑃(𝐴̄) + 𝑃(𝐵̄ )
B) 𝑃(𝐴̄) − 𝑃(𝐵̄ )
C) 𝑃(𝐴̄). 𝑃(𝐵̄ )
D) None
36 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
6. The probability of drawing a king from pack of cards is [ A ]
1
A) 13
1
B) 26
1
C) 52
D) None
B) 0
C) 𝑃(𝐴)𝑃(𝐵)𝑃(𝐶)
D) None
1 1 𝐵
8. 𝑃(𝐴 ∩ 𝐵) = 6 , 𝑃(𝐴) = 2 then 𝑃 (𝐴) = [ A ]
1
A) 3
2
B) B) 3
C) C) 1
D) D) None
9. The total no. of sample events when two dice are thrown simultaneously [ C]
A) 20
B) 25
C) 36
D) None
2
B) 5
3
C) 5
D) 1
A) Discrete
B) Continuous
C) both A & B
37 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
D) None
A) 0
B) 1
C) k
D) None
A) 4
B) 8
C) 16
D) 12
D) None
A) 0
B) 1
C) -1 to 1
D) None
10. Assignments
S.No Question BL CO
A box has 5 white, 4 red and 3 green balls. Two balls are drawn at L1 CO4
1 random from the box. Find the probability that they are (i) of the same
colour (ii) of different colours
38 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
In a toy manufacturing company three machines namely A, B, C L3 CO4
manufacture 20%, 30%, 50% of toys respectively. A quality control
officer examined the machines and found that A, B, C produces 2%,
3
3%, 4% defectives of the total output. A toy is selected at a random
and is found to be defective, what are the probabilities that this toy
came from machines A, B, C, respectively.
A Random Variable ‘X’ has the following values of ‘X’ L3 CO4
x 0 1 2 3 4 5 6 7
4
P(x) 0 k 2k 2k 3k K2 2K2 K+7K2
39 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
P (A U B UC) = P (A ∪ D)
= P (A) + P (D) − P (A ∩ D)
= P (A) + P (B ∪ C) − P [A ∩ (B ∪C)]
= P (A) + P (B) + P (C) − P (B ∩C) − P [(A ∩ B) ∪ (A ∩C)]
= P (A) + P (B) + P (C) − P (B ∩C) − P (A ∩ B) − P (A ∩C)
+ P [(A ∩ B) ∩ (A ∩C)]
P (A U B UC) = P (A) + P (B) + P (C) − P (A ∩ B) − P (B ∩C) −P (C ∩ A)
+ P (A ∩ B ∩C)
3 State Baye’s theorem.
Sol: If E1 , E2 , E3 , . . . . En are ‘n’ mutually exclusive events with 𝑃(𝐸𝑖 ) ≠
0 for each i in the sample space S and for any arbitrary event A
L1 4
which is a subset of ⋃𝑛𝑖=1 𝐸𝑖 with 𝑃(𝐴) > 0 then
A
P(𝐸𝑖 )(P( ⁄𝐸 ),
𝐸
P ( 𝑖⁄A) = 𝑛 𝑖
for i=1to n.
∑𝑖=1 P(Ei )P(A⁄𝐸 )
𝑖
BTECH_EEE/ME – SEM22
Therefore, probability of drawing either a king or a queen
= 4/52 + 4/52 = 2/13
8 Define probability distribution.
Sol: A systematic presentation of the values taken by a random
variable and the corresponding probabilities is called probability L1 4
p(x) ¼ ½ ¼
The mathematical expectation of the number of head is
1 1 1
𝐸(𝑋) = ∑ 𝑥. 𝑝(𝑥) = 0 × + 1 × + +2 × = 1
4 2 4
S.No Question BL CO
41 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
2 Of three men, the chances that a politician, business man or an
academician will be appointed as vice chancellor of a
university are 0.5,0.3,0.2 respectively. The probability that the
research is promoted by these persons if they are appointed as
L3 4
V.C are 0.3,0.7 and 0.8.
a) Find the probability that the research is promoted?
b) if research is promoted then find the probability that V.C is an
academician?
3 A businessman goes to the hotels X, Y, Z are 20%, 50%, 30% of L3 4
the time respectively. It is known that 5%, 4%, 8% of the rooms in
X, Y, Z hotels have faulty plumbing. What is the probability that
business man’s room having faulty plumbing is assigned to hotel
Z?
4 State and prove Addition theorem and Bayes theorem L1 4
S. No Application CO
42 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
1 Probability Theory used in the earthquake risk assessment and its 4
consequent possible reduction
Text Book
1. B. S. Grewal, Higher Engineering Mathematics, Khanna Publishers.
2. Erwin Kreyszig, Advanced Engineering Mathematics, John Wiley & Sons.
References:
1. B. V. Ramana, Higher Engineering Mathematics, McGraw Hill Education
2. Alan Jeffrey, “Advanced Engineering Mathematics”, Elsevier Publishers
43 | N M P T - U N I T - I V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
COURSE MATERIAL
UNIT V
COURSE II B. TECH
SEMESTER 2-2
BTECH_EEE/ME-SEM 22
SVCE TIRUPATI
3 SYLLABUS 1
4 COURSE OUTCOMES 1
5 CO - PO/PSO MAPPING 1
6 LESSON PLAN 2
7 ACTIVITY BASED LEARNING 2
8 LECTURE NOTES
5.1 Introduction 3
5.2 Binomial Distribution 4
5.3 Poisson Distribution 7
5.4 Normal Distribution 12
9 PRACTICE QUIZ 20
10 ASSIGNMENTS 22
11 PART A QUESTIONS & ANSWERS (2 MARKS QUESTIONS) 23
12 PART B QUESTIONS 25
13 SUPPORTIVE ONLINE CERTIFICATION COURSES 26
14 REAL TIME APPLICATIONS 26
15 CONTENTS BEYOND THE SYLLABUS 26
16 PRESCRIBED TEXT BOOKS & REFERENCE BOOKS 26
BTECH_EEE/ME-SEM 22
SVCE TIRUPATI
1. COURSE OBJECTIVES
2. PREREQUISITES
Students should have knowledge on
• Basic Mathematics & Calculus
• Permutations and combinations
3. SYLLABUS
UNIT V: Random Variables & Distributions:
Probability distribution - Binomial, Poisson approximation to the binomial distribution
and normal distribution-their properties-Uniform distribution-exponential distribution
4. COURSE OUTCOMES
After the completion of course, students will be able to
1. Apply numerical methods to solve algebraic and transcendental equations
2. Derive interpolating polynomials using interpolation formulae
3. Solve differential and integral equations numerically
4. Apply Probability theory to find the chances of happening of events.
5. Understand various probability distributions and calculate their statistical constants.
NMPT PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 P10 PO11 PO12 PSO1 PSO2
CO1 3 3
CO2 3 3
CO3 3 3
CO4 3 3
CO5 3 3
1|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
6. LESSON PLAN
Lecture
Weeks Topics to be covered References
No.
T1, R1
9 Problems on Normal distribution
3
T1, R1
10 Problems on Normal distribution
2|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
8. LECTURE NOTES
5.1 INTRODUCTION
BERNOULLI EXPERIMENT:
3|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
Example:
1. Let coin be tossed 3 times. Let Xi (i=1,2,3) be a variate which takes values 1 and 0
according as the ith toss result in “Head” or “Tail”. Then, X = X1+X2+X3 denotes “the
number of head” obtained in the 3 tosses.
Result:
If X1, X2, …Xn are independently and identically distributed (i,i,d) Bernoulli variates with
common parameter p, their sum X = X1+X2 + ….+Xn is a Binomial variate with
parameters n and p
A Probability distribution which has the following probability mass function (p.m.f) is
called Binomial distribution.
p(x) = nCx px qn-x, x=0,1, 2……n.
0<p<1; q=1-p
Here n, p are parameters the variable X is discrete and it is called Binomial variate.
Note1: Binomial p.m.f. has two independent constants, namely, n and p. These two
constants are the parameters of binomial distribution
Note2: A binomial distribution with parameter n and p is denoted by b(x;n,p) or
B(n,p).
EXAMPLES FOR BINOMIAL VARIATE
1.Number of heads obtained in 3 tosses of a coin.
2.Number of male children in a family of 5 children
3.Number of bombs hitting a bridge among 8 bombs which are dropped on it.
4.Number of defective articles in a random sample of 5 articles drawn from a
manufactured lot
5.Number of seeds germinating among 10 seeds which were sown
4|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
Mean is E(X) = np
5|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
3. In a Binomial distribution the mean is 6 and the variance is 1.5. Then, find (i) P[X=2]
and (ii) P[X≤2].
Solution:
Therefore, q = ¼ and p = ¾
Therefore, Mean = n*3/4 = 6
That is, n = 24/3 = 8
The p.m.f is -------
p(x) = 8Cx (3/4) x (1/4)8-x, x=0,1, 2…….8
(i) P[X=2] = 8C2 (3/4)2 (1/4)6 =252/65536=0.003845
(ii) P[X≤2] = p(x=0) +p(x=1) +p (x=2)
= 8C0 (3/4)0 (1/4)8 + 8C1 (3/4)1 (1/4)7 + 8C2 (3/4)2 (1/4)6
= 277/65536 = 0.004227
6|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
A probability distribution which has the following probability mass function (p.m.f) is
called Poisson distribution
𝑒 −λ λ𝑥
𝑝(𝑥) = , 𝑥 = 0, 1, 2 … … … …
𝑥!
Note 1: λ is the parameter of Poisson, Poisson distribution has only one parameter
1. The number of accidents occurring in a city in a day is a Poisson variate with mean
0.8. Find the probability that on a randomly selected day
(i)There are no accidents
(ii)There are accidents
Solution:
Let X: number of accidents per day.
Then, X is P(λ=0.8).
The p.m.f. is –
7|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
𝑒 −0.8 (0.8)𝑥
𝑝(𝑥) = , 𝑥 = 0,1,2,3, . . ..
𝑥!
2. The number of persons joining a cinema queue in a minute has Poisson distribution
with parameter 5.8. Find the probability that (i) no one joins the queue in a particular
minute (ii)2 or more persons join the queue in the minute.
Solution:
Let X: number of persons joining the queue in a minute Then, is P(λ=5.8).
The p.m.f is -------------------
𝑒 −5.8 (5.8)𝑥
𝑝(𝑥) = , 𝑥 = 0,1,2,3, . . ..
𝑥!
(i) P [no one joints the queue] = P[X=0] = p(0)
𝑒 −5.8 (5.8)0
= 0!
= 𝑒 −5.8=0.003
8|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
3. The average number of telephone calls booked at an exchange between 10-00 A.M.
and 10-10 A.M. is Find the probability that on a randomly selected day 2 or more calls
are booked between 10-00 A.M. and 10-10 A.M. On how many days of a year, would
you expect booking of 2 or more calls during those times gap.
Solution:
Let X: number of telephone calls booked at the exchange during 10-00 A.M. to 10-
10 A.M. Then, X is P(λ=4).
The p.m.f is ---
𝑒 −4 4𝑥
𝑝(𝑥) = , 𝑥 = 0,1,2,3, . ..
𝑥!
P [2 or more calls] = 1-P [less than 2 calls]
= 1 – [p (0) +p (1)]
= 1 – e-4[(40)/0! +(41)/1!]
= 1 – 0.0183[1+4]
= 1 – 0.0915 = 0.9085
A year has 365 days. Out of these N = 365 days, the number of days on which there
will be 2 or more calls is ---
N *P [2 or more calls] = 365 * 0.9085 = 332
9|NMPT-UNIT-V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
10 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
6. On an average, a typist mistakes while typing one page. What is the probability
that a randomly observed page in free of mistakes? Among 200 pages, in how
many pages would you expect mistakes?
Solution:
Let X: number of mistakes in a page.
Then, X is P(λ=3).
The p.m.f. is ---
𝑒 −3 3𝑥
𝑝(𝑥) = , 𝑥 = 0,1,2,3, . . ..
𝑥!
P [page is free of mistakes] = p(0)
𝑒 −3 30
= = 𝑒 −3 = 0.0498
0!
11 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
A probability distribution which has the following probability density function (p.d.f) is
called Normal distribution
1 1 𝑥−𝜇 2
𝑓(𝑥) = 𝑒 −2 (𝜎
)
, −∞ < 𝑥 < ∞, 𝜎>0
𝜎√2𝜋
Here, the variable X is continuous and it is called Normal variate.
Note 1: The distribution has two parameters, namely, µ and σ.
(Here, Π=3.14 and e=2.718)
Note 2: This normal distribution has Mean E(X) = µ and
Variance = V(X) = σ2. S.D.(X)=σ.
Note 3: A normal variate with parameters µ and σ is denoted by N (µ, σ2)
12 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
13 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
The shaded area in the figure represents the probability that the variate takes
a value between 0 and z. This area can be read from the table of areas under
Standard Normal Curve. Corresponding to nay positive z, the area from 0 to z can be
read from this table.
𝑋−𝜇
Let X be a normal variate with mean µ and standard deviation σ. Then 𝑍 = is a
𝜎
1. X is a normal variate with mean 42 and standard deviation 4. Find the probability
Solution:
14 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
Therefore,
𝑥−𝜇 𝑥−42
𝑧= = is a Standard Normal Variate.
𝜎 4
𝑥−42 50−42
(i) 𝑝(𝑥 < 50) = 𝑝( < )
4 4
= P[Z<2]
= area from (-) to 2
= [area from (-) to 0] + [area from 0 to 2]
= 0.5 + 0.4772(from the table)
= 0.977200
𝑥−42 50−42
(ii) 𝑝(𝑥 > 50) = 𝑝( > )
4 4
= P[Z<2]
= area from 2 to
= [area from 0 to ] - [area from 0 to 2]
= 0.5 - 0.4772(from the table)
= 0.0228
𝑥−42 40−42
(iii) 𝑝(𝑥 < 40) = 𝑝( < )
4 4
= P [Z < -0.5]
= area from (- ) to (-0.5)
= area from 0.5 to
= [area from 0 to ] - [area from 0 to 0.5]
= 0.5 - 0.1915
= 0.3085
𝑥−42 40−42
(iv) 𝑝(𝑥 > 40) = 𝑝( > )
4 4
= P [Z > -0.5]
= 0.1915 + 0.5
= 0.6915
15 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
= 0.1915 + 0.1915
= 0.3830
37−42 𝑥−42 41−42
(vi) 𝑝(37 < 𝑥 < 41) = 𝑝( < < )
4 4 4
= 0.3944 – 0.0987
= 0.2957.
2. Height of students is normally distributed with mean 165 cms and standard
Solution:
Let X denote height. Then, X is a normal variate with parameters µ = 165 cms and σ=5
𝑥−𝜇 𝑥−165
Then 𝑧 = =
𝜎 5
(i) Probability that the student is more than 177 cms tall is –
𝑥−165 177−165
𝑝(𝑥 > 177) = 𝑝( > )
5 5
= P [Z > 2.4]
16 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
= 0.5 – 0.4918
= 0.0082
(ii) Probability that the student is less than 162 cms. Tall is -----
𝑥−165 162−165
𝑝(𝑥 < 162) = 𝑝( < )
5 5
= P [Z < -0.6]
= 0.5 – 0.2258
= 0.2742
3. Mean life of electric bulbs manufactured by a firm is 1200 hrs. The standard
deviation is 200 hrs.
(i) In a lot of 10,000 bulbs, how many bulbs are expected have life 1050 hrs. or more?
(ii) What is the percentage of bulbs which are expected to find before 1500 hrs. of
service?
Solution:
Let X denotes the life of the bulbs. Then, X is a normal variate with parameters
µ=1200hrs σ=200 hrs
𝑥−𝜇 𝑥−1200
Then 𝑧 = =
𝜎 200
=P [ Z ≤ -0.75]
=0.2734 + 0.5
=0.7734
17 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
In a lot of n=10,000 bulbs, expected number of bulbs with life 1050 hrs. or
more is ---
N * P[X≥1050] =10000*0.7734=7734
Let a be the marks above which if a student scores he would be promoted. Then,
since only 20% of the students have to be promoted the probability of a student
getting promotion should be 20/100=0.2
Therefore,
𝑝(𝑥 ≥ 𝑎) = 0.2
𝑥 − 47 𝑎 − 47
𝑝( ≥ ) = 0.2
10 10
𝑎 − 47
𝑝 (𝑧 ≥ ) = 0.2
10
𝑎−47
And so, P[Z≥.z] = 0.2 where z= 1
18 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
From the table of areas, the value of z for which [area from 0 to z] = 0.3 is z=0.84
Therefore, z=0.84.
𝑎−47
And so, = 0.84
10
𝑎 − 47 = 8.4
𝑎 = 55.4
Thus, the marks limit for promotion is a = 55.4
19 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
9. Practice Quiz
A) 0 B) np C) npq D) 𝑛𝑝(1 + 𝑞)
1 5 1 3 1 1 2
A) 5𝐶2 (2) B) 5𝐶2 (2) (2) C) 5𝐶3 (2) D) None
1 1
A) 1 B) 2 C) 3 D) None
A) 8 B) 9 C) 10 D) None
𝑒 −3
A) 𝑒 −3 B) C) −3𝑒 −3 D) None
−3
A) 0 B) 1 C) 0.5 D) None
20 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
−𝑧2
1
10. If 𝑓(𝑥) = 𝑒 2 then mean, variances are [ A ]
√2𝜋
13. If P (1) =P (2), then the mean of the Poisson distribution is---- [ C]
A) 1 B) 0 C) 2 D) -1
21 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
10. Assignments
S.No Question BL CO
Out of 800 families with 5 children each, how many would you expect L3 CO5
1 to have (a) 3 boys (b) 5 girls (c) either 2 or 3 boys, assume equal
probabilities for boys and girls.
2% of the items of a factory are defective. The items are packed in L3 CO5
2 boxes. What is the probability that there will be (i) 2 defective items
(ii) at least three defective items in a box of 100 items.
3
find (i) the mean of X (ii) 𝑃(𝑥 ≤ 2)
Suppose the weights of 800 male students are normally distributed with L3 CO5
𝜇 = 140 pounds and standard deviation 10 pounds find the number of
4
students whose weight are (i) between 138 and 148 pounds
(ii) more than 152 pounds.
In a normal distribution 7% of the items are under 35, 89% are under 63. L3 CO5
5
Determine the mean and variance of the distribution.
22 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
as: 𝑝(𝑥) =
𝑒 −λ λ𝑥
where λ is a parameter. L3 5
𝑥!
23 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
7 Define standard normal distribution?
Sol: A normal variate with mean µ=0 and standard deviation σ =1
is called Standard Normal Variate. It is denoted by Z. Its probability L1 5
−𝑧2
1
density function is 𝑓(𝑥) = 𝑒− 2 , −∞ < 𝑧 < ∞
√2𝜋
𝑥−42 40−42
Sol: 𝑝(𝑥 > 40) = 𝑝( > )
4 4
= P [Z > -0.5] L3 5
24 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
S.No Question BL CO
3 Out of 800 families with 5 children each, how many would you
expect to have (a) 3 boys (b) 5 girls (c) either 2 or 3 boys, L3 5
assume equal probabilities for boys and girls.
4 The marks obtained in statistics in a certain examination found
to be normally distributed. If 15% of the students’ marks>=60, L3 5
40% <= 30marks, Find the mean and standard deviation.
5 The heights of 1000 students are normally distributed with a
mean of 174.5 cm and a standard deviation of 6.9 cm.
Assuming that the heights are recorded to the nearest half-cm,
L3 5
how many of these students would you expect to have heights:
(i) Less than 160.0 cms? (ii) Between 171.5 and 182.0 cms
inclusive? (iii) Greater than or equal to 188.0 cms.
25 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22
SVCE TIRUPATI
S. No Application CO
Text Book
1. B. S. Grewal, Higher Engineering Mathematics, Khanna Publishers.
2. Erwin Kreyszig, Advanced Engineering Mathematics, John Wiley & Sons.
References:
1. B. V. Ramana, Higher Engineering Mathematics, McGraw Hill Education
2. Alan Jeffrey, “Advanced Engineering Mathematics”, Elsevier Publishers
26 | N M P T - U N I T - V
BTECH_EEE/ME – SEM22