0% found this document useful (0 votes)
24 views

CH#4 Solution of Non-Linear Equations-2nd-Form-15-12-2023

1) The document discusses numerical methods for solving nonlinear equations and numerical integration. 2) It covers direct and iterative methods for finding roots of equations, including the Newton-Raphson, Chebyshev, and secant methods. 3) Criteria for determining the convergence of iterative root-finding methods like Newton-Raphson are presented.

Uploaded by

Umer Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

CH#4 Solution of Non-Linear Equations-2nd-Form-15-12-2023

1) The document discusses numerical methods for solving nonlinear equations and numerical integration. 2) It covers direct and iterative methods for finding roots of equations, including the Newton-Raphson, Chebyshev, and secant methods. 3) Criteria for determining the convergence of iterative root-finding methods like Newton-Raphson are presented.

Uploaded by

Umer Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs.

& Numerical Integration


.

CHAPTER # 4
SOLUTIONS OF
NON-LINERA EQUATIONS
&
NUMERICAL INTEGRATION

Dr. Jamil Book Series 1 Page 1


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

CHAPTER # 4
Introduction:-

In the lower classes, students might have discussed the mathematical method of solving
polynomial equations or algebraic equations. We were able to solve such equations only when
some information about or some condition satisfied by the roots was given. In the absence of
any information about the roots of algebraic equation and also when the roots are not whole
numbers, it is difficult to fixed the roots exactly by mathematical methods. In such situations,
we find approximate values of the roots.

Two types of Equation:-


In Science and Engineering, many problems reduce to the problem of solving the equation
𝒇(𝒙) = 𝟎. A number 𝛂 (real or complex) is a root of the equation 𝒇(𝒙) = 𝟎 if 𝒇(𝛂) = 𝟎. There
are two types of equation.

1): Algebraic Equation:-


The equation 𝒇(𝒙) = 𝟎 is called an algebraic equation, it involves power and root.

2): Transcendental Equation:-


Those equation which involve fraction other than just powers of 𝒙 i.e. “A transcendental
equation is one which involves trigonometric, hyperbolic, logarithmic, inverse circular,
exponential, and inverse hyperbolic function”.

Dr. Jamil Book Series 1 Page 2


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Example:-
1): 4𝒙𝟒 + 𝒙𝟑 + 𝒙𝟐 + 𝒙 + 𝟏 = 𝟎
2): 7𝒙𝒔/𝟐 + 𝒙𝟐 + 𝟐𝒙 + 𝟗 = 𝟎
𝒙𝟑 +𝟐𝒙𝟐 +𝟑
3): = 𝟖𝒙𝟐 + 𝟑𝒙 + 𝟐
𝒙𝟑/𝟐 −𝟒𝒙+𝟓

4): 𝐭𝐚𝐧 𝒙 + 𝒆𝒙 − 𝐥𝐧 𝒙 = 𝟎
5): 𝒆𝒙 𝐬𝐢𝐧 𝒙 + 𝐜𝐨𝐭 𝒙 = 𝟎
6): 𝐜𝐨𝐬𝐡 𝒙 + 𝒆𝒙 = 𝟔
Two types of method:-
There are two types of equation to find the roots of the equation 𝒇(𝒙) = 𝟎.
1): Direct method:-
In this method, we can get the exact value of all the roots. For example, for the quadratic

𝟐 −𝒃±√𝒃𝟐 −𝟒𝒂𝒄
equation 𝒂𝒙 + 𝒃𝒙 + 𝒄 = 𝟎 , the roots are given by = . In other words, direct
𝟐𝒂

method do not require knowledge of initial approximation.


2): Iterative method:-
In this method, starting with initial approximation to the root of 𝒙𝟎 , we obtain sequence of
approximation {𝒙𝒏 } to the root which converges to the root.
Important theorem related to root of equation:-
If 𝒇(𝒙) is a continuous function in the closed interval [𝒂, 𝒃] and 𝒇(𝒂) and 𝒇(𝒃) are of opposite
signs.

𝒇(𝒂) = +ve and 𝒇(𝒃) = -ve OR


𝒇(𝒂) = -ve and 𝒇(𝒃) = +ve OR
𝒇(𝒂) 𝒇(𝒃) < 0

Suppose, we have to find the root of the equation 𝒇(𝒙) = 𝟎, then the equation 𝒇(𝒙) = 𝟎 has
at least one real root in the open interval (𝒂, 𝒃) i.e. 𝛂 ∈ (𝒂, 𝒃).

Dr. Jamil Book Series 1 Page 3


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

1): Newton-Raphson Iteration Method:-


This is very powerful tool for finding the real root of equation in the form 𝒇(𝒙) = 𝟎.
Let 𝒙𝒏 be an approximate value of a root of the equation 𝒇(𝒙) = 𝟎. Let

𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉

where 𝒉 is small is the exact root of the equation 𝒇(𝒙) = 𝟎. Since 𝒙𝒏+𝟏 is the exact root of
𝒇(𝒙) = 𝟎, we have
⇒ 𝒇(𝒙𝒏+𝟏 ) = 𝟎
⇒ 𝒇(𝒙𝒏 + 𝒉 ) = 𝟎
Expanding 𝒇(𝒙𝒏+𝟏 ) by taylor’s theorem, we get

𝒉 𝒉𝟐
𝒇(𝒙𝒏 ) + 𝟏! 𝒇′(𝒙𝒏 ) + 𝒇′′(𝒙𝒏 ) + .......... = 0
𝟐!
Dr. Jamil Book Series 1 Page 4
Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Since 𝒉 is small, we neglect terms containing 𝒉𝟐 and it’s higher power, then

𝒇(𝒙𝒏 ) + 𝒉𝒇′(𝒙𝒏 ) = 0

𝒇(𝒙𝒏 )
⇒ 𝒉= −
𝒇′(𝒙𝒏 )

Therefore,

𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉

𝒇(𝒙 )
𝒙𝒏+𝟏 = 𝒙𝒏 − 𝒇′(𝒙𝒏 ) , 𝒏 = 𝟎, 𝟏, 𝟐, 𝟑, ….
𝒏

This is known as Newton-Raphson Iteration formula.

2): Chebyshev Iteration Method:-


This is very powerful tool for finding the real root of equation in the form 𝒇(𝒙) = 𝟎.
Let 𝒙𝒏 be an approximate value of a root of the equation 𝒇(𝒙) = 𝟎. Let

𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉 ,

where 𝒉 is small is the exact root of the equation 𝒇(𝒙) = 𝟎. Since 𝒙𝒏+𝟏 is the exact root of
𝒇(𝒙) = 𝟎, we have

⇒ 𝒇(𝒙𝒏+𝟏 ) = 𝟎

⇒ 𝒇(𝒙𝒏 + 𝒉 ) = 𝟎
Expanding 𝒇(𝒙𝒏+𝟏 ) by taylor’s theorem, we get

𝒉 𝒉𝟐
𝒇(𝒙𝒏 ) + 𝟏! 𝒇′(𝒙𝒏 ) + 𝒇′′(𝒙𝒏 ) + .......... = 0
𝟐!

Since 𝒉 is small, we neglect terms containing 𝒉𝟑 and it’s higher power, then

𝒉 𝒉𝟐
𝒇(𝒙𝒏 ) + 𝒇′(𝒙𝒏 ) + 𝒇′′(𝒙𝒏 ) + . . . . . . . . . . = 𝟎
𝟏! 𝟐!

𝟏
⇒ 𝒉𝒇′(𝒙𝒏 ) = −𝒇(𝒙𝒏 ) − 𝒉𝟐 𝒇′′(𝒙𝒏 )
𝟐

𝒇(𝒙𝒏 ) 𝟏 𝒇′′(𝒙𝒏 )
⇒ 𝒉= − − 𝒉𝟐
𝒇′(𝒙𝒏 ) 𝟐 𝒇′(𝒙𝒏 )

𝒇(𝒙𝒏 ) 𝟏 [𝒇(𝒙𝒏 )]𝟐 𝒇′′(𝒙𝒏 ) 𝒇(𝒙𝒏 )


⇒ 𝒉= − − ,∴𝒉 = −
𝒇′(𝒙𝒏 ) 𝟐 [𝒇′(𝒙𝒏 )]𝟑 𝒇′(𝒙𝒏 )

Then,
𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉

Dr. Jamil Book Series 1 Page 5


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

𝒇(𝒙𝒏 ) 𝟏 [𝒇(𝒙𝒏 )]𝟐 𝒇′′(𝒙𝒏 )


𝒙𝒏+𝟏 = 𝒙𝒏 − − , 𝒏 = 𝟎, 𝟏, 𝟐, 𝟑, ….
𝒇′(𝒙𝒏 ) 𝟐 [𝒇′(𝒙𝒏 )]𝟑

This is known as Chebyshev Iteration formula.

3): Secant Method:-


In Newton-Raphson Method’s Iteration formula,
𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 − → (𝟏)
𝒇′(𝒙𝒏 )

We have to calculate 𝒇′(𝒙) at every iteration. In secant method, 𝒇′(𝒙) is approximated by the
formula:
𝒇(𝒙𝒏 ) −𝒇(𝒙𝒏−𝟏 )
𝒇′(𝒙𝒏 ) = 𝐥𝐢𝐦 , then
(𝒙𝒏 −𝒙𝒏−𝟏 )→𝟎 𝒙𝒏 −𝒙𝒏−𝟏

𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 )
𝒇′(𝒙) ≅
𝒙𝒏 − 𝒙𝒏−𝟏

Putting in Eq.(𝟏) gives

𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 − 𝒇(𝒙𝒏 ) −𝒇(𝒙𝒏−𝟏 )
𝒙𝒏 −𝒙𝒏−𝟏

(𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )


𝒙𝒏+𝟏 = 𝒙𝒏 − , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….
𝒇(𝒙𝒏 ) −𝒇(𝒙𝒏−𝟏 )

This is the required secant iteration formula.

Important theorem for Convergence criteria :-


Suppose 𝒙 = 𝛂 be a root of the equation 𝒇(𝒙) = 𝟎 which can be rewritten as 𝒙 = 𝚽(𝒙),
contained in an interval I(𝒂, 𝒃). Also, let 𝚽(𝒙) and 𝚽′(𝒙)can be continuous in I(𝒂, 𝒃). Then,

If | 𝚽′(𝒙) | < 𝟏 for all 𝒙 in I(𝒂, 𝒃),

the iterative process defined by 𝒙𝒏+𝟏 = 𝚽(𝒙𝒏 )converges to the root 𝒙 = 𝛂, if and only if, the
initially choosen initial approximation 𝒙𝟎 ∈ I(𝒂, 𝒃).

1): Convergence criteria of Newton- Raphson Method:-


To examine the convergence of Newton-Raphson formula
𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇′(𝒙𝒏 )

Dr. Jamil Book Series 1 Page 6


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

We compare the convergence of general iteration formula

𝒙𝒏+𝟏 = 𝚽(𝒙𝒏 ), we get

𝒇(𝒙𝒏 ) 𝒇(𝒙)
𝚽(𝒙𝒏 ), = 𝒙𝒏 − ⇒ 𝚽(𝒙) = 𝒙 −
𝒇′(𝒙𝒏 ) 𝒇′(𝒙)

[𝒇′(𝒙)]𝟐 − 𝒇(𝒙)𝒇′′(𝒙)
⇒ 𝚽′(𝒙) = 𝟏 −
[𝒇′(𝒙)]𝟐

We know that the iteration method converges if |𝚽′(𝒙) | < 𝟏. Therefore, Newton-Raphson
formula converges, provided

[𝒇′(𝒙)]𝟐 − 𝒇(𝒙)𝒇′′(𝒙)
⇒ |𝟏 − |<𝟏
[𝒇′(𝒙)]𝟐

[𝒇′(𝒙)]𝟐 − [𝒇′(𝒙)]𝟐 + 𝒇(𝒙)𝒇′′(𝒙)


⇒| |<𝟏
[𝒇′(𝒙)]𝟐

𝒇(𝒙)𝒇′′(𝒙)
⇒| |<𝟏
[𝒇′(𝒙)]𝟐

⇒ | 𝒇(𝒙)𝒇′′(𝒙)| < | [𝒇′(𝒙)]𝟐 | for all 𝒙 in the interval in which the root lies.

⇒ | 𝒇(𝒙)𝒇′′(𝒙)| < [𝒇′(𝒙)]𝟐 for all 𝒙 in the interval in which the root lies.

