DR ST-BS401-Numerical Methods-Module-4&5
DR ST-BS401-Numerical Methods-Module-4&5
NUMERICAL METHODS
n
va
el
Dr. S.TAMILSELVAN
ils
Professor
m
Engineering Mathematics
Ta
S
r
D
METHODS
m Ta
na S
An Dr
Dr. S.TAMILSELVAN
Numerical Methods
BISECTION METHOD
Bisection method is one of the bracketing methods. It is based on the “Intermediate value
theorem”
The idea behind the method is that if f(x) C [a, b] and f(a).f(b)<0 then there exist a root
“c (a,b)” such that “f(c)=0”
This method also known as BOLZANO METHOD (or) BINARY SECTON METHOD.
ALGORITHM
ve n
ity
ni va
For a given continuous function f(x)
rs
2. Let c = U el
1. Find a ,b such that f(a).f(b)<0 (this means there is a root “r
(mid-point)
(a,b)” such that f(r)=0
ai ils
3. If f(c)=0; done (lucky!)
al m
4. Else; check if ( ) ( ) or ( ) ( )
5. Pick that interval [a, c] or [c, b] and repeat the procedure until stop criteria satisfied.
m Ta
STOP CRITERIA
na S
CONVERGENCE CRITERIA
No. of iterations needed in the bisection method to achieve certain accuracy
Consider the interval [a0 ,b0] ,, c0 = and let r (a0,b0) be a root then the error is
0 = |r-c0|≤
Denote the further intervals as [an,bn] for iteration number “n” then
n=|r-cn|≤ ≤ =
ve n
After taking logarithm log (b0-a0) – nlog2 ≤ log (2 )
ity
ni va
( )– ( ) ( )–
≤n ≤ n (which is required)
rs
U el
ai ils
MERITS OF BISECTION METHOD
al m
1. The iteration using bisection method always produces a root, since the method
brackets the root between two values.
m Ta
2. As iterations are conducted, the length of the interval gets halved. So one can
guarantee the convergence in case of the solution of the equation.
na S
EXAMPLE
SOLUTION
X 2 4
f(x) -9 29
ve n
(2) For interval [2,3] ; xr = = 2.5
ity
ni va
f (2.5) = -5.875 (-ve)
(3) For interval [2.5,3]; xr = (2.5+3)/2 = 2.75
rs
(4) U el
f (2.75) = -2.9534 (-ve)
For interval [2.75,3]; xr = (2.75+3)/2 = 2.875
ai ils
f (2.875) = -1.1113 (-ve)
al m
EXAMPLE
Use bisection method to find out the roots of the function describing to drag coefficient of
parachutist given by
SOLUTION
X 12 13 14 15
f(x) 6.670 3.7286 1.5687 -0.4261
ve n
ity
ni va
Since f (14). f (15) <0 therefore root lie between 14 and 15
rs
Xr = = 14.5
U el
So f(14.5) = 0.5537
ai ils
Again f (14.5). f (15) <0 therefore root lie between 14.5 and 15
al m
EXAMPLE
An Dr
Explain why the equation e−x = x has a solution on the interval [0,1]. Use bisection to find the
root to 4 decimal places. Can you prove that there are no other roots?
SOLUTION
If f(x) = e−x − x, then f(0) = 1, f(1) = 1/e − 1 < 0, and hence a root is guaranteed by the
Intermediate Value Theorem. Using Bisection, the value of the root is x? = .5671.
Since f0(x) = −e−x − 1 < 0 for all x, the function is strictly decreasing, and so its graph can only
This method also known as REGULA FALSI METHOD,, CHORD METHOD ,, LINEAR
INTERPOLATION and method is one of the bracketing methods and based on intermediate
value theorem.
Like the bisection method we are not taking the mid-point of the given interval to determine
the next interval and converge faster than bisection method.
ALGORITHM
ve n
ity
Given a function f(x) continuous on an interval [a0,b0] and satisfying f(a0).f(b0)<0 for all
ni va
n = 0,1,2,3………….. then Use following formula to next root
rs
= ( ) ( ) U el
f(xf) We can also use xr = xn+1 ,,, xf = xn ,,, xi = xn-1
ai ils
STOPING CRITERIA
al m
4. Same answer.
5. Any combination of previous ones
An Dr
EXAMPLE
Using Regula Falsi method Solve x3-9x+1 for roots between x=2 and x=4
SOLUTION
X 2 4
f(x) -9 29
ve n
Using formula
ity
ni va
= xf - ( )
f(xf)
( )
rs
For interval [2,4] U el
we have xr ( )
29
ai ils
Which implies ( ) (-ve)
al m
Interval xr F(xr)
[2.4737,4] 2.7399 -3.0905
na S
EXAMPLE
Using Regula Falsi method to find root of equation “ ” upto four decimal
places, after 3 successive approximations.
SOLUTION
X 0 1 2
F(X) - -0.5403 1.1093
ve n
ity
ni va
Using formula
rs
Xr= xf - f(xf)
( ) ( )
U el
ai ils
For interval [1,2] we have xr=2- 1.1093=1.3275
( )
al m
Interval xr F(xr)
na S
KEEP IN MIND
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
ve n
( ) ( )
ity
ni va
( ) ( )
rs
(
U el ) ( )
ai ils
( ) ( )
al m
( ) ( )
m Ta
( ) ( )
We observe that f(xn-1), f(xn+1) are of opposite sign so, we can apply the above procedure to
na S
successive approximations.
An Dr
The Newton Raphson method is a powerful technique for solving equations numerically. It is
based on the idea of linear approximation. Usually converges much faster than the linearly
convergent methods.
ve n
ALGORITHM
ity
ni va
The steps of Newton Raphson method to find the root of an equation “f(x) =0” are
rs
Evaluate ( )
U el
ai ils
Use an initial guess (value on which f(x) and ( ) becomes (+ve) of the roots “xn” to
estimate the new value of the root “xn+1” as
al m
( )
m Ta
( )
na S
STOPING CRITERIA
An Dr
CONVERGENCE CRITERIA
Newton method will generate a sequence of numbers (xn) ; n 0, that converges to the zero
“x*” of “f” if
“f” is continuous.
“x*” is a simple zero of “f”.
“x0” is close enough to “x*”
When the Generalized Newton Raphson method for solving equations is helpful?
To find the root of “f(x)=0” with multiplicity “p” the Generalized Newton formula is required.
Newton Raphson method requires the evaluation of derivatives of the function and this is not
always possible, particularly in the case of functions arising in practical problems.
In such situations Secant method helps to solve the equation with an approximation to the
derivatives.
ve n
ity
ni va
Why Newton Raphson method is called Method of Tangent?
rs
U el
In this method we draw tangent line to the point” P0(x0,f(x0))”. The (x,0) where this tangent
line meets x-axis is 1st approximation to the root.
ai ils
Similarly, we obtained other approximations by tangent line. So, method also called Tangent
al m
method.
m Ta
Secant method needs two approximations x0,x1 to start, whereas Newton Raphson method
An Dr
Newton Raphson method is an open method because initial guess of the root that is needed
to get the iterative method started is a single point. While other open methods use two initial
guesses of the root but they do not have to bracket the root.
INFLECTION POINT
For a function “f(x)” the point where the concavity changes from up-to-down
e.g. f(x) = (x-1)3 changes concavity at x=1,, Hence (1,0) is an Inflection point.
ve n
Root jumping is another drawback.
ity
ni va
Results obtained from Newton Raphson method may oscillate about the Local
Maximum or Minimum without converging on a root but converging on the Local
rs
U el
Maximum or minimum.
ai ils
Eventually, it may lead to division by a number close to zero and may diverge.
al m
The requirement of finding the value of the derivatives of f(x) at each approximation
is either extremely difficult (if not possible) or time consuming.
m Ta
na S
An Dr
Let ( )
Then ( ) ( )
By Taylor theorem
( ) ( ) ( ) ( )
ve n
Since “h” is small therefore neglecting higher terms we get
ity
ni va
( ) ( ) ( )
rs
( )
U el
ai ils
( )
( )
al m
( )
( )
m Ta
( )
Similarly ( )
na S
( )
( )
An Dr
( )
( )
EXAMPLE
Apply Newton’s Raphson method for correct to three decimal places.
SOLUTION
( )
( )
( )
Using formula ( )
at
ve n
( )
( )
ity
ni va
( )
( ) ( )
rs
Similarly U el
ai ils
n ( ) ( )
al m
REMARK
An Dr
1. If two are more roots are nearly equal, then method is not fastly convergent.
2. If root is very near to maximum or minimum value of the function at the point, NR-
method fails.
EXAMPLE
Apply Newton’s Raphson method for correct to two decimal places.
SOLUTION
( )
( )
( )
( )
ve n
ity
ni va
( )
rs
For interval
U el
ai ils
X 0 1 2 3 4 5 6 7
f(x) -4.77 -4.77 -4.17 -3.34 -2.36 -1.28 -0.10 1.15
al m
m Ta
( )
Thus
An Dr
( )
( )
( ) ( )
Similarly
n ( ) ( )
2 6.08 0.00 0.00
Hence root is “6.08”
CONDITION
Choose “x0” such that ( ) and ( ) have same sign. If ( ( )) is a point then slope
of tangent at ( ( )) ( ( )) ( )
( )
ve n
( ) ( )( ) ……………………………………………. (i)
ity
ni va
Since ( ( ) ) as we take x1 as exact root
rs
(i) (U el ) ( )( )
ai ils
( )
al m
( )
( )
m Ta
( )
Which is first approximation to the root . If “P1” is a point on the curve corresponding
na S
to “x1” then tangent at “P1” cuts x-axis at P1(x2, 0) which is still closer to “ ” than “x1”.
Therefore “x2” is a 2nd approximation to the root.
An Dr
NEWTON SCHEME OF ITERATION FOR FINDING THE SQUARE ROOT OF POSITION NUMBER
The square root of “N” can be carried out as a root of the equation
Here ( ) ( )
( ) ( )
( )
Using Newton Raphson formula ( )
( )
ve n
ity
ni va
, - This is required formula.
rs
U el
ai ils
QUESTION
al m
SOLUTION
Let √
na S
Here ( ) ( ) ( )
An Dr
X 0 1 2 3 4
F(x) -12 -11 -8 -3 4
Root lies between 3 and 4 and x0 =4
For n=2 0 1 0 1
Similarly
Hence √
NEWTON SCHEME OF ITERATION FOR FINDING THE “pth” ROOT OF POSITION NUMBER “N”
Consider
Here ( ) ( )
( ) ( )
( ) ( )
[ ]
( ) . /
( )
) , -
ve n
[( ] Required formula for pth root.
ity
ni va
QUESTION
rs
U el
Obtain the cube root of 12 using Newton Raphson iteration.
ai ils
SOLUTION
al m
m Ta
Consider
Here ( ) and ( ) ( )
na S
For interval
An Dr
X 0 1 2 3
F(x) -12 -11 -4 15
Root lies between 2 and 3 and x0=3
( ) ( )
, - 0 1 , -
( )
Put n=0 [ ] 0 1
( )
Similarly
Hence √
………………………………………………………………………………….
………………………………………………………………………………….
ve n
ity
ni va
Where the coefficients “ ” and “ ” are given numbers.
rs
U el
The system is said to be homogeneous if all the “ ” are zero. Otherwise it is said to be
ai ils
non-homogeneous.
PARTIAL PIVOTING
In partial pivoting we interchange rows where pivotal element is zero.
(j>i) contains this element, then we interchange the “ith” equation with the “jth” equation and
proceed for elimination. This process is continued whenever pivotal coefficients become zero
during elimination.
TOTAL PIVOTING
In Full (complete, total) pivoting we interchange rows as well as column.
Because Pivoting made the difference between non-sense and a perfect result.
ve n
ity
ni va
rs
PIVOTAL COEFFICIENT
U el
ai ils
For elimination methods (Guass’s Elimination, Guass’s Jordan) the coefficient of the first
unknown in the first equation is called Pivotal Coefficient.
al m
BACK SUBSTITUTION
m Ta
The analogous algorithm for upper triangular system “Ax=b” of the form
na S
∑
The solution “xi” is computed by
FORWARD SUBSTITUTION
The analogous algorithm for lower triangular system “Lx=b” of the form
∑
The solution “xi” is computed by
ALGORITHM
In the first stage, the given system of equations is reduced to an equivalent upper
triangular form using elementary transformation.
In the second stage, the upper triangular system is solved using back substitution
procedure by which we obtain the solution in the order
REMARK
ve n
ity
ni va
Guass’s Elimination method fails if any one of the Pivotal coefficient become zero. In such a
situation, we rewrite the equation in a different order to avoid zero Pivotal coefficients.
rs
U el
ai ils
QUESTION Solve the following system of equations using Elimination Method.
al m
m Ta
na S
SOLUTION
An Dr
()
( )
( )
Using “z” in (iv) we get and Using “y”, “z” in (i) we get
Hence solution is
QUESTION
Solve the following system of equations by Guass’s Elimination method with partial pivoting.
SOLUTION
[ ]6 7 [ ]
ve n
ity
ni va
[ ]6 7 [ ] * +6 7 [ ]
rs
U el
ai ils
al m
[ ]6 7 [ ] 6 7 [ ]
m Ta
[ ]
2nd row cannot be used as pivot row as a22 =0, So interchanging the 2nd and 3rd row we get
na S
An Dr
6 7 [ ]
[ ]
QUESTION
Solve the following system of equations using Guass’s Elimination Method with partial
pivoting.
SOLUTION
ve n
ity
ni va
[ ][ ] [ ]
rs
U el
ai ils
[ ][ ] [ ]
al m
m Ta
[ ][ ] [ ]
na S
An Dr
[ ][ ] [ ]
[ ] [ ] and
[ ]
[ ][ ] [ ]
[ ] [ ]
[ ]
[ ] [ ] [ ]
ve n
ity
ni va
rs
U el
ai ils
al m
m Ta
na S
An Dr
(OR)
i.e. [ ]
ve n
CROUTS REDUCTION METHOD
ity
ni va
In linear Algebra this method factorizes a matrix as the product of a Lower Triangular matrix
rs
U el
and an Upper Triangular matrix.
ai ils
Method also named as Cholesky’s reduction method, triangulation method,
al m
or LU-decomposition (Factorization)
m Ta
ALGORITHM
For a given system of equations ∑
na S
2. Use “A=LU” (without pivoting) and “PA=LU” (with pivoting) where “P” is the pivoting
matrix and find “ ”
3. Use formula “AX=B” where “X” is the matrix of variables and “B” is the matrix of
solution of equations.
4. Replace “AX=B” by “LUX=B” and then put “UX=Z” i.e. “LZ=B”
5. Find the values of “ ” then use “Z=UX” find “ ” ; i=1, 2, 3, …….n
ADVANTAGE/LIMITATION (FAILURE)
1. Cholesky’s method widely used in Numerical Solution of Partial Differential Equation.
2. Popular for Computer Programming.
3. This method fails if in that case the system is Singular.
QUESTION
Solve the following system of equations using Crout’s Reduction Method
ANSWER
ve n
One of the
Let [ ]
ity
ni va
diagonals of L or U
must be 1
rs
Step I….
U el
ai ils
, - , -, -
al m
[ ] [ ][ ]
m Ta
[ ] [ ]
( )
( )
( * ( *
. / . /. /
[ ][ ] [ ]
[ ][ ] [ ]
ve n
ity
ni va
. /
rs
U el ( * ( )
ai ils
al m
[ ][ ] [ ]
na S
An Dr
[ ][ ] [ ]
( *
. / . /. / ( )
( )
( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
ve n
ity
ni va
( ) ( ) ( )
( ) ( )
rs
U el
ai ils
GUASS SEIDEL ITERATION METHOD
al m
Guass’s Seidel method is an improvement of Jacobi’s method. This is also known as method
m Ta
of successive displacement.
ALGORITHM
na S
In this method we can get the value of “ ”from first equation and we get the value of “ ”
An Dr
Need only one vector for both and save memory space.
Not good for parallel computing.
Converge a bit faster than Jacobi’s.
How Jacobi method is accelerated to get Guass Seidel method for solving system of Linear
Equations.
QUESTION: Find the solutions of the following system of equations using Guass Seidel
method and perform the first five iterations.
ve n
ity
ni va
rs
U el
ai ils
al m
m Ta
ANSWER
na S
An Dr
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
ve n
( )
ity
ni va
( ) ( )
( )
rs
( ) ( )
U el
ai ils
( )
( ) ( )
al m
( )
( ) ( )
na S
( )
( ) ( )
An Dr
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
COLLOCATION
Like the finite difference methods, the idea behind the collocation is to reduce the boundary
value problem to a set of solvable algebraic equations.
However, instead of discretizing the differential equation by replacing derivative with finite
differences, the solution is given a functional from whose parameters are fit by the method.
CRITERION OF APPROXIMATION
Some methods are as follows
ve n
ity
ni va
FORWARD DIFFERENCE OPERATOR ‘
rs
U el
We define forward difference operator as
ai ils
Where y=f(x) ( )
al m
Given function y=f(x) and a value of argument ‘x’ as x=a, a+h…… a+nh etc.
Where ‘h’ is the step size (increment) first order Forward Difference Operator is
na S
( ) ( ) ( )
An Dr
In General: ( )
Remark ( )
X Y
ve n
ity
ni va
rs
U el
QUESTION: Construct forward difference Table for the following value of ‘X’ and ‘Y’
ai ils
X 0.1 0.3 0.5 0.7 0.9 1.1 1.3
al m
X y
0.1 0.003
na S
0.064
An Dr
INTERPOLATION
ERROR OF APPROXIMATION
The deviation of g(x) from f(x) i.e. |f(x) – g (x)| is called Error of Approximation.
EXTRAPOLATION
The method of computing the values of ‘y’ for a given value of ‘x’ lying outside the table of
ve n
values of ‘x’ is called Extrapolation.
ity
ni va
REMARK
rs
U el
A function is said to interpolate a set of data points if it passes through those points.
ai ils
INVERSE INTERPOLATION
Suppose , - ( ) on [a, b] and has non- zero ‘p’ in *a, b+
al m
.
To approximate ‘p’ construct the interpolating polynomial of degree ‘n’ on the nodes
“y0, y1...........yn” for
na S
Since “yk=f (xk)” and f (p) =0, it follows that (yk) = Xk and p = (0).
An Dr
Where
Where
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
Where
DERIVATION:
Let ( ) ( )
( ) ( ) ( ) ( ) ( )
ve n
( ) ( ) ( )
ity
ni va
, - ( )
( )
rs
)
( ) (
U el) ( ) ( )
ai ils
CONDITION FOR THIS METHOD
al m
Value on which we find the function check either it is near to start or end.
If near to start, then use forward method.
If near to end, then use backward method.
na S
An Dr
QUESTION
Evaluate ( ) given the following table of values
X : 10 20 30 40 50
f(x) : 46 66 81 93 101
SOLUTION
Here ‘15’ nearest to starting point we use Newtown’s Forward Difference Interpolation.
X Y Y 2Y 3Y 4Y
10 46
ve n
20
ity
ni va
20 66 -5
15 2
rs
30 81
U el 12
-3
-1
-3
ai ils
40 93 -4
8
al m
50 101
m Ta
( ) ( )( ) ( )( )( )
( )
na S
( )
An Dr
( )( ) ( )( )( )
( ) ( )( ) ( ) ( )
( )( )( )( )
( )
( )
( ) ( )
( ) ( )( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( )( )
( ) 0 1 ( )
( )
( ) ( ) ( ) ( )
X 1 2 3 4 5 6 7 8
ve n
f(x) 1 8 27 64 125 216 343 512
ity
ni va
SOLUTION
rs
U el
Since ‘7.5’ is nearest to End of table, So We use Newton’s Backward Interpolation.
ai ils
X Y Y 2Y 3Y 4Y
1 1
al m
7
2 8 12
m Ta
19 6
3 27 18 0
37 6
na S
4 64 24 0
61 6
An Dr
5 125 30 0
91 6
6 216 36 0
127 6
7 243 42
169
8 512
Since
( ) ( )( )
Now
( )( ) ( )( )( )
( )( ) ( ) ( )
( )
(polynomial of n-degree)
( ) 2
ve n
ity
ni va
DERIVATION OF FORMULA
rs
n-degree polynomial U el
Let y=f (x) be a function which takes the values
( )= 0 +
so we will obtain an
+…………..+ n
ai ils
( ) ( )( ) ( )
al m
( )( ) ( )
() ( )( )( ) ( )
m Ta
Now
{ ( )( ) ( )
na S
Put x= in (i)
( ) ( )( ) ( )
( )( ) ( )
() ( )( )( ) ( )
{ ( )( ) ( )
( )( ) ( )
,( )( ) ( )-
Now Put x=
( ) ( )( ) ( )
,( )( ) ( )-
Similarly
,( )( ) ( )-
( ) ∑
( )( ) ( )( ) ( )
Where ( ) ( )( ) ( )( ) ( )
ve n
ALTERNATIVELY DEFINE
ity
ni va
( ) ( )( ) ( )
rs
Then ( ) (U el ),( )( ) ( )-
ai ils
( ),( )( )( ) ( )-
al m
( ),( )( )( ) ( )-
m Ta
( ) ( )( ) ( )( ) ( )
( ) ( )( ) ( )( ) ( )
( )
na S
( ) ( )( ) ( )( ) ( )
An Dr
( )
Then ( ) ( ) ( )
CONVERGENCE CRITERIA
( )
Assume a triangular array of interpolation nodes exactly ‘ ’ distinct nodes for
“
( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
QUESTION
Find langrage’s Interpolation polynomial fitting The points ( )
( ) ( ) ( ) Hence find ( )
X: =1 =3 =4 =6
Y: -3 0 30 132
ANSWER
Since ( ) + + +
ve n
( )( )( ) ( )( )( ) ( )( )( )
( ) ( )( )( )
+( )( )( )
+( )( )( )
+
ity
ni va
( )( )( )
( )( )( )
rs
By putting values, we get
U el
ai ils
( )
al m
( )( )( ) ( )( )( ) ( )( )( ) ( )( )( )
( )( )( )
( ) ( ) ( ) ( )
( )( )( ) ( )( )( ) ( )( )( )
m Ta
( ) , -
Put to get ( )
na S
( ) , ( ) ( ) -
An Dr
Y (5) =75
DIVIDED DIFFRENCE
, - ( )
, - , -
, - [ ]
The 2nd Order Difference is [ ]
[ ] [ ]
Similarly [ ]
NUMARICAL DIFFERENTIATION
ve n
ity
( ) ( )
ni va
Since
, ( )-
rs
Where D is differential operator.
U el
ai ils
0 1 ()
al m
Therefore
m Ta
( ) 0 1 ( ) ( )
na S
( ) ( ) 0 ( ) ( ) ( ) ( ) 1
An Dr
0 1
() 0 1
0 1 After solving
0 1
Since ( ) ( )
Since ( ) therefore
0 1 ()
Now ( ) 0 1 ( ) ( )
( ) ( ) 0 ( ) ( ) ( ) ( ) 1
ve n
0 1
ity
ni va
Similarly, for second derivative squaring (i) we get
rs
() U el 0 1
ai ils
al m
0 1
m Ta
Since
na S
( )
( ) ( )( ) ( )
An Dr
( ) ( ) ( ) ( ) ()
( )
( )
() ( ) ( ) ( ) ( ) )
( )
0 ( ) ( ) 1. /
( )
6 ( ) ( ) 4 5 ( )
4 5 ( ) 7
( )
0 ( ) ( ) ( ) . / ( ) 1
( )
ve n
ity
ni va
Equation ( )& ( ) are Newton’s backward interpolation formulae which can be used to
compute 1st and 2nd derivatives of a tabular function near the end of table similarly
rs
U el
Expression of Newton’s forward interpolation formulae can be derived to compute the 1st, 2nd
ai ils
and higher order derivatives near the beginning of table of values.
al m
m Ta
Since
na S
An Dr
Since therefore
Also as therefore . /
. / . / . /
( ) . / ………..
. / . / . /
[ ( + ]
0 1 ()
NUMERICAL INTEGRATION
The process of producing a numerical value for the defining integral ∫ ( ) is called
Numerical Integration. Integration is the process of measuring the Area under a function
plotted on a graph. Numerical Integration is the study of how the numerical value of an
integral can be found.
ve n
ity
ni va
This formula is also called a general quadrature formula.
Suppose f(x) is given for equidistant value of ‘x’ say a=x0, x0+h,x0+2h …. x0+nh = b
rs
U el
Let the range of integration (a,b) is divided into ‘n’ equal parts each of width ‘h’ so that
ai ils
“b-a=nh”.
al m
By using fundamental theorem of numerical analysis It has been proved the general
m Ta
( ) 1
An Dr
Bu putting n into different values various formulae is used to solve numerical integration.
That are Trapezoidal Rule, Simpson’s 1/3, Simpson’s 3/8, Boole’s, Weddle’s etc.
TRAPEZOIDAL RULE
ve n
ity
ni va
Consider a curve ( ) bounded by and we have to find ∫ ( ) i.e.
( ) then for one Trapezium under the area i.e. n = 1
rs
Area under the curve
U el Y
ai ils
Y
f(x2)
al m
m Ta
F(x0) F(x1)
f(x0)
h h
na S
An Dr
O a=x0 B=x1 X
O a= x0 x1 b= x2 X
∫ ( )
( ) ( )
∫ ( ) , ( ) ( )-
∫ ( ) , ( ) ( )- , ( ) ( )- , ( ) ( ) ( )-
For n = 3 ∫ ( ) , ( ) ( )- , ( ) ( )- , ( ) ( )-
∫ ( ) , ( ) , ( ) ( )- ( )-
∫ ( ) , ( ) , ( ) ( ) ( )- ( )-
∫ ( ) , ( ) -
The accuracy will be increase if number of trapezium will be increased OR step size will be
decreased mean number of step size will be increased.
ve n
DARIVATION (2nd METHOD)
ity
ni va
Define y = f(x) in an interval , - , - then
rs
U el
ai ils
∫ ( ) ∫ ( ) ∫ ( ) ∫ ( )
al m
∫ ( ) [ ( )] [ ( )] [ ( )]
m Ta
, ( )-
An Dr
Therefore ∫ ( ) , ( ) - Where
SOLUTION
SIMPSON’S ( ) RULE
∫ ( ) , ( ) ( ) -
ve n
Global error for Simpson’s Rule is defined as ( ) ( )
ity
ni va
REMARK
rs
U el
In Simpson Rule number of trapezium must of Even and number of points must of Odd.
ai ils
DERIVATION OF SIMPSON’S ( ) RULE (1st method)
al m
Consider a curve bounded by x = a and x = b and let ‘c’ is the mid-point between and such
m Ta
Y
na S
An Dr
f(c )
f(a) f(b)
A B C
0 a c b X
Consider ()
Now
()
∫ ( ) ∫ 0 ( ) ( ) ( ) 1
∫ ( ) ∫ 0 ( ) ( ) ( )1
∫ ( ) | ( ) ( ) ( )| 0 ( ) ( )1 ()
ve n
( ) ( ) ( ) ( ) ( )
ity
ni va
rs
( ) ( )
U el ( ) ( ) ( )
ai ils
( ) ( ) ( ) ( )
al m
∫ ( ) , ( ) * ( ) ( ) ( )+-
∫ ( ) , ( ) ( ) ( ) ( )-
na S
( ) , ( ) ( ) ( )- , ( ) ( ) ( )-
An Dr
∫ ( ) , ( ) ( ) ( )- , -
For n = 4
∫ ( ) ∫ ( ) ∫ ( ) , - , -
∫ ( ) , ( ) -
In General
∫ ( ) , ( ) ( ) -
∫ ( ) ∫ ( ) ∫ ( ) ∫ ( )
∫ ( ) , - , - , -
∫ ( ) , ( ) ( ) -
EXAMPLE
ve n
ity
ni va
Compute √ ∫ using Simpson’s (1/3) Rule when
rs
SOLUTION U el
ai ils
X 0 0.125 0.250 0.375 0.5 0.625 0.750 0.875 1
al m
F(x) 0.798 0.792 0.773 0.744 0.704 0.656 0.602 0.544 0.484
m Ta
√ ∫ , ( ) ( )-
An Dr
SIMPSON’S ( ) RULE
∫ ( ) , - ( )
∫ ( ) , ( ) ( ) -
ve n
ity
ni va
DERIVATION
rs
∫ ( )
U el ∫ ( ) ∫ ( ) ∫ ( )
ai ils
∫ ( ) , - , -
al m
m Ta
, -
∫ ( ) , ( ) ( ) -
na S
REMARK: Global error in Simpson’s (1/3) and (3/8) rule are of the same order but if we
consider the magnitude of error then Simpson (1/3) rule is superior to Simpson’s (3/8) rule.
SINGLE STEP METHODS: A series for ‘y’ in terms of power of ‘x’ form which the value of
‘y’ at a particular value of ‘x’ can be obtained by direct substitution
e.g. Taylor’s, Picard’s, Euler’s, Modified Euler’s Method.
MULTI - STEP METHODS: In multi-step methods, the solution at any point ‘x’ is obtained
using the solution at a number of previous points.
(Predictor- corrector method, Adam’s Moulton Method, Adam’s Bash forth Method)
REMARK
ve n
There are some ODE that cannot be solved using the standard methods. In such situations we
ity
ni va
apply numerical methods. These methods yield the solutions in one of two forms.
rs
U el
(i) A series for ‘y’ in terms of powers of ‘x’ from which the value of ‘y’ can be obtained
by direct substitution. e.g. Taylor’s and Picard’s method
ai ils
(ii) A set of tabulated values of ‘x’ and ‘y’. e.g. and Euler’s, Runge Kutta
al m
m Ta
Using these methods one step method clears after the first few steps.
IMPLICIT METHODS
Method that does not directly give a formula to the new approximation. A need to get it,
need an implicit formula for new approximation in term of known data. These methods also
known as close methods. It is possible to get stable 3 rd order implicit method.
EXPLICIT METHODS
Methods that not directly give a formula to new approximation and need an explicit formula
for new approximation in terms of known data. These are also called open methods.
Most Authorities proclaim that it is not necessary to go to a higher order method. Explain.
If more accuracy is required, then either a smaller step size. OR an adaptive method should
be used.
CONSISTENT METHOD: A multi-step method is consistent if it has order at least one “1”
ve n
Given ( ) , smooth function. Expand it at point then
ity
ni va
( )
( ) ( ) ( ) ( ) ( )
rs
( U el
)
ai ils
( ) ∑ This is called Taylor’s series of ‘f’ at ‘c’
al m
If ( )
m Ta
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ∑ ( )
DISADVANTAGE
Need to explicit form of the derivatives of function. That is why not practical.
( )
( ) ∑ ( ) Then first ( ) term is Taylor series
( ) ( )
( ) ( )∑ ( ) ( )
( )
CONVERGENCE
ve n
ity
ni va
A Taylor’s series converges rapidly if ‘x’ is nears ‘c’ and slowly (or not at all) if ‘x’ is for away
form ‘c’.
rs
EXAMPLE U el
ai ils
Obtain numerically the solution of ( ) using Taylor Series method to
al m
SOLUTION
()
na S
( ) [ ] ( )
An Dr
where
therefore ( ) ,( ) ,( ) ,( ) ,...........................
( ) ( ) as required.
i.e.
Also denote ( ) ( ) ( )
,, ( ) ,, ( )
ve n
Then ( ) Is the formula for second order RK-method.
ity
ni va
REMARK: Modified Euler Method is a special case of second order RK-Method.
rs
IN ANOTHER WAY: U el If ( ) ( )
ai ils
Then Equation for second order method is ( )
al m
( ) Where ( ) . /
An Dr
Where ( ) ( )
( ) ………………….….. ( ∑ )
SOLUTION: ( ) ()
If ‘h’ is not given then use by own choice for 4 – step take h=0.1 and for 1 – step take h=0.4
( ) Where ( ) . /
ve n
( ) . /
ity
ni va
𝑥 𝑥0
𝑛
For n = 0; ( ) . / ℎ
rs
() U el ( ) ( )
n = 2 steps
ai ils
( ) . /
al m
For n = 1;
m Ta
() ( ) ( )
na S
i.e.
Also denote ( ) ( ) ( )
,, ( ) . /
. / ( )
Then ( )
Is the formula for Runge Kutta method of order four and its error is ( )
ADVANTAGE OF METHOD
EXAMPLE: use 4th order RK method to solve ( ) from t =0 to 0.4 taking h = 0.4
SOLUTION: ()
ve n
ity
ni va
Now using formulas for the RK method of 4th order
rs
(
U el ) ( )
ai ils
Where ( ) , . / , . / ( )
al m
( ) , . /
. / ( )
na S
( ) ( ) ( )
An Dr
( ) , . /
. / ( )
( ) ( ) ( )
( ) , . /
. / ( )
( ) ( ) ( )
THIS IS REQUIRED ANSWER
A predictor corrector method refers to the use of the predictor equation with one subsequent
application of the corrector equation and the values so obtained are the final solution at the
grid point.
PREDICTOR FORMULA
The explicit (open) formula used to predict approximation is called a predictor formula.
CORRECTOR FORMULA
The implicit (closed) formula used to determine is called Corrector Formula. This used
to improve
ve n
ity
ni va
IN GENERAL
rs
Explicit and Implicit formula are used as pair of formulas. The explicit formula is called
U el
‘predictor’ and implicit formula is called ‘corrector’
ai ils
al m
Implicit methods are often used as ‘corrector’ and Explicit methods are used as ‘predictor’ in
predictor-corrector method. why?
m Ta
Because the corresponding Local Truncation Error formula is smaller for implicit method on
the other hand the implicit methods has the inherent difficulty that extra processing is
na S
REMARK
( )
Truncation Error of predictor is
( )
Local Truncation Error of Adam’s Predictor is
Truncation Error of Corrector is
Why Should one bother using the predictor corrector method When the Single step method
are of the comparable accuracy to the predictor corrector methods are of the same order?
A practical answer to that relies in the actual number of functional evaluations. For example,
RK - Method of order four, each step requires four evaluations where the Adams Moulton
method of the same order requires only as few as two evaluations. For this reason, predictor
corrector formulas are in General considerably more accurate and faster than single step
methods.
REMEMBER
In predictor corrector method if values of against the values of
are given the we use symbol predictor corrector method and in this
method we use given values of
ve n
In predictor corrector methods a predictor formula is used to predict the value of at
ity
ni va
and then a corrector formula is used to improve the value of
rs
Following are predictor – corrector methods
1. Milne’s Method
U el
ai ils
2. Adam – Moulton method
al m
m Ta
MILNE’S METHOD
It’s a multi-step method. In General, Milne’s Predictor – Corrector pair can be written as
na S
P: ( )
An Dr
C: ( )
ALGORITHM
First predict the value of by above predictor formula.
Where derivatives are computed using the given differential equation itself.
Using the predicted value we calculate the derivative from the given
differential Equation.
Then use the corrector formula given above for corrected value of . Repeat this
process.
SOLUTION:
Now by using Euler’s method ( )
( ) ( )
( ) ( )
( ) ( )
Now
For n=1
ve n
For n=2
ity
ni va
For n=3
rs
U el
Now using Milne’s Predictor formula
ai ils
P: ( )
al m
( )
m Ta