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

BASIC NUMERICAL METHODS

LECTURE-3

on

SOLUTION OF NON-LINEAR EQUATIONS (CO2)

Solution of Non-Linear Equations 1 / 14


Table of Contents

1 Non Linear Equations


Introduction
Solution of Algebraic and Transcendental Equations

2 Methods of Solving Algebraic and Transcendental Equations and


their Convergence
Fixed Point Iteration Method

3 References

Solution of Non-Linear Equations 2 / 14


Algebraic and Transcendental Equations

Linear Equation: An equation f (x) = 0 in which the independent


variable x involves a single power, either alone or multiplied by a
constant.

Solution of Non-Linear Equations 3 / 14


Algebraic and Transcendental Equations

Linear Equation: An equation f (x) = 0 in which the independent


variable x involves a single power, either alone or multiplied by a
constant.
Example: x + 3 = 0, 5x + 6 = 0.

Solution of Non-Linear Equations 3 / 14


Algebraic and Transcendental Equations

Linear Equation: An equation f (x) = 0 in which the independent


variable x involves a single power, either alone or multiplied by a
constant.
Example: x + 3 = 0, 5x + 6 = 0.

Nonlinear Equation: An equation f (x) = 0 which is not linear is called a


non linear equation.

Solution of Non-Linear Equations 3 / 14


Algebraic and Transcendental Equations

Linear Equation: An equation f (x) = 0 in which the independent


variable x involves a single power, either alone or multiplied by a
constant.
Example: x + 3 = 0, 5x + 6 = 0.

Nonlinear Equation: An equation f (x) = 0 which is not linear is called a


non linear equation.

Example: x 3 + 3x 2 + 3 = 0, 3ex + 3x + 2 = 0.

Solution of Non-Linear Equations 3 / 14


Cont...
There are two types of non linear equations:

1) Algebraic Equation 2) Transcendental Equation

Solution of Non-Linear Equations 4 / 14


Cont...
There are two types of non linear equations:

1) Algebraic Equation 2) Transcendental Equation

Algebraic Equation: An equation which contains algebraic terms(finite


powers of x) is called algebraic equation.

Solution of Non-Linear Equations 4 / 14


Cont...
There are two types of non linear equations:

1) Algebraic Equation 2) Transcendental Equation

Algebraic Equation: An equation which contains algebraic terms(finite


powers of x) is called algebraic equation.

Example: x 2 + 3x + 1 = 0, x 4 + 16 = 0.

Solution of Non-Linear Equations 4 / 14


Cont...
There are two types of non linear equations:

1) Algebraic Equation 2) Transcendental Equation

Algebraic Equation: An equation which contains algebraic terms(finite


powers of x) is called algebraic equation.

Example: x 2 + 3x + 1 = 0, x 4 + 16 = 0.

Transcendental Equation: An equation which contains functions like


trignometric, exponential, logarithimic etc., is known as transcendental
equation.

Solution of Non-Linear Equations 4 / 14


Cont...
There are two types of non linear equations:

1) Algebraic Equation 2) Transcendental Equation

Algebraic Equation: An equation which contains algebraic terms(finite


powers of x) is called algebraic equation.

Example: x 2 + 3x + 1 = 0, x 4 + 16 = 0.

Transcendental Equation: An equation which contains functions like


trignometric, exponential, logarithimic etc., is known as transcendental
equation.

Example: ex − 3 = 0, cos x + 1 = 0, log(x + 2) = 0.

Solution of Non-Linear Equations 4 / 14


Solution of Algebraic and Transcendental Equations

A number a is said to be a root of the equation f (x) = 0, if it satisfies


the equation i.e. f (a) = 0. To find the root of nonlinear equations we
use two methods:

Solution of Non-Linear Equations 5 / 14


Solution of Algebraic and Transcendental Equations

A number a is said to be a root of the equation f (x) = 0, if it satisfies