That is the Modulus of the Product of 𝒇(𝒙) and 𝒇′′(𝒙) is Less than the square of 𝒇′(𝒙) OR
the Modulus of the Product of 𝒇(𝒙) and its acceleration 𝒇′′(𝒙) is Less than the square of the
velocity 𝒇′(𝒙).
This is the required criteria for convergence of Newton-Raphson Iteration formula.

2): Convergence criteria of Chebyshe’s iteration Method:-


The convergence criteria of fixed point iteration method is |𝚽′(𝒙) | < 𝟏 for 𝒙 ∈ (𝒂, 𝒃).

Dr. Jamil Book Series 1 Page 7


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Table for Comparison of Iterative Method

S. Method Iterative Formula Order Evaluation Reliability of Geometrical


N. of of function Convergence Meaning
Convergence
𝒇(𝒙 ) Convergence Moving
Newton- 𝒙𝒏+𝟏 = 𝒙𝒏 − 𝒇′(𝒙𝒏 )
1 Raphson 𝒏 depends on initial towards the
2 2 value root using
tangent line
𝒙𝒏+𝟏 Fast convergence ?
𝒇(𝒙𝒏 )
2 Chebyshev = 𝒙𝒏 −
𝒇′(𝒙𝒏 ) 3 3
𝟏 [𝒇(𝒙𝒏 )]𝟐 𝒇′′(𝒙𝒏 )

𝟐 [𝒇′(𝒙𝒏 )]𝟑
(𝒙𝒏 − 𝒙𝒏−𝟏 )𝒇(𝒙𝒏 ) No guarantee if not Using secant
𝒙𝒏+𝟏 = 𝒙𝒏 −
3 Secant 𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 ) near the root line
1.62 1

Algorithm for Evaluation of Iterative Methods:-


Step-1:-
First of all find the interval (𝒂, 𝒃), whose length is 0.1, such that the exact root 𝜶 of the
equation 𝒇(𝒙) = 𝟎, lie in the interval (𝒂, 𝒃) and

𝒇(𝒂)𝒇(𝒃) < 𝟎.

Note:-
Generally start with 0, 1, 2, 3, ……, and bisect the interval until the length becomes 0.1.

Step-2:-
Determine the initial approximation 𝒙𝟎 , using the criteria:

𝒙𝟎 = 𝒂, |𝒇(𝒂)| < |𝒇(𝒃)|


OR
𝒙𝟎 = 𝒃, |𝒇(𝒃)| < |𝒇(𝒂)|

Step-3:-
Write the iterative formulae as:
𝒙𝒏+𝟏 = 𝒙𝒏 + [ ], 𝒏 = 𝟎, 𝟏, 𝟐, ….
𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏 , 𝒏 = 𝟎, 𝟏, 𝟐, ….
where
𝒉𝒏 = [ ]

Dr. Jamil Book Series 1 Page 8


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Step-4:-
Make a table according to the requirement of iterative formulae.
Step-5:-
Usually form the last column of the table, we can find our required root up to the desired
accuracy.

Important Note-1:-

Whenever an equation involve trigonometric functions, calculator must be in Radian


mode.

Important Note-2:-

The initial approximation 𝒙𝟎 must be very close to the exact root 𝜶, otherwise the
iteration process may diverge.

Important Note-3:-

The interval (𝒂, 𝒃) may have Minimum length of 0.1 and Maximum length of 1. The
large length of the interval require more iterations.

Remember these Points for Iteration Process


1): Exact Error:-
The Exact Error is defined as:

𝑬𝒙𝒂𝒄𝒕 𝑬𝒓𝒓𝒐𝒓 = |𝑻𝒓𝒖𝒆 𝑽𝒂𝒍𝒖𝒆 − 𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒆 𝑽𝒂𝒍𝒖𝒆| = |𝑽𝑻 − 𝑽𝑨 |

2): Approximater Error:-


The Approximate Error is defined as:

𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒓𝒆 𝑬𝒓𝒓𝒐𝒓 = |𝑪𝒖𝒓𝒓𝒆𝒏𝒕 𝑽𝒂𝒍𝒖𝒆 − 𝑷𝒓𝒆𝒗𝒊𝒐𝒖𝒔 𝑽𝒂𝒍𝒖𝒆| = |𝑽𝑪 − 𝑽𝑷 |

𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒓𝒆 𝑬𝒓𝒓𝒐𝒓 = |𝑳𝒂𝒕𝒆𝒔𝒕 𝑽𝒂𝒍𝒖𝒆 − 𝑷𝒂𝒔𝒕 𝑽𝒂𝒍𝒖𝒆| = |𝑽𝑳 − 𝑽𝑷 |

𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒓𝒆 𝑬𝒓𝒓𝒐𝒓 = |(𝒏 + 𝟏)𝒕𝒉 𝑽𝒂𝒍𝒖𝒆 − (𝒏)𝒕𝒉 𝑽𝒂𝒍𝒖𝒆| = |𝑽𝒏+𝟏 − 𝑽𝒏 |

𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒓𝒆 𝑬𝒓𝒓𝒐𝒓 = |𝑴𝒐𝒓𝒆 𝒂𝒄𝒄𝒖𝒓𝒂𝒕𝒆 𝑽𝒂𝒍𝒖𝒆 − 𝑳𝒆𝒔𝒔 𝒂𝒄𝒄𝒖𝒓𝒂𝒕𝒆 𝑽𝒂𝒍𝒖𝒆| = |𝑽𝑴𝑨 − 𝑽𝑳𝑨 |

Very Important Note:-

1): From calculator screen Pick One Unit Greater the Decimal Number as your required
decimal accuracy after Rounding-Off.

2): Sometime how much Decimal Numbers Pick form Calculator, you required for it to
understand the situations/wording/accuracy of the problem (So No Hard and Fast Rule !).

Dr. Jamil Book Series 1 Page 9


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

EXAMPLES
Example 1:-
Find a +ve root of 𝒙 + 𝒍𝒏𝒙 − 𝟐 = 𝟎 by Newton-Raphson method correct to give 5-decimal
places.

Solution:-
The equation is given by:
𝒙 + 𝒍𝒏𝒙 − 𝟐 = 𝟎

Then
𝒇(𝒙) = 𝒙 + 𝒍𝒏𝒙 − 𝟐

and

𝒇(𝟏. 𝟓) = −𝟎. 𝟎𝟗𝟒𝟓𝟑𝟒𝟖𝟗


𝒇(𝟏. 𝟔) = 𝟎. 𝟎𝟕𝟎𝟎𝟎𝟑𝟔𝟐𝟗
⇒ 𝒇(𝟏. 𝟓)𝒇(𝟏. 𝟔) < 𝟎

Exact root 𝛂 lies between 1.5 and 1.6 i.e. 𝛂 ∈ (𝟏. 𝟓, 𝟏. 𝟔), also
𝟏
𝒇′ (𝒙) = 𝟏 +
𝒙
Consider 𝒙𝒐 = 𝟏. 𝟔 as an initial approximation, then successive approximation of exact
root are computed from Newton-Raphson iteration formula given by

𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 − , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….
𝒇′(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏 , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….
where

𝒇(𝒙𝒏 )
𝒉𝒏 = −
𝒇′(𝒙𝒏 )

Now we make a table as.

Table of values”

𝒏 𝒙𝒏 f(𝒙𝒏 ) 𝒇′(𝒙𝒏 ) 𝒇(𝒙𝒏 ) 𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏


𝒉𝒏 = −
𝒇′(𝒙𝒏 )

0 1.6 0.070003629 1.625 -0.043079156 1.556920844

1 1.5569208440 -3.69103233x10-4 1.642293411 2.247486536x10-4 1.557145593

2 1.557145593 -9.84929x10-9 1.642200707 +1.6174511x10-8 1.55714609

Hence the required root corrects up to 5-decimal places is 1.55714.

Dr. Jamil Book Series 1 Page 10


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Example 2:-
Find the +ve root of the equation 𝒙𝟑 − 𝟒𝒙 + 𝟏 = 𝟎. Correct to 8-decimal places, using
Chebyshev’s method.

Solution:-
The equation is given by:
𝒙𝟑 − 𝟒𝒙 + 𝟏 = 𝟎

Then,
𝒇(𝒙) = 𝒙𝟑 − 𝟒𝒙 + 𝟏

and
𝒇(𝟎. 𝟐) = 𝟎. 𝟐𝟎𝟖
𝒇(𝟎. 𝟑) = −𝟎. 𝟏𝟕𝟑

⇒ 𝒇(𝟎. 𝟐) 𝒇(𝟎. 𝟑) < 𝟎

⇒Exact root 𝒙 lies between 0.2 and 0.3 i.e. 𝜶 ∈ (𝟎. 𝟐, 𝟎. 𝟑), also,

𝒇′ (𝒙) = 𝟑𝒙𝟐 − 𝟒 , 𝒇′′ (𝒙) = 𝟔𝒙

Consider 𝒙𝟎 = 𝟎. 𝟑 as an initial approximation, then successive approximations of exact


roots are computed from chebyshev’s iteration formula, given by:

𝒇(𝒙𝒏 ) 𝟏 [𝒇(𝒙𝒏 )]𝟐 𝒇′′(𝒙𝒏 )


𝒙𝒏+𝟏 = 𝒙𝒏 − − [𝒇′(𝒙𝒏 )]𝟑
, 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….
𝒇′(𝒙𝒏 ) 𝟐

𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏 , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….

where
𝒇(𝒙𝒏 ) 𝟏 [𝒇(𝒙𝒏 )]𝟐 𝒇′′(𝒙𝒏 )
𝒉𝒏 = − − 𝟑
𝒇′(𝒙𝒏 ) 𝟐 [𝒇′(𝒙𝒏 )]

“Table of values”

𝒇(𝒙𝒏 ) 𝟏 [𝒇(𝒙𝒏 )]𝟐 𝒇′′(𝒙𝒏 )


𝒏 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒇′(𝒙𝒏 ) 𝒇′′(𝒙𝒏 ) 𝒉𝒏 = − −
𝒇′(𝒙𝒏 ) 𝟐 [𝒇′(𝒙𝒏 )]𝟑
𝒙𝒏+𝟏
= 𝒙 𝒏 + 𝒉𝒏
0 0.3 -0.173 -3.73 1.8 -0.045860 0.2541390

1 0.254139 -1.42018*10-4 -3.806253 1.524834 -3.731150*10-5 0.2541016

2 0.254101688 1.389*10-9 -3.806296 1.524610128 3.649216982*10-10 0.254 1016

Hence the required root correct upto 8-decimal places is: 0.25410168.

Dr. Jamil Book Series 1 Page 11


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Example 3:-
Find a root of the equation 𝒔𝒊𝒏(𝒙) + 𝒄𝒐𝒔(𝒙) − 𝟏 = 𝟎 by secant method correct up to 7-
decimal places.

Solution:-
The equation is given by:
𝒔𝒊𝒏(𝒙) + 𝒄𝒐𝒔(𝒙) − 𝟏 = 𝟎

Then,
𝒇(𝒙) = 𝒔𝒊𝒏(𝒙) + 𝒄𝒐𝒔(𝒙) − 𝟏

and
𝒇(𝟏. 𝟓) = 𝟎. 𝟎𝟔𝟖𝟐𝟑𝟐𝟏𝟖𝟖
𝒇(𝟏. 𝟔) = −𝟎. 𝟎𝟐𝟗𝟔𝟐𝟓𝟗𝟏𝟗
⇒ 𝒇(𝟏. 𝟓)𝒇(𝟏. 𝟔) < 𝟎

Exact root 𝜶 lies between 1.5 and 1.6 i.e. 𝜶 ∈ (𝟏. 𝟓, 𝟏. 𝟔).

Consider 𝒙𝒏−𝟏 = 𝟏. 𝟓 𝒂𝒏𝒅 𝒙𝒏 = 𝟏. 𝟔 as an initial approximation, then successive


approximation of exact root is computed from secant iteration formula which is given by

(𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )


𝒙𝒏+𝟏 = 𝒙𝒏 − , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….
𝒇(𝒙𝒏 )−𝒇(𝒙𝒏−𝟏 )

𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏 , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….

Where

(𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )


𝒉𝒏 = −
𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 )

Now we make a table as:

“Table of values”

𝒏 𝒙𝒏−𝟏 𝒇(𝒙𝒏−𝟏 ) 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒉𝒏 𝒙𝒏+𝟏 𝒇(𝒙𝒏+𝟏 )


(𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )
(+𝒗𝒆) (−𝒗𝒆) =−
𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 ) = 𝒙 𝒏 + 𝒉𝒏
1 1.5 0.068232188 1.6 -0.029625919 -0.030274363 1.569725637 1.0701164*10-3

2 1.569725637 1.0701164*10-3 1.6 -0.029625919 -0.0292185952 1.570781047 1.527959*10-5

3 1.570781047 1.527959*10-5 1.6 -0.029625919 -0.02920389 1.570781047 -

The required root correct up to seven decimal places is 1.5707810.

Dr. Jamil Book Series 1 Page 12


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Example 4:-
Compute the root of the equation 𝟐𝒙 − 𝒍𝒐𝒈(𝒙) − 𝟕 = 𝟎 by secant method, correct up to 9-
decimal places.
Solution:-
The equation is given by:
𝟐𝒙 − 𝒍𝒐𝒈(𝒙) − 𝟕 = 𝟎

Then,
𝒇(𝒙) = 𝟐𝒙 − 𝒍𝒐𝒈(𝒙) − 𝟕

and

𝒇(𝟑. 𝟕) = −𝟎. 𝟏𝟔𝟖𝟐𝟎𝟏𝟕𝟐𝟒


𝒇(𝟑. 𝟖) = 𝟎. 𝟎𝟐𝟎𝟐𝟏𝟔𝟒𝟎𝟑
⇒ 𝒇(𝟑. 𝟕)𝒇(𝟑. 𝟖) < 𝟎

Exact root 𝜶 lies between 3.7 and 3.8 i.e. 𝜶 ∈ (𝟑. 𝟕, 𝟑. 𝟖),

Consider 𝒙𝒏−𝟏 = 𝟑. 𝟕 𝒂𝒏𝒅 𝒙𝒏 = 𝟑. 𝟖 as an initial approximation, then successive


approximations of exact roots are computed from secant iteration formula, given by:

(𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )


𝒙𝒏+𝟏 = 𝒙𝒏 − , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….
𝒇(𝒙𝒏 )−𝒇(𝒙𝒏−𝟏 )

𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏 , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….

Where

(𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )


𝒉𝒏 = −
𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 )

Now we make a table as:


--

“Table of values”

𝒏 𝒙𝒏−𝟏 𝒇(𝒙𝒏−𝟏 ) 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒉𝒏 𝒙𝒏+𝟏 𝒇(𝒙𝒏+𝟏 )


(−𝒗𝒆) (+𝒗𝒆) (𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )
=−
𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 ) = 𝒙 𝒏 + 𝒉𝒏
1 3.7 -0.168201724 3.8 0.020216403 -0.010729542 3.789270458 -1.468801*10-5

2 3.78927045 -1.468801*10-3 3.8 0.020216403 -0.010721752 3.789278248 -8.4*10-10

3 3.78927824 -8.4*10-10 3.8 0.020216403 -0.010721751 3.789278248 -

The required root correct up to nine decimal places is 3.789278248.

Dr. Jamil Book Series 1 Page 13


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Example 5:-
Compute:
a): Square root of 27 b): Square root of 8
c): Cube root of 18 d): 5th root of 17
e): 3√𝟏𝟑

Solution(d):-

Let the 5th root of 17 is x i.e. 𝒙=171/5

𝒙𝟓 = 𝟏𝟕
𝒙𝟓 − 𝟏𝟕 = 𝟎 ∴ 171/5=1.762340348

Then,
𝒇(𝒙)= 𝒙𝟓 − 𝟏𝟕

and
𝒇(𝟏. 𝟕) = −𝟐. 𝟖𝟎𝟏𝟒𝟑
𝒇(𝟏. 𝟖) = 𝟏. 𝟖𝟗𝟓𝟔𝟖
𝒇(𝟏. 𝟕)𝒇(𝟏. 𝟖) < 𝟎

Exact root 𝜶 lies between 1.7 and 1.8 i.e. 𝜶 ∈ (𝟏. 𝟕, 𝟏. 𝟖), also
𝒇′(𝒙)= 𝟓𝒙𝟒

Consider 𝒙𝟎 = 𝟏. 𝟖 as an initial approximation, the successive approximation of exact root


can be computed from Newton-Raphson formula given by:

𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 − , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, …
𝒇′(𝒙𝒏 )

𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏 , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….

where
𝒇(𝒙𝒏 )
𝒉𝒏 = −
𝒇′(𝒙𝒏 )
Now we make table as:

“Table of values”

𝒏 𝒙𝒏 f(𝒙𝒏 ) 𝒇′(𝒙𝒏 ) 𝒇(𝒙𝒏 ) 𝒙𝒏+𝟏 = 𝒙𝒏 + 𝒉𝒏


𝒉𝒏 = −
𝒇′(𝒙𝒏 )

0
1.8 𝟏. 𝟖𝟗𝟓𝟔𝟖 94.4784 -0.020064692 1.779935308

1 1.779935308 0.865743336 50.1864962611 0.0172505236 1.7626847844

2 1.7626847844 0.016619125 48.2690361759 0.000344302 1.7623404824

3 1.7623404824 0.0000064904 48.2313340134 0.0000001346 1.7623403478

Hence the required 5th root of 17 corrects up to 6-decimal places is 1.762340.

Dr. Jamil Book Series 1 Page 14


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Drill Excercise # 1:-


The Mathematical modeling of certain electrical system provide that when current 𝑰 = 𝟏𝟎, the
following nonlinear equation:
𝒙𝟒 − 𝒙 = 𝟏𝟎
where 𝒙 represent time expressed in seconds. Use Secant method to find the roots of the above
equations, correct to at least 4-decimal places and write some suitable/good comments on your
solutions. Is Secant method is best for this equation ? Why not Newton-Raphson, Chebyshev’s
and Graeffe’s ?
Drill Excercise # 2:-
Mathematical expression of some electrical system provide that when current 𝑰 = 𝒔𝒊𝒏𝒙, the
following nonlinear equation:
𝒔𝒊𝒏𝒙 = 𝒆𝒙 − 𝟑𝒙
where 𝒙 represent time expressed in seconds. Use any Numerical method to find 𝒙 of the above
equations, correct to at least 4-decimal places and write some suitable/good comments on your
solutions.

Drill Excercise # 3:-


Find a real root of 𝒙𝒙 + 𝒙 − 𝟒 = 𝟎 by Newton-Raphson method correct up to six decimal places.
Answer:-
𝒙 = 𝟏. 𝟔𝟔𝟒𝟓𝟔𝟑 is the required root correct up to six decimal places.
Drill Excercise # 4:-
Find a root of the equation 𝒙𝒔𝒊𝒏𝒙 + 𝒄𝒐𝒔𝒙 = 𝟎
Answer:-
𝒙 = 𝟐. 𝟕𝟗𝟖𝟒
Drill Excercise # 5:-
Use Chebyshev’s method to find the roots of the following equations as indicated, correct to four
places of decimals.
a): 𝐱 𝟐 + 𝟒 𝐬𝐢𝐧𝐱 = 𝟎
b): 𝐱 𝐞𝐱 − 𝐜𝐨𝐬𝐱 = 𝟎
c): 𝟑𝐱 + 𝐬𝐢𝐧𝐱 − 𝐞𝐱=𝟎
Answer:-
a): -1.9338
b): 0.5178
c): 0.3604
Drill Excercise # 6:-
Use secant method to find the roots of the following equations as indicated, correct to four places
of decimal:
a): 𝒙𝟑 + 𝒙𝟐 + 𝒙 − 𝟏𝟎𝟎 = 𝟎
b): 𝒙 𝒕𝒂𝒏𝒙 + 𝟏 = 𝟎
c): 𝒙𝟒 − 𝒙 − 𝟏𝟎 = 𝟎
Answer:-
a): 0.4264
b): 2.7980
c): 1.8558

Dr. Jamil Book Series 1 Page 15


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Drill Excercise # 7:-


A sphere of Pine wood, 2 meters in diameter, floating in water sinks to the depth of 𝒉 meter,
given by the equation
𝒉𝟑 − 𝟑𝒉𝟐 + 𝟐. 𝟓 = 𝟎
Find 𝒉 correct to 4 decimal places by any suitable method.
Answer:-
𝒉 = 𝟏. 𝟏𝟕
Drill Excercise # 8:-
A particle starts at rest on a smooth inclined plane whose angle θ is changing at a constant rate
𝒅𝜽
=𝝎<𝟎
𝒅𝒕

At the end of 𝒕 seconds the position of object is given by


𝒈 𝒆𝝎𝒕 − 𝒆−𝝎𝒕
𝒙(𝒕) = ( − 𝒔𝒊𝒏(𝝎𝒕))
𝟐𝝎𝟐 𝟐

Suppose the particle has moved 1.7ft in 1s. Find the rate 𝝎 correct to 5 decimal places at wich
the 𝜽 changes. Assume that 𝒈 = −𝟑𝟐. 𝟏𝟕 𝒇𝒕/𝒔𝟐 .
Answer:-

Dr. Jamil Book Series 1 Page 16


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Descartes rule of signs:-

The number of +𝒗𝒆 roots of an algebraic equation 𝒇(𝒙) = 𝟎 with real coefficients cannot
exceed the number of changes in sign of the coefficient in the polynomial (𝒙) = 𝟎 . Similarly,
the number of −𝒗𝒆 roots of 𝒇(𝒙) = 𝟎 cannot exceed the number of changes in the sign of the
coefficients of 𝒇(−𝒙) = 𝟎.

Example 1:-
Consider an equation 𝒇(𝒙) = 𝒙𝟑 − 𝟐𝒙𝟐 − 𝟓𝒙 + 𝟔 there are two sign changes and in 𝐟(−𝐱) =
−𝐱 𝟑 − 𝟐𝐱 𝟐 + 𝟓𝐱 + 𝟔 there are one sign change. Hence there are two +𝒗𝒆 root and one −𝒗𝒆
root.

Example 2:-
Consider an equation 𝒇(𝒙) = 𝒙𝟑 − 𝟑𝒙𝟐 + 𝟒𝒙 − 𝟓 there are three sign change and in 𝒇(−𝒙) =
−𝒙𝟑 − 𝟑𝒙𝟐 − 𝟒𝒙 − 𝟓 there are no sign change. Hence are exactly three roots of the given
equation.

Example 3:-
Consider an equation 𝒇(𝒙) = 𝟐𝒙𝟑 + 𝒙𝟐 − 𝟐𝒙 − 𝟏 there are one sign change and in 𝒇(−𝒙) =
−𝟐𝒙𝟑 + 𝒙𝟐 + 𝟐𝒙 − 𝟏 there are two sign change. Hence there is one +𝒗𝒆 root and two −𝒗𝒆
root.

Some important results:-

1): There will be exactly n roots for an nth degree polynomial equation.
2): There will be at least one real root if n is odd.
3): Complex roots occur only in pair.
4): Descarte’s rule of sign is always true.

4): Graeffe’s Root squaring method:-


Graeffe’s root squaring method is applicable to polynomial equations only. The advantage of
this method is that it does not require any prior information about the root and it gives all
the roots of the equations.

Let the given equation be:

𝒇(𝒙) = 𝒂𝒐 𝒙𝒏 + 𝒂𝟏 𝒙𝒏−𝟏 + 𝒂𝟐 𝒙𝒏−𝟐 + ⋯ + 𝒂𝒏−𝟏 𝒙 + 𝒂𝒏 ⟶ (𝟏)

If 𝜶𝟏 , 𝜶𝟐 , 𝜶𝟑 , … . , 𝜶𝒏 are the roots of this equation, then we have:


𝒇(𝒙) = 𝒂𝒐 (𝒙 − 𝜶𝟏 )(𝒙 − 𝜶𝟐 ) … (𝒙 − 𝜶𝒏 ) → (𝟐)
Consider:
𝒇(−𝒙) = 𝒂𝒐 (−𝒙 − 𝜶𝟏 )(−𝒙 − 𝜶𝟐 ) … (−𝒙 − 𝜶𝒏 )

𝒇(−𝒙) = (−𝟏)𝒏 𝒂𝒐 (𝒙 + 𝜶𝟏 )(𝒙 + 𝜶𝟐 ) … (𝒙 + 𝜶𝒏 )

(−𝟏)𝒏 𝒇(−𝒙) = 𝒂𝒐 (𝒙 + 𝜶𝟏 )(𝒙 + 𝜶𝟐 ) … (𝒙 + 𝜶𝒏 ) → (𝟑)

