Bma3207 Numerical Analysis Lecture 2
Bma3207 Numerical Analysis Lecture 2
Gikonyo Kiguta
Contents
Transcendental Equation
An equation which contains trigonometric ratios, exponential function and logarithmic functions is
called as a Transcendental Equation.
Examples of the transcendental equations are as follows
i) 3 sin(x) − e−x = 0
ii) 3x2 − 2 cos x = 0
iii) 2ex sin x − ln(x) = 0
Transcendental equations may have finite or infinite numbers of real roots or may not have real
roots at all.
In order to solve the above type of equations, the following methods exist
Directive Methods: The methods which are used to find solutions of given equations in the
direct process is called as directive methods.
Example: Synthetic division, remainder theorem, Factorization method etc
Note: By using Directive Methods, it is possible to find exact solutions of the given equation.
Indirect Methods: The methods which are used to find solutions of the given equation in some
indirect process is called as Iterative Methods
Note: By using Iterative methods, it is possible to find approximate solution of the given equation
and also it is possible to find single solution of the given equation at the same time.
Note:
There may be many roots of the given nonlinear equation but we will seek the approximation
of only one of its real root α lies in the given interval [a, b] that is
f (α ) = 0, where α ∈ [a, b]
a+b
x0 =
2
If f (a) f (x0 ) < 0 then according to intermediate value theorem, the root will lie in the interval
(a, x0 ) . So the next approximation is given by
a + x0
x1 =
2
Else, the root will lie in the interval (x0 , b) and the next approximation is given by
b + x0
x1 =
2
xn−1 + xn−2
xn =
2
else
xn−1 + xn−3
xn =
2
According to intermediate value theorem, at least one root of the equation x3 − 4x − 9 = 0 lies in
the interval ( 2,3 ). To obtain iterations of Bisection method, let us start with initial approximations
a = 2, b = 3
The first approximation to root is the midpoint of the interval (a, b).
a+b 2+3
x0 = 2 = 2 = 2.5
2.5 + 3
x1 = = 2.75, f (2.75) = 0.796875
2
The difference between 8th and 9th approximations is less than ε = 0.002. Therefore, we can stop
iterations and say that approximate root is x9 = 2.706055
Ans. The given equation is a cubic and the last term is positive. Hence, f (x) = 0 will have
a negative real root. We find that
Q.3. Find the positive root, between 0 and 1, of the equation x = e−x to a tolerance of 0.05%
Ans. Let
f (x) = xex − 1 = 0
We have, f (0) = −1 and f (1) = e − 1, which is positive. Hence, a root exists between 0 and 1, and
0+1
x1 = = 0.5
2
Because, f (x1 ) = −0.1756, the root lies between 0.5 and 1.0. Then
0.5 + 1.0
x2 = = 0.75
2
Now, the tolerance ε1 is given by
X2 − X1
ε1 = × 100
X2
0.25
= × 100 = 33.33%
0.75
since f (x2 ) = 0.5878, the root lies between 0.5 and 0.75 Therefore,
0.5 + 0.75
x3 = = 0.625
2
also,
0.625 − 0.75
ε2 =| × 100 = 20%
0.625
Q.4. Find a root, correct to three decimal places and lying between 0 and 0.5, of the equation
4e−x sin x − 1 = 0
Ans
Let
f (x) = 4e−x sin x − 1
We have f (0) = −1 and f (0.5) = 0.163145 Therefore,
x1 = 0.25
since f (0.25) = −0.22929, it follows that the root lies between 0.25 and 0.5 Therefore,
0.75
x2 = = 0.375
2
The successive approximations are given by
x3 = 0.3125,x4 = 0.3438, x5 = 0.3594,
x6 = 0.3672,x7 = 0.3711, x8 = 0.3692,
x9 = 0.3702,x10 = 0.3706, x11 = 0.3704
x12 = 0.3705, . . .
Hence the required root is 0.371, correct to three decimal places.
Drawbacks
• If one of the initial guesses is close to the root, the convergence is slower
• If a function f(x) is such that it just touches the x-axis it will be unable to find the lower and
upper guesses.
The equation of the chord joining the two points, (a, f (a)) and (b, f (b)) is given by
y − f (a) f (b) − f (a)
=
x−a b−a
We replace the part of the curve between the points [a, f (a)] and [b, f (b)] by means of the
chord joining these points and we take the point of intersection of the chord with the x axis as an
approximation to the root. The point of intersection is obtained by putting y = 0
Our first approximation xo to the root of f (x) = 0. is given by
xn+1 = xn − ((xf (x
n −xn−1 ) f (xn )
n )− f (xn−1 ))
2(16) − 3(−1) 35
x1 = = = 2.058823529
16 − (−1) 17
Now, f (x1 ) = −0.390799917 and hence the root lies between 2.058823529 and 3.0. Using formula
( 2.7 ), we obtain
2.058823529(16) − 3(−0.390799917)
x2 = = 2.08126366
16.390799917
since f (x2 ) = −0.147204057, it follows that the root lies between 2.08126366 and 3.0. Hence, we
have
2.08126366(16) − 3(−0.147204057)
x3 = = 2.089639211
16.147204057
Proceeding in this way, we obtain successively:
Proceeding in this way, we obtain successively:
x4 = 2.092739575, x5 = 2.09388371
x6 = 2.094305452, x7 = 2.094460846, . . .
Q.2. Find a root of the equation 4e−x sin x − 1 = 0 by regular-falsi method given that the root
lies between 0 and 0.5
Ans
Let
We have
Therefore,
0(0.163145) − 0.5(−1)
x1 =
1.163145
0.5
= = 0.4298690
1.163145
Now, we take
a = 0 and b = 0.4298690
Then
f (x) = 0.08454
Therefore,
0(0.08454) − 0.42987(−1)
x2 =
1.08454
= 0.39636
Now,
Hence
0(0.038919) − 0.39636(−1)
x3 =
1.038919
= 0.381512
and
f (x3 ) = 0.016934
0(0.016934) − 0.381512(−1)
x4 =
1.016934
= 0.375159
and
f (x4 ) = 0.0071873
x5 = 0.37248, x6 = 0.37136,
x7 = 0.37089, x8 = 0.370697
It follows that the required root is 0.371, correct to three decimal places.