the equation i.e. f (a) = 0. To find the root of nonlinear equations we
use two methods:
1) Direct Method

Solution of Non-Linear Equations 5 / 14


Solution of Algebraic and Transcendental Equations

A number a is said to be a root of the equation f (x) = 0, if it satisfies


the equation i.e. f (a) = 0. To find the root of nonlinear equations we
use two methods:
1) Direct Method 2) Iterative Method (Indirect method)

Solution of Non-Linear Equations 5 / 14


Solution of Algebraic and Transcendental Equations

A number a is said to be a root of the equation f (x) = 0, if it satisfies


the equation i.e. f (a) = 0. To find the root of nonlinear equations we
use two methods:
1) Direct Method 2) Iterative Method (Indirect method)

Direct Methods give the exact solution of the nonlinear equations in


one step.

Some direct methods are known as synthetic division, factorization


methods etc.

Solution of Non-Linear Equations 5 / 14


Cont...

Iterative Methods are those methods which use an initial guess to


generate a sequence of improving approximate solutions and in this
method the n-th approximation is derived from the previous ones. This
method gives the approximate solution of the nonlinear equations in n
number of steps.

Solution of Non-Linear Equations 6 / 14


Cont...

Iterative Methods are those methods which use an initial guess to


generate a sequence of improving approximate solutions and in this
method the n-th approximation is derived from the previous ones. This
method gives the approximate solution of the nonlinear equations in n
number of steps.

Some Iterative methods are known as Fixed point iteration method,


Bisection method, Regula Falsi method, Secant method, Newton
Raphson method.

Solution of Non-Linear Equations 6 / 14


Fixed Point Iteration Method
In this method we solve the non linear equation by assuming the initial
approximate root and by using that root we find the successive
approximate root. Let us consider the equation f (x) = 0. Now rewrite
the equation as x = φ(x) such that |φ0 (x)| < 1.

Solution of Non-Linear Equations 7 / 14


Fixed Point Iteration Method
In this method we solve the non linear equation by assuming the initial
approximate root and by using that root we find the successive
approximate root. Let us consider the equation f (x) = 0. Now rewrite
the equation as x = φ(x) such that |φ0 (x)| < 1.
Let us choose the initial approximation as x0 . Then the successive
approximations are given as

x1 = φ(x0 )

Solution of Non-Linear Equations 7 / 14


Fixed Point Iteration Method
In this method we solve the non linear equation by assuming the initial
approximate root and by using that root we find the successive
approximate root. Let us consider the equation f (x) = 0. Now rewrite
the equation as x = φ(x) such that |φ0 (x)| < 1.
Let us choose the initial approximation as x0 . Then the successive
approximations are given as

x1 = φ(x0 )

x2 = φ(x1 )

Solution of Non-Linear Equations 7 / 14


Fixed Point Iteration Method
In this method we solve the non linear equation by assuming the initial
approximate root and by using that root we find the successive
approximate root. Let us consider the equation f (x) = 0. Now rewrite
the equation as x = φ(x) such that |φ0 (x)| < 1.
Let us choose the initial approximation as x0 . Then the successive
approximations are given as

x1 = φ(x0 )

x2 = φ(x1 )

x3 = φ(x2 )

Solution of Non-Linear Equations 7 / 14


Fixed Point Iteration Method
In this method we solve the non linear equation by assuming the initial
approximate root and by using that root we find the successive
approximate root. Let us consider the equation f (x) = 0. Now rewrite
the equation as x = φ(x) such that |φ0 (x)| < 1.
Let us choose the initial approximation as x0 . Then the successive
approximations are given as

x1 = φ(x0 )

x2 = φ(x1 )

x3 = φ(x2 )

...
xn+1 = φ(xn )
Solution of Non-Linear Equations 7 / 14
Cont...

Check for absolute difference between two consecutive approximated


roots i.e. |xn+1 − xn | is within the desired accuracy. If so then stop the
process otherwise continue. For example if we want the answer
correct up to two decimal places then we would continue till the
absolute difference becomes either less than or equal to 0.005