Dr. Jamil Book Series 1 Page 17


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Multiplying eq:(2) and eq:(3), we get:

(−𝟏)𝒏 𝒇(−𝒙)𝒇(𝒙) = 𝒂𝟎 𝟐 (𝒙𝟐 − 𝜶𝟏 𝟐 )(𝒙𝟐 − 𝜶𝟐 𝟐 ) … (𝒙𝟐 − 𝜶𝒏 𝟐 )

Let y=𝒙𝟐 , the above eqn becomes:

(−𝟏)𝒏 𝒇(−𝒙)𝒇(𝒙) = 𝚽(𝒚) = 𝒂𝟎 𝟐 (𝒚 − 𝜶𝟏 𝟐 )(𝒚 − 𝜶𝟐 𝟐 ) … (𝒚 − 𝜶𝒏 𝟐 ) → (𝟒)

The roots of eq:(4) are 𝜶𝟏 𝟐 , 𝜶𝟐 𝟐 , … . . , 𝜶𝒏 𝟐 and are thus the squares of the roots of the given

equation. It follows that the roots 𝜶𝟏 𝟐𝒏 , 𝜶𝟐 𝟐𝒏 , … , 𝜶𝒏 𝟐𝒏 and the coefficients 𝒃𝟎 , 𝒃𝟏 , 𝒃𝟐 , … . 𝒃𝒏 of

the final transformed equation after m squaring:

𝒃𝟎 𝒖𝒏 + 𝒃𝟏 𝒖𝒏−𝟏 + ⋯ + 𝒃𝒏−𝟏 𝒖𝟏 + 𝒃𝒏 = 𝟎

Are connected by the corresponding relations:

𝒏 𝒃𝒊
𝜶𝒊 𝟐 = , 𝒊 = 𝟏, 𝟐, … . , 𝒏
𝒃𝒊−𝟏

𝒃𝒊 𝟏/𝟐𝒏
|𝜶𝒊 | = | | , 𝒊 = 𝟏, 𝟐, … . , 𝒏
𝒃𝒊−𝟏

i.e.

𝟏 𝟏 𝟏
𝒃𝟏 𝒏
𝟐 𝒃𝟐 𝒏
𝟐 𝒃𝒏 𝟐𝒏
|𝜶𝟏 | = | | , |𝜶𝟐 | = | | , . . . . . . , |𝜶𝒏 | = | |
𝒃𝒐 𝒃𝟏 𝒃𝒏−𝟏

Where “𝒏” is the degree of the given polynomial.

From these equations the desired roots can be easily formed, where we assume that the order

of the magnitude of the roots be:

|𝜶𝟏 | > |𝜶𝟐 | > |𝜶𝟑 | >. . . . . > |𝜶𝒏 |

Important Note for Squaring Procedure:-


1): For Cubic Polynomial:-
Let the cubic polynomial be:

𝒇(𝒙) = 𝒂𝒐 𝒙𝟑 + 𝒂𝟏 𝒙𝟐 + 𝒂𝟐 𝒙 + 𝒂𝟑 = 𝟎

The multiplication by (−𝟏)𝒏 𝒇(−𝒙) can be carried out as given below:

ao a1 a2 a3

ao2 -a12 a22 -a32


2aoa2 -2a1a3
b0 b1 b2 b3

Dr. Jamil Book Series 1 Page 18


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

2): For Biquadratic Polynomial:-


Let the biquadratic polynomial be:

𝒇(𝒙) = 𝒂𝒐 𝒙𝟒 + 𝒂𝟏 𝒙𝟑 + 𝒂𝟐 𝒙𝟐 + 𝒂𝟑 𝒙 + 𝒂𝟒 = 𝟎

Then the multiplication by (−𝟏)𝒏 𝒇(−𝒙) i.e. (−𝟏)𝟒 𝒇(−𝒙) can be carried out as given below:

ao a1 a2 a3 a4

ao2 -a12 a 22 -a32 a4


2a0a2 -2a1a3 2a2a4
2aoa4

bo b1 b2 b3 b4

and so on.

Note:-
This method of course fails, when the roots of the given polynomial are repeated.

Important Note:-
𝒙𝒏+𝟏 → 𝜶, 𝐭𝐡𝐞𝐧 𝒇(𝒙𝒏+𝟏 ) → 𝟎

Example 1:-
Find all the roots of the equation 𝒙𝟑 − 𝟒𝒙𝟐 + 𝟓𝒙 − 𝟐 = 𝟎 by graeffe’s root squaring method
(squaring three times).

Solution:-
The equation is given by 𝒙𝟑 − 𝟒𝒙𝟐 + 𝟓𝒙 − 𝟐 = 𝟎,
we have 𝒇(𝒙) = 𝒙𝟑 − 𝟒𝒙𝟐 + 𝟓𝒙 − 𝟐
Now, we make a table as:

Dr. Jamil Book Series 1 Page 19


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

“Table of values”

Coefficient’s
No. of squaring ao a1 a2 a3
1 -4 5 -2

1 -16 25 -4
10 -16

First squaring: 21=2 1 -6 9 -4

1 -36 81 -16
18 -48

Second squaring: 22=4 1 -18 33 -16

1 -324 1089 -256


66 -864

Third Squaring: 23=8 1 -258 225 -256


bo b1 b2 b3

Hence the roots are given by:


𝟏 𝟏
𝒃𝟏 𝟖 −𝟐𝟓𝟖 𝟖
|𝜶𝟏 | = | | =| | = 𝟐. 𝟎𝟎𝟏𝟗𝟒
𝒃𝒐 𝟏

𝟏 𝟏
𝒃𝟐 𝟖 𝟐𝟐𝟓 𝟖
|𝜶𝟐 | = | | = | | = 𝟎. 𝟗𝟖𝟑𝟎𝟒
𝒃𝟏 𝟐𝟓𝟖

𝟏 𝟏
𝒃𝟑 𝟖 𝟐𝟓𝟔 𝟖
|𝜶𝟑 | = | | = | | = 𝟏. 𝟎𝟑𝟐𝟖𝟎
𝒃𝟐 𝟐𝟐𝟓

Since 𝒇(𝒙) = 𝒙𝟑 − 𝟒𝒙𝟐 + 𝟓𝒙 − 𝟐 change sign three times and 𝒇(−𝒙) = −𝒙𝟑 − 𝟒𝒙𝟐 − 𝟓𝒙 − 𝟐
have no sign change. Hence by descarte’s rule of sign all three roots are +𝒗𝒆. Therefore,
required roots are:

𝜶𝟏 = 𝟐. 𝟎𝟎𝟏𝟗𝟒, 𝜶𝟐 = 𝟎. 𝟗𝟖𝟑𝟎𝟒, 𝜶𝟑 = 𝟏. 𝟎𝟑𝟐𝟖𝟎

Note: -
In above Example 1, the roots are not correct to 5 decimals; only for three squaring.

Example 2:-

Find all the roots of the equation 𝒙𝟑 − 𝟓𝒙𝟐 − 𝟏𝟕𝒙 + 𝟐𝟎 = 𝟎 by graeffe’s root squaring
method.

Solution:-
The equation is given by 𝒙𝟑 − 𝟓𝒙𝟐 − 𝟏𝟕𝒙 + 𝟐𝟎 = 𝟎, we have

Dr. Jamil Book Series 1 Page 20


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

⇒ 𝒇(𝒙) = 𝒙𝟑 − 𝟓𝒙𝟐 − 𝟏𝟕𝒙 + 𝟐𝟎

Now, we make a table as:

“Table of values”

Coefficient’s
No. of squaring ao a1 a2 a3
1 -5 -17 20

1 -25 289 -400


-34 200

First squaring: 21=2 1 -59 489 -400

1 -3481 239121 -16x104


978 -47200

Second squaring: 22=4 1 -2503 191921 -16x104

1 -6265009 36933670241 -256x108


383842 -800960000

Third squaring: 23=8 1 -5881167 3603271024 -256x108


bo b1 b2 b3

Hence the roots are given by:


𝟏 𝟏
𝒃𝟏 𝟖 −𝟓𝟖𝟖𝟏𝟏𝟔𝟕 𝟖
|𝜶𝟏 | = | | = | | = 𝟕. 𝟎𝟏𝟕𝟓
𝒃𝒐 𝟏

𝟏 𝟏
𝒃𝟐 𝟖 𝟑𝟔𝟎𝟑𝟐𝟕𝟏𝟎𝟐𝟒𝟏 𝟖
|𝜶𝟐 | = | | =| | = 𝟐. 𝟗𝟕𝟒𝟒
𝒃𝟏 −𝟓𝟖𝟖𝟏𝟏𝟔𝟕

𝟏 𝟏
𝟖 𝟖
𝒃𝟑 𝟖 −𝟐𝟓𝟎𝒙𝟏𝟎
|𝜶𝟑 | = | | =| | = 𝟎. 𝟗𝟓𝟖𝟏𝟕𝟎𝟔𝟖𝟒
𝒃𝟐 𝟑𝟔𝟎𝟑𝟐𝟕𝟏𝟎𝟐𝟒𝟏

Since 𝒇(𝒙) = 𝒙𝟑 − 𝟓𝒙𝟐 − 𝟏𝟕𝒙 + 𝟐𝟎 change sign two times and 𝒇(𝒙) = −𝒙𝟑 − 𝟓𝒙𝟐 +
𝟏𝟕𝒙 + 𝟐𝟎 change sign one times. Hence by descarte’s rule of signs, there are two +𝒗𝒆 root
and one −𝒗𝒆 root. Now.

𝒇(𝟕. 𝟎𝟏𝟕𝟓) = 𝟎. 𝟎𝟓𝟒𝟗𝟎, 𝒇(−𝟕. 𝟎𝟏𝟕𝟓) = −𝟒𝟓𝟐. 𝟓𝟎𝟕𝟗𝟔

𝒇(𝟐. 𝟗𝟕𝟒𝟒) = −𝟒𝟖. 𝟒𝟖𝟓𝟑𝟗, 𝒇(−𝟐. 𝟗𝟕𝟒𝟒) = 𝟎. 𝟎𝟏𝟒𝟖𝟒

𝒇(𝟎. 𝟗𝟓𝟖𝟏𝟕𝟎𝟔𝟖𝟒) = 𝟎. 𝟎𝟎𝟎𝟑𝟑𝟏, 𝒇 (−𝟎. 𝟗𝟓𝟖𝟏𝟕𝟎𝟔𝟖𝟒) = 𝟑𝟎. 𝟖𝟏𝟖𝟕𝟓

Dr. Jamil Book Series 1 Page 21


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.

Therefore, the required roots are:

𝜶𝟏 = 𝟕. 𝟎𝟏𝟕𝟓, 𝜶𝟐 = −𝟐. 𝟗𝟕𝟒𝟒, 𝜶𝟑 = 𝟎. 𝟗𝟓𝟖𝟏𝟕𝟎𝟔𝟖𝟒

Note:-

In above Example 2, the roots not correct to 4 decimals places; only for three squaring.

Example 3:-

Find all the roots of the equation 𝟐𝒙𝟑 + 𝒙𝟐 − 𝟐𝒙 − 𝟏 = 𝟎 by graeffe’s root squaring method
and squaring four times.

Solution:-
The equation is given by: 𝟐𝒙𝟑 + 𝒙𝟐 − 𝟐𝒙 − 𝟏 = 𝟎. We have

⇒ 𝒇(𝒙) = 𝟐𝒙𝟑 + 𝟒𝒙𝟐 − 𝟐𝒙 − 𝟏

Now, we make a table as:

“Table of values”

Coefficient’s
No. of squaring ao a1 a2 a3
2 1 -2 -1

4 -1 4 -1
-8 2
First squaring: 21=2 4 -9 6 -1

16 -81 36 -1
48 -18
Second squaring: 22=4 16 33 18 -1

256 -1089 324 -1


576 -66
Third squaring: 23=8 256 -513 258 -1

65536 -263169 66564 -1


+132096 -1026
Fourth squaring: 24=16 65536 -131073 65538 -1
bo b1 b2 b3

Hence the roots are given by:


𝟏 𝟏
𝒃𝟏 𝟏𝟔 −𝟏𝟑𝟏𝟎𝟕𝟑 𝟏𝟔
|𝜶𝟏 | = | | = | | = 𝟏. 𝟎𝟒𝟒𝟐
𝒃𝒐 𝟔𝟓𝟓𝟓𝟑𝟔
Dr. Jamil Book Series 1 Page 22
Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration
.
𝟏 𝟏
𝒃𝟐 𝟏𝟔 𝟔𝟓𝟓𝟓𝟑𝟖 𝟏𝟔
|𝜶𝟐 | = | | =| | = 𝟎. 𝟗𝟓𝟕
𝒃𝟏 −𝟏𝟑𝟏𝟎𝟕𝟑

𝟏 𝟏
𝒃𝟑 𝟏𝟔 −𝟏 𝟏𝟔
|𝜶𝟑 | = | | =| | = 𝟎. 𝟒𝟗𝟗𝟗
𝒃𝟐 𝟔𝟓𝟓𝟓𝟑𝟖

ce 𝒇(𝒙) = 𝟐𝒙𝟑 + 𝒙𝟐 − 𝟐𝒙 − 𝟏 change sign one time and 𝒇(−𝒙) = −𝟐𝒙𝟑 + 𝒙𝟐 + 𝟐𝒙 − 𝟏


change sign two time. Hence by descartes rule of sign there are one +𝒗𝒆 and two −𝒗𝒆 roots.
Now

𝒇(𝟏. 𝟎𝟒𝟒𝟐) = 𝟎. 𝟐𝟕𝟗𝟎𝟒 , 𝒇(−𝟏. 𝟎𝟒𝟒𝟐) = −𝟎. 𝟎𝟗𝟖𝟑𝟒

𝒇(𝟎. 𝟗𝟓𝟕𝟔) = −𝟎. 𝟐𝟒𝟏𝟗𝟔 , 𝒇(−𝟎. 𝟗𝟓𝟕𝟔) = 𝟎. 𝟎𝟕𝟗𝟓𝟗𝟔

𝒇(𝟎. 𝟒𝟗𝟗𝟗) = −𝟏. 𝟓𝟎𝟎𝟎𝟒 , 𝒇(−𝟎. 𝟒𝟗𝟗𝟗) = 𝟎. 𝟎𝟎𝟎𝟏𝟓

Therefore the required roots are:

𝜶𝟏 = −𝟏. 𝟎𝟒𝟒𝟐 , 𝜶𝟐 = +𝟎. 𝟗𝟓𝟕𝟔 , 𝜶𝟑 = −𝟎. 𝟒𝟗𝟗𝟗.

(Note the values are not correct to 4 decimals).

Important note:-
The following table shows the magnitude of the roots at the end of each squaring.

No. of squaring |𝜶𝟏 | |𝜶𝟐 | |𝜶𝟑 |

1. 1.5 0.8165 0.4082

2. 1.198 0.8660 0.4855

3. 1.1442 0.9176 0.4995

4. 1.1442 0.9176 0.4999

The actual roots are +1, -1 and -0.5.


Table show the quick convergence of the third root and the slow convergence of the second
root. Strictly speaking, we must do some more squaring to get closer approximate roots.

Drill Excercise # 9:-


Using Graeffe’s Root Squaring Method, solve the following equations:
a): 𝟐𝒙𝟑 − 𝟕 𝒙𝟐 + 𝟕𝒙 − 𝟐 = 𝟎
b): 𝒙𝟑 − 𝟔𝒙𝟐 + 𝟏𝟏𝒙 − 𝟔 = 𝟎
Answer:-
a): 0.5, 1, 2
b): 3, 2, 1

Dr. Jamil Book Series 1 Page 23


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

CHAPTER # 4

Lines, Parabolas & Cubic Curves

S.N. Linear, First Degree Parabolic, Second Cubic Equation, 3rd


Equation Degree, Quadratic Degree Equation
Equation

Eq. 𝒂𝒙 + 𝒃 = 𝟎 𝒂𝒙𝟐 + 𝒃𝒙 + 𝒄 = 𝟎 𝒂𝒙𝟑 + 𝒃𝒙𝟐 + 𝒄𝒙 + 𝒅 = 𝟎

Points 2 Points 3 Points 4 Points

L
I
N
E
S

P
A
R
A
B
O
L
A
S

C
U
B
I
C
C
U
R
V
E
S

Dr. Jamil Book Series 2 Page 24


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Area of Trapezium:-

The area of Trapezium is given by:

𝟏 𝒉
𝑨𝒓𝒆𝒂 𝒐𝒇 𝑻𝒓𝒂𝒑𝒆𝒛𝒊𝒖𝒎 = × 𝒉𝒆𝒊𝒈𝒉𝒕 × (𝒔𝒖𝒎 𝒐𝒇 || 𝒔𝒊𝒅𝒆𝒔) = (𝒂 + 𝒃)
𝟐 𝟐

Note(Area under the Line or Trapezium):-

𝒉 𝒉
𝑨𝒓𝒆𝒂 𝒖𝒏𝒅𝒆𝒓 𝒕𝒉𝒆 𝑳𝒊𝒏𝒆 𝒐𝒓 𝑻𝒓𝒂𝒑𝒆𝒛𝒊𝒖𝒎 = (𝒇(𝒂) + 𝒇(𝒃)) = (𝒇(𝒙𝟎 ) + 𝒇(𝒙𝟏 ))
𝟐 𝟐

Dr. Jamil Book Series 2 Page 25


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

1): Trapezodal Method/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 26


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

𝒂 = 𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , . . . . . 𝒙𝒏−𝟏 , 𝒃 = 𝒙𝒏

OR

𝒙𝒊 = 𝒙𝟎 + 𝒊𝒉 , 𝒊 = 𝟎, 𝟏, 𝟐, . . . , 𝒏

and the step size is

Dr. Jamil Book Series 2 Page 27


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

𝒃 − 𝒂 𝒙𝒏 − 𝒙𝟎
𝒉= =
𝒏 𝒏
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 28


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical 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”

𝒙 𝟏 𝟏. 𝟓 𝟐. 𝟎 𝟐. 𝟓 𝟑. 𝟎
𝒙𝟎 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒
𝒇(𝒙) 𝟏 𝟎. 𝟒 𝟎. 𝟐𝟓 𝟎. 𝟏𝟔 𝟎. 𝟏𝟏
𝒇(𝒙𝟎 ) 𝒇(𝒙𝟏 ) 𝒇(𝒙𝟐 ) 𝒇(𝒙𝟑 ) 𝒇(𝒙𝟒 )

Dr. Jamil Book Series 2 Page 29


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Using trapezoid formula for 5-point, we have


𝒃
𝒉
∫ 𝒇(𝒙)𝒅𝒙 = [𝒇(𝒙𝟎 ) + 𝟐𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝟐 ) + 𝟐𝒇(𝒙𝟑 ) + 𝒇(𝒙𝟒 )]
𝒂 𝟐

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,

𝟑 𝒅𝒙 𝟎.𝟐
⇒ ∫𝟏 = [𝟏 + 𝟐(𝟎. 𝟔𝟗𝟒𝟒𝟒) + 𝟐(𝟎. 𝟓𝟏𝟎𝟐𝟎) + 𝟐(𝟎. 𝟑𝟗𝟔𝟐𝟓) + 𝟐(𝟎. 𝟑𝟎𝟖𝟔𝟒) + 𝟐(𝟎. 𝟐𝟓) +
𝒙𝟐 𝟐

𝟐(𝟎. 𝟐𝟎𝟔𝟔𝟏) + 𝟐(𝟎. 𝟏𝟕𝟑𝟔𝟏) + 𝟐(𝟎. 𝟏𝟒𝟕𝟗𝟐) + 𝟐(𝟎. 𝟏𝟐𝟕𝟓𝟓𝟏) + 𝟎. 𝟏𝟏 ]

𝟎. 𝟐(𝟏 + 𝟓. 𝟔𝟏𝟗𝟏𝟗𝟐 + 𝟎. 𝟏)
⇒ = 𝟎. 𝟔𝟕𝟗𝟏𝟗𝟐
𝟐

Dr. Jamil Book Series 2 Page 30


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Exact value:-
𝒅𝒙𝟑
𝟏𝟑 𝟏
⇒ ∫ 𝟐 = |− | = − [ − 𝟏] = 𝟎. 𝟔𝟕
𝟏 𝒙 𝒙𝟏 𝟑

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,

𝒃−𝒂 𝟏−𝟎
⇒𝒉=
𝒏
= 𝟒
= 𝟏𝟒 = 𝟎. 𝟐𝟓

“Table of values”

𝒙 𝟎 𝟎. 𝟐𝟓 𝟎. 𝟓 𝟎. 𝟕𝟓 𝟏
𝒙𝟎 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒

𝒇(𝒙) 𝟏 𝟎. 𝟗𝟒 𝟎. 𝟖 𝟎. 𝟔𝟒 𝟎. 𝟓
𝒇(𝒙𝟎 ) 𝒇(𝒙𝟏 ) 𝒇(𝒙𝟐 ) 𝒇(𝒙𝟑 ) 𝒇(𝒙𝟒 )

Using trapezoid formula for 5 points, we have

𝒃
𝒉
∫ 𝒇(𝒙)𝒅𝒙 = [𝒇(𝒙𝟎 ) + 𝟐𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝟐 ) + 𝟐𝒇(𝒙𝟑 ) + 𝒇(𝒙𝟒 )]
𝒂 𝟐

Substituting value we have,

𝟏
𝒅𝒙 𝟎. 𝟐𝟓 𝟎. 𝟐𝟓(𝟔. 𝟐𝟓)
⇒∫ = [ 𝟏 + 𝟐 (𝟎. 𝟗𝟒 ) + 𝟐 (𝟎. 𝟖 ) + 𝟐 (𝟎. 𝟔𝟒 ) + 𝟎. 𝟓 ] = = 𝟎. 𝟕𝟖𝟐𝟓
𝟎 𝒙𝟐 𝟐 𝟐
Dr. Jamil Book Series 2 Page 31
Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

2): For 11- points:-


For 11 -points 𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝟏𝟎 we have 𝒏 = 𝟏𝟎 and step size is

𝒃−𝒂 𝟏−𝟎 𝟏
⇒𝒉=
𝒏
=
𝟏𝟎
= 𝟏𝟎 = 𝟎. 𝟏

“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
𝝅
𝟏): 𝑬𝟓 = | − 𝟎. 𝟕𝟖𝟐𝟓| = 𝟎. 𝟎𝟎𝟐𝟖𝟗
𝟒
𝝅
𝟐): 𝑬𝟏𝟏 = | − 𝟎. 𝟕𝟖𝟓| = 𝟎. 𝟎𝟎𝟎𝟑𝟗
𝟒

Dr. Jamil Book Series 2 Page 32


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

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

Note(Area under the Parabola):-

𝒉
𝑨𝒓𝒆𝒂 𝒖𝒏𝒅𝒆𝒓 𝒕𝒉𝒆 𝑷𝒂𝒓𝒂𝒃𝒐𝒍𝒂 = [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )]
𝟑

Dr. Jamil Book Series 2 Page 33


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

2): Simpson’s 1/3rd Method/Rule

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

𝒃
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.

Dr. Jamil Book Series 2 Page 34


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & 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

𝒙𝒊 = 𝒙𝟎 + 𝒊 𝒉 , 𝒊 = 𝟎, 𝟏, 𝟐, … … . . , 𝟐𝒏

𝒃
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,
Dr. Jamil Book Series 2 Page 35
Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

𝒃
𝒉 𝒉
⇒ ∫ 𝒇(𝒙)𝒅𝒙 = [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )] + [𝒇(𝒙𝟐 ) + 𝟒𝒇(𝒙𝟑 ) + 𝒇(𝒙𝟒 )]
𝒂 𝟑 𝟑

𝒉 𝒉
+ [𝒇(𝒙𝟒 ) + +𝟒𝒇(𝒙𝟓 ) + 𝒇(𝒙𝟔 )] + ⋯ + [𝒇(𝒙𝟐𝒏−𝟐 ) + 𝟒𝒇(𝒙𝟐𝒏−𝟏) + 𝒇(𝒙𝟐𝒏 )]
𝟑 𝟑

𝒃
𝒉
⇒ ∫ 𝒇(𝒙) = [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝟐 ) + 𝟒𝒇(𝒙𝟑 ) + 𝟐𝒇(𝒙𝟒 ) + 𝟒𝒇(𝒙𝟓 ) + 𝟒𝒇(𝒙𝟐𝒏−𝟏 )
𝒂 𝟑
+ ⋯ + 𝟐𝒇(𝒙𝟐𝒏−𝟐 ) + 𝒇(𝒙𝟐𝒏 )]

