CH#3 Numerical Differentiation and Integration-14!05!2023-First Form

You might also like

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

Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

CHAPTER # 3
NUMERICAL
DIFFERENTIATION
& INTEGRATION

Dr. Jamil Book Series 2 Page 1


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

CHAPTER # 3
PART-I: NUMERICAL DIFFERENTIATION

𝟏): Newton’s Forward differentiation formulae

1a): Newton’s Forward differentiation formulae at general point :-

Let ( ) 𝟏 be the given data points or

“Table of values”

( ) ( ) ( ) 𝟏 ( 𝟏) 𝟏 ( ) ( )

The Newton’s forward interpolation formula is given by

( 𝟏) ( 𝟏)( )
( ) ( )

( 𝟏)( ) ( 𝟏)

where

Differentiating this formula using chain rule, we have

𝟏 𝟏

𝟏 𝟏 𝟏
,

𝟏 𝟏
- (F1X)
𝟏

Differentiating once again, we have

𝟏 𝟏 𝟏 𝟏
( ) ( ) ( ) ( )

Dr. Jamil Book Series 2 Page 2


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

𝟏 𝟏 𝟏𝟏
, ( 𝟏)
𝟏

𝟏 𝟏 𝟏
- (F2X)
𝟏

and so on.

1b): Newton’s Forward differentiation formulae at Initial point :-

In particular at initial point , we have . Then (F1X) and (F2X) becomes

𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
| 0

1 (F1X0)

𝟏 𝟏𝟏
| 0 – 1 (F2X0)
𝟏

and so on.

2): Newton’s Backward differentiation formulae

2a): Newton’s Backward differentiation formulae at general point :-

Let ( ) 𝟏 be the given data points or

“Table of values”

( ) ( ) ( ) 𝟏 ( 𝟏) 𝟏 ( ) ( )

The Newton’s forward interpolation formula is given by

( 𝟏) ( 𝟏)( )
( ) ( )

( 𝟏)( ) ( 𝟏)

where

Dr. Jamil Book Series 2 Page 3


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Differentiating this formula using chain rule, we have

𝟏 𝟏

𝟏 𝟏 𝟏
,

𝟏 𝟏
- (B1X)
𝟏

Differentiating once again, we have

𝟏 𝟏 𝟏 𝟏
( ) ( ) ( ) ( )

𝟏 𝟏 𝟏𝟏
, ( 𝟏)
𝟏

𝟏 𝟏 𝟏
- (B2X)
𝟏

and so on.

2b): Newton’s Backward differentiation formulae at Final point :-

In particular at initial point , we have . Then (B1X) and (B2X) becomes

𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
| 0

1 (B1XN)

𝟏 𝟏𝟏
| 0 1 (B2XN)
𝟏

and so on.

3): Derivative using central difference interpolation formulae

3a): Central differentiation formulae at general point

Let ( ) 𝟏 be the given data points or

Dr. Jamil Book Series 2 Page 4


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

“Table of values”

( ) ( ) ( ) 𝟏 ( 𝟏) 𝟏 ( ) ( )

For differentiation in the central part of the table, we can use sterling or Bessel’s

interpolation formulae and differentiate. The Sterling’s formula is given by:

( 𝟏) ( 𝟏) 𝟏
( ) 𝟏 ( )

( 𝟏)

where

and is the central point of the table. Differentiating this formula two times using chain

rule, we get

𝟏 ( 𝟏) 𝟏 𝟏 ( )
0. / 𝟏 . / 1 (C1X)

𝟏 𝟏 (𝟏 )
0 𝟏 . / 1 (C2X)

and so on.

3b): Central differentiation formulae at Central point :-

In particular at initial point , we have . Then (C1X) and (C2X) becomes

𝟏 ( 𝟏) 𝟏 𝟏
| = *( ) ( ) + (C1X0)

𝟏 𝟏
| = 0 𝟏 1 (C2X0)
𝟏

and so on.

Dr. Jamil Book Series 2 Page 5


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Example 1 :-

Find the first two derivative at 𝟏 𝟏 and 𝟏 from the following data :

1.0 1.2 1.4 1.6 1.8 2.0

0.000 0.1280 0.5440 1.2960 2.4320 4.000

Solution :-

“Forward Difference Table ”

1.0 0.000
0.1280
1.2 0.1280 0.2880
0.4160 0.0480
1.4 0.5440 0.3360 0
0.7520 0.0480
0
1.6 1.2960 0.386 0
1.1360 0.0480
1.8 2.4320 0.4320
1.5680
2.0 4.000

𝟏𝟏

We have to use Newton’s forward formula as 𝟏 𝟏 near the starting value.

𝟏𝟏 𝟏

𝟏𝟏 𝟏

𝟏 𝟏
* +

𝟏
, ( 𝟏) -

Substituting the values in above formulae, we have

𝟏 ( ) 𝟏 ( ) ( )
| = 0 𝟏 ( ) ( )1
𝟏𝟏

(𝟏 𝟏)
|
𝟏𝟏

Dr. Jamil Book Series 2 Page 6


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

and

𝟏
| = , 𝟏 ( 𝟏)( )-
𝟏𝟏 ( )

(𝟏 𝟏)
|
𝟏𝟏

We have to use Newton’s forward differentiation formula at 𝟏 is exactly the initial


point of the table. Therefore, We have

