Documente Academic
Documente Profesional
Documente Cultură
Chapter 3 TRANSCENDENTAL
EQUATIONS
C
onsider the equation of the form f(x) = 0.
If f(x) is a quadratic, cubic, or biquadratic expression, then algebraic
formulae are available for expressing the roots. But when f(x) is a
polynomial of higher degree or an expression involving transcendental
functions, for example, 1 + cos x – 5x, x tan x – cosh x, e–x – sin x, etc.,
algebraic methods are not available.
In this unit, we shall describe some numerical methods for the solution of
f(x) = 0, where f(x) is algebraic or transcendental or both.
77
78 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
In the adjoining figure, f(x1) is (+)ve so that the root lies between a and x1.
1
The second approximation to the root is x2 = (a + x1). If f (x2) is (–)ve the
2
1
root lies between x1 and x2. The third approximation to the root is x3 = (x1 +
2
x2), and so on.
)
f(x
y=
f(b)
a x2
O f(a) x3 x1 b X
Once the method of calculation has been decided, we must describe clearly
the computational steps to be followed in a particular sequence. These steps
constitute the algorithm of method.
3.2 ALGORITHM
3.3 FLOW-CHART
START
Define F(x)
Initialize i = 1
Call subroutine
bisect mid
Y
Yes is
B=X F(mid) A=X
<0
is Subroutine
Yes
Abs (XI-X) X bisect
< Aerr
No
X = (A + B)/2
Yes
i < iter Y
Iter + +
No
X
Print solution does Print ITER, Xl
not converge
Print iter, Xl
RETURN
STOP
80 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
Based on the flow-chart, we write the instructions in a code which the computer
can understand. A series of such instructions is called a program.
If there are any errors in the program, they will be pointed out by the
computer during compilation. After correcting compilation errors, the program
is executed with input data to check for logical errors which may be due to
misinterpretation of the algorithm. The process of finding the errors and
correcting them is called debugging.
ei + 1
lim ≤A
i→∞ ei k
In the Bisection method, the original interval is divided into half interval in
each iteration. If we take mid-points of successive intervals to be the
approximations of the root, one half of the current interval is the upper bound
to the error.
In Bisection method,
ei + 1
ei + 1 = 0.5 ei or = 0.5 (1)
ei
where ei and ei + 1 are the errors in the ith and (i + 1)th iterations, respectively.
ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 81
ei + 1
lim ≤A
i→∞ ei k
Let [pn, qn] be the interval at nth step of bisection, having a root of the equation
f(x) = 0. Let xn be the nth approximation for the root. Then, initially, p1 = a and
q1 = b.
FG p + q1 IJ
H K
1
⇒ x1 = first approximation =
2
⇒ p1 < x1 < q1
Now either the root lies in [a, x1] or in [x1, b].
∴ either [p2, q2] = [p1, x1] or [p2, q2] = [x1, q1]
⇒ either p2 = p1, q2 = x1 or p2 = x1, q2 = q1
⇒ p1 ≤ p2, q2 ≤ q1
p2 + q2
Also, x2 = so that p2 < x2 < q2
2
82 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
Now, since the length of the interval is decreasing at every step, we get
that
lim (qn – pn) = 0 ⇒ q=p
n→∞
⇒ 0 ≥ lim [ f ( pn ) . f ( qn )]
n→∞
⇒ 0 ≥ f(p) . f(q)
⇒ 0 ≥ [f(p)]2
But, [f(p)]2 ≥ 0 being a square
∴ we get f(p) = 0
∴ p is a root of f(x) = 0 (3)
From (2) and (3), we see that <xn> converges necessarily to a root of equation
f(x) = 0
The method is not rapidly converging, but it is useful in the sense that it
converges surely.
ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 83
EXAMPLES
Example 1. Find the real root of the equation x log10 x = 1.2 by Bisection method
correct to four decimal places. Also write its program in C-language.
Sol. f(x) = x log10 x – 1.2
Since f(2.74) = – .000563 i.e., (–)ve
and f(2.75) = .0081649 i.e., (+)ve
Hence, the root lies between 2.74 and 2.75.
∴ First approximation to the root is
2.74 + 2.75
x1 = = 2.745
2
Now f(x1) = f(2.745) = .003798 i.e., (+)ve
Hence, the root lies between 2.74 and 2.745.
∴ Second approximation to the root is
2.74 + 2.745
x2 = = 2.7425
2
Now f(x2) = f(2.7425) = .001617 i.e., (+)ve
Hence, the root lies between 2.74 and 2.7425.
∴ Third approximation to the root is
2.74 + 2.7425
x3 = = 2.74125
2
Now f(x3) = f(2.74125) = .0005267 i.e., (+)ve
Hence, the root lies between 2.74 and 2.74125.
∴ Fourth approximation to the root is
2.74 + 2.74125
x4 = = 2.740625
2
Now f(x4) = f(2.740625) = – .00001839 i.e., (–)ve.
Hence, the root lies between 2.740625 and 2.74125.
∴ Fifth approximation to the root is
2.740625 + 2.74125
x5 = = 2.7409375
2
84 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
2.740625 + 2.740703125
x8 = = 2.740664063
2
Now f(x8) = f(2.740664063) = .00001567 i.e., (+)ve
Hence, the root lies between 2.740625 and 2.740664063.
∴ Nineth approximation to the root is
2.740625 + 2.740664063
x9 = = 2.740644532
2
Since x8 and x9 are the same up to four decimal places, the approximate
real root is 2.7406. C-program for above problem is given below:
for(x1=x2-1;;x2--)
{
f1=F(x1);
if(f1<0)
{
break;
}
}
//...Printing Result
printf("\t\t-----------------------------------------");
printf("\n\t\t ITERATIONS\t\t ROOTS\n");
printf("\t\t-----------------------------------------");
for(;count<=n;count++)
{
x0=(x1+x2)/2.0;
f0=F(x0);
if(f0==0)
{
root=x0;
}
if(f0*f1<0)
{
x2=x0;
}
else
{
x1=x0;
f1=f0;
}
printf("\n\t\t ITERATION %d", count);
printf("\t :\t %f",x0);
if(fabs((x1-x2)/x1) < EPS)
{
printf("\n\t\t---------------------------------");
printf("\n\t\t Root = %f",x0);
ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 87
OUTPUT
Solution by BISECTION method
Equation is
x* log(x) - 1.2=0
Enter the number of iterations: 30
-----------------------------------------
ITERATIONS ROOTS
-----------------------------------------
ITERATION 1: 2.500000
ITERATION 2: 2.750000
ITERATION 3: 2.625000
ITERATION 4: 2.687500
ITERATION 5: 2.718750
ITERATION 10: 2.741211
ITERATION 11: 2.740723
ITERATION 12: 2.740479
ITERATION 13: 2.740601
ITERATION 14: 2.740662
ITERATION 15: 2.740631
ITERATION 16: 2.740646
ITERATION 17: 2.740639
ITERATION 18: 2.740643
ITERATION 19: 2.740644
ITERATION 20: 2.740645
88 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
2.706 + 2.707
x1 = = 2.7065
2
Now f(x1) = – .0005025 i.e., (–)ve
Hence, the root lies between 2.7065 and 2.707.
∴ Second approximation to the root is
2.7065 + 2.707
x2 = = 2.70675
2
Now f(x2) = .003992 i.e., (+)ve
Hence, the root lies between 2.7065 and 2.70675.
ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 89
2.7065 + 2.70675
x3 = = 2.706625
2
Now f(x3) = .001744 i.e., (+)ve
Hence, the root lies between 2.7065 and 2.706625.
∴ Fourth approximation to the root is
2.7065 + 2.706625
x4 = = 2.7065625
2
Hence, the root is 2.7065625, correct to three decimal places.
Example 3. Find a positive real root of x – cos x = 0 by bisection method,
correct up to 4 decimal places between 0 and 1.
Sol. Let f(x) = x – cos x
f(0.73) = (–)ve and f(0.74) = (+)ve
Hence, the root lies between 0.73 and 0.74. First approximation to the root
is
0.73 + 0.74
x1 = = 0.735
2
Now f(0.735) = (–)ve
Hence, the root lies between 0.735 and 0.74. Second approximation to the
root is
0.73 + 0.74
x2 = = 0.7375
2
Now f(0.7375) = (–)ve
Hence, the root lies between 0.7375 and 0.74. Third approximation to the
root is
0.7375 + 0.74
x3 = = 0.73875
2
Now f(0.73875) = (–)ve
Hence, the root lies between 0.73875 and 0.74.
Fourth approximation to the root is
1
x4 = (0.73875 + 0.74) = 0.739375
2
Now f(x4) = f(0.739375) = (+)ve
90 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
1
x6 = (0.7390625 + 0.739375) = 0.73921875
2
Now f(0.73921875) = (+)ve
Hence, the root lies between 0.7390625 and 0.73921875
Seventh approximation to the root is
1
x7 = (0.7390625 + 0.73921875) = 0.73914
2
Now f(0.73914) = (+)ve
Hence, the root lies between 0.7390625 and 0.73914
Eighth approximate to the root is
1
x8 = (0.7390625 + 0.73914) = 0.73910
2
Hence, the approximate real root is 0.7391.
Example 4. Perform five iterations of the bisection method to obtain the smallest
positive root of equation
f(x) ≡ x3 – 5x + 1 = 0.
Sol. f(x) = x3 – 5x + 1
Since f(.2016) = .0001935 i.e., (+)ve
and f(.2017) = – .0002943 i.e., (–)ve
Hence, the root lies between .2016 and .2017.
First approximation to the root is
.2016 + .2017
x1 = = .20165
2
Now f(x1) = – .00005036 i.e., (–)ve
ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 91
.2016 + .20165
x2 = = .201625
2
Now f(x2) = .00007159 i.e., (+)ve
Hence, the root lies between .201625 and .20165.
Third approximation to the root is
.201625 + .20165
x3 = = .2016375
2
Now f(x3) = .00001061 i.e., (+)ve
Hence, the root lies between .2016375 and .20165.
Fourth approximation to the root is
.2016375 + .20165
x4 = = .20164375
2
Now f(x4) = – .00001987 i.e., (–)ve
Hence, the root lies between .2016375 and .20164375.
∴ Fifth approximation to the root is
.2016375 + .20164375
x5 = = .201640625
2
Hence, after performing five iterations, the smallest positive root of the
given equation is .20164, correct to five decimal places.
Example 5. Find a real root of x3 – x = 1 between 1 and 2 by bisection method.
Compute five iterations.
Sol. Here, f(x) = x3 – x – 1
Since f(1.324) = – .00306 i.e., (–)ve
and f(1.325) = .00120 i.e., (+)ve
Hence, the root lies between 1.324 and 1.325.
∴ First approximation to the root is
1.324 + 1.325
x1 = = 1.3245
2
Now f(x1) = – .000929 i.e., (–)ve
Hence, the root lies between 1.3245 and 1.325
∴ Second approximation to the root is
1.3245 + 1.325
x2 = = 1.32475
2
92 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
1.324625 + 1.32475
x4 = = 1.3246875
2
Now f(x4) = – .0001298 i.e., (–)ve
Hence, the root lies between 1.3246875 and 1.32475
∴ Fifth approximation to the root is
1.3246875 + 1.32475
x5 = = 1.32471875
2
Hence, the real root of the given equation is 1.324 correct to three decimal
places after computing five iterations.
Example 6. Use bisection method to find out the positive square root of 30
correct to 4 decimal places.
Sol. Let f(x) = x2 – 30
Since f(5.477) = – .00247 i.e., (–)ve
and f(5.478) = .00848 i.e., (+)ve
Hence, the root lies between 5.477 and 5.478
∴ First approximation to the root is
5.477 + 5.478
x1 = = 5.4775
2
Now f(x1) = .003 i.e., (+)ve
Hence, the root lies between 5.477 and 5.4775
∴ Second approximation to the root is
5.477 + 5.4775
x2 = = 5.47725
2
ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 93
ASSIGNMENT 3.1
1. (i) Transcendental equation is given as
f(x) = 2x – x – 3
Calculate f(x) for x = – 4, – 3, – 2, – 1, 0, 1, 2, 3, 4 and determine, between which
integer the values roots are lying.
(ii) The equation x2 – 2x – 3cos x = 0 is given. Locate the smallest root in magnitude in
an interval of length one unit.
2. Find a real root of ex = 3x by Bisection method.
3. Find the smallest positive root of x3 – 9x + 1 = 0, using Bisection method correct to three
decimal places.
4. Find the real root lying in interval (1, 2) up to four decimal places for the equation
x6 – x4 – x3 – 1 = 0 by bisection method.
5. Find the root of tan x + x = 0 up to two decimal places which lies between 2 and 2.1 using
Bisection method.
6. Compute the root of log x = cos x correct to 2 decimal places using Bisection method.
7. Compute the root of f(x) = sin 10x + cos 3x by computer using Bisection method. The
initial approximations are 4 and 5.
8. Find the real root correct to three decimal places for the following equations:
(i) x3 – x – 4 = 0 (ii) x3 – x2 – 1 = 0
(iii) x3 + x2 – 1 = 0 (iv) x3 – 3x – 5 = 0.
9. Find a root of x3
– x – 11 = 0 using Bisection method correct to 3 decimal places which
lies between 2 and 3.
10. Find a real root of the equation x3 – 2x – 5 = 0 using Bisection method.
11. Find a positive root of the equation xex = 1 which lies between 0 and 1.
94 COMPUTER-BASED NUMERICAL AND STATISTICAL TECHNIQUES
12. Apply Bisection method to find a root of the equation x4 + 2x3 – x – 1 = 0 in the interval
[0, 1].
13. Obtain a root correct to three decimal places for each of these equations using Bisection
method.
(i) x3 + x2 + x + 7 = 0 (ii) x3 – 18 = 0
(iii) x3 + x – 1 = 0 (iv) x3 – 5x + 3 = 0.
14. By displaying procedure in tabular form, use Bisection method to compute the root of
36.
15. Find a positive root of the equation x3 + 3x – 1 = 0 by bisection method.
16. Find a real root of x3 – 2x – 1 = 0 which lies between 1 and 2 by using Bisection method
correct to 2 decimal places.
17. Find the approximate value of the root of the equation 3x – 1 + sin x = 0 by Bisection
method.
18. (i) Explain the Bisection method to calculate the roots of an equation. Write an algo-
rithm and implement it in ‘C’.
(ii) Write computer program in a language of your choice which implements bisection
method to compute the real root of the equation 3x + sin x – ex = 0 in a given interval.
19. Solve x3 – 9x + 1 = 0 for the root between x = 2 and x = 4 by the method of Bisection.
20. If a root of f(x) = 0 lies in the interval (a, b), then find the minimum number of iterations
required when the permissible error is E.
21. The negative root of the smallest magnitude of the equation f(x) = 3x3 + 10x2 + 10x + 7 = 0
is to be obtained.
(i) Find an interval of unit length which contains this root.
(ii) Perform two iterations of the bisection method.
22. The smallest positive root of the equation
f(x) = x4 – 3x2 + x – 10 = 0
is to be obtained.
(i) Find an interval of unit length which contains this root.
(ii) Perform two iterations of the bisection method.