Solution of Non-Linear Equations 8 / 14


Cont...

Check for absolute difference between two consecutive approximated


roots i.e. |xn+1 − xn | is within the desired accuracy. If so then stop the
process otherwise continue. For example if we want the answer
correct up to two decimal places then we would continue till the
absolute difference becomes either less than or equal to 0.005

Example: Find the root of the equation 3x − cos x − 1 = 0 by the


iteration method using the initial approximation 0.5, correct to six
significant figures.

Solution of Non-Linear Equations 8 / 14


Cont...

Check for absolute difference between two consecutive approximated


roots i.e. |xn+1 − xn | is within the desired accuracy. If so then stop the
process otherwise continue. For example if we want the answer
correct up to two decimal places then we would continue till the
absolute difference becomes either less than or equal to 0.005

Example: Find the root of the equation 3x − cos x − 1 = 0 by the


iteration method using the initial approximation 0.5, correct to six
significant figures.

cos x + 1
Solution: Rewrite the equation as x = = φ(x),
3

0
sin x | sin x| 1
|φ (x)| =
= ≤ < 1.
3 3 3

Solution of Non-Linear Equations 8 / 14


Cont...

Taking x0 = 0.5, we get

Solution of Non-Linear Equations 9 / 14


Cont...

Taking x0 = 0.5, we get

cos x0 + 1 cos(0.5) + 1
x1 = φ(x0 ) = = = 0.6666539
3 3

Solution of Non-Linear Equations 9 / 14


Cont...

Taking x0 = 0.5, we get

cos x0 + 1 cos(0.5) + 1
x1 = φ(x0 ) = = = 0.6666539
3 3

cos x1 + 1 cos(0.6666539) + 1
x2 = φ(x1 ) = = = 0.6666441
3 3

Solution of Non-Linear Equations 9 / 14


Cont...

Taking x0 = 0.5, we get

cos x0 + 1 cos(0.5) + 1
x1 = φ(x0 ) = = = 0.6666539
3 3

cos x1 + 1 cos(0.6666539) + 1
x2 = φ(x1 ) = = = 0.6666441
3 3
cos x2 + 1 cos(06666441) + 1
x3 = φ(x2 ) = = = 0.6666441
3 3

Solution of Non-Linear Equations 9 / 14


Cont...

Taking x0 = 0.5, we get

cos x0 + 1 cos(0.5) + 1
x1 = φ(x0 ) = = = 0.6666539
3 3

cos x1 + 1 cos(0.6666539) + 1
x2 = φ(x1 ) = = = 0.6666441
3 3
cos x2 + 1 cos(06666441) + 1
x3 = φ(x2 ) = = = 0.6666441
3 3
Therefore 0.666644 is the root correct up to six decimal places.

Solution of Non-Linear Equations 9 / 14


Example: Find the real root of the equation x 3 + x 2 = 1, x > 0 using
iteration method correct upto four decimal places.

Solution of Non-Linear Equations 10 / 14


Example: Find the real root of the equation x 3 + x 2 = 1, x > 0 using
iteration method correct upto four decimal places.

Solution: Consider the equation f (x) = 0, where f (x) = x 3 + x 2 − 1.

Solution of Non-Linear Equations 10 / 14


Example: Find the real root of the equation x 3 + x 2 = 1, x > 0 using
iteration method correct upto four decimal places.

Solution: Consider the equation f (x) = 0, where f (x) = x 3 + x 2 − 1.


Rewrite the equation as
1 1 1 − x2
x 2 (x + 1) = 1 ⇒ x + 1 = 2 ⇒ x = 2 − 1 = = φ(x).
x x x2

Solution of Non-Linear Equations 10 / 14


Example: Find the real root of the equation x 3 + x 2 = 1, x > 0 using
iteration method correct upto four decimal places.