𝒃 𝒉
⇒ ∫𝒂 𝒇(𝒙)𝒅𝒙 = [𝒇𝒊𝒓𝒔𝒕 𝒕𝒆𝒓𝒎 + 𝟒{𝒔𝒖𝒎 𝒐𝒇 𝒐𝒅𝒅 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏𝒂𝒍 𝒗𝒂𝒍𝒖𝒆𝒔} +
𝟑

𝟐{𝒔𝒖𝒎 𝒐𝒇 𝒆𝒗𝒆𝒏 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏𝒂𝒍 𝒗𝒂𝒍𝒖𝒆𝒔} + 𝒍𝒂𝒔𝒕 𝒕𝒆𝒓𝒎𝒔]

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.

Example # 3:-
𝟏𝟎 𝒅𝒙
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 method that provide the best answer.
Solution:-
5- Points trapezoidal rule:-

We have

𝟏
𝒇(𝒙)= , 𝒂 = 𝟎 𝒂𝒏𝒅 𝒃 = 𝟏
𝟏+𝒙𝟐

For 5 -points 𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , 𝒙𝟒 we have 𝒏 = 𝟒 and step size is,

𝒃−𝒂 (𝟏−𝟎)
⇒𝒉=
𝒏
= 𝟒
= 𝟏𝟒 = 𝟎. 𝟐𝟓

Dr. Jamil Book Series 2 Page 36


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

“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:-
𝟏
𝒅𝒙 −𝟏 ] 𝟏 −𝟏 ( ) −𝟏 ( )
𝝅
⇒∫ = [ 𝒕𝒂𝒏 𝒙 𝟎= 𝒕𝒂𝒏 𝟏 − 𝒕𝒂𝒏 𝟎 =
𝟎 𝟏 + 𝒙𝟐 𝟒
𝟏
𝒅𝒙 𝟑. 𝟏𝟒𝟏𝟓𝟗
⇒∫ = = 𝟎. 𝟕𝟖𝟓𝟑𝟗
𝟎 𝟏 + 𝒙𝟐 𝟑

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.
Dr. Jamil Book Series 2 Page 37
Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Solution:-

1):5-Points trapezoidal rule:-

We have,

𝒇(𝒙) = 𝟑𝒙𝟐 , 𝒂 = 𝟎 𝒂𝒏𝒅 𝒃 = 𝟏𝟎

For 5 points 𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , 𝒙𝟒 we have 𝒏 = 𝟒 and step size is:


𝒃 − 𝒂 𝟏𝟎 − 𝟎
⇒𝒉= = = 𝟐. 𝟓
𝒏 𝟒

“Table of Values”

𝒙 𝒙0 0 𝒙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

𝟏𝟎
𝟐. 𝟓
⇒ ∫ 𝟑𝒙𝟐 𝒅𝒙 = [𝟎 + 𝟐{𝟏𝟖. 𝟕𝟓 + 𝟕𝟓 + 𝟏𝟔𝟖. 𝟕𝟓} + 𝟑𝟎𝟎]
𝟎 𝟐

𝟏𝟎 𝟐.𝟓 𝟐.𝟓(𝟖𝟐𝟓)
⇒ ∫𝟎 𝟑𝒙𝟐 𝒅𝒙 = [𝟓𝟐𝟓 + 𝟑𝟎𝟎] =
𝟐 𝟐

𝟏𝟎
⇒ ∫ 𝟑𝒙𝟐 𝒅𝒙 = 𝟏𝟎𝟑𝟏. 𝟐𝟓
𝟎

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

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

𝒃
𝒉
∫ 𝒇(𝒙)𝒅𝒙 = [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝟐 ) + 𝟒𝒇(𝒙𝟑 ) + 𝒇(𝒙𝟒 )]
𝒂 𝟑

Substituting the values, we have

𝟏𝟎
𝟐. 𝟓
⇒ ∫ 𝟑𝒙𝟐 𝒅𝒙 = [𝟎 + 𝟒(𝟏𝟖. 𝟕𝟓) + 𝟐(𝟕𝟓) + 𝟒(𝟏𝟔𝟖. 𝟕𝟓) + 𝟑𝟎𝟎]
𝟎 𝟑

𝟏𝟎
𝟐. 𝟓
⇒ ∫ 𝟑𝒙𝟐 𝒅𝒙 = [𝟏𝟐𝟎𝟎] = 𝟐. 𝟓(𝟒𝟎𝟎) = 𝟏𝟎𝟎𝟎
𝟎 𝟐

Dr. Jamil Book Series 2 Page 38


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

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 39


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

3): Simpson’s 3/8th Method/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.

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.

Dr. Jamil Book Series 2 Page 40


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

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

𝒃 𝒙𝟑𝒏
⇒ ∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙
𝒂 𝒙𝟎

𝒃 𝒙 𝒙 𝒙 𝒙
⇒ ∫𝒂 𝒇(𝒙)𝒅𝒙 = ∫𝒙 𝟑 𝒇(𝒙)𝒅𝒙 + ∫𝒙 𝟔 𝒇(𝒙)𝒅𝒙 + ∫𝒙 𝟗 𝒇(𝒙)𝒅𝒙 + ⋯ + ∫𝒙 𝟑𝒏 𝒇(𝒙)𝒅𝒙
𝟎 𝟑 𝟔 𝟑𝒏−𝟑

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

Dr. Jamil Book Series 2 Page 41


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

𝒃 𝟑𝒉 𝟑𝒉
⇒ ∫𝒂 𝒇(𝒙)𝒅𝒙 = [𝒇(𝒙𝟎 ) + 𝟑𝒇(𝒙𝟏 ) + 𝟑𝒇(𝒙𝟐 ) + 𝒇(𝒙𝟑 )] + [𝒇(𝒙𝟑 ) + 𝟑𝒇(𝒙𝟒 ) + 𝟑𝒇(𝒙𝟓 ) +
𝟖 𝟖

𝟑𝒉 𝟑𝒉
𝒇(𝒙𝟔 )] + [𝒇(𝒙𝟔 ) + 𝟑𝒇(𝒙𝟕 ) + 𝟑𝒇(𝒙𝟖 ) + 𝒇(𝒙𝟗 )] + ⋯ + [𝒇(𝒙𝟑𝒏−𝟑 ) + 𝟑𝒇(𝒙𝟑𝒏−𝟐) +
𝟖 𝟖

𝟑𝒇(𝒙𝟑𝒏−𝟏 ) + 𝒇(𝒙𝟑𝒏 )]

𝒃 𝟑𝒉
⇒ ∫𝒂 𝒇(𝒙)𝒅𝒙 = [𝒇(𝒙𝟎 ) + 𝟑𝒇(𝒙𝟏 ) + 𝟑𝒇(𝒙𝟐 ) + 𝟐𝒇(𝒙𝟑 ) + 𝟑𝒇(𝒙𝟒 ) + 𝟑𝒇(𝒙𝟓 ) + 𝟐𝒇(𝒙𝟔 ) … +
𝟖

𝟐𝒇(𝒙𝟑𝒏−𝟑 ) + 𝟑𝒇(𝒙𝟑𝒏−𝟐 ) + 𝟑𝒇(𝒙𝟑𝒏−𝟏 ) + 𝒇(𝒙𝟑𝒏 )]

𝒃 𝟑𝒉
⇒ ∫𝒂 𝒇(𝒙)𝒅𝒙 = [𝒇(𝒙𝟎 ) + 𝟑{𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 ) + 𝒇(𝒙𝟒 ) + ⋯ + 𝒇(𝒙𝒏−𝟏 )} +
𝟖

𝟐{𝒇(𝒙𝟑 ) + ⋯ + 𝒇(𝒙𝟔 ) + ⋯ + 𝒇(𝒙𝟑𝒏−𝟑 )} + 𝒇(𝒙𝟑𝒏 )]

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 42


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical 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 43


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical 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 44


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical 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 45


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical 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 46


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical 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 𝒙𝒏 − 𝒙𝟎 𝟐 ′′ 𝒙𝟐𝒏 − 𝒙𝟎 𝟒 𝟒 𝒙𝟑𝒏 − 𝒙𝟎 𝟒 𝟒


− 𝒉 𝒇 (𝒇) − 𝒉 𝒇 (𝒇) − 𝒉 𝒇 (𝒇)
𝟏𝟐 𝟏𝟖𝟎 𝟖𝟎

Drill Excercise # 10:-


𝟏 𝟐𝒙
Calculate the value of 𝒍𝒏𝟐 by finding ∫𝟎 𝒅𝒙 ,using Simpsons rule by dividing into 4 equal
𝟏+𝒙𝟐
parts.

Drill Excercise # 11:-


The speed of a train at various times are given in following data:

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

𝒗 (Km/h) 0 13 33 39.5 40 40 36 15 0

Find the distance 𝑺 from 𝒕 = 𝟎 to 𝒕 = 𝟑. 𝟓.


Answer:-
98.5km

Dr. Jamil Book Series 2 Page 47


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Drill Excercise # 12:-


Using Simpson’s 1/3 rule with 6 subintervals to find the Area contained between the 𝒙 − 𝒂𝒙𝒊𝒔
and the curve 4𝒙𝟐 + 𝟗𝒚𝟐 = 𝟑𝟔.
Answer:-
9.156
Drill Excercise # 13:-
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.

𝒑 0 5 10 15 20 25 30

𝑫 36 35 33 29 22 16 9

𝟑𝟎 𝑫 𝟐
Hint:- 𝑽𝒐𝒍𝒖𝒎𝒆 = 𝝅 ∫𝟎 ( ) 𝒅𝒑
𝟐

Answer:-
𝟏𝟖𝟎𝟕𝟖. 𝟓𝟔 𝒎𝟑
Drill Excercise # 14:-
𝝅
Evaluate ∫ 𝒔𝒊𝒏𝒙𝒅𝒙 by
𝟐
𝟎
1): Trapezoidal rule
2): Simpsons 1/3 rule
Taking 6 equal interval correct to 3 decimal places.

Answer:-
Drill Excercise # 15:-
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:-
𝟐𝟐𝟏. 𝟐𝟓𝒎𝟐

Dr. Jamil Book Series 2 Page 48


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

EXERCISE- 4
“Newton-Raphson Method”

Question # 1:-
Find a +𝒗𝒆 root of 𝒙 + 𝒍𝒏𝒙 − 𝟐 = 𝟎 by Newton-Raphson method correct to six decimal
places.
Answer:-
𝒙 = 𝟏. 𝟓𝟓𝟕𝟏𝟒 correct to six decimal places.

Question # 2:-
Find a real root of 𝟑𝒙 − 𝒄𝒐𝒔𝒙 − 𝟏 = 𝟎 by Newton-Raphson method correct to eight decimal
places.
Answer:-
𝒙 = 𝟎. 𝟔𝟎𝟕𝟏𝟎𝟏𝟔𝟒 is the required root correct up eight decimal places.

Question # 3:-
Compute the +ve root of 𝒙𝟑 − 𝒙 − 𝟎. 𝟏 = 𝟎 by Newton-Raphson method correct to six
decimal places.
Answer:-
𝒙 = 𝟏. 𝟎𝟒𝟔𝟔𝟖𝟏 correct to six decimal places.

Question # 4:-
Compute one +ve root of 𝟐𝒙 − 𝟑𝒔𝒊𝒏𝒙 − 𝟓 = 𝟎 by Newton-Raphson method correct to three
decimal places.
Answer:-
𝒙 = 𝟐. 𝟖𝟖𝟑 is the required root correct up eight decimal places.

Question # 5:-
Evaluate one root of the following equations, by Newton-Raphson method:
a): 𝟑𝒙𝟐 + 𝟓𝒙 − 𝟒𝟎 = 𝟎 correct up to four significant figures.
b): 𝒔𝒊𝒏𝒙 = 𝟓𝒙 − 𝟐 correct up to three decimal places.
c): 𝟐𝒙 − 𝟑𝒄𝒐𝒔𝒙 = 𝟏. 𝟖𝟓 correct up to seven decimal places.
d): 𝒙𝟒 − 𝒙𝟐 − 𝟏 = 𝟎 correct up to seven decimal places.

Answer:-
a): 𝒙 = 𝟐. 𝟗𝟏𝟐
b): 𝒙 = 𝟎. 𝟓𝟑𝟒
c): 𝒙 = 𝟎. 𝟕𝟖𝟔𝟏𝟓𝟏𝟑𝟖
d): 𝒙 = 𝟏. 𝟑𝟏𝟎𝟕𝟐𝟒𝟔

