Wk5_Solution of Algebraic and Transcendental Equations
-
Upload
fazelah-yakub -
Category
Documents
-
view
12 -
download
5
description
Transcript of Wk5_Solution of Algebraic and Transcendental Equations
Engineering Mathematics 2 – Week 5Solution 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:2 4
2
b b acx
a
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: .
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.
0 2
a bx
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 and therefore we take
Then , which is positive. Hence the root lies
between 1 and 1.5 and we obtain .
We find , which is negative. We therefore conclude that the root lies between 1.25 and 1.5. It follows that
The procedure is repeated and the successive approximations are x3 = 1.3125, x4 = 1.34375 etc.
0
1 2 3
2 2x
0
27 3 8( ) 1
8 2 7f x
1
1 1.51.25
2x
1
19( )
64f x
2
1.25 1.51.375
2x
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:
.......(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 putting y = 0 in (1). Thus, we obtain:
0 1 0
0 1 0
( ) ( ) ( )y f x f x f x
x x x x
00 1 0
1
( )( ).
( ) ( )
f xx x x x
f x f x
The False-Position Method Hence the second approximation to the root of
f(x) = 0 is given by:
....(2) 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.
02 0 1 0
1 0
( )( ).
( ) ( )
f xx x x x
f x f x
The False-Position Method Example: Find a real root of Wallis’s 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
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
Repeating the process, we obtain successively: x4 = 2.0904 , x5 = 2.0934 etc.
2
12 2.059.17
x
3
0.3862.059 (3 2.059) 2.0812.
16.386x
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:
Therefore the root lies between 0.5 and 1.
Root lies between 0.64 and 1
375.0)5.0(,1)1(,01)( 3 ffxxxf
1)1(,0979.0)64.0(
64.0375.1
375.0)5.01(5.02
ff
x
6822.0
0979.1
0979.0)64.01(64.03
x
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 Taylor’s series, we obtain
Neglecting the 2nd and higher order derivatives, we have
A better approximation than x0 is therefore given by x1 where
Successive approximations are given by x2, x3, ..., xn+1, where
-----(3) which is called the Newton-Raphson formula.
2
0 0 0( ) ( ) ( ) ... 0.2!
hf x hf x f x
0 0
0
0
( ) ( ) 0
( )
( )
f x hf x
f xh
f x
01 0
0
( )
( )
f xx x
f x
1
( )
( )n
n nn
f xx x
f x
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 and . Eq. (3) therefore gives
Clearly, a root lies between 2 and 3 since f(2) = -3 and f(3) = 13. We choose x0 = 3 and obtain successively
2( ) 3 3f x x
3
1 2
3 5
3 3n n
n nn
x xx x
x
1
2 3
133 2.4624
2.295, 2.279.
x
x x
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 derivative of the function can be evaluated as
The iteration formula is therefore
with x0 = 0, the successive iterations are given below:
( ) 1xf x e
1 1
n
n
xn
n n x
e xx x
e
n xn
0 0
1 0.5
2 0.5663
3 0.5671
The Newton_Raphson Method Example: Using Newton-Raphson method evaluate to
two decimal figures, the root of the equation lying between 0 and 1.
Solution: The middle point of the interval (0,1) is 0.5
By Newton-Raphson method with
The required root is x = 0.6186
2817.03)1(,1)0(,03)( 1 effxexf x
149.0)5.0(3)5.0( 5.0 ef
351.1)5.0(,3)( fexf x
5.00 x
N xn
0.5 0.61
0.61 0.6186
xe x 3
Next lectures Interpolation and Polynomial
Approximation using: Langrangian’s Polynomials Finite Differences