Solution: Consider the equation f (x) = 0, where f (x) = x 3 + x 2 − 1.


Rewrite the equation as
1 1 1 − x2
x 2 (x + 1) = 1 ⇒ x + 1 = 2 ⇒ x = 2 − 1 = = φ(x).
x x x2
−2x 3 − 2x + 2x 3

0
|φ (x)| = = 2 > 1, ∀0 < x < 1.
x4 x3

Therefore the method will not converge to the exact solution in this
case.

Solution of Non-Linear Equations 10 / 14


Example: Find the real root of the equation x 3 + x 2 = 1, x > 0 using
iteration method correct upto four decimal places.

Solution: Consider the equation f (x) = 0, where f (x) = x 3 + x 2 − 1.


Rewrite the equation as
1 1 1 − x2
x 2 (x + 1) = 1 ⇒ x + 1 = 2 ⇒ x = 2 − 1 = = φ(x).
x x x2
−2x 3 − 2x + 2x 3

0
|φ (x)| = = 2 > 1, ∀0 < x < 1.
x4 x3

Therefore the method will not converge to the exact solution in this
case. Again rewrite the equation as
1 1
x 2 (x + 1) = 1 ⇒ x 2 = ⇒x = √ = φ(x).
1+x 1+x

−1 1
|φ0 (x)| =

= < 1, ∀x > 0.
2(1 + x)3/2 2(1 + x)3/2
Solution of Non-Linear Equations 10 / 14
Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165
1 0.8165 0.74196 0.07454

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165
1 0.8165 0.74196 0.07454
2 0.74196 0.75767 0.01571

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165
1 0.8165 0.74196 0.07454
2 0.74196 0.75767 0.01571
3 0.75767 0.75428 0.00339

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165
1 0.8165 0.74196 0.07454
2 0.74196 0.75767 0.01571
3 0.75767 0.75428 0.00339
4 0.75428 0.75501 0.00073

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165
1 0.8165 0.74196 0.07454
2 0.74196 0.75767 0.01571
3 0.75767 0.75428 0.00339
4 0.75428 0.75501 0.00073
5 0.75501 0.75485 0.00016

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165
1 0.8165 0.74196 0.07454
2 0.74196 0.75767 0.01571
3 0.75767 0.75428 0.00339
4 0.75428 0.75501 0.00073
5 0.75501 0.75485 0.00016
6 0.75485 0.75488 0.00003

Solution of Non-Linear Equations 11 / 14


Cont...
Let us take the initial approximation x0 = 0.5
1 1
x1 = φ(x0 ) = √ =√ = 0.81649
1 + x0 1 + 0.5
For all further computation see the table below:

n xn xn+1 = φ(xn ) |xn+1 − xn |


0 0.5 0.8165 0.3165
1 0.8165 0.74196 0.07454
2 0.74196 0.75767 0.01571
3 0.75767 0.75428 0.00339
4 0.75428 0.75501 0.00073
5 0.75501 0.75485 0.00016
6 0.75485 0.75488 0.00003

1
Since |xn+1 − xn |< 10−4 = 0.00005, therefore 0.7549 is the root
2
correct up to four decimal places.
Solution of Non-Linear Equations 11 / 14
Cont...

Example 1:Solve by iteration method 2x − log x − 7 = 0.

Example 2: Find the root of the equation x log x = 1.2 by iteration


method.

Solution of Non-Linear Equations 12 / 14


References

M. K. Jain, S. R. K. Iyengar and R. K. Jain, Numerical Methods for


Scientific and Engineering Computation, 6th Ed., New Age
International, New Delhi, 2014.
R. S. Gupta, Elements of Numerical Analysis, 2nd Ed., Cambridge
University Press, 2015.
C.F. Gerald and P.O. Wheatley, Applied Numerical Analysis, 7th Ed.,
Pearson Education, 2004.

Solution of Non-Linear Equations 13 / 14


Solution of Non-Linear Equations 14 / 14

You might also like