0% found this document useful (0 votes)
13 views16 pages

Notes Unit-5 22MA21C

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views16 pages

Notes Unit-5 22MA21C

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Department of Mathematics

UNIT-V

NUMERICAL METHODS

Introduction:

Numerical analysis plays a great role in engineering and in the quantitative parts of pure and
applied science. Interpolation, the computing of values for a tabulated function at points not
in the table, is historically a most important task. Many famous mathematicians have their
names associated with procedures for interpolation: Gauss, Newton, Bessel, Stirling. The
need to interpolate began with the early studies of astronomy when the motion of heavenly
bodies was to be determined from periodic observations. Interpolation methods demonstrate
some important theory about polynomials and the accuracy of numerical methods.
Interpolating with polynomials serves as an excellent introduction to some techniques for
drawing smooth curves. These methods are the basis of many other procedures. Among
these procedures, we will focus on numerical differentiation and integration in this unit.

Interpolation and Extrapolation:

Interpolation is the technique of estimating the value of a function for any intermediate value of
the independent variable while the process of computing the value of the function outside the
given range is called extrapolation.

Finite Differences:

The finite difference deals with the changes in the value of the function (dependent variable)
due to the changes in the values of independent variable. The values of the independent
variable x are called Arguments and the corresponding values of dependent variables y are
called Entries.

Forward difference:

If …… denote the set of values of the function y=f(x).Then  = - ,


 = - .........,  = - are called the First Forward Differences of the function
y=f(x) where ∆ is called the forward difference operator. The differences are called first
forward differences denoted by  ,    second forward differences and are

1
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
denoted by  ,  ,......,  . i.e.  =  -  ,  =  - , ...,  =
 -  

Similarly we can define third, fourth forward differences etc.


In general, the nth forward differences is defined by the equation,

Forward Difference Table:

   
   
  
 
 
 
 
  
 
  

Here is called the First Entry and , ...... are called the Leading
Differences.

Backward Difference:

Consider the function y = f(x). If ,...., denote the set of values of y.


Then = , , ........., are called the First Backward
Differences and is called the backward difference operator.
The second backward difference of the function is given by,
, , ……..,
Similarly we can define higher order differences.
In general the nth backward difference is given by

Backward Difference Table:

2
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
  

   
   
   
    
  
  

NOTE: Only the notations are changed not the differences.


(i) Relation between forward and backward operators:
(ii) –
(iii) – –

Problems:

1. Evaluate tan-1 x
Solution: tan-1 x = tan-1 (x + h) – tan-1 x

= tan-1 , - =tan-1 , -

2. Evaluate cos 2x
Solution: cos 2x = { }
cos 2 (x + h) cos 2x
= [cos2(x + 2h) – cos 2 (x + h)] – [cos 2 (x + h) – cos 2x]
= - 2 sin (2x + 3h) sin h + 2 sin (2x + h) sin h
= - 2 sin h [sin (2x + 3h) – sin (2x + h)]
= - 2 sin h [2 cos (2x + 2h) sin h]
= -4 sin2 h cos (2x + 2h)

Differences of a Polynomial:

The nth differences of a polynomial of the nth degree are constant and all higher order
differences are zero.
Let , then
n
n (n - 1) (n - 2) … 1. = n! ........………………(1)
and then for higher orders = . …….……….(2)

Problems:
1. Evaluate 10 [(1 – ax) (1 – b ) (1 – c ) (1 – d )] with h=1, h=2.

Solution: Given,
 – – – – = +() +() + ......+1]
3
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
= [ ( ) = 0 or
]
= (10 !) (for = 1)
Similarly for h =2, = (10!) (2)10

2. Construct the forward difference table, given that

5 10 15 20 25 30
9962 9848 9659 9397 9063 8660

and find the values of , .


Solution:

5 9962 

10 9848 
 
15 9659  
 
20 9397  
 
25 9063 
30 8660 

Now = - 73 which is second element for the column .


= 2 which is the first element of the column .Similarly = - 1.

3. Construct the finite difference table for the function where x takes
the values 0,1,2,3,4,5,6. Identify the leading forward and backward differences. Hence
find .

Solution:
First Second Third Fourth
difference difference difference difference
0 1 
1 3 
 6
2 11  
 6
3 31  
 6
4 69  
 6
5 131 
6 223 

The leading forward differences are 2, 6, 6 and leading backward differences are 92, 30, 6.
, .

4
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
Note: Third differences are constants and higher order differences are zero as is a
polynomial of third degree.

Interpolation with equal intervals:


Newton’s Forward Interpolation Formula:
Let the function takes the values ......., at the points , ......., where
= . Then Newton’s Forward interpolation polynomial is given by,
= + y0 + y0 + y0 +........... ,
where x= + ph

Newton’s Backward Interpolation Formula:


Let the function y = f(x) takes the values , ......., at the points , ......., ,
where . The Newton’s Backward Interpolation polynomial is given by,
= +p + + +........... ,
where

