Page 1
Geometrical Interpretation of
Newton–Raphson Formula
y
f(x
0
)
f(x
f(x
2
)
x
0
x
x
1
x
2
y = f(x)
O
1
)
The geometrical meaning of Newton–Raphson method is a
tangent is drawn at the point [x
0
, f (x
0
)] to the curve y = f (x).
It cuts the x-axis at x
1
which will be a better approximation
of the root. Now drawing another tangent at [x
1
, f (x
1
)] which
cuts the x-axis at x
2
which is a still better approximation and
the process can be continued till the desired accuracy has
been achieved.
Convergence of Newton–Raphson Method
The order of convergence of Newton–Raphson method is 2
or the convergence is quadratic. It converges if |f (x). f ?(x)| <
|f '(x) |
2
. Also this method fails if f '(x) = 0
Newton’s Iterative Formula to Find bth Root
of a Positive Real Number a
The iterative formula is given by x
n+1
=- +
?
?
?
?
?
?
?
?
?
?
-
1
1
1
b
bx
a
x
n
n
b
()
Newton’s Iterative Formula to Find a
Reciprocal of a Number N
The iterative formula is given by
x
i+1
= x
i
(2 - x
i
N)
Example
Find a real root of the equation -4x + cos x + 2 = 0, by
Newton–Raphson method upto four decimal places assum-
ing x
0
= 0.5
Solution
Let f (x) = -4x + cos x + 2 and
f '(x) = -4 - sin x
Chapter 06.indd 125 5/31/2017 10:59:31 AM
Page 2
Geometrical Interpretation of
Newton–Raphson Formula
y
f(x
0
)
f(x
f(x
2
)
x
0
x
x
1
x
2
y = f(x)
O
1
)
The geometrical meaning of Newton–Raphson method is a
tangent is drawn at the point [x
0
, f (x
0
)] to the curve y = f (x).
It cuts the x-axis at x
1
which will be a better approximation
of the root. Now drawing another tangent at [x
1
, f (x
1
)] which
cuts the x-axis at x
2
which is a still better approximation and
the process can be continued till the desired accuracy has
been achieved.
Convergence of Newton–Raphson Method
The order of convergence of Newton–Raphson method is 2
or the convergence is quadratic. It converges if |f (x). f ?(x)| <
|f '(x) |
2
. Also this method fails if f '(x) = 0
Newton’s Iterative Formula to Find bth Root
of a Positive Real Number a
The iterative formula is given by x
n+1
=- +
?
?
?
?
?
?
?
?
?
?
-
1
1
1
b
bx
a
x
n
n
b
()
Newton’s Iterative Formula to Find a
Reciprocal of a Number N
The iterative formula is given by
x
i+1
= x
i
(2 - x
i
N)
Example
Find a real root of the equation -4x + cos x + 2 = 0, by
Newton–Raphson method upto four decimal places assum-
ing x
0
= 0.5
Solution
Let f (x) = -4x + cos x + 2 and
f '(x) = -4 - sin x
Chapter 06.indd 125 5/31/2017 10:59:31 AM
Also f (0) = 1 + 2 = 3 > 0 and
f (1) = -4 + cos 1 + 2 = -1.4596 < 0
So, a root lies between 0 and 1.
Given x
0
= 0.5
\ The first approximation
xx
fx
fx
10
0
0
=-
'
()
()
=-
-+ +
--
05
40 50 52
40 5
.
[( .) cos( .)
sin( .)
=-
-+ +
--
(. )
[cos(. )
sin.
05
22 05
40 5
=-
-
05
0 8775
4 4794
.
.
.
= 0.5 + 0.1958 = 0.6958.
Example
Obtain the cube root of 14 using Newton–Raphson method,
with the initial approximation as 2.5.
Solution
We know that, the iterative formula to find a
b
is
x
b
bx
a
x
nn
n
b + -
=- +
?
?
?
?
?
?
?
?
?
?
1 1
1
1 ()
Here b = 3 and a = 14 and let x
0
= 2.5
?= +
?
?
?
?
?
?
?
?
?
?
xx
x
10
0
2
1
3
2
14
x
1 2
1
3
22 5
14
25
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
=+ =
1
3
5
14
625
1
3
52 24 2 413
.
{. }.
x
2 2
1
3
22 413
14
2 413
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
1
3
4 826
14
5 822569
.
.
.
.
=+ =
1
3
4 826 2 4044 2 410 {. .} .
\ The approximate cube root of 14 is 2.41.
Example
Find the reciprocal of 24 using Newton–Raphson method
with the initial approximation as 0.041.
Solution
The iterative formula to find
1
N
is,
x
n+1
= x
n
(2 - x
n
N)
Let x
0
= 0.041. Then x
1
= x
0
(2 - x
0
(24))
? x
1
= (0.041) (2 - (24) (0.041))
= 0.04165
x
2
= (0.0416) {2 - (24) (0.04165)} = 0.04161, similarly
proceeding we get x
3
= 0.041666
\ The reciprocal of 24 is 0.04166.
Curve Fitting
In engineering applications, many a times, we need to find
a suitable relation or law that may exist between the vari-
ables x and y from a given set of observed values (x
1
, y
1
),
(x
2
, y
2
), …, (x
n
, y
n
), The relation connecting x and y is called
as empirical law.
The process of finding the equation of the curve of best
fit which may be most suitable for predicting the value of y
for a given value of x is known as curve fitting.
Least Squares Approximation
Least squares approximation method is one of the best
methods available for curve fitting.
Let (x
1
, y
1
), (x
2
, y
2
), …, (x
n
, y
n
) be the pairs of observed
set of values of x and y. Let y = f (x) be the functional rela-
tionship sought between the variables x and y where f (x)
consists of some unknown parameters. We need to find the
relationship y = f (x) by using the observed values.
Procedure
1. Find the residual d
i
= y
i
- f (x
i
) (i = 1, 2, …, n) for
every pair of observed value y
i
and f(x
i
), the value of
the functional relation f (x) at x = x
i
2. Find the sum of the squares of residuals corresponding
to all pairs of values of y
i
and f(x
i
) and let it be S
i.e.,Sy fx
i
i
n
=-
=
?
(( )) .
2
1
3. Find the values of the parameters in f(x) such that S is
minimum.
Fitting a Straight Line Let y = a + bx be a straight line to
be fitted to the data (x
1
y
1
), (x
2
y
2
), …, (x
n
y
n
).
\ Residual = d
i
= y
i
- (a + bx
i
), i = 1, 2, …, n
Sum of the squares of the residuals = S = ?(y
i
- (a + bx
i
))
2
Now we have to find the parameters a and b such that S is
minimum
?
?
=- +-
?
S
a
ya bx
ii
21 [( )( )] and
?
?
=- +-
?
S
b
ya bx x
ii i
[( ( ))( )] 2
For S to be minimum,
?
?
=
S
a
0 and
?
?
=
S
a
0
Chapter 06.indd 126 5/31/2017 10:59:33 AM
Page 3
Geometrical Interpretation of
Newton–Raphson Formula
y
f(x
0
)
f(x
f(x
2
)
x
0
x
x
1
x
2
y = f(x)
O
1
)
The geometrical meaning of Newton–Raphson method is a
tangent is drawn at the point [x
0
, f (x
0
)] to the curve y = f (x).
It cuts the x-axis at x
1
which will be a better approximation
of the root. Now drawing another tangent at [x
1
, f (x
1
)] which
cuts the x-axis at x
2
which is a still better approximation and
the process can be continued till the desired accuracy has
been achieved.
Convergence of Newton–Raphson Method
The order of convergence of Newton–Raphson method is 2
or the convergence is quadratic. It converges if |f (x). f ?(x)| <
|f '(x) |
2
. Also this method fails if f '(x) = 0
Newton’s Iterative Formula to Find bth Root
of a Positive Real Number a
The iterative formula is given by x
n+1
=- +
?
?
?
?
?
?
?
?
?
?
-
1
1
1
b
bx
a
x
n
n
b
()
Newton’s Iterative Formula to Find a
Reciprocal of a Number N
The iterative formula is given by
x
i+1
= x
i
(2 - x
i
N)
Example
Find a real root of the equation -4x + cos x + 2 = 0, by
Newton–Raphson method upto four decimal places assum-
ing x
0
= 0.5
Solution
Let f (x) = -4x + cos x + 2 and
f '(x) = -4 - sin x
Chapter 06.indd 125 5/31/2017 10:59:31 AM
Also f (0) = 1 + 2 = 3 > 0 and
f (1) = -4 + cos 1 + 2 = -1.4596 < 0
So, a root lies between 0 and 1.
Given x
0
= 0.5
\ The first approximation
xx
fx
fx
10
0
0
=-
'
()
()
=-
-+ +
--
05
40 50 52
40 5
.
[( .) cos( .)
sin( .)
=-
-+ +
--
(. )
[cos(. )
sin.
05
22 05
40 5
=-
-
05
0 8775
4 4794
.
.
.
= 0.5 + 0.1958 = 0.6958.
Example
Obtain the cube root of 14 using Newton–Raphson method,
with the initial approximation as 2.5.
Solution
We know that, the iterative formula to find a
b
is
x
b
bx
a
x
nn
n
b + -
=- +
?
?
?
?
?
?
?
?
?
?
1 1
1
1 ()
Here b = 3 and a = 14 and let x
0
= 2.5
?= +
?
?
?
?
?
?
?
?
?
?
xx
x
10
0
2
1
3
2
14
x
1 2
1
3
22 5
14
25
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
=+ =
1
3
5
14
625
1
3
52 24 2 413
.
{. }.
x
2 2
1
3
22 413
14
2 413
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
1
3
4 826
14
5 822569
.
.
.
.
=+ =
1
3
4 826 2 4044 2 410 {. .} .
\ The approximate cube root of 14 is 2.41.
Example
Find the reciprocal of 24 using Newton–Raphson method
with the initial approximation as 0.041.
Solution
The iterative formula to find
1
N
is,
x
n+1
= x
n
(2 - x
n
N)
Let x
0
= 0.041. Then x
1
= x
0
(2 - x
0
(24))
? x
1
= (0.041) (2 - (24) (0.041))
= 0.04165
x
2
= (0.0416) {2 - (24) (0.04165)} = 0.04161, similarly
proceeding we get x
3
= 0.041666
\ The reciprocal of 24 is 0.04166.
Curve Fitting
In engineering applications, many a times, we need to find
a suitable relation or law that may exist between the vari-
ables x and y from a given set of observed values (x
1
, y
1
),
(x
2
, y
2
), …, (x
n
, y
n
), The relation connecting x and y is called
as empirical law.
The process of finding the equation of the curve of best
fit which may be most suitable for predicting the value of y
for a given value of x is known as curve fitting.
Least Squares Approximation
Least squares approximation method is one of the best
methods available for curve fitting.
Let (x
1
, y
1
), (x
2
, y
2
), …, (x
n
, y
n
) be the pairs of observed
set of values of x and y. Let y = f (x) be the functional rela-
tionship sought between the variables x and y where f (x)
consists of some unknown parameters. We need to find the
relationship y = f (x) by using the observed values.
Procedure
1. Find the residual d
i
= y
i
- f (x
i
) (i = 1, 2, …, n) for
every pair of observed value y
i
and f(x
i
), the value of
the functional relation f (x) at x = x
i
2. Find the sum of the squares of residuals corresponding
to all pairs of values of y
i
and f(x
i
) and let it be S
i.e.,Sy fx
i
i
n
=-
=
?
(( )) .
2
1
3. Find the values of the parameters in f(x) such that S is
minimum.
Fitting a Straight Line Let y = a + bx be a straight line to
be fitted to the data (x
1
y
1
), (x
2
y
2
), …, (x
n
y
n
).
\ Residual = d
i
= y
i
- (a + bx
i
), i = 1, 2, …, n
Sum of the squares of the residuals = S = ?(y
i
- (a + bx
i
))
2
Now we have to find the parameters a and b such that S is
minimum
?
?
=- +-
?
S
a
ya bx
ii
21 [( )( )] and
?
?
=- +-
?
S
b
ya bx x
ii i
[( ( ))( )] 2
For S to be minimum,
?
?
=
S
a
0 and
?
?
=
S
a
0
Chapter 06.indd 126 5/31/2017 10:59:33 AM
?- -+ =
?
[( ( ))] 20 ya bx
ii
and
[( ( ))( )] 20 ya bx x
ii i
-+ -=
?
?= +
??
ynab x
ii
(1)
and xy ax bx
ii ii
=+
? ? ?
2
(2)
Eqs. (1) and (2) are known as normal equations.
By solving these equations, we get the values of ‘a’ and b
Fitting a Parabola (Quadratic Equation)
To fit a parabola of the type y = a + bx + cx
2
to the set of data
points (x
1
, y
1
), (x
2
, y
2
), …, (x
n
, y
n
), by proceeding as above, we
get the normal equations as
ynab xc x
ii i
=+ +
?? ?
2
(1)
xy ax bx cx
ii ii i ?? ??
=+ +
23
(2)
xy ax bx cx
ii ii i
22 34
?? ??
=+ + (3)
By solving Eqs. (1), (2) and (3), we can get the values of
the parameters a, b and c
Fitting of various exponential curves that can be brought
into the form of a straight line: Exponential curves of the
type y = ax
b
, y = ab
x
and y = ae
bx
can be fitted to the given
data by transforming it into the form of a straight line by
applying logarithm as follows.
Equation of
the curve to
be fitted
Equation obtained
after applying
log
e
(= ln)
T ransformed equation
into the form
of a straight line
y = ax
b
lny = lna + blnx Y = A + bX where Y = lny;
A = lna and X = lnx
y = ab
x
lny = lna + xlnb Y = A + Bx where Y = lny;
A = lna and B = lnb
y = ae
bx
lny = lna +bx Y = A + bx where Y = lny;
A = lna
Example
Using the method of least squares, fit a straight line y = a +
bx to the following data.
x 1 2 3 4
y 4 11 35 100
Hence find the value of y at x = 5.
Solution
We have to fit the line y = a + bx to the given data.
The normal equations are
?= +? ynab x
ii
(1)
?= ?+ ? xy ax bx
ii ii
2
(2)
The required values in the normal equations can be found
using the following table
x
i
y
i
x
i
y
i
x
i
2
1 4 4 1
2 11 22 4
3 35 105 9
4 100 400 16
xy xy x
ii ii i ?? ??
== == 10 150 531 30
2
;; ;
Substituting these values in Eqn. (1) and (2), we get
150 = 4a +10b and 531 = 10a + 30b
? 4a +10b = 150
10a + 30b = 531
Solving these linear equations, we get
a = -40.5 and b = 31.2
\ The straight line that fits to the given data is y = a + bx
? y = -40.5 + 31.2x
The value of y at x = 5 is
y = -40.5 +31.2 × 5 ? y = 115.5.
Example
Fit a quadratic equation y = a + bx + cx
2
to the following
data by the method of least squares.
x -2 -1 0 1 2
y 1 5 10 22 38
Solution
We have to fit the curve y = a + bx + cx
2
to the given data.
Here the normal equations are
?= +? +? ynab xc x
ii i
2
(1)
? x
i
y
i
= a? x
i
+ b? x
i
2
+ c? x
i
3
(2)
? x
i
2
y
i
= a? x
i
2
+ b? x
i
3
+ c? x
i
4
(3)
The values required in the normal equations can be obtained
by the following table:
x
i
y
i
x
i
y
i
x
i
2
x
3
i
x
i
4
x
i
2
y
i
-2 1 -2 4 -8 16 4
-1 5 -5 1 -1 1 5
0 10 0 0 0 0 0
1 22 22 1 1 1 22
2 38 76 4 8 16 152
? x
i
= 0; ? y
i
= 76; ? x
i
y
i
= 91; ? x
i
2
= 10; ? x
i
3
= 0; ? x
i
4
= 34;
? x
i
2
y
i
= 183
Substituting these values in the normal equation we have
76 = 5a + b × 0 + c × 10
91 = a × 0 + b × 10 + c × 0
Chapter 06.indd 127 5/31/2017 10:59:35 AM
Page 4
Geometrical Interpretation of
Newton–Raphson Formula
y
f(x
0
)
f(x
f(x
2
)
x
0
x
x
1
x
2
y = f(x)
O
1
)
The geometrical meaning of Newton–Raphson method is a
tangent is drawn at the point [x
0
, f (x
0
)] to the curve y = f (x).
It cuts the x-axis at x
1
which will be a better approximation
of the root. Now drawing another tangent at [x
1
, f (x
1
)] which
cuts the x-axis at x
2
which is a still better approximation and
the process can be continued till the desired accuracy has
been achieved.
Convergence of Newton–Raphson Method
The order of convergence of Newton–Raphson method is 2
or the convergence is quadratic. It converges if |f (x). f ?(x)| <
|f '(x) |
2
. Also this method fails if f '(x) = 0
Newton’s Iterative Formula to Find bth Root
of a Positive Real Number a
The iterative formula is given by x
n+1
=- +
?
?
?
?
?
?
?
?
?
?
-
1
1
1
b
bx
a
x
n
n
b
()
Newton’s Iterative Formula to Find a
Reciprocal of a Number N
The iterative formula is given by
x
i+1
= x
i
(2 - x
i
N)
Example
Find a real root of the equation -4x + cos x + 2 = 0, by
Newton–Raphson method upto four decimal places assum-
ing x
0
= 0.5
Solution
Let f (x) = -4x + cos x + 2 and
f '(x) = -4 - sin x
Chapter 06.indd 125 5/31/2017 10:59:31 AM
Also f (0) = 1 + 2 = 3 > 0 and
f (1) = -4 + cos 1 + 2 = -1.4596 < 0
So, a root lies between 0 and 1.
Given x
0
= 0.5
\ The first approximation
xx
fx
fx
10
0
0
=-
'
()
()
=-
-+ +
--
05
40 50 52
40 5
.
[( .) cos( .)
sin( .)
=-
-+ +
--
(. )
[cos(. )
sin.
05
22 05
40 5
=-
-
05
0 8775
4 4794
.
.
.
= 0.5 + 0.1958 = 0.6958.
Example
Obtain the cube root of 14 using Newton–Raphson method,
with the initial approximation as 2.5.
Solution
We know that, the iterative formula to find a
b
is
x
b
bx
a
x
nn
n
b + -
=- +
?
?
?
?
?
?
?
?
?
?
1 1
1
1 ()
Here b = 3 and a = 14 and let x
0
= 2.5
?= +
?
?
?
?
?
?
?
?
?
?
xx
x
10
0
2
1
3
2
14
x
1 2
1
3
22 5
14
25
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
=+ =
1
3
5
14
625
1
3
52 24 2 413
.
{. }.
x
2 2
1
3
22 413
14
2 413
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
1
3
4 826
14
5 822569
.
.
.
.
=+ =
1
3
4 826 2 4044 2 410 {. .} .
\ The approximate cube root of 14 is 2.41.
Example
Find the reciprocal of 24 using Newton–Raphson method
with the initial approximation as 0.041.
Solution
The iterative formula to find
1
N
is,
x
n+1
= x
n
(2 - x
n
N)
Let x
0
= 0.041. Then x
1
= x
0
(2 - x
0
(24))
? x
1
= (0.041) (2 - (24) (0.041))
= 0.04165
x
2
= (0.0416) {2 - (24) (0.04165)} = 0.04161, similarly
proceeding we get x
3
= 0.041666
\ The reciprocal of 24 is 0.04166.
Curve Fitting
In engineering applications, many a times, we need to find
a suitable relation or law that may exist between the vari-
ables x and y from a given set of observed values (x
1
, y
1
),
(x
2
, y
2
), …, (x
n
, y
n
), The relation connecting x and y is called
as empirical law.
The process of finding the equation of the curve of best
fit which may be most suitable for predicting the value of y
for a given value of x is known as curve fitting.
Least Squares Approximation
Least squares approximation method is one of the best
methods available for curve fitting.
Let (x
1
, y
1
), (x
2
, y
2
), …, (x
n
, y
n
) be the pairs of observed
set of values of x and y. Let y = f (x) be the functional rela-
tionship sought between the variables x and y where f (x)
consists of some unknown parameters. We need to find the
relationship y = f (x) by using the observed values.
Procedure
1. Find the residual d
i
= y
i
- f (x
i
) (i = 1, 2, …, n) for
every pair of observed value y
i
and f(x
i
), the value of
the functional relation f (x) at x = x
i
2. Find the sum of the squares of residuals corresponding
to all pairs of values of y
i
and f(x
i
) and let it be S
i.e.,Sy fx
i
i
n
=-
=
?
(( )) .
2
1
3. Find the values of the parameters in f(x) such that S is
minimum.
Fitting a Straight Line Let y = a + bx be a straight line to
be fitted to the data (x
1
y
1
), (x
2
y
2
), …, (x
n
y
n
).
\ Residual = d
i
= y
i
- (a + bx
i
), i = 1, 2, …, n
Sum of the squares of the residuals = S = ?(y
i
- (a + bx
i
))
2
Now we have to find the parameters a and b such that S is
minimum
?
?
=- +-
?
S
a
ya bx
ii
21 [( )( )] and
?
?
=- +-
?
S
b
ya bx x
ii i
[( ( ))( )] 2
For S to be minimum,
?
?
=
S
a
0 and
?
?
=
S
a
0
Chapter 06.indd 126 5/31/2017 10:59:33 AM
?- -+ =
?
[( ( ))] 20 ya bx
ii
and
[( ( ))( )] 20 ya bx x
ii i
-+ -=
?
?= +
??
ynab x
ii
(1)
and xy ax bx
ii ii
=+
? ? ?
2
(2)
Eqs. (1) and (2) are known as normal equations.
By solving these equations, we get the values of ‘a’ and b
Fitting a Parabola (Quadratic Equation)
To fit a parabola of the type y = a + bx + cx
2
to the set of data
points (x
1
, y
1
), (x
2
, y
2
), …, (x
n
, y
n
), by proceeding as above, we
get the normal equations as
ynab xc x
ii i
=+ +
?? ?
2
(1)
xy ax bx cx
ii ii i ?? ??
=+ +
23
(2)
xy ax bx cx
ii ii i
22 34
?? ??
=+ + (3)
By solving Eqs. (1), (2) and (3), we can get the values of
the parameters a, b and c
Fitting of various exponential curves that can be brought
into the form of a straight line: Exponential curves of the
type y = ax
b
, y = ab
x
and y = ae
bx
can be fitted to the given
data by transforming it into the form of a straight line by
applying logarithm as follows.
Equation of
the curve to
be fitted
Equation obtained
after applying
log
e
(= ln)
T ransformed equation
into the form
of a straight line
y = ax
b
lny = lna + blnx Y = A + bX where Y = lny;
A = lna and X = lnx
y = ab
x
lny = lna + xlnb Y = A + Bx where Y = lny;
A = lna and B = lnb
y = ae
bx
lny = lna +bx Y = A + bx where Y = lny;
A = lna
Example
Using the method of least squares, fit a straight line y = a +
bx to the following data.
x 1 2 3 4
y 4 11 35 100
Hence find the value of y at x = 5.
Solution
We have to fit the line y = a + bx to the given data.
The normal equations are
?= +? ynab x
ii
(1)
?= ?+ ? xy ax bx
ii ii
2
(2)
The required values in the normal equations can be found
using the following table
x
i
y
i
x
i
y
i
x
i
2
1 4 4 1
2 11 22 4
3 35 105 9
4 100 400 16
xy xy x
ii ii i ?? ??
== == 10 150 531 30
2
;; ;
Substituting these values in Eqn. (1) and (2), we get
150 = 4a +10b and 531 = 10a + 30b
? 4a +10b = 150
10a + 30b = 531
Solving these linear equations, we get
a = -40.5 and b = 31.2
\ The straight line that fits to the given data is y = a + bx
? y = -40.5 + 31.2x
The value of y at x = 5 is
y = -40.5 +31.2 × 5 ? y = 115.5.
Example
Fit a quadratic equation y = a + bx + cx
2
to the following
data by the method of least squares.
x -2 -1 0 1 2
y 1 5 10 22 38
Solution
We have to fit the curve y = a + bx + cx
2
to the given data.
Here the normal equations are
?= +? +? ynab xc x
ii i
2
(1)
? x
i
y
i
= a? x
i
+ b? x
i
2
+ c? x
i
3
(2)
? x
i
2
y
i
= a? x
i
2
+ b? x
i
3
+ c? x
i
4
(3)
The values required in the normal equations can be obtained
by the following table:
x
i
y
i
x
i
y
i
x
i
2
x
3
i
x
i
4
x
i
2
y
i
-2 1 -2 4 -8 16 4
-1 5 -5 1 -1 1 5
0 10 0 0 0 0 0
1 22 22 1 1 1 22
2 38 76 4 8 16 152
? x
i
= 0; ? y
i
= 76; ? x
i
y
i
= 91; ? x
i
2
= 10; ? x
i
3
= 0; ? x
i
4
= 34;
? x
i
2
y
i
= 183
Substituting these values in the normal equation we have
76 = 5a + b × 0 + c × 10
91 = a × 0 + b × 10 + c × 0
Chapter 06.indd 127 5/31/2017 10:59:35 AM
183 = a × 10 + b × 0 + c × 34
? 5a + 10c = 76
10b = 91
10a + 34c = 183
Solving these equations for a, b and c we get
a = 10.77, b = 9.1 and c = 2.21
Substituting these in y = a + bx + cx
2
, we get the required
parabola as
y = 10.77 + 9.1x + 2.21x
2
.
Interpolation
The process of finding the most appropriate estimate for
the unknown values of a function y = f (x) at some values
of x by using the given pairs of values (x, f(x)) is called
interpolation.
Assumptions in Interpolation
1. The frequency distribution is normal and not marked
by sudden ups and downs.
2. The changes in the series are uniform within a period.
Before looking into interpolation, let us get
familiarity with the finite differences which we use in
interpolation.
Finite Differences
1. Forward differences: Consider a function y = f(x).
Let we were given the following table representing
the values of y = f(x) corresponding to the values x
i
,
x
2
, …, x
n
of x that are equally spaced (i.e., x
i
= x
0
+ ih;
i = 1, 2, …, n).
x = x
i
x
1
x
2
x
3
… x
n
y = f(x
i
) y
1
y
2
y
3
y
n
The forward difference of f(x) denoted by Dy = D[ f(x)]
can be defined as
D y = D[ f(x)] = f(x +h) - f(x)
\ Dy
0
= f(x
0
+ h) - f(x
0
) = y
1
- y
0
D y
1
= y
2
- y
1
D y
2
= y
3
- y
2
.
.
.
D y
n-1
= y
n
- y
n-1
where D is called the forward difference operator and
D y
0
, D y
1
, …, D y
n-1
are called the first order forward
differences of y = f(x)
Similarly, D 2
y = D[ f(x + h)] - D[ f(x)]
\ D 2
y
0
= Dy
1
- Dy
0
D 2
y
1
= Dy
2
- Dy
1
D 2
y
n- 2
= Dy
n- 1
- Dy
n- 2
where D 2
y
0
, D 2
y
1
,…, D 2
y
n-2
are called the second order
forward differences.
And in general, the nth order forward differences
are given by
D n
y = D n
[ f(x)] = D n-1
[ f(x + h)] - D n-1
[ f(x)]
\ D n
y
0
= D n-1
y
1
- D n-1
y
0
D n
y
1
= D n-1
y
2
- D n-1
y
1
.
.
.
These forward differences of various orders can be
found and represented in a table called the forward
difference table as shown below
x y = f(x) Dy D 2
y D 3
y D 4
y D 5
y
x
0
x
1
= x
0
+ h
x
2
= x
0
+ 2h
x
3
= x
0
+ 3h
x
4
= x
0
+ 4h
x
5
= x
0
+ 5h
y
0
y
1
y
2
y
3
y
4
y
5
Dy
0
Dy
1
Dy
2
Dy
3
Dy
4
D 2
y
0
D 2
y
1
D 2
y
2
D 2
y
3
D 3
y
0
D 3
y
1
D 3
y
2
D 4
y
0
D 4
y
1
D 5
y
0
2. Backward differences: Consider a function y = f (x).
Let we were given the following table representing
the values of y = f (x) corresponding to the values x
1
,
x
2
, …, x
n
of x that are equally spaced (i.e; x
i
= x
0
+ ih,
i = 1, 2, … n)
x = x
i
x
1
x
2
x
3
… x
n
y
i
= f(x
i
) y
1
y
2
y
3
… y
n
The backward difference of f(x) denoted by ?y (or)
?[ f(x)] can be defined as
? y = ?[ f(x)] = f(x) - f(x - h)
\ ?y
1
= y
1
- y
0
? y
2
= y
2
- y
1
? y
3
= y
3
- y
2
.
.
.
?y
n
= y
n
- y
n-1
where ? is called the backward difference operator and
?y
1
, ?y
2
, …, ?y
n
are called the first order backward
differences of y = f(x)
Similarly, ?
2
y = ?
2
[ f(x)] = ?[f(x) - ?[ f(x - h)]
Chapter 06.indd 128 5/31/2017 10:59:35 AM
Page 5
Geometrical Interpretation of
Newton–Raphson Formula
y
f(x
0
)
f(x
f(x
2
)
x
0
x
x
1
x
2
y = f(x)
O
1
)
The geometrical meaning of Newton–Raphson method is a
tangent is drawn at the point [x
0
, f (x
0
)] to the curve y = f (x).
It cuts the x-axis at x
1
which will be a better approximation
of the root. Now drawing another tangent at [x
1
, f (x
1
)] which
cuts the x-axis at x
2
which is a still better approximation and
the process can be continued till the desired accuracy has
been achieved.
Convergence of Newton–Raphson Method
The order of convergence of Newton–Raphson method is 2
or the convergence is quadratic. It converges if |f (x). f ?(x)| <
|f '(x) |
2
. Also this method fails if f '(x) = 0
Newton’s Iterative Formula to Find bth Root
of a Positive Real Number a
The iterative formula is given by x
n+1
=- +
?
?
?
?
?
?
?
?
?
?
-
1
1
1
b
bx
a
x
n
n
b
()
Newton’s Iterative Formula to Find a
Reciprocal of a Number N
The iterative formula is given by
x
i+1
= x
i
(2 - x
i
N)
Example
Find a real root of the equation -4x + cos x + 2 = 0, by
Newton–Raphson method upto four decimal places assum-
ing x
0
= 0.5
Solution
Let f (x) = -4x + cos x + 2 and
f '(x) = -4 - sin x
Chapter 06.indd 125 5/31/2017 10:59:31 AM
Also f (0) = 1 + 2 = 3 > 0 and
f (1) = -4 + cos 1 + 2 = -1.4596 < 0
So, a root lies between 0 and 1.
Given x
0
= 0.5
\ The first approximation
xx
fx
fx
10
0
0
=-
'
()
()
=-
-+ +
--
05
40 50 52
40 5
.
[( .) cos( .)
sin( .)
=-
-+ +
--
(. )
[cos(. )
sin.
05
22 05
40 5
=-
-
05
0 8775
4 4794
.
.
.
= 0.5 + 0.1958 = 0.6958.
Example
Obtain the cube root of 14 using Newton–Raphson method,
with the initial approximation as 2.5.
Solution
We know that, the iterative formula to find a
b
is
x
b
bx
a
x
nn
n
b + -
=- +
?
?
?
?
?
?
?
?
?
?
1 1
1
1 ()
Here b = 3 and a = 14 and let x
0
= 2.5
?= +
?
?
?
?
?
?
?
?
?
?
xx
x
10
0
2
1
3
2
14
x
1 2
1
3
22 5
14
25
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
=+ =
1
3
5
14
625
1
3
52 24 2 413
.
{. }.
x
2 2
1
3
22 413
14
2 413
=+
?
?
?
?
?
?
(. )
(. )
=+
?
?
?
?
?
?
1
3
4 826
14
5 822569
.
.
.
.
=+ =
1
3
4 826 2 4044 2 410 {. .} .
\ The approximate cube root of 14 is 2.41.
Example
Find the reciprocal of 24 using Newton–Raphson method
with the initial approximation as 0.041.
Solution
The iterative formula to find
1
N
is,
x
n+1
= x
n
(2 - x
n
N)
Let x
0
= 0.041. Then x
1
= x
0
(2 - x
0
(24))
? x
1
= (0.041) (2 - (24) (0.041))
= 0.04165
x
2
= (0.0416) {2 - (24) (0.04165)} = 0.04161, similarly
proceeding we get x
3
= 0.041666
\ The reciprocal of 24 is 0.04166.
Curve Fitting
In engineering applications, many a times, we need to find
a suitable relation or law that may exist between the vari-
ables x and y from a given set of observed values (x
1
, y
1
),
(x
2
, y
2
), …, (x
n
, y
n
), The relation connecting x and y is called
as empirical law.
The process of finding the equation of the curve of best
fit which may be most suitable for predicting the value of y
for a given value of x is known as curve fitting.
Least Squares Approximation
Least squares approximation method is one of the best
methods available for curve fitting.
Let (x
1
, y
1
), (x
2
, y
2
), …, (x
n
, y
n
) be the pairs of observed
set of values of x and y. Let y = f (x) be the functional rela-
tionship sought between the variables x and y where f (x)
consists of some unknown parameters. We need to find the
relationship y = f (x) by using the observed values.
Procedure
1. Find the residual d
i
= y
i
- f (x
i
) (i = 1, 2, …, n) for
every pair of observed value y
i
and f(x
i
), the value of
the functional relation f (x) at x = x
i
2. Find the sum of the squares of residuals corresponding
to all pairs of values of y
i
and f(x
i
) and let it be S
i.e.,Sy fx
i
i
n
=-
=
?
(( )) .
2
1
3. Find the values of the parameters in f(x) such that S is
minimum.
Fitting a Straight Line Let y = a + bx be a straight line to
be fitted to the data (x
1
y
1
), (x
2
y
2
), …, (x
n
y
n
).
\ Residual = d
i
= y
i
- (a + bx
i
), i = 1, 2, …, n
Sum of the squares of the residuals = S = ?(y
i
- (a + bx
i
))
2
Now we have to find the parameters a and b such that S is
minimum
?
?
=- +-
?
S
a
ya bx
ii
21 [( )( )] and
?
?
=- +-
?
S
b
ya bx x
ii i
[( ( ))( )] 2
For S to be minimum,
?
?
=
S
a
0 and
?
?
=
S
a
0
Chapter 06.indd 126 5/31/2017 10:59:33 AM
?- -+ =
?
[( ( ))] 20 ya bx
ii
and
[( ( ))( )] 20 ya bx x
ii i
-+ -=
?
?= +
??
ynab x
ii
(1)
and xy ax bx
ii ii
=+
? ? ?
2
(2)
Eqs. (1) and (2) are known as normal equations.
By solving these equations, we get the values of ‘a’ and b
Fitting a Parabola (Quadratic Equation)
To fit a parabola of the type y = a + bx + cx
2
to the set of data
points (x
1
, y
1
), (x
2
, y
2
), …, (x
n
, y
n
), by proceeding as above, we
get the normal equations as
ynab xc x
ii i
=+ +
?? ?
2
(1)
xy ax bx cx
ii ii i ?? ??
=+ +
23
(2)
xy ax bx cx
ii ii i
22 34
?? ??
=+ + (3)
By solving Eqs. (1), (2) and (3), we can get the values of
the parameters a, b and c
Fitting of various exponential curves that can be brought
into the form of a straight line: Exponential curves of the
type y = ax
b
, y = ab
x
and y = ae
bx
can be fitted to the given
data by transforming it into the form of a straight line by
applying logarithm as follows.
Equation of
the curve to
be fitted
Equation obtained
after applying
log
e
(= ln)
T ransformed equation
into the form
of a straight line
y = ax
b
lny = lna + blnx Y = A + bX where Y = lny;
A = lna and X = lnx
y = ab
x
lny = lna + xlnb Y = A + Bx where Y = lny;
A = lna and B = lnb
y = ae
bx
lny = lna +bx Y = A + bx where Y = lny;
A = lna
Example
Using the method of least squares, fit a straight line y = a +
bx to the following data.
x 1 2 3 4
y 4 11 35 100
Hence find the value of y at x = 5.
Solution
We have to fit the line y = a + bx to the given data.
The normal equations are
?= +? ynab x
ii
(1)
?= ?+ ? xy ax bx
ii ii
2
(2)
The required values in the normal equations can be found
using the following table
x
i
y
i
x
i
y
i
x
i
2
1 4 4 1
2 11 22 4
3 35 105 9
4 100 400 16
xy xy x
ii ii i ?? ??
== == 10 150 531 30
2
;; ;
Substituting these values in Eqn. (1) and (2), we get
150 = 4a +10b and 531 = 10a + 30b
? 4a +10b = 150
10a + 30b = 531
Solving these linear equations, we get
a = -40.5 and b = 31.2
\ The straight line that fits to the given data is y = a + bx
? y = -40.5 + 31.2x
The value of y at x = 5 is
y = -40.5 +31.2 × 5 ? y = 115.5.
Example
Fit a quadratic equation y = a + bx + cx
2
to the following
data by the method of least squares.
x -2 -1 0 1 2
y 1 5 10 22 38
Solution
We have to fit the curve y = a + bx + cx
2
to the given data.
Here the normal equations are
?= +? +? ynab xc x
ii i
2
(1)
? x
i
y
i
= a? x
i
+ b? x
i
2
+ c? x
i
3
(2)
? x
i
2
y
i
= a? x
i
2
+ b? x
i
3
+ c? x
i
4
(3)
The values required in the normal equations can be obtained
by the following table:
x
i
y
i
x
i
y
i
x
i
2
x
3
i
x
i
4
x
i
2
y
i
-2 1 -2 4 -8 16 4
-1 5 -5 1 -1 1 5
0 10 0 0 0 0 0
1 22 22 1 1 1 22
2 38 76 4 8 16 152
? x
i
= 0; ? y
i
= 76; ? x
i
y
i
= 91; ? x
i
2
= 10; ? x
i
3
= 0; ? x
i
4
= 34;
? x
i
2
y
i
= 183
Substituting these values in the normal equation we have
76 = 5a + b × 0 + c × 10
91 = a × 0 + b × 10 + c × 0
Chapter 06.indd 127 5/31/2017 10:59:35 AM
183 = a × 10 + b × 0 + c × 34
? 5a + 10c = 76
10b = 91
10a + 34c = 183
Solving these equations for a, b and c we get
a = 10.77, b = 9.1 and c = 2.21
Substituting these in y = a + bx + cx
2
, we get the required
parabola as
y = 10.77 + 9.1x + 2.21x
2
.
Interpolation
The process of finding the most appropriate estimate for
the unknown values of a function y = f (x) at some values
of x by using the given pairs of values (x, f(x)) is called
interpolation.
Assumptions in Interpolation
1. The frequency distribution is normal and not marked
by sudden ups and downs.
2. The changes in the series are uniform within a period.
Before looking into interpolation, let us get
familiarity with the finite differences which we use in
interpolation.
Finite Differences
1. Forward differences: Consider a function y = f(x).
Let we were given the following table representing
the values of y = f(x) corresponding to the values x
i
,
x
2
, …, x
n
of x that are equally spaced (i.e., x
i
= x
0
+ ih;
i = 1, 2, …, n).
x = x
i
x
1
x
2
x
3
… x
n
y = f(x
i
) y
1
y
2
y
3
y
n
The forward difference of f(x) denoted by Dy = D[ f(x)]
can be defined as
D y = D[ f(x)] = f(x +h) - f(x)
\ Dy
0
= f(x
0
+ h) - f(x
0
) = y
1
- y
0
D y
1
= y
2
- y
1
D y
2
= y
3
- y
2
.
.
.
D y
n-1
= y
n
- y
n-1
where D is called the forward difference operator and
D y
0
, D y
1
, …, D y
n-1
are called the first order forward
differences of y = f(x)
Similarly, D 2
y = D[ f(x + h)] - D[ f(x)]
\ D 2
y
0
= Dy
1
- Dy
0
D 2
y
1
= Dy
2
- Dy
1
D 2
y
n- 2
= Dy
n- 1
- Dy
n- 2
where D 2
y
0
, D 2
y
1
,…, D 2
y
n-2
are called the second order
forward differences.
And in general, the nth order forward differences
are given by
D n
y = D n
[ f(x)] = D n-1
[ f(x + h)] - D n-1
[ f(x)]
\ D n
y
0
= D n-1
y
1
- D n-1
y
0
D n
y
1
= D n-1
y
2
- D n-1
y
1
.
.
.
These forward differences of various orders can be
found and represented in a table called the forward
difference table as shown below
x y = f(x) Dy D 2
y D 3
y D 4
y D 5
y
x
0
x
1
= x
0
+ h
x
2
= x
0
+ 2h
x
3
= x
0
+ 3h
x
4
= x
0
+ 4h
x
5
= x
0
+ 5h
y
0
y
1
y
2
y
3
y
4
y
5
Dy
0
Dy
1
Dy
2
Dy
3
Dy
4
D 2
y
0
D 2
y
1
D 2
y
2
D 2
y
3
D 3
y
0
D 3
y
1
D 3
y
2
D 4
y
0
D 4
y
1
D 5
y
0
2. Backward differences: Consider a function y = f (x).
Let we were given the following table representing
the values of y = f (x) corresponding to the values x
1
,
x
2
, …, x
n
of x that are equally spaced (i.e; x
i
= x
0
+ ih,
i = 1, 2, … n)
x = x
i
x
1
x
2
x
3
… x
n
y
i
= f(x
i
) y
1
y
2
y
3
… y
n
The backward difference of f(x) denoted by ?y (or)
?[ f(x)] can be defined as
? y = ?[ f(x)] = f(x) - f(x - h)
\ ?y
1
= y
1
- y
0
? y
2
= y
2
- y
1
? y
3
= y
3
- y
2
.
.
.
?y
n
= y
n
- y
n-1
where ? is called the backward difference operator and
?y
1
, ?y
2
, …, ?y
n
are called the first order backward
differences of y = f(x)
Similarly, ?
2
y = ?
2
[ f(x)] = ?[f(x) - ?[ f(x - h)]
Chapter 06.indd 128 5/31/2017 10:59:35 AM
\ ?
2
y
2
= ?y
2
- ?y
1
?
2
y
3
= ?y
3
- ?y
2
.
.
.
?
2
y
n
= ?y
n
- ?y
n-1
where ?
2
y
2
, ?
2
y
3
, …, ?
2
y
n
are called the second order
backward differences.
And in general, the nth order backward differences
are given by
?
n
y = ?
n
[ f(x)] = ?
n-1
[ f(x)] - ?
n-1
[ f(x - h)]
\ ?
n
y
n
= ?
n-1
y
n
- ?
n-1
y
n-1
These backward differences of various orders can be
found and represented in a table called the backward
difference table as shown below
x y = f(x) ?y ?
2
y ?
3
y ?
4
y ?
5
y
x
0
x
1
= x
0
+ h
x
2
= x
0
+ 2h
x
3
= x
0
+ 3h
x
4
= x
0
+ 4h
x
5
= x
0
+ 5h
y
0
y
1
y
2
y
3
y
4
Y
5
?y
1
?y
2
?y
3
?y
4
?y
5
?
2
y
2
?
2
y
3
?
2
y
4
?
2
y
5
?
3
y
3
?
3
y
4
?
3
y
5
?
4
y
4
?
4
y
5
?
5
y
5
Relation between forward and backward differences:
First order: ?[ f(x + h)] = D[ f(x)]
Second order: ?
2
[ f (x + 2h)] = D 2
[ f (x)]
Third order: ?
3
[ f(x + 3h)] = D 3
[ f (x)]
In general, the nth order forward and backward differ -
ences are connected by the relation.
?
n
[f (x+ nh)] = D n
[f (x)]
3. Divided differences: Consider a function y = f(x).
Let we were given a table of values of y = f (x) at x
1
,
x
2
, x
3
,…, x
n
, (need not be equally spaced) as shown
below.
x = x
i
x
1
x
2
x
3
… x
n
y
i
= f( x
i
) y
1
y
2
y
3
… y
n
Then the first order divided differences are given by:
[] xx
yy
xx
x 0
10
10
=
-
-
[] xx
yy
xx
12
21
21
=
-
-
.
.
.
[]
,
xx
yy
xx
nn
nn
nn
-
-
-
=
-
-
1
1
1
The second order divided differences are given by:
[, ,]
|, || ,|
[, ,]
[, ][ ,]
xx x
xx xx
xx
xx x
xx xx
x
01 2
12 01
30
12 3
23 12
=
-
-
=
-
3 31
- x
Similarly, the third order divided differences are given
by
[, ,, ]
|, ,| |, ,|
xxx x
xx xx xx
xx
0 234
12 30 12
30
=
-
-
[, ,, ]
|, ,| |, ,|
xx xx
xx xx xx
xx
1 234
234 12 3
41
=
-
-
Note that [x
0
, x
1
] = [x
1
, x
0
]
And [x
0
, x
1
, x
2
] = [x
1
, x
2
, x
0
] = [x
2
, x
0
, x
1
]
Interpolation Formulae
1. Newton’s forward interpolation formula: If the
function y = f (x) takes the values y
0
, y
1
, y
2
, …, y
n
respectively at the equally spaced points x
0
, x
1
, x
2
,
…, x
n
(i.e., x
i+1
= x
0
+ ih (OR) x
i+1
= x
i
+ h, then the
Newton’ s forward interpolation formula is given by:
yy py
pp
y
pp p
y
pp pp
p
=+ +
-
+
--
++
--
00
2
0
3
0
1
2
12
3
12
??
?
()
!
()()
!
()() (
- -- ())
!
n
n
y
n
1
0
?
where p
xx
h
=
-
0
(OR) x = x
0
+ ph.
2. Newton’s backward interpolation formula: If the
function y = f(x) takes the values y
0
, y
1
, y
2
, …, y
n
respectively at the equally spaced points x
0
, x
1
, x
2
,
…., x
n
(i.e., x
i+1
= x
0
+ ih (OR) x
i+1
= x
i
+ h), then the
Newton’ s backward interpolation formula is given by
Y
p
= ?y
n
+ p?y
n
+
pp
y
pp p
n
()
!
()()
!
+
?+
++ 1
2
12
3
2
?+ +
++ …+ -
?
3
12 1
y
pp pp n
n
y
n
n
n
()() (( ))
!
where p
xx
h
xx ph
n
n
=
-
=+ () . OR
Chapter 06.indd 129 5/31/2017 10:59:37 AM
Read More