Wk5 - Solution of Algebraic and Transcendental Equations

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

Engineering

Mathematics
2 Week 5
Solution of Algebraic and
Transcendental Equations

(BEng in CE / CSE / CGE Intake 14)

Lecture Contents
Solutions

by:
Bisection Method
False Position Method
Newton Raphson Method

Solution of Algebraic and


Transcendental Equations
In

scientific and engineering work, a frequently


occurring problem is to find the roots of equations
of the form f(x) = 0.

If

f(x) is a quadratic or cubic expression, then


algebraic formulae are available for expressing
the roots in terms of the coefficients.

For

f(x) = ax2 + bx +c = 0, we have:


b b 2 4ac
x
2a

The bisection method


If a function f(x) is continuous between a and b and f(a)
and f(b) are of opposite signs, then there exists atleast
one root between a and b.
For definiteness, let f(a) be negative and f(b) be
positive. Then the root lies between a and b and let its
approximate value be given by: .
ab
x0
2

If f(x0) = 0, we conclude that x0 is a root of the equation


f(x) = 0. Otherwise, the root lies either between x0 and
b, or between x0 and a depending on whether f(x0) is
negative or positive.
Then, as before, we bisect the interval and repeat the
process until the root is known to the desired accuracy.

The bisection method

Example: Find a real root of the equation


f(x) = x3 x 1 = 0.

Since f(1) is negative and f(2) positive, a root lies between 1 and 2
1 2 3
and therefore we take
x0

2
2

27 3
8

Then , which is positive.


the root lies
8 2 Hence
7
1 1.5
x1
1.25
2
between 1 and 1.5 and we obtain .
f ( x0 )

f ( x1 )

19
64

We find , which is negative. We therefore conclude that the root lies


1.25 1.5
between 1.25 and
x2 1.5. It follows
1.375that
2

The procedure is repeated and the successive approximations are


x3 = 1.3125, x4 = 1.34375 etc.

The False-Position Method

This is the oldest method for finding the real root of an


equation, and closely resembles the bisection method. In this
method, we choose two points x0 and x1 such that f(x0) and
f(x1) are of opposite signs. Since the graph of y = f(x) crosses
the x-axis between these two points, a root must lie in
between these two points. Now the equation of the chord
joining the two points [x0, f(x0)] and [x1, f(x1)] is:
y f ( x0 ) f ( x1 ) f ( x0 )

x x0
x1 x0

.......(1)

This method consists in replacing the part of the curve


between the points [x0, f(x0)] and [x1, f(x1)] by means of the
chord joining these points, and taking the point of intersection
of the chord with the x-axis as an approximation to the root.
The point of intersection in the present case is given by
f ( x0we
) obtain:
putting y = 0 xin (1).
Thus,
x0
( x1 x0 ).
f
(
x
)

f
(
x
)

The False-Position Method


Hence

the second approximation to the root of


f(x) = 0 is given by:
f ( x0 )
x2 x0
( x1 x0 ).
f ( x1 ) f ....(2)
( x0 )

If

now f(x2) and f(x0) are of opposite signs, then


the root lies between x0 and x2, and we replace
x1 by x2 in (2), and obtain the next
approximation. Otherwise, we replace x0 by x2
and generate the next approximation. The
procedure is repeated till the root is obtained to
the desired accuracy.

The False-Position Method


Example:

Find a real root of Walliss equation


f(x) = x3 2x 5 = 0.

First

iteration: We observe that f(2) = -1 and f(3) = 16


and hence a root lies between 2 and 3. Eq. (2) then gives

1
x2 2 2.059.
17
Second

iteration: Now f(x2) = -0.386 and hence the root


lies between 2.059 and 3.0. Using eq. (2) once again, we
obtain
0.386
x3 2.059
(3 2.059) 2.0812.
16.386

Repeating

the process, we obtain successively:


x4 = 2.0904 , x5 = 2.0934 etc.

The False-Position Method


Example:

Find an approximate value of the root of


the equation near x = 1, using the method of
false position two times.
Solution:
f ( x) x 3 x 1 0, f (1) 1, f (0.5) 0.375
Therefore

the root lies between 0.5 and 1.

(1 0.5) 0.375
0.64
1.375
f (0.64) 0.0979, f (1) 1

x 2 0.5

Root

lies between 0.64 and 1

(1 0.64) 0.0979
x3 0.64
0.6822
1.0979

The Newton_Raphson Method


Let

x0 be an approximation of f(x) = 0 and let x1 = x0 + h be the


correct root so that f (x1) = 0. Expanding f(x0 + h) by Taylors
series, we obtain
2

f ( x0 ) hf ( x0 )

Neglecting

the 2nd and higher order derivatives, we have

f ( x0 ) hf ( x0 ) 0

h
A

h
f ( x0 ) ... 0.
2!

f ( x0 )
f ( x0 )

better approximation
x0 is therefore given by x1 where
f ( xthan
0)
x1 x0
f ( x0 )

Successive

f ( xn ) are given by x2, x3, ..., xn+1, where


approximations
xn 1 xn
f ( xn )

-----(3)
which is called the Newton-Raphson formula.

The Newton_Raphson Method


Example:

Use the Newton-Raphson method to


estimate a root of equation x3 3x 5 = 0.
Here f(x) = x3 3x 5 andf ( x) 3 x 2 3
.
Eq. (3) therefore gives

xn3 3xn 5
xn 1 xn
3 xn2 3

Clearly,

a root lies between 2 and 3 since f(2) =


-3 and f(3) = 13. We choose x0 = 3 and obtain
successively
13
x1 3
2.46
24
x2 2.295, x3 2.279.

The Newton_Raphson Method

Example: Use the Newton-Raphson method to


estimate a root of e-x x, employing an initial guess
of x0 = 0.

The first
f ( xderivative
) e x 1of the function can be evaluated
as

e xn xn
xn 1 is
xn therefore
xn
The iteration formula
e 1

xn

0.5

0.5663

0.5671

with x0 = 0, the successive iterations are given below:

The Newton_Raphson Method


Example: Using Newton-Raphson method evaluate to
x
two decimal figures, the root of the equation e 3x
lying between 0 and 1.
x
1
Solution: f ( x ) e 3 x 0, f (0) 1, f (1) e 3 0.2817
The middle point of the interval (0,1) is 0.5

f (0.5) e 0.5 3(0.5) 0.149


f ( x) e x 3, f (0.5) 1.351

By Newton-Raphson method with x0 0.5


N

xn

0.5

0.61

0.61

0.6186

The required root is x = 0.6186

Next lectures
Interpolation

and Polynomial
Approximation using:
Langrangians Polynomials
Finite Differences

You might also like