𝟏 𝟏 𝟏
| = 0 1
𝟏

𝟏
| 0 𝟏 1
𝟏

(𝟏)
| = =0
𝟏

and

𝟏
| = , -
𝟏

𝟏
| ( )
, -
𝟏

(𝟏)
| =
𝟏

Example 2:-

The following table gives the displacement in meters at different times. Find the velocities
and accelerations at 𝟏

0 0.5 1.0 1.5 2.0


0 8.75 30.0 71.25 140.0

Solution :-

We have to use Newton’s back ward differentiation formula at 𝟏 sec is near the end
of the table.

Dr. Jamil Book Series 2 Page 7


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

“Backward Difference Table ”

( )

8.75 𝟏
21.25
𝟏
41.25
𝟏 𝟏

From above table, we have

𝟏
𝟏

𝟏
Now the newton’s formulae for backward differentiation are

𝟏 ( 𝟏) ( )
* +

𝟏
, ( 𝟏) -

After substituting we get ,

(𝟏 )
| 𝟏
𝟏

and
𝟏
| , ( 𝟏)( )-
𝟏
( )

(𝟏 )
| 𝟏
𝟏

Dr. Jamil Book Series 2 Page 8


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Now

Therefore we have to use Newton’s backward differentiation formula at sec is


exactly the final point of the table. Therefore, We have
𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
| [ ] [ ( ) ( )]

( )
| 𝟏

Also

𝟏
| , -

𝟏
| , -

( )
| 𝟏

Example 3:-

Find , at for the following data:

0 0.2 0.4 0.6 0.8 1.0 1.2

0 0.122 0.493 1.123 2.022 3.200 4.666

Solution:-
We have to use central difference formula because is the centre point of the given
data.

Dr. Jamil Book Series 2 Page 9


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

“Central Difference Table”

0 0

0.2 𝟏

𝟏 𝟏

𝟏 0.4 𝟏

𝟏 𝟏

0.6 𝟏𝟏 𝟏 𝟏

𝟏 𝟏 𝟏

𝟏 0.8 𝟏 𝟏 𝟏

𝟏𝟏 𝟏

1.0 𝟏

1.2

We have
𝟏 , , 𝟏 , 𝟏 , 𝟏 𝟏 ,

, , 𝟏 and 𝟏

Here and , then by central difference formula, we have

𝟏 𝟏 𝟏 𝟏 𝟏
| * ( ) +

𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
| 0 1

| 𝟏

Also

𝟏 𝟏 𝟏
| 0 𝟏 1
𝟏

𝟏 𝟏 𝟏
| [ ( ) ( 𝟏)]
( ) 𝟏

Dr. Jamil Book Series 2 Page 10


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Example 4:-
From the following table:

1.0 1.2 1.4 1.6 1.8 2.0 2.2

2.7183 3.3201 4.0552 4.9530 6.0496 7.3891 9.0250

Calculate at 𝟏 𝟏 .

Answer:-

Example 5:-

Compute , at 𝟏 from the following data:

𝟏
𝟏 𝟏𝟏 𝟏 𝟏 𝟏 𝟏

Answer:-

Dr. Jamil Book Series 2 Page 11


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

CHAPTER # 3

Area of Trapezium:-

The area of Trapezium is given by:

𝟏
( ) ( )

Note(Area under the Line or Trapezium):-


Trapezium

( ( ) ( )) ( ( ) ( 𝟏 ))

Dr. Jamil Book Series 2 Page 12


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

1): Trapezodal Rule

1a): Simple Trapezoid Rule:-

The numerical value of this definite integral ∫ ( ) the simple trapezoid rule when the
curve ( ) is approximated by lines (linear on first degree approximation and the
number of points are two o and 𝟏 and the number of subinterval 𝟏 and
is given by

Exact area under the curve Area under the Line or Trapezium

∫ ( ) , ( ) ( )- , ( ) ( 𝟏 )- (Area of Trapezium)

1b): Genralized or Composite Trapezoidal Rule:-

Consider the curve ( ) bounded by lines and We are interested to find


∫ ( ) that is the area under the curve ( ) bounded by and , using
Trapezoidal rule

Divide the interval , - into n sub interval , i i- of equal length or step size
as shown in the figure above, Then

Dr. Jamil Book Series 2 Page 13


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

𝟏 𝟏

OR

Dr. Jamil Book Series 2 Page 14


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

and the step size is

The corresponding value of the function ( ) at the points and

( ) ( 𝟏) ( ) ( )

Let the area under the curve ( ) between these points 𝟏 and be denoted by i,

then

∫ 𝟏
( )

, ( 𝟏) ( )- 𝟏

Thus the area under the curve from to is

∫ ( ) 𝟏

Exact area under the curve Area under the Lines or Trapeziums

Using simple Trapezoid rule for each above integral that is approximate the curve ( )

by line to each of these integral, we have,

∫ ( ) , ( ) ( 𝟏 )- , ( 𝟏) ( )- , ( ) ( )-

, ( 𝟏) ( )-

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( 𝟏) ( )-

This is called generalized or Composite Trapezoid formula for ( 𝟏) points and sub
intervals.
Note:-
The accuracy of the approximate solutions can be increased n (number of Trapezium or
sub intervals) or by decreasing step size h.

Dr. Jamil Book Series 2 Page 15


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Example#1:-

Evaluate the integral: ∫𝟏 ,using Trapezoid rule for