Remark:
Newton’s Forward Interpolation Formula is used to interpolate the values of y near the
beginning of the set of tabulated values or for extrapolating values of y to the left of the
beginning. Newton’s Backward Interpolation Formula is used to interpolate the values of y
near the end of the set of tabulated values or for extrapolating values of y to the right of the
last tabulated value y.

Examples:
1. Find a cubic polynomial which takes the following data
0 1 2 3
1 2 1 10
Solution: The forward difference table is given by,
x y = f(x)
0 1
1
1 2 -2
-1 12
2 1 10
9
3 10

Here, = 0, h = 1, = = x, =1, = -2, =12,

By Newton-Gregory forward interpolation formula we have

 
+ p + +

5
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics

– is the required polynomial.

2. The table gives the distance in nautical miles of the visible horizon for the given
heights in feet above the earth’s surface.

x =height: 150 200 250 300 350 400

y=distance: 13.03 15.04 16.81 18.42 19.90 21.27

Find the values of when and

Solution:

The difference table is

First Second Third Fourth Fifth


difference difference difference difference difference
150 13.03
2.01
200 15.04 -0.24
1.77 0.08
250 16.81 -0.16 -0.05
1.61 0.03 0.04
300 18.42 -0.13 -0.01
1.48 0.02
350 19.90 -0.11
1.37
400 21.27

(i) =160, =13.03, = 2.01, = -0.24, =0.08, =-0.05,

Using Newton’s forward interpolation formula, we get


+p + + +…….

nautical miles.

(ii) 410, =400, =21.27, =1.37, =-0.11, =0.02,

Using Newton’s backward interpolation formula we get,


= +p + + …….

6
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics

nautical miles.

3. From the following table, estimate the number of students who obtained marks between 40 and
45:

Marks (x): 30-40 40-50 50-60 60-70 70-80

No. of students(y): 31 42 51 35 31

Solution: we prepare cumulative frequency table as follows:

Marks less than(x): 40 50 60 70 80

No. of students(y): 31 73 124 159 190

Now the difference table is:

y y y y


40 31 

50 73 
 
60 124  
 
70 159 

80 190

To find i.e. number of students with marks less than 45.

Taking , , = = 0.5

Using Newton’s Forward Interpolation formula we get,

y(45) =

= 47.87

The number of students with marks less than 45 is 47.87 48.

But the number of students with marks less than 40 is 31.

Hence the number of students getting marks between 40 and 45 =48-31=17.


7
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics

Exercise:

1. Fit a cubic polynomial to the following data using suitable interpolation formula.

2. Using Newton-Gregory Interpolation formula, estimate from the following data.

3. Apply Newton’s backward difference interpolation formula to find from the


following table:

4. Using Newton -Gregory Interpolation formulae, find from the following data.

Interpolation with unequal intervals

Lagrange’s formula for unequal intervals:


Let be a function whose values are ,......., corresponding to
,......., not necessarily equally spaced.

This formula is known as Lagrange’s Interpolation formula.

Inverse interpolation:
The process of estimating the value of x for a given value of is called Inverse interpolation.
So far given a table of values of x and y, using one of the interpolation formulae we find the value
of y corresponding to some value of x which is not in the table. On the other hand the process of

8
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
estimating the value of x for some value of y which is not in the table is called inverse
interpolation.
This method is used when the values of x are not necessarily equally spaced. Lagrange’s
interpolation formula can be simply viewed as a relation between two variables and any one of
the variable can be taken as an independent variable. Therefore, inverse interpolation formula can
be obtained by interchanging the variables x and y in Lagrange’s formula, we get.

Problems:
1. By using the Lagrange’s interpolation formula to fit a polynomial to the data given

Hence, find when .


Solution:
=0 =1 =3 =4
=0 =6 = 12
By Lagrange’s formula


for , we get

2. Apply Lagrange’s formula to find f(5) and f(6) given that f(1) =2, f(2)=4,f(3)=8,f(7)=128
and explain why the results differ from those obtained by f(x) = .
Solution: =2 =2 =7

9
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
By Lagrange’s formula, we have

)+ )+

)+ )

+ (4) +

+ + +

+ + (8) + (128)

But actual values of f(5) and f(6) are f(5) = = 32 and f(6) = = 64.
The difference in values of f(5) and f(6) are due to the assumption of f(x) as a polynomial,
when it is an exponential function of the form .

3. Find for

Solution:
=1 =3 =4
=4 = 12 = 14

+ +

= + + (4)

at

Numerical Differentiation:

Let the function y = f(x) is given by a table of values (x , y) then the process of computing the
derivatives etc. for some particular value of x is called Numerical Differentiation.
10
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics

Derivatives using Newton’s forward interpolation formula:

By Newton’s Interpolation Formula, we have

+P + + + ……….. (1)

where, x = + Ph (or) P = ………. (2)