Dr. Jamil Book Series 2 Page 49


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Question # 6:-
Find a +ve root of 𝟏𝟎𝒙 + 𝒙 − 𝟒 = 𝟎 by Newton-Raphson method correct to six significant
figures.
Answer:-
𝒙 = 𝟎. 𝟓𝟑𝟗𝟏𝟕𝟗 is the required root correct to six significant figures.

Question # 7:-
Find a real root of 𝒙𝒙 + 𝒙 − 𝟒 = 𝟎 by Newton-Raphson method correct up to six decimal
places.
Answer:-
𝒙 = 𝟏. 𝟔𝟔𝟒𝟓𝟔𝟑 is the required root correct up to six decimal places.

Question # 8:-
Use Newton-Raphson method to approximate the root of
𝒙𝟑 − 𝟒𝒙𝟐 + 𝟏𝟎𝒙 − 𝟏𝟎 = 𝟎 , which is lying between 1.5 and 2 and correct up to 5-decimal
places.
Answer:-
𝒙 = 𝟏. 𝟔𝟐𝟗𝟑𝟔 correct up to 5-decimal places.

Question # 9:-
Solve for +𝒗𝒆 root of 𝟐𝒙 − 𝟑𝒔𝒊𝒏𝒙 = 𝟓
Answer:-

Question # 10:-
Find the −𝒗𝒆 root of 𝒙𝟐 + 𝟒𝒔𝒊𝒏𝒙 = 𝟎
Answer:-
𝒙 = −𝟏. 𝟗𝟑𝟑𝟖

Question # 12:-
Find a root of the equation 𝒙𝒔𝒊𝒏𝒙 + 𝒄𝒐𝒔𝒙 = 𝟎
Answer:-
𝒙 = 𝟐. 𝟕𝟗𝟖𝟒

Question # 13:-
Use Newton-Raphson method to compute:
a): Square root of 27.
b): Square root of 8.

Dr. Jamil Book Series 2 Page 50


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

c): Square root of 18.


d): 𝟓𝒕𝒉 root of 17.
e): 𝟑√𝟏𝟑
f): √𝟏𝟐𝟓 correct up to six decimal places.

Answer:-
a): 𝒙 = 𝟓. 𝟏𝟗𝟔𝟏𝟓𝟐
b): 𝒙 = 𝟐. 𝟖𝟐𝟖𝟒𝟐𝟕
c): 𝒙 = 𝟐. 𝟔𝟐𝟎𝟕𝟒𝟏
d): 𝒙 = 𝟏. 𝟕𝟔𝟐𝟑𝟒𝟎
e): 𝒙 = 𝟐. 𝟑𝟓𝟏𝟑𝟑𝟒
f): 𝒙 = 𝟏𝟏. 𝟏𝟖𝟎𝟑𝟑𝟗

Question # 14:-
Compute the following, correct to five decimal places:
𝟕
a): √𝟓
b): 𝟒√𝟏𝟓
c): √𝟖𝟗
𝟑
d): √𝟑𝟒
Answer:-
a): 1.25849
b): 1.96798
c): 9.43398
d): 3.23961

“Chebyshev’s Method”

Question # 15:-
Find the +𝒗𝒆 root of the equation 𝒙𝟑 -4𝒙+1 = 0 correct to eight decimal places, using
Chebyshev’s method.
Answer:-
𝒙 = 𝟎. 𝟐𝟓𝟒𝟏𝟎𝟏𝟔𝟖 correct to eight decimal places.

Question # 16:-
Find the root of the equation 𝟐𝒙𝟑 − 𝟑𝒙 + 𝟔 = 𝟎, that lies between -2 and -1 correct to 4 places
of decimals, using Chebyshev’s method.
Answer:-
𝒙 = −𝟏. 𝟕𝟖𝟑𝟕𝟕 correct to four places of decimal.

Dr. Jamil Book Series 2 Page 51


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Question # 17:-
Use Chebyshev’s method to find the roots of the following equations as indicated, correct to
four places of decimals.
a): 𝐱 𝟑 − 𝐱 − 𝟏 = 𝟎
b): 𝐱 𝟑 − 𝟒𝐱 + 𝟗 = 𝟎
c): 𝐱 𝟑 − 𝟓𝐱 + 𝟔 = 𝟎
d): 𝐱 𝟐 + 𝟒 𝐬𝐢𝐧𝐱 = 𝟎
e): 𝐱 𝐞𝐱 − 𝐜𝐨𝐬𝐱 = 𝟎
f): 𝟑𝐱 + 𝐬𝐢𝐧𝐱 − 𝐞𝐱=𝟎
Answer:-
a): 2.7984
b): -2.7065
c): -2.6890
d): -1.9338
e): 0.5178
f): 0.3604

“Secant Method”

Question # 18:-
Find a root of the equation 𝒔𝒊𝒏𝒙 + 𝒄𝒐𝒔𝒙 = 𝟏 by secant method correct to 7 decimal places.
Answer:-
𝒙 = 𝟏. 𝟓𝟕𝟎𝟕𝟖𝟏𝟎 correct to 7 decimal places.

Question # 19:-
Compute the root of the equation 𝟐𝒙 − 𝒍𝒐𝒈𝒙 − 𝟕 = 𝟎 by secant method correct to nine
decimal places.

Answer:-
𝒙 = 𝟑. 𝟕𝟖𝟗𝟐𝟕𝟖𝟐𝟒𝟖 correct to 9 decimal places.

Question # 20:-
Use secant method to find the roots of the following equations as indicated, correct to four
places of decimal:
a): 𝒙𝟑 + 𝒙𝟐 + 𝒙 − 𝟏𝟎𝟎 = 𝟎
b): 𝒙𝟑 − 𝟖𝒙 + 𝟒𝟎 = 𝟎
c): 𝒙 + 𝒕𝒂𝒏𝒙 = 𝟎
d): 𝒙 𝒕𝒂𝒏𝒙 + 𝟏 = 𝟎
e): 𝒙𝒆𝒙 = 𝟐
f): 𝒙𝟒 − 𝒙 − 𝟏𝟎 = 𝟎
Answer:-
a): 0.4264
b): -4.1891
c): 2.365
d): 2.7980
e): 0.8526
f): 1.8558

Dr. Jamil Book Series 2 Page 52


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Question # 21:-
The Mathematical modeling of certain electrical system provide that when current 𝑰 = 𝟏𝟎,
the following nonlinear equation:
𝒙𝟒 − 𝒙 = 𝟏𝟎
where 𝒙 represent time expressed in seconds. Use Secant method to find the roots of the
above equations, correct to at least 4-decimal places and write some suitable/good comments
on your solutions. Is Secant method is best for this equation ? Why not Newton-Raphson,
Chebyshev’s and Graeffe’s ?

Question # 22:-
Mathematical expression of some electrical system provide that when current 𝑰 = 𝒔𝒊𝒏𝒙, the
following nonlinear equation:
𝒔𝒊𝒏𝒙 = 𝒆𝒙 − 𝟑𝒙
where 𝒙 represent time expressed in seconds. Use any Numerical method to find 𝒙 of the
above equations, correct to at least 4-decimal places and write some suitable/good comments
on your solutions.

Question # 23:-
A sphere of Pine wood, 2 meters in diameter, floating in water sinks to the depth of 𝒉 meter,
given by the equation
𝒉𝟑 − 𝟑𝒉𝟐 + 𝟐. 𝟓 = 𝟎
Find 𝒉 correct to 4 decimal places by any suitable method.
Answer:-
𝒉 = 𝟏. 𝟏𝟕
Question # 24:-
A particle starts at rest on a smooth inclined plane whose angle 𝜽 is changing at a constant rate
𝒅𝜽
=𝝎<𝟎
𝒅𝒕

At the end of 𝒕 seconds the position of object is given by


𝒈 𝒆𝝎𝒕 − 𝒆−𝝎𝒕
𝒙(𝒕) = ( − 𝒔𝒊𝒏(𝝎𝒕))
𝟐𝝎𝟐 𝟐

Dr. Jamil Book Series 2 Page 53


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Suppose the particle has moved 1.7ft in 1s. Find the rate 𝝎 correct to 5 decimal places at
wich the 𝜽 changes. Assume that 𝒈 = −𝟑𝟐. 𝟏𝟕 𝒇𝒕/𝒔𝟐 .
Answer:-

“Graeffe’s Root Squaring Method”

Question # 25:-
Find all the roots of the equation 𝒙𝟑 − 𝟒𝒙𝟐 + 𝟓𝒙 − 𝟐 = 𝟎 by Graeffe’s root squaring method
(squaring three times)
Answer:-
𝜶𝟏 = 2.00194 , 𝜶𝟐 = 0.98304 , 𝜶𝟑 = 1.03280

Question # 26:-
Find all the roots of the equations 𝒙𝟑 − 𝟓 𝒙𝟐 − 𝟏𝟕𝒙 + 𝟐𝟎 = 𝟎 by Graeffe’s root squaring
method.
Answer:-
𝜶𝟏 = 7.0175 , 𝜶𝟐 =2.9744 , 𝜶𝟑 = 0.958170684

Question # 27:-
Find all the roots of the equation 𝟐𝒙𝟑 + 𝒙𝟐 − 𝟐𝒙 − 𝟏 = 𝟎 by Graeffe’s root squaring method
(squaring four times).
Answer:-
𝛂𝟏 = 1.0442 , 𝛂𝟐 = 0.9576 , 𝛂𝟑 = 0.4999

Question # 28:-
Find all the roots of the equation 𝒙𝟑 − 𝒙𝟐 − 𝟏𝟕𝒙 − 𝟏𝟓 = 𝟎, by Graeffe’s root squaring
method with four squaring.
Answer:-
Required roots are 𝒙 = −𝟓 and 𝒙 = 𝟑

Question # 29:-
Solve the equation 𝒙𝟑 + 𝟑𝒙𝟐 − 𝟒 = 𝟎 , using Graeffe’s root squaring method, squaring four
times.
Answer:-
Required roots are -2, -2, 1

Question # 30:-
Using Graeffe’s method, solve the following equations:
a): 𝒙𝟑 − 𝟐 𝒙𝟐 − 𝟓𝒙 + 𝟔 = 𝟎
b): 𝟐𝒙𝟑 − 𝟕 𝒙𝟐 + 𝟕𝒙 − 𝟐 = 𝟎
c): 𝒙𝟑 − 𝟔𝒙𝟐 + 𝟏𝟏𝒙 − 𝟔 = 𝟎
d): 𝒙𝟑 − 𝟗𝒙𝟐 + 𝟏𝟖𝒙 − 𝟔 = 𝟎
Answer:-
a): 3.0144, 0.9994, -1.9914
b): 0.5, 1, 2
c): 3, 2, 1
d): 6.29019, 2.29419, 0.41577

Dr. Jamil Book Series 2 Page 54


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Question # 31:-
Using Graeffe’s method, solve the following equation
𝒙𝟒 − 𝟏𝟎𝒙𝟑 + 𝟑𝟓𝒙𝟐 − 𝟓𝟎𝒙 + 𝟐𝟒 = 𝟎
Answer:-
Required roots are 4, 3, 2, 1

PART-II: NUMERICAL INTEGRATION


Question # 32:-
𝟑 𝒅𝒙
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 # 33:-
𝟑.𝟒
Evaluate the integral ∫𝟏.𝟖 𝒆𝒙 𝒅𝒙, using trapezoid rule with step size 𝒉 = 𝟎. 𝟐 and
calculate the exact value and comment on your result.

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

Question # 35:-
𝟏 𝒅𝒙
Apply 3-points Simpsons 1/3 rule to evaluate ∫𝟎 𝟏+𝒙𝟐
, compare your answer with exact
value

Question # 36:-
𝟏𝟎
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 # 37:-
𝝅
Evaluate the integral ∫𝟎 𝒔𝒊𝒏𝒙𝒅𝒙
𝟐 , using

Dr. Jamil Book Series 2 Page 55


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

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 # 38:-
𝟔 𝒅𝒙
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 # 39:-
𝟔 𝒅𝒙
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 # 40:-
𝟏 𝒅𝒙
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 # 41:-
𝟏 𝒅𝒙
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 # 42:-
𝝅
Evaluate ∫ 𝒔𝒊𝒏𝒙𝒅𝒙 by
𝟐
𝟎
1): trapezoidal rule
2): Simpsons 1/3 rule
Taking 6 equal interval correct to 3 decimal places.