1): 3-points.
2): 5-points.
3): 11-points.
also calculate the exact value and comment on your result.
Solutions:-
1): For 3-points:-
We have,
𝟏
( ) 𝟏

For these points 𝟏 we have and step size is;

𝟏
𝟏

“Table of values”
1
𝟏

( ) 𝟏 𝟏𝟏
( ) ( 𝟏) ( )

Using trapezoid formula for 3 points, we have

∫ ( ) , ( ) ( 𝟏) ( )-

Substituting value we have,

𝟏 𝟏 𝟏
∫ ,𝟏 ( ) 𝟏𝟏 -
𝟏

2): For 5- points:-


For 5 -points 𝟏 we have and step size is

𝟏 𝟏

“Table of values”

𝟏 𝟏
𝟏
( ) 𝟏 𝟏 𝟏𝟏
( ) ( 𝟏) ( ) ( ) ( )

Using trapezoid formula for 5-point, we have

Dr. Jamil Book Series 2 Page 16


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( )-

Substituting value we have,

( 𝟏)
∫ ,𝟏 ( ) ( ) ( 𝟏) 𝟏𝟏 -
𝟏

3): For 11- points:-


For 11 -points 𝟏 𝟏 we have 𝟏 and step size is

𝟏 𝟏
𝟏 𝟏

“Table of values”

1 1.2 1.4 1.6 1.8 2.0

( ) 1 0.6944 0.5102 0.3906 0.3086 0.25


( ) ( 𝟏) ( ) ( ) ( ) ( )

2.2 2.4 2.6 2.8 3.0

0.2066 0.1736 0.1472 0.1275 0.11


( ) ( ) ( ) ( ) ( 𝟏 )

Using trapezoid formula for 11 points, we have

∫ ( ) , ( ) * ( 𝟏) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( )+ ( 𝟏 )]

Substituting value we have,

∫𝟏 ,𝟏 ( ) ( 𝟏 ) ( ) ( ) ( )

( 𝟏) ( 𝟏 𝟏) ( 𝟏 ) ( 𝟏 𝟏) 𝟏𝟏 -

(𝟏 𝟏 𝟏 𝟏)
𝟏

Exact value:-
𝟏 𝟏
∫ | | [ 𝟏]
𝟏 𝟏

Dr. Jamil Book Series 2 Page 17


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Comment:-
It is clear that as the number of trapezium or sub intervals are increased then the
approximate solution become closer to the exact value.

Example#2:-
𝟏
Evaluate the integral: ∫ using trapezoidal rule for
𝟏
1): 5- points
2): 11- points
Also calculate the exact value and comment on your result.
Solutions:-
1): For 5- points:-
We have

𝟏
( )= , 𝟏
𝟏

For 5 -points 𝟏 we have and step size is,

𝟏
h =𝟏

“Table of values”

𝟏
𝟏

( ) 𝟏
( ) ( 𝟏) ( ) ( ) ( )

Using trapezoid formula for 5 points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( )-

Substituting value we have,

𝟏
( )
∫ ,𝟏 ( ) ( ) ( ) -

2): For 11- points:-


For 11 -points 𝟏 𝟏 we have 𝟏 and step size is

𝟏 𝟏
𝟏
=𝟏 𝟏

Dr. Jamil Book Series 2 Page 18


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

“Table of values”

0 0.1 0.2 0.3 0.4 0.5


𝟏

( ) 1 0.99 0.96 0.92 0.86 0.80


( ) ( 𝟏) ( ) ( ) ( ) ( )

0.6 0.7 0.8 0.9 1.0


𝟏

0.74 0.67 0.61 0.55 0.5


( ) ( ) ( ) ( ) ( 𝟏 )

Using trapezoid formula for 11 points, we have

∫ ( ) , ( ) * ( 𝟏) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( )+ ( 𝟏 )]

Substituting value we have,


𝟏
𝟏
∫ ,𝟏 ( ) ( ) ( ) ( ) ( ) ( )

( ) ( 𝟏) ( ) -

𝟏(𝟏 𝟏 )

Exact value:-
𝟏
𝟏 𝟏 𝟏( 𝟏
∫ | | , 𝟏) ( )-
𝟏

Comment:-
The absolute error on above calculations are

𝟏) | |

) 𝟏𝟏 | |

The error can be futher minimized by increasing sub interval n or decreasing step size by
h.

Dr. Jamil Book Series 2 Page 19


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Note(Area under the Parabola):-

, ( ) ( 𝟏) ( )-

2): Simpson’s 1/3rd Rule

2a): Simple Simpson 1/3rd Rule:-

Dr. Jamil Book Series 2 Page 20


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

The numerical value of the definite integral ∫ ( ) by simple simpson’s 3rd rule when
the curve ( ) approximated by parabola (quadratic or second degree approximation)
the number of points are three(odd) 𝟏 and number of interval
(even) and the step size is given by (without proof)

Exact area under the curve Area under the Parabola

∫ ( ) , ( ) ( 𝟏) ( )-

The formula is known as simple simpson’s 1/3rd rule for numerical integration.

2b): Generalized or Composite Simpson 1/ 3rd rule:-


Consider the curve ( ) bounded by the lines and we are interested to
find ∫ ( ) that is the area under the curve ( ) bounded by and and
using simpson 3rd rule.

We shall divide the level of integration , - into an even number of sub –intervals
( ) of equal length o step-size . The number of
points are ( 𝟏) (odd) given by:

𝟏 𝟏

Or

Dr. Jamil Book Series 2 Page 21


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Then the numerical value of definite integral ∫ ( ) or area under the curve ( )
from to from generalized or composite Simpson’s 1/3rd rule is given by:

Exact area under the curve Area under all Parabolas

∫ ( ) ∫ ( )

∫ ( ) ∫ ( ) ∫ ( ) ∫ ( ) ∫ ( )

Using simple Simpson’s 1/3rd rule for each above integrals that is approximate the curve
( ) by parabolas to each of these integrals, we have,

∫ ( ) , ( ) ( 𝟏) ( )- , ( ) ( ) ( )-

, ( ) ( ) ( )- , ( ) ( 𝟏) ( )-

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( 𝟏)

( ) ( )-

∫ ( )

, * +

* + -

This is called generalized or composite Simpson’s 1/3rd formula for ( 𝟏) points and
sub-intervals.
Note:-
In Simpson’s 1/3rd rule, the number of sub-intervals must be even or the number of
points must be odd otherwise it is not applicable.

Dr. Jamil Book Series 2 Page 22


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Example # 3:-
Apply 5-Points Simpson’s 1/3rd rule to evaluate:
𝟏
∫ 𝟏
, compare your answer with the exact value and obtained value by trapezoidal rule.

Solution:-
5- Points trapezoidal rule:-

We have

𝟏
( )= , 𝟏
𝟏

For 5 -points 𝟏 we have and step size is,

(𝟏 ) 𝟏
h =

“Table of values”

𝟏 𝟏

( ) ( )𝟏 ( 𝟏) ( ) ( ) ( )

Using trapezoid formula for 5 points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( )-

Substituting value we have,

𝟏
( )
∫ ,𝟏 ( ) ( ) ( ) -

5- Point Simpson’s 1/3rd rule:-


Using Simpson’s 1/3rd formula, for five points we have,

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( )-

Substituting values, we have


𝟏
∫ ,𝟏 ( ) ( ) ( ) -
𝟏

𝟏
( )

𝟏
Exact value:-
𝟏
, 𝟏 - 𝟏 𝟏( 𝟏( 𝟏(
∫ 𝟏) 𝟏) )
𝟏

Dr. Jamil Book Series 2 Page 23


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

𝟏
𝟏 𝟏

𝟏

Comment:-

The solution obtained by Simpson’s 1/3rd rule is better than Trapezoid rule. So we refer
Simpson’s 1/3rd rule.

Example # 4:-
𝟏
Evaluate the integral:∫ , using
1): 5-Points trapezoidal rule:-
2): 5 -Points Simpson’s 1/3rd rule and compare your results with the exact value and
comment on the superiority of the method applied.
Solution:-

1):5-Points trapezoidal rule:-

We have,

( ) 𝟏

For 5 points 𝟏 we have and step size is:


𝟏

“Table of Values”

00 1 2.5 2 5.0 3 7.5 4 10

( ) ( )0 ( 𝟏 )18.75 ( )75 ( )168.75 ( )300

Using Trapezoidal formula, for 5 points we have,

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( )-

Substituting the values, we have


𝟏
∫ , *𝟏 𝟏 + -

𝟏 ( )
∫ , -

Dr. Jamil Book Series 2 Page 24


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

𝟏
∫ 𝟏 𝟏

1): 5 -Points Simpson’s 1/3rd rule:-

Using Simpson’s 1/3rd formula, for five points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( )-

Substituting the values, we have


𝟏
∫ , (𝟏 ) ( ) (𝟏 ) -

𝟏
∫ ,𝟏 - ( ) 𝟏

Exact value:-
𝟏
𝟏
∫ , - 𝟏 𝟏

Comment:-
The (absolute) error in above two, methods are:
1): 𝟏 𝟏 𝟏 𝟏
2): 𝟏 𝟏 𝟏
We are thankful to Simpson’s 1/3rd rule because it is far better than Trapezoidal rule.

Note(Area under the Cubic curve):-

Dr. Jamil Book Series 2 Page 25


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

, ( ) ( 𝟏) ( ) ( )-

3): Simpson’s 3/8th Rule

3a): Simple Simpson’s 3/8th:-_

The numerical value of the definite integral ∫ ( ) , by simple simpson’s 3/8th rule, when
the curve ( ) approximated by cubic curve( third degree approximation) and number
of points are four 𝟏 and number of sub-intervals by (without proof).

Exact area under the curve Area under Cubic curve

∫ ( ) , ( ) ( 𝟏) ( ) ( )-

This formula is known as simple Simpson’s 3/8th rule for numerical integration.

Dr. Jamil Book Series 2 Page 26


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

3b): Generalized or Composite Simpson’s 3/8th rule:-


Consider the curve ( ) bounded by the lines 𝟏 and . we are interested to

find ∫ ( ) that is area under the ( ) bounded by and using


Simpson’s 3/8th rule.

We shall divide the interval of integration , - into( ) number

of sub-intervals of equal length or step-size . The number of points are ( 𝟏)

given by:
𝟏 𝟏

or
𝟏

Then numerical value of definite integral ∫ ( ) or area under the curve ( ) from
from generalized or composite Simpson’s 3/8th rule is given by

Exact area under the curve Area under all Cubic curves

