Input / Question:

Input / Question:

Find the interval in which the smallest positive root of the following equations lies :

(a) tan x + tanh x = 0

(b) x^{3 }– x – 4 = 0.

Determine the roots correct to two decimal places using the bisection method.

Verified

Output/Answer

(a) Let f (x) = tan x + tanh x.

Note that f (x) has no root in the first branch of y = tan x, that is, in the interval (0, π / 2).

The root is in the next branch of y = tan x, that is, in the interval (π / 2, 3π / 2).

We have :

f (1.6) = – 33.31, f (2.0) = – 1.22,

f (2.2) = – 0.40, f (2.3) = – 0.1391, f (2.4) = 0.0676.

Therefore, the root lies in the interval (2.3, 2.4).

f(m_{k})f(a_{k-1}) m_{k} b_{k-1} a_{k-1} k
>0 2.35 2.4 2.3 1
<0 2.375 2.4 2.35 2
>0 2.3625 2.375 2.35 3
<0 2.36875 2.375 2.3625 4

After four iterations, we find that the root lies in the interval (2.3625, 2.36875). Hence,

the approximate root is m = 2.365625. The root correct to two decimal places is 2.37.

b)  For f (x) = x^{ 3} – x – 4, we find f (0) = – 4, f (1) = – 4, f (2) = 2.

Therefore, the root lies in the interval (1, 2).

f(m_{k})f(a_{k-1}) m_{k} b_{k-1} a_{k-1} k
>0 1.5 2 1 1
>0 1.75 2 1.5 2
<0 1.875 2 1.75 3
>0 1.8125 1.875 1.75 4
>0 1.78125 1.8125 1.75 5
<0 1.796875 1.8125 1.78125 6
>0 1.789063 1.796875 1.78125 7
>0 1.792969 1.796875 1.789063 8
>0 1.794922 1.796875 1.792969 9
>0 1.795898 1.796875 1.794922 10

After 10 iterations, we find that the root lies in the interval (1.795898, 1.796875).

Therefore, the approximate root is m = 1.796387. The root correct to two decimal places is 1.80.