Question # 43:-
𝟐.𝟐
Evaluate ∫𝟏 𝒍𝒏𝒙𝒅𝒙 by
1): trapezoidal rule
2): Simpsons 1/3 rule
Taking 6 equal interval correct to decimal places.

Dr. Jamil Book Series 2 Page 56


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Question # 44:-
𝟑 𝒅𝒙
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 # 45:-
𝟏 𝒙𝟐 𝒅𝒙
Evaluate ∫ , using Simpsons 3/8 rule with 𝒉 = 𝟎. 𝟐𝟓
𝟎 𝟏+𝒙𝟑
Answer:-
0.2310846

Question # 46:-
𝟏.𝟒
Compute the value of ∫𝟎.𝟐 (𝒔𝒊𝒏𝒙 − 𝒍𝒏𝒙 + 𝒆𝒙)𝒅𝒙 taking 𝒉 = 𝟎. 𝟐 and using trapezoidal rule
, Simpsons y 3rd rule and 3/8 rule , compare your result by integration.

Question # 47:-
𝟕
Evaluate ∫𝟑 𝒙𝟐 𝒍𝒏𝒙 𝒅𝒙 using 𝒏 = 𝟒.

Question # 48:-
𝟏
Evaluate ∫𝟎 𝒆𝒙 𝒅𝒙 dividing the range into 4 equal parts by

1): trapezoidal rule


2): Simpsons 1/3 rule

Question # 49:-
𝟏𝟎 𝒅𝒙
Evaluate ∫𝟎 dividing the range into 8 equal parts.
𝟏+𝒙

Question # 50:-
𝝅
𝝅
Evaluate ∫𝟎 𝒆𝒔𝒊𝒏𝒙 𝒅𝒙, taking 𝒉 =
𝟐 .
𝟔

Question # 51:-
𝟎.𝟕
Evaluate ∫𝟎.𝟓 𝒙𝟏/𝟐 𝒆−𝒙 𝒅𝒙 approximately by using a suitable formula and at least five
points.

Question # 52:-
𝟏 𝟐𝒙
Calculate the value of 𝒍𝒏𝟐 by finding ∫𝟎 𝒅𝒙 ,using Simpsons rule by dividing into 4
𝟏+𝒙𝟐
equal parts.

Question # 53:-
𝟏
Evaluate ∫𝟎 (𝒔𝒊𝒏𝒙 + 𝒄𝒐𝒔𝒙)𝟏/𝟐 𝒅𝒙, correct to two decimal places using seven coordinates.

Dr. Jamil Book Series 2 Page 57


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

“Miscellaneous Applied Problems”

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

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

𝒗 (Km/h) 0 13 33 39.5 40 40 36 15 0

Find the distance 𝑺 from 𝒕 = 𝟎 to 𝒕 = 𝟑. 𝟓.


Answer:-
98.5km

Question # 55:-
𝟏𝟎
Evaluate: ∫𝟎 𝒍𝒏√𝟏 + 𝒙 𝒅𝒙 , using Simpson’s 1/3 rule with 8 subintervals.

Answer:-
0.6479

Question # 56:-
Using Simpson’s 1/3 rule with 6 subintervals to find the Area contained between the 𝒙 −
𝒂𝒙𝒊𝒔 and the curve 4𝒙𝟐 + 𝟗𝒚𝟐 = 𝟑𝟔.
Answer:-
9.156

Question # 57:-
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.

𝒑 0 5 10 15 20 25 30

𝑫 36 35 33 29 22 16 9

𝟑𝟎 𝑫 𝟐
Hint:- 𝑽𝒐𝒍𝒖𝒎𝒆 = 𝝅 ∫𝟎 ( ) 𝒅𝒑
𝟐

Answer:-
𝟏𝟖𝟎𝟕𝟖. 𝟓𝟔 𝒎𝟑

Dr. Jamil Book Series 2 Page 58


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Question # 58:-
𝟔 𝟏
Compute ∫𝟎 ( ) 𝒅𝒙, from the following data using Simpson’s 𝟑/𝟖𝒕𝒉 rule:
𝒚

𝒙 0 1 2 3 4 5 6

𝒚 0.146 0.161 0.176 0.190 0.204 0.217 0.230

Answer:-
𝟑𝟐𝟐𝟐𝟓𝟎
Question # 59:-
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 # 60:-
The velocity of an electric train which starts from

𝒕 (hour) 0 1 2 3 4 5 6 7 8 9 10 11 12

𝒗 (Km/h) 0 10 25 40 55 60 62 57 42 30 20 13 0

Find the total distance covered in 12 minutes.


Answer:-
𝟔. 𝟗𝟑𝒌𝒎

Question # 61:-
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:
𝐭𝟐

𝐌 = 𝐐 ∫ 𝐜 𝐝𝐭
𝐭𝟏

Dr. Jamil Book Series 2 Page 59


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Use numerical integration to evaluate this equation for the data listed below. Note that
𝐐 = 𝟒 𝐦𝟑 /𝐦𝐢𝐧.

𝒕 (𝒎𝒊𝒏) 𝟎 𝟏𝟎 𝟐𝟎 𝟑𝟎 𝟑𝟓 𝟒𝟎 𝟒𝟓 𝟓𝟎

𝑪(𝒎𝒈/𝒎𝟑 ) 𝟏𝟎 𝟑𝟓 𝟓𝟓 𝟓𝟐 𝟒𝟎 𝟑𝟕 𝟑𝟐 𝟑𝟒

Answer:-

Dr. Jamil Book Series 2 Page 60


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

Summary Of CH # 4
PART-I: SOLUTIONS OF NON-LINEAR EQUATIONS

1. Two types of equation


In Science and Engineering, many problems reduce to the problem of solving the equation
𝒇(𝒙) = 𝟎.

2. Algebraic equation
It involves power and root of x.

3. Transcendental equation
It involves trigonometric, hyperbolic, logarithmic, inverse circular, exponential, and inverse
hyperbolic function”.

4. Two types of Method


To find the roots of the equation 𝒇(𝒙) = 𝟎.

5. Direct Method
It do not require knowledge of initial approximation.

6. Iterative Method
It starts with initial approximation to the root of 𝒙𝟎 .

7. Important theorem related to root of equation


If 𝒇(𝒙) is a continuous function in the closed interval [𝒂, 𝒃] and 𝒇(𝒂) and 𝒇(𝒃) are of opposite
signs.
For finding the root of the equation 𝒇(𝒙) = 𝟎, then the equation 𝒇(𝒙) = 𝟎 has at least one
real root in the open interval [𝒂, 𝒃] i.e. 𝛂 ∈ (𝒂, 𝒃).

8. Newton-Raphson Method
A powerful tool for finding the real root of equation in the form 𝒇(𝒙) = 𝟎
Newton-Raphson Iteration formula is
𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 − , 𝒏 = 𝟎, 𝟏, 𝟐, 𝟑, ….
𝒇′(𝒙𝒏 )

9. Chebyshev Method
When the first and second derivative of 𝒇(𝒙) can be easily found and when an approximate
value of a real root of the equation 𝒇(𝒙) = 𝟎 is known as a closer approximation, the root can
be obtained by an iterative process.
Chebyshev Iteration formula is
Dr. Jamil Book Series 2 Page 61
Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

𝒇(𝒙𝒏 ) 𝟏 [𝒇(𝒙𝒏 )]𝟐 𝒇′′(𝒙𝒏 )


𝒙𝒏+𝟏 = 𝒙𝒏 − − [𝒇′(𝒙𝒏 )]𝟑
, 𝒏 = 𝟎, 𝟏, 𝟐, 𝟑, ….
𝒇′(𝒙𝒏 ) 𝟐

10. Secant Method


Secant iteration formula is
(𝒙𝒏 −𝒙𝒏−𝟏 )𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 − , 𝒏 = 𝟏, 𝟐, 𝟑, 𝟒, ….
𝒇(𝒙𝒏 ) −𝒇(𝒙𝒏−𝟏 )

11. Convergence criteria of Newton-Raphson Method


The required criteria for convergence of Newton-Raphson Iteration formula is
| 𝒇(𝒙)𝒇′′(𝒙)| < | [𝒇′(𝒙)]𝟐 | for all 𝒙 in the interval in which the root lies.

12. Convergence criteria of Chebyshev iteration Method


The convergence criteria of fixed point iteration method is
|∅′(𝒙)| < 𝟏 for 𝒙 ∈ (𝒂, 𝒃).

13. Descartes rule of signs


The number of +𝒗𝒆 roots of an algebraic equation 𝒇(𝒙) = 𝟎 with real coefficients cannot
exceed the number of changes in sign of the coefficient in the polynomial (𝒙) = 𝟎 . Similarly,
the number of −𝒗𝒆 roots of 𝒇(𝒙) = 𝟎 can not exceed the number of changes in the sign of
the coefficients of 𝒇(−𝒙) = 𝟎.

14. Some important results


1): Exactly n roots for an nth degree polynomial equation.
2): At least one real root if n is odd.
3): Complex roots occur only in pair.
4): Descarte’s rule of sign is always true.
5):

15. Graeffe’s Root squaring method:-


Applicable to polynomial equations only.

Let the given equation be:


𝒇(𝒙) = 𝒂𝒐 𝒙𝒏 + 𝒂𝟏 𝒙𝒏−𝟏 + 𝒂𝟐 𝒙𝒏−𝟐 + ⋯ + 𝒂𝒏−𝟏 𝒙 + 𝒂𝒏 → (𝟏)

Then above equation becomes:


(−𝟏)𝒏 𝒇(−𝒙)𝒇(𝒙) = ∅(𝒚) = 𝒂𝟎 𝟐 (𝒚 − 𝜶𝟏 𝟐 )(𝒚 − 𝜶𝟐 𝟐 ) … (𝒚 − 𝜶𝒏 𝟐 ) → (𝟐)

The roots of eq:(2) are 𝜶𝟏 𝟐 , 𝜶𝟐 𝟐 , … . . , 𝜶𝒏 𝟐 and are thus the squares of the roots of the given
equation. It follows that the roots 𝜶𝟏 𝟐𝒏 , 𝜶𝟐 𝟐𝒏 , … , 𝜶𝒏 𝟐𝒏 and the coefficients 𝒃𝟎 , 𝒃𝟏 , 𝒃𝟐 , … . 𝒃𝒏 of
the final transformed equation after m squaring:

𝒃𝟎 𝒖𝒏 + 𝒃𝟏 𝒖𝒏−𝟏 + ⋯ + 𝒃𝒏−𝟏 𝒖𝟏 + 𝒃𝒏 = 𝟎

1. For cubic polynomial:-


Let the cubic polynomial be:

𝒇(𝒙) = 𝒂𝒐 𝒙𝟑 + 𝒂𝟏 𝒙𝟐 + 𝒂𝟐 𝒙 + 𝒂𝟑 = 𝟎
Dr. Jamil Book Series 2 Page 62
Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

The multiplication by (−𝟏)𝒏 𝒇(−𝒙) can be carried out as given below:

ao a1 a2 a3

ao2 -a12 2aoa2 a 22 -a32


-2a1a3
b0 b1 b2 b3

2. For biquadratic polynomial:-


Let the biquadratic polynomial be:

𝒇(𝒙) = 𝒂𝒐 𝒙𝟒 + 𝒂𝟏 𝒙𝟑 + 𝒂𝟐 𝒙𝟐 + 𝒂𝟑 𝒙 + 𝒂𝟒 = 𝟎

Then the multiplication by (−𝟏)𝒏 𝒇(−𝒙) i.e. (−𝟏)𝟒 𝒇(−𝒙) can be carried out as given below:
ao a1 a2 a3 a4

ao2 -a12 a 22 -a32 a4


2a0a2 -2a1a3 2a2a4
2aoa4
bo b1 b2 b3 b4

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
𝒃 𝒉
∫𝒂 𝒇(𝒙) = 𝟐 [𝒇(𝒙𝟎 ) + 𝟐𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝟐 ) + 𝟐𝒇(𝒙𝟑 ) + ⋯ + 𝟐𝒇(𝒙𝒏−𝟏 ) + 𝒇(𝒙𝒏 )]

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

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


𝒃
𝒉
∫ 𝒇(𝒙) = [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )]
𝒂 𝟑

Dr. Jamil Book Series 2 Page 63


Applied Numerical Methods Chapter#4 Sol. of Non-Linear Eqs. & Numerical Integration

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 64

You might also like