∫ ( ) ∫ ( )

Dr. Jamil Book Series 2 Page 27


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

∫ ( ) ∫ ( ) ∫ ( ) ∫ ( ) ∫ ( )

Using simple Simpson’s 3/8th rule for each above integrals that is approximate the curve
( ) by cubic curves to each of these integral, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( )- , ( ) ( ) ( )

( )- , ( ) ( ) ( ) ( )- , ( ) ( )

( 𝟏) ( )

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( 𝟏) ( )-

∫ ( ) , ( ) * ( 𝟏) ( ) ( ) ( 𝟏 )+ * ( )

( ) ( )+ ( )-

This is called generalized or composite Simpson’s 3/8th formula for ( 𝟏) points and n
sub-interval.
Note:-
In Simpson’s 3/8th rule, the number of sub-intervals “n” must be multiple of 3, otherwise it
is not applicable.

Example # 5:-
Evaluate: ∫ , when , using
𝟏
1): Trapezoidal rule
2): Simpson’s 1/3rd rule
3): Simpson’s 3/8th rule and compare your result with exact value and comment.

Solution:-
Trapezoidal rule:-
We have,

𝟏
( )
𝟏

For seven points 𝟏 we have and step size is :

Dr. Jamil Book Series 2 Page 28


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

“Table of Values”

0 1 2 3 4 5 6
0 1 3 4 5 6 7
( ) 1 ½ 1/3 ¼ 1/5 1/6 1/7
( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )

Using Trapezoidal formulas for seven points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )-

Substituting the values, we have


𝟏 𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
∫ [𝟏 { } ]
𝟏

𝟏 𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
∫ [𝟏 { } ]
𝟏

𝟏 𝟏 𝟏
∫ [𝟏 ] , 𝟏 -
𝟏

𝟏
∫ , 𝟏 𝟏-
𝟏

Simpson’s 1/3rd rule:-


Using Simpson’s 1/3rd formula, for seven points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )-

Substituting the values, we have


𝟏 𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
∫ [𝟏 { } { } ]
𝟏

𝟏 𝟏𝟏 𝟏 𝟏
∫ [𝟏 ]
𝟏 𝟏

𝟏
∫ , 𝟏 - 𝟏 𝟏
𝟏

Dr. Jamil Book Series 2 Page 29


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Simpson’s 3/8th rule:-


Using Simpson’s 3/8th formula for seven points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )-

Substituting the values, we have


𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
∫ [𝟏 { } ( ) ]
𝟏
𝟏 𝟏 𝟏
∫ [𝟏 ]
𝟏

𝟏
∫ , 𝟏 - 𝟏 𝟏
𝟏

Exact value:-

∫ (𝟏 ) 𝟏
𝟏

Comment:-
The (absolute) error in above three, methods are:
1): 𝟏 𝟏 𝟏 𝟏
2): 𝟏 𝟏 𝟏 𝟏
3): 𝟏 𝟏 𝟏 𝟏

From above three methods, we note that the error in Simpson’s rules are less than the error
in Trapezoidal rule, and Simpson’s 1/3rd rule is much better than the Trapezoidal and
Simpson’s 3/8th rules.

Example # 6:-
Evaluate: ∫ , when , using
𝟏
1): Trapezoidal rule
2): Simpson’s 1/3rd rule
3): Simpson’s 3/8th rule and compare your result with exact value and comment.

Solution:-
Trapezoidal rule:-
we have,

Dr. Jamil Book Series 2 Page 30


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

𝟏
( )
𝟏
For seven points 𝟏 we have and step size is :

“Table of Values”

0 1 2 3 4 5 6
0 1 2 3 4 5 6
( ) 1 0.5 0.2 0.1 0.05882 0.03846 0.02702
( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )

Using Trapezoidal formulas for seven points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )-

Substituting the values, we have

𝟏
∫ ,𝟏 * 𝟏 𝟏 + -
𝟏

𝟏
∫ ,𝟏 𝟏 𝟏 -
𝟏

𝟏
∫ , 𝟏 𝟏 𝟏- ,𝟏 𝟏 𝟏-
𝟏

Simpson’s 1/3rd rule:-

Using Simpson’s 1/3rd formula, for seven points, we have

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )-

Substituting the values, we have


𝟏
∫ ,𝟏 * 𝟏 𝟏 + * +
𝟏

𝟏
∫ ,𝟏 𝟏 -
𝟏

𝟏
∫ , - 𝟏 𝟏 𝟏
𝟏

Simpson’s 3/8th rule:-


Using Simpson’s 3/8th formula for seven points, we have

Dr. Jamil Book Series 2 Page 31


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )-

Substituting the values, we have

∫ ,𝟏 * 𝟏 + ( 𝟏)
𝟏

∫ ,𝟏 𝟏 𝟏 -
𝟏

𝟏
∫ , 𝟏 - 𝟏
𝟏

Exact value:-
, 𝟏 - 𝟏( ) 𝟏( )
∫ 𝟏
𝟏

Comment:-
The (absolute) error in above three, methods are:
1): 𝟏 𝟏 𝟏 𝟏
2): 𝟏 𝟏 𝟏 𝟏 𝟏
3): 𝟏 𝟏 𝟏 𝟏
It is clear that solution obtained by Trapezoidal rule is close to exact value

Dr. Jamil Book Series 2 Page 32


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Comparison of Trapezoidal, Simpson’s 1/3rd and 3/8th rules