Differentiating (1) w.r.t. P, we get

+ + + + ……. (3)

Differentiating (2) w.r.t. x, we get

……….. (4) But,

Using (3) and (4) the above equation becomes,

( ) = * + …. (5)

At x = , P= 0, the above equation becomes,

( ) = * + …. (6)

Formula (5) is used to compute at any point x = + Ph , whereas formula (6) is used to
compute at any of the value of x when y is specified.
Similarly,

( ) = * + …. (7)

and( ) = * + …. (8)

The formula (7) is used to compute y'' at any point x = +Ph whereas formula (8) is used to
compute y'' at any value of x where y is specified.

Derivatives using Newton’s backward interpolation formula:


By Newton’s Backward Interpolation Formula, we have

11
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
+ + + + …… ……… (1)

Where, + Ph (or) ……… (2)

Differentiating (1) w.r.t. P, we get

= + + + …… ……… (3)

Differentiating (2) w.r.t. x, we get

= …. (4) But,

Using (3) and (4) the above equation becomes,

( ) = * + …. (5)

At x = , P = 0, the above equation becomes,

( ) = * + …. (6)

Formula (5) is used to compute y ' at any point x = + Ph whereas formula (6) is used to
compute at any of the values of x when y is specified.
Similarly

( ) = * + …. (7)

( ) = * + …. (8)

The formula (7) is used to compute y'' at any point whereas formula (8) is used
to compute y'' at any of the values of when is specified.

Problems:

1. Given

Find and at x = 1.2.

Solution: Here, the step-length is . We first form the following difference table.

first Second Third Fourth


differences differences differences differences
12
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
1.0 2.27
0.60
1.2 3.32 0.14
0.74 0.02
1.4 4.06 0.16 0.01
0.90 0.03
1.6 4.96 0.19 0.03
1.09 0.06
1.8 6.05 0.25
1.34
2.0 7.39
We have to compute and at x = 1.2, which is a specified value of x, for this purpose, we
take = 1.2. Then we find from the table that,

= 0.74, = 0.16, = 0.03, = 0.03


Using the formula we have,

( ) = * +

Then, ( ) * + = 3.3125

Using the formula we have,

( ) = * +

And ( ) * + = 3.39375

2. Using appropriate interpolation formulas, find the values of when x = 4 using the
following table.

Solution: Here is a specified value of which is at the end of the given table.
For this purpose we take = 4.
The difference table is given by,

First Second Third


differences differences differences

1 4
8
2 12 0
8 8
3 20 8
16
4 36

Here = 4, = 16, = 8, = 8 and h=1


13
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
Then, (4) = * + * +

And * + = 16

3. A rod is rotating in a plane, the following table gives the angle θ (in radians) through which the
rod is turned for various values of time t (in seconds): Find the angular velocity and angular
acceleration at t = 0.4 sec.

Solution: Given

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

To compute velocity and Acceleration at


The finite difference table is given by

First second Third Fourth


differences differences differences differences

0 0
0.12
0.2 0.12 0.25
0.37 0.01
0.4 0.49 0.26 0.00
0.63 0.01
0.6 1.12 0.27 0.00
0.90 0.01
0.8 2.02 0.28 0.00
1.18 0.01
1.0 3.20 0.29
1.47
1.2 4.67

To compute and at , which is specified value of . We take

∆θ0 = 0.63, ∆2θ0 = 0.21, ∆3θ0 = 0.01, ∆4θ0 = 0.00


Using the formula,

( ) = * +

( ) * + = 2.49

And using the formula,

( ) = * +
14
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
. /

4. The following table gives the temperature θ (in degree Celsius) of a cooling body at different

instants of time t (in seconds)

1 3 5 7 9

85.3 74.5 67.0 60.5 54.3

Find approximately the rate of cooling at t = 8 seconds.

Solution: Rate of cooling =

The backward difference table is given by,

T θ θ θ θ

1 85.3
-10.8
3 74.5 3.3
-7.5 -2.3
5 67.0 1.0 1.6
-6.5 -0.7
7 60.5 0.3
-6.2
9 54.3

Here, to compute at ., which is not the specified value of

We have, = = 9, = = 54.3

= -6.2, = 0.3, = -0.7, = 1.6


Using the formula, we have

( ) = * +

( ) 0

=
Thus, the body cools at the rate of 3.11875 degree/second.

15
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)
Department of Mathematics
Exercise:

1. Given that,

Find , at and .

2. A slider in a machine moves along a fixed straight rod. Its distance x cm along the rod is
given below for various values of the time ‘t’ seconds. Find the velocity of the slider and its
acceleration when t = 0.1 second.

3. Find and at of the function tabulated below:

4. Compute (0) and (0) from the following table:

5. Find (1.5) using the differentiation formula based on Newton’s interpolation for the
following data:

16
Second Semester Number theory, Vector calculus and Computational methods (22MA21C)

You might also like