S# Characteristics Trapezoidal Rule Simpson’s 1/3rd Simpson’s 3/8th
1 No. of points 𝟏 𝟏 𝟏
2 No. of intervals

3 n is multiple of 1 2 3
4 Function y=f(x) is Lines Parabolas Cubic curves
approximated by

5 Type of First degree Second degree Third degree cubic or


approximation Linear quadratic or parabolic ternary curve

6 Initial coefficients

7 Middle terms 2,2,2,2,… 4,2,4,2,4,2,… 3,3,2,3,3,2,…


coefficients vary

8 Error ( ) ( ) ( )
𝟏 𝟏

Dr. Jamil Book Series 2 Page 33


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

EXERCISE- 3
PART-I: NUMERICAL DIFFERENTIATION
Question # 1:-
Find the first two derivative at 𝟏 𝟏 and 𝟏 from the following table:

𝟏 𝟏 𝟏 𝟏 𝟏

( ) 𝟏 𝟏

Answer:-
(1.1) = 0.630 , (1.1) = 6.60, (1) = 0 , (1) = 6.000
Question # 2:-

Find ( ), ( ), (𝟏 ) and (𝟏 ) from the following table:

𝟏 𝟏 𝟏

( ) 𝟏

Answer:-
( ) , ( ) , (𝟏 ) , (𝟏 )
Question # 3:-

Compute ( ), ( ), ( 𝟏), ( ), ( ) and ( ) from the following table:

( ) 𝟏 𝟏

Answer:-
-2, 0, 117, 16, 192, 498, 288, 12

Question # 4:-
Compute the second and third derivatives of the function tabulated below at the point
.

𝟏 𝟏

( ) 𝟏 𝟏

Answer:-

( ) 𝟏 , ( )

Question # 5:-

Compute ( ) from the following table:

Dr. Jamil Book Series 2 Page 34


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

( ) 𝟏 𝟏 𝟏 𝟏 𝟏 𝟏𝟏 𝟏𝟏

Answer:-
( )

Question # 6:-

Find ( ) and ( ) at and from the following table:

( )

Answer:-
( ) , ( ) , ( ) , ( )

Question # 7:-
A roc et is launched from the ground and its velocity during first 10 seconds is given below.
Find its acceleration at t = 5 sec.

𝟏 𝟏 𝟏 𝟏 𝟏 𝟏 𝟏

Answer:-

Question # 8:-
The Population of a certain town shown in following table :

( ) 1941 1951 1961 1971 1981

( ) 21.96 40.65 60.81 79.21 96.81

Find the rate of growth of the population in 1941.


Answer:-
1.5881
Question # 9:-

The following table gives corresponding values of Pressure and Specific volume of supper
heated steam:

𝟏 𝟏 𝟏

Find the rate of change of Pressure with respect to volume, when and 𝟏 .

Dr. Jamil Book Series 2 Page 35


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Answer:-
6.2333, -12.6833

Question # 10:-
A road is rotating in a plane about one of its ends. The table given below gives the values of
the angle radians through which the rod has turned. for various values of time seconds.
Find its angular velocity and angular acceleration when .

𝟏 𝟏

Answer:-

Question # 11:-
The specific heats of silica glass at various temperature are as follows:

( ) 𝟏

( ) 𝟏

Find the rate of change of specific heat with respect to temperature at 120°C and 450°C.
Answer:-
0.00004429 ; 0.00004125.
Question #12:-
Find the values of sinx at from the following data using numerical
differentiation.

35 40 45 50 55

0.8192 0.7660 0.7071 0.6428 0.5736

Answer:-
0.5101 ; 0.7066 ; 0.8619
Question # 13:-

In a certain machine a slider moves along a fixed straight rod. Its distance X cms along the
rod is given in the following table for various values of time t seconds. Find the velocity
and acceleration of the slider when t = 0.3 sec.

𝟏 𝟏 𝟏

Answer:-
⁄ ⁄

Dr. Jamil Book Series 2 Page 36


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Question # 14:-
Find the value of x for which f(x) is maximum in the range of x given, using the following
table; Find also the maximum value of f(x).

𝟏 𝟏

( )

Answer:-
92.11 ; 43.27

Question # 15:-
Find the maximum value of ( ) in the given range of , from the following table:

1.2 1.3 1.4 1.5 1.6

( ) 0.9320 0.9636 0.9855 0.9975 0.9996

Answer:-
𝟏 𝟏
Question # 16:-
In the range of ; given in the following data. Find also the minimum value of ( ).

2 3 4 5 6

( ) 31.1875 12.0275 2.8655 3.7052 14.5440

Answer:-
4.416 ; 1.9999
Question # 17 :-
For what value of is the following tabulated function a minimum? Find also the minimum
value of the function.

0 2 4 6

( ) 3 2 11 27

Answer:-
0.58 ; 1.029

Question # 18 :-
A rod is rotating in a plan. The following table given the angle in radian through which
the rod has turned for various values of the time in second.

( ) 0 0.2 0.4 0.6 0.8 1.0 1.2


( ) 0 0.12 0.49 1.12 2.02 3.20 4.67

(i): Calculate the Angular Velocity ( ) and Angular Acceleration


( ) at
(ii): Give final accumulating remarks and interpretation of your findings.
Answer:-

Dr. Jamil Book Series 2 Page 37


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Question # 19 :-
The population of a certain town is given below. Find the rate of growth of the population
in 1941 and 1961.
Year 1931 1941 1951 1961 1971

40.62 60.80 17.95 103.56 132.65

Answer:-

Question # 20 :-
The table below gives the result of an observation. is the observed temperature in degrees
centigrade of a vessel of cooling water, is the time of minutes from the beginning of the
observations.

1 3 5 7 9

85.3 74.5 67.0 60.5 54.3

Find the approximate rate of cooling at and

Answer:-
𝟏𝟏 𝟏

Question # 21 :-
A slider in a machine moves along a fixed straight rod. Its distance along the rod is
given below for various values of the time Find the velocity of the slider and its
acceleration when

0 0.1 0.2 0.3 0.4 0.5 0.6

30.13 31.62 32.87 33.64 39.95 33.81 33.24

Answer:-

Question # 22 :-
Given the following table of values of and

1.00 1.05 1.10 1.15 1.20 1.25 1.30

1.000 1.025 1.049 1.072 1.095 1.118 1.140

Find and at a): 𝟏 b): 𝟏𝟏 c): 𝟏

Answer:-
a): 𝟏𝟏 b): 𝟏 c):

Dr. Jamil Book Series 2 Page 38


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

EXERCISE- 3
PART-II: NUMERICAL INTEGRATION
Question # 23:-
Evaluate the integral ∫𝟏 using trapezoidal rule for
1): three points
2): five points
3): eleven points
Also calculate the exact value and comment on your results.

Question # 24:-

Evaluate the integral ∫𝟏 using trapezoid rule with step size and
calculate the exact value and comment on your result.

Question # 25:-
𝟏
Evaluate the integral ∫ using trapezoidal rule for
𝟏
1): five points
2): eleven points
Also calculate the exact value and comment on your results.

Question # 26:-
𝟏
Apply 3-points Simpsons 1/3 rule to evaluate ∫ 𝟏
, compare your answer with exact
value

Question # 27:-
𝟏
Evaluate the integral ∫ , using
1): five points trapezoidal rule
2): five points Simpson’s rule
And compare your result with the exact value and comment on the superiority of the
method applied.

Question # 28:-

Evaluate the integral ∫ , using


1): five points trapezoidal rule
2): five points Simpson’s rule
And compare your result with the exact value and comment on the superiority of the
method applied.

Dr. Jamil Book Series 2 Page 39


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Question # 29:-

Evaluate ∫ 𝟏
, where using
1): trapezoidal rule
2): Simpsons 1/3 rule
3): Simpsons 3/8 rule
and compare your result with exact value and comment.
Question # 30:-

Evaluate ∫ 𝟏
, where using
1): trapezoidal rule
2): Simpsons 1/3 rule
3): Simpsons 3/8 rule
and compare your result with exact value and comment.
Question # 31:-
𝟏
Evaluate ∫ 𝟏
, where using

1): trapezoidal rule


2): Simpsons 1/3 rule
3): Simpsons 3/8 rule
and compare your result with exact value and comment

Question # 32:-
𝟏
Evaluate ∫ , where using
(𝟏 )

1): trapezoidal rule


2): Simpsons 1/3 rule
3): Simpsons 3/8 rule
and compare your result with exact value and comment.

Question # 33:-

Evaluate ∫ by
1): trapezoidal rule
2): Simpsons 1/3 rule
Taking 6 equal interval correct to decimal places.

Question # 34:-
Evaluate ∫𝟏 by
1): trapezoidal rule
2): Simpsons 1/3 rule
Taking 6 equal interval correct to decimal places.

Question # 35:-

Evaluate ∫ 𝟏
where using
1): trapezoidal rule
2): Simpsons 1/3 rule
3): Simpsons 3/8 rule
And compare your result with exact value and comment.

Dr. Jamil Book Series 2 Page 40


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Question # 36:-
𝟏
Evaluate ∫ 𝟏
, using Simpsons 3/8 rule with
Answer:-
0.2310846

Question # 37:-
𝟏
Compute the value of ∫ ( ) taking and using trapezoidal rule
, Simpsons y 3rd rule and 3/8 rule , compare your result by integration.

Question # 38:-
Evaluate ∫ using

Question # 39:-
𝟏
Evaluate ∫ dividing the range into 4 equal parts by

1): trapezoidal rule


2): Simpsons 1/3 rule

Question # 40:-
𝟏
Evaluate ∫ dividing the range into 8 equal parts.
𝟏

Question # 41:-
Evaluate ∫ , taking h= .

Question # 42:-
𝟏
Evaluate ∫ approximately by using a suitable formula and at least five
points.

Question # 43:-
𝟏
Calculate the value of by finding ∫ ,using Simpsons rule by dividing into 4
𝟏
equal parts.

Question # 44:-
𝟏
Evaluate ∫ ( )𝟏 , correct to two decimal places using seven coordinates.

Dr. Jamil Book Series 2 Page 41


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

“Miscellaneous Applied Problems”


Question # 44:-
The speed of a train at various times are given in following data:

T (hour) 0 0.5 1 1.5 2.0 2.5 3.0 3.25 3.5

V(Kmph) 0 13 33 39.5 40 40 36 15 0

Find the distance from to


Answer:-
98.5km

Question # 45:-
𝟏
Evaluate: ∫ √𝟏 , using Simpson’s 1/3 rule with 8 subintervals.

Answer:-
0.6479

Question # 46:-
Using Simpson’s 1/3 rule with 6 subintervals to find the Area contained between the
and the curve 4
Answer:-
9.156

Question # 47:-
A reservoir is the form of a surface of revolution and D is the diameter in meters at a depth
of P meters beneath the surface of the water. Find the amounts of water in , that the
reservoir holds when full, from the following data using Simpson’s 1/3rd rule.

P 0 5 10 15 20 25 30

D 36 35 33 29 22 16 9

Hint:- ∫ . /

Answer:-
𝟏

Question # 48:-
𝟏
Compute ∫ . / from the following data using Simpson’s rule:

Dr. Jamil Book Series 2 Page 42


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

0 1 2 3 4 5 6

0.146 0.161 0.176 0.190 0.204 0.217 0.230

Answer:-

Question # 49:-
A river is 45m wide, The depth d in meters at a distance meters from one bank is given in
the following data:

I 5 10 15 20 25 30 35 40 45

0 3 6 8 7 7 6 4 3 0

Find the Cross-Section of the river by Simpson’s 3/ rule.


Answer:-
𝟏

Question # 50:-
The velocity of an electric train which starts from

T(minutes) 0 1 2 3 4 5 6 7 8 9 10 11 12

V( ) 0 10 25 40 55 60 62 57 42 30 20 13 0

Find the total distance covered in 12 minutes.


Answer:-

Question # 51:-
Integration provides a means to compute how much mass enters or leaves a reactor over a
specified time period, as in

𝟏

where 𝟏 the initial and final times, respectively. This formula makes intuitive
sense if you recall the analogy between integration and summation. Thus, the integral
represents the summation of the product of flow times concentration to give the total mass
entering or leaving from 𝟏 . If the flow rate is constant, Q can be moved outside the
integral:


𝟏
Use numerical integration to evaluate this equation for the data listed below. Note that
.

( ) 𝟏
( ) 𝟏

Dr. Jamil Book Series 2 Page 43


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

Summary Of Ch#3
PART-I: NUMERICAL DIFFERENTIATION
𝟏): Newton’s Forward differentiation formulae:-
1a): Newton’s Forward differentiation formulae at general point :-

𝟏 𝟏 𝟏
,

𝟏 𝟏
- (F1X)
𝟏

𝟏 𝟏 𝟏𝟏
, ( 𝟏)
𝟏

𝟏 𝟏 𝟏
- (F2X)
𝟏

1b): Newton’s Forward differentiation formulae at Initial point :-


𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
| 0 1 (F1X0)

𝟏 𝟏𝟏
| 0 – 1 (F2X0)
𝟏

2): Newton’s Backward differentiation formulae:-


2a): Newton’s Backward differentiation formulae at general point :-

𝟏 𝟏 𝟏
,

𝟏 𝟏
- (B1X)
𝟏

𝟏 𝟏 𝟏𝟏
, ( 𝟏)
𝟏

𝟏 𝟏 𝟏
- (B2X)
𝟏

Dr. Jamil Book Series 2 Page 44


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

2b): Newton’s Backward differentiation formulae at Final point :-


𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
| 0 1 (B1XN)

𝟏 𝟏𝟏
| 0 1 (B2XN)
𝟏

3): Derivative using central difference interpolation formulae:-


3a): Central differentiation formulae at general point

𝟏 ( 𝟏) 𝟏 𝟏 ( )
0. / 𝟏 . / 1 (C1X)

𝟏 𝟏 (𝟏 )
0 𝟏 . / 1 (C2X)

3b): Central differentiation formulae at Central point :-

𝟏 ( 𝟏) 𝟏 𝟏
| = *( ) ( ) + (C1X0)

𝟏 𝟏
| = 0 𝟏 1 (C2X0)
𝟏

PART-II: NUMERICAL INTEGRATION


1. Trapezodal rule:-

There are two types of trapezoidal rules.

Simple trapezoidal rule, given by area of trapezium

∫ ( ) , ( ) ( )- , ( ) ( 𝟏 )-

Type of approximation is first degree (linear)


Step size is
Generalized or composite trapezoidal rule, given by

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( 𝟏) ( )-

Dr. Jamil Book Series 2 Page 45


Advanced Mathematical Techniques Chapter#3 Numerical Differentiation & Integration

2. Simpson’s 1/3rd rule:-

Simple Simpson’s 1/3rd rule, is given by

∫ ( ) , ( ) ( 𝟏) ( )-

Type of approximation is second degree (quadratic).

Step size is

Generalized or composite Simpson’s 1/3rd rule for (2n+1) points and 2n sub-intervals, is
given by

∫ ( ) , ( ) ( 𝟏) ( ) ( ) ( ) ( ) ( )

( 𝟏) ( )-

3. Simpson’s 3/8th rule:-

Simple Simpson’s 3/8th rule, is given by

∫ ( ) , ( ) ( 𝟏) ( ) ( )-

Type of approximation is third degree (cubic)

Step size is

Generalized or composite Simpson’s 3/8th rule for (n+1) points and n sub-intervals, is given
by

∫ ( ) , ( ) * ( 𝟏) ( ) ( ) ( 𝟏 )+ * ( )

( 𝟏 )+ ( )-

Dr. Jamil Book Series 2 Page 46

You might also like