Exercise 10.1 Examples – 12th Class Math Federal Board (Root Finding by Iteration)

Exercise 10.1 solved examples thumbnail for 12th class math Federal Board chapter 10 (Numerical Methods)

All textbook examples for Exercise 10.1 (Root Finding by Iteration) of Chapter 10: Numerical Methods, 12th class Mathematics, Federal Board (FBISE). All 6 examples are worked step by step, with the final answers highlighted.

Worked textbook examples

Tap an example to open or close it.
Example 1Use the Bisection method to find (correct to two decimal points) the root between $0.4$ and $0.6$ of the equation $\sin(x)-5x+2=0$.

Solution:

Let $f(x)=\sin(x)-5x+2$; $x_0=0.4$, $x_1=0.6$.

The angles are in radians, so set the calculator to radian mode.

$$\begin{aligned}f(x_0)&=f(0.4)=\sin(0.4)-5(0.4)+2\approx 0.3894\quad(+\text{ve})\\[7pt]f(x_1)&=f(0.6)=\sin(0.6)-5(0.6)+2\approx -0.4354\quad(-\text{ve})\end{aligned}$$

$f(x_0)f(x_1)<0$, so the root lies between $0.4$ and $0.6$.

Keep full values in the calculator. The values shown are rounded.

$$\begin{aligned}x_2&=\frac{x_0+x_1}{2}=\frac{0.4+0.6}{2}=0.5\\[7pt]f(x_2)&=\sin(0.5)-5(0.5)+2\approx -0.0206\quad(-\text{ve})\end{aligned}$$

$f(x_0)f(x_2)<0$, so the root lies between $x_0$ and $x_2$, that is, between $0.4$ and $0.5$.

$$\begin{aligned}x_3&=\frac{x_0+x_2}{2}=\frac{0.4+0.5}{2}=0.45\\[7pt]f(x_3)&=\sin(0.45)-5(0.45)+2\approx 0.1850\quad(+\text{ve})\end{aligned}$$

$f(x_2)f(x_3)<0$, so the root lies between $x_2$ and $x_3$, that is, between $0.45$ and $0.5$.

$$\begin{aligned}x_4&=\frac{x_2+x_3}{2}=\frac{0.5+0.45}{2}=0.475\\[7pt]f(x_4)&=\sin(0.475)-5(0.475)+2\approx 0.0823\quad(+\text{ve})\end{aligned}$$

$f(x_2)f(x_4)<0$, so the root lies between $x_2$ and $x_4$, that is, between $0.475$ and $0.5$.

$$\begin{aligned}x_5&=\frac{x_2+x_4}{2}=\frac{0.5+0.475}{2}=0.4875\\[7pt]f(x_5)&=\sin(0.4875)-5(0.4875)+2\approx 0.0309\quad(+\text{ve})\end{aligned}$$

$f(x_2)f(x_5)<0$, so the root lies between $x_2$ and $x_5$, that is, between $0.4875$ and $0.5$.

$$\begin{aligned}x_6&=\frac{x_2+x_5}{2}=\frac{0.5+0.4875}{2}\approx 0.4938\\[7pt]f(x_6)&\approx 0.0052\quad(+\text{ve})\end{aligned}$$

$f(x_2)f(x_6)<0$, so the root lies between $x_2$ and $x_6$, that is, between $0.4938$ and $0.5$.

$$\begin{aligned}x_7&=\frac{x_2+x_6}{2}\approx\frac{0.5+0.4938}{2}\approx 0.4969\\[7pt]f(x_7)&\approx -0.0077\quad(-\text{ve})\end{aligned}$$

$f(x_6)f(x_7)<0$, so the root lies between $x_6$ and $x_7$, that is, between $0.4938$ and $0.4969$.

The ends $0.4938$ and $0.4969$ round to $0.49$ and $0.50$. So the second decimal place is not settled yet. The two ends are still on opposite sides of $0.495$. We continue, and show 6 decimal places.

New valueValue of $f$The root lies between
$x_8=\dfrac{x_6+x_7}{2}\approx 0.495313$$-0.001256\ (-\text{ve})$$x_6$ and $x_8$, that is, $0.493750$ and $0.495313$
$x_9=\dfrac{x_6+x_8}{2}\approx 0.494531$$0.001963\ (+\text{ve})$$x_8$ and $x_9$, that is, $0.494531$ and $0.495313$
$x_{10}=\dfrac{x_8+x_9}{2}\approx 0.494922$$0.000354\ (+\text{ve})$$x_8$ and $x_{10}$, that is, $0.494922$ and $0.495313$
$x_{11}=\dfrac{x_8+x_{10}}{2}\approx 0.495117$$-0.000451\ (-\text{ve})$$x_{10}$ and $x_{11}$, that is, $0.494922$ and $0.495117$
$x_{12}=\dfrac{x_{10}+x_{11}}{2}\approx 0.495020$$-0.000049\ (-\text{ve})$$x_{10}$ and $x_{12}$, that is, $0.494922$ and $0.495020$
$x_{13}=\dfrac{x_{10}+x_{12}}{2}\approx 0.494971$$0.000152\ (+\text{ve})$$x_{12}$ and $x_{13}$, that is, $0.494971$ and $0.495020$
$x_{14}=\dfrac{x_{12}+x_{13}}{2}\approx 0.494995$$0.000052\ (+\text{ve})$$x_{12}$ and $x_{14}$, that is, $0.494995$ and $0.495020$
$x_{15}=\dfrac{x_{12}+x_{14}}{2}\approx 0.495007$$0.000001\ (+\text{ve})$$x_{12}$ and $x_{15}$, that is, $0.495007$ and $0.495020$

Both ends, $0.495007$ and $0.495020$, round to $0.50$. So the root is $0.50$ correct to two decimal places.

Answer $x\approx0.50$
Common mistake / Note: In the step for $x_4$ the book prints $\dfrac{0.4+0.5}{2}$. It should be $\dfrac{0.5+0.45}{2}$.
Common mistake / Note: The book prints $f(x_4)=0.0832$. The correct value is $0.0823$.
Common mistake / Note: The book stops at $x_7$ and gives $0.4968$. This also rounds to $0.50$, but at $x_7$ the two ends do not yet give the same second decimal place.
Example 2Find a root of equation $x^3-x-11=0$ correct to one decimal.

Solution:

Let $f(x)=x^3-x-11$.

Two starting values are not given, so we first look for $x_0$ and $x_1$ at which $f$ has opposite signs. Take $x_0=2$ and $x_1=3$.

$$\begin{aligned}f(x_0)&=f(2)=2^3-2-11=-5\quad(-\text{ve})\\[7pt]f(x_1)&=f(3)=3^3-3-11=13\quad(+\text{ve})\end{aligned}$$

$f(x_0)f(x_1)<0$, so the root lies between $2$ and $3$.

Keep full values in the calculator. The values shown are rounded.

$$\begin{aligned}x_2&=\frac{x_0+x_1}{2}=\frac{2+3}{2}=2.5\\[7pt]f(x_2)&=(2.5)^3-2.5-11=2.125\quad(+\text{ve})\end{aligned}$$

$f(x_0)f(x_2)<0$, so the root lies between $x_0$ and $x_2$, that is, between $2$ and $2.5$.

$$\begin{aligned}x_3&=\frac{x_0+x_2}{2}=\frac{2+2.5}{2}=2.25\\[7pt]f(x_3)&=(2.25)^3-2.25-11\approx -1.8594\quad(-\text{ve})\end{aligned}$$

$f(x_2)f(x_3)<0$, so the root lies between $x_2$ and $x_3$, that is, between $2.25$ and $2.5$.

$$\begin{aligned}x_4&=\frac{x_2+x_3}{2}=\frac{2.5+2.25}{2}=2.375\\[7pt]f(x_4)&=(2.375)^3-2.375-11\approx 0.0215\quad(+\text{ve})\end{aligned}$$

$f(x_3)f(x_4)<0$, so the root lies between $x_3$ and $x_4$, that is, between $2.25$ and $2.375$.

$$\begin{aligned}x_5&=\frac{x_3+x_4}{2}=\frac{2.25+2.375}{2}=2.3125\\[7pt]f(x_5)&=(2.3125)^3-2.3125-11\approx -0.9460\quad(-\text{ve})\end{aligned}$$

$f(x_4)f(x_5)<0$, so the root lies between $x_4$ and $x_5$, that is, between $2.3125$ and $2.375$.

$$\begin{aligned}x_6&=\frac{x_4+x_5}{2}=\frac{2.375+2.3125}{2}\approx 2.3438\\[7pt]f(x_6)&\approx -0.4691\quad(-\text{ve})\end{aligned}$$

$f(x_4)f(x_6)<0$, so the root lies between $x_4$ and $x_6$, that is, between $2.3438$ and $2.375$.

$$\begin{aligned}x_7&=\frac{x_4+x_6}{2}\approx\frac{2.375+2.3438}{2}\approx 2.3594\\[7pt]f(x_7)&\approx -0.2256\quad(-\text{ve})\end{aligned}$$

$f(x_4)f(x_7)<0$, so the root lies between $x_4$ and $x_7$, that is, between $2.3594$ and $2.375$.

Both ends, $2.3594$ and $2.375$, round to $2.4$. So the root is $2.4$ correct to one decimal place.

Answer $x\approx2.4$
Common mistake / Note: The book prints $f(2.5)=2.215$. The correct value is $2.125$.
Common mistake / Note: The book stops at $x_5=2.3125$ and prints the answer $2.315$. The root is $2.3736$ to four decimal places, so the answer correct to one decimal place is $2.4$.
Example 3Use the method of False position for finding the root correct to two decimal places between $0.4$ and $0.6$ of the equation $\sin(x)=5x-2$.

Solution:

Let $f(x)=\sin(x)-5x+2$; $x_0=0.4$, $x_1=0.6$.

Use radian mode in the calculator.

The root comes very close to $0.495$, so six decimal places are shown.

$$\begin{aligned}f(x_0)&=\sin(0.4)-5(0.4)+2\approx 0.389418\ (+\text{ve})\\[7pt]f(x_1)&=\sin(0.6)-5(0.6)+2\approx -0.435358\ (-\text{ve})\end{aligned}$$

Since $f(x_0)f(x_1)<0$, the root lies between $x_0$ and $x_1$, that is, between $0.4$ and $0.6$.

Keep full values in the calculator. The values shown are rounded.

$$\begin{aligned}x_2&=\frac{x_0f(x_1)-x_1f(x_0)}{f(x_1)-f(x_0)}\\[7pt]&\approx \frac{0.4(-0.435358)-0.6(0.389418)}{-0.435358-0.389418}\approx 0.494430\\[7pt]f(x_2)&\approx \sin(0.494430)-5(0.494430)+2\approx 0.002380\ (+\text{ve})\end{aligned}$$

$f(x_1)f(x_2)<0$, so the root lies between $x_1$ and $x_2$, that is, between $0.494430$ and $0.6$.

$$\begin{aligned}x_3&=\frac{x_1f(x_2)-x_2f(x_1)}{f(x_2)-f(x_1)}\\[7pt]&\approx \frac{0.6(0.002380)-0.494430(-0.435358)}{0.002380-(-0.435358)}\approx 0.495004\\[7pt]f(x_3)&\approx \sin(0.495004)-5(0.495004)+2\approx 0.000015\ (+\text{ve})\end{aligned}$$

$f(x_1)f(x_3)<0$, so the root lies between $x_1$ and $x_3$, that is, between $0.495004$ and $0.6$.

$$\begin{aligned}x_4&=\frac{x_1f(x_3)-x_3f(x_1)}{f(x_3)-f(x_1)}\\[7pt]&\approx \frac{0.6(0.000015)-0.495004(-0.435358)}{0.000015-(-0.435358)}\approx 0.495008\end{aligned}$$

$x_3$ and $x_4$ both round to $0.50$.

Check: $f(0.495)\approx0.000032>0$ and $f(0.505)\approx-0.041193<0$. So the root lies between $0.495$ and $0.505$, and it rounds to $0.50$.

Answer $x\approx0.50$.
Common mistake / Note: In the last step the book prints $0.00003$ in place of $x_3$ and gets $0.4949$. The correct value is $0.495008$, which rounds to $0.50$.
Example 4Find the root of $xe^x=3$ by Regula Falsi method correct to two decimal places by taking two initial approximations.

Solution:

Let $f(x)=xe^x-3$; $x_0=1$, $x_1=1.5$.

$$\begin{aligned}f(x_0)&=1\cdot e^{1}-3\approx -0.2817\ (-\text{ve})\\[7pt]f(x_1)&=1.5e^{1.5}-3\approx 3.7225\ (+\text{ve})\end{aligned}$$

Since $f(x_0)f(x_1)<0$, the root lies between $x_0$ and $x_1$, that is, between $1$ and $1.5$.

Keep full values in the calculator. The values shown are rounded.

$$\begin{aligned}x_2&=\frac{x_0f(x_1)-x_1f(x_0)}{f(x_1)-f(x_0)}\\[7pt]&\approx \frac{1(3.7225)-1.5(-0.2817)}{3.7225-(-0.2817)}\approx 1.0352\\[7pt]f(x_2)&\approx 1.0352e^{1.0352}-3\approx -0.0853\ (-\text{ve})\end{aligned}$$

$f(x_1)f(x_2)<0$, so the root lies between $x_1$ and $x_2$, that is, between $1.0352$ and $1.5$.

$$\begin{aligned}x_3&=\frac{x_1f(x_2)-x_2f(x_1)}{f(x_2)-f(x_1)}\\[7pt]&\approx \frac{1.5(-0.0853)-1.0352(3.7225)}{-0.0853-3.7225}\approx 1.0456\\[7pt]f(x_3)&\approx 1.0456e^{1.0456}-3\approx -0.0252\ (-\text{ve})\end{aligned}$$

$f(x_1)f(x_3)<0$, so the root lies between $x_1$ and $x_3$, that is, between $1.0456$ and $1.5$.

$$\begin{aligned}x_4&=\frac{x_1f(x_3)-x_3f(x_1)}{f(x_3)-f(x_1)}\\[7pt]&\approx \frac{1.5(-0.0252)-1.0456(3.7225)}{-0.0252-3.7225}\approx 1.0486\end{aligned}$$

$x_3$ and $x_4$ both round to $1.05$.

Answer $x\approx1.05$.
Common mistake / Note: The book stops at $1.048$. To two decimal places the root is $1.05$.
Example 5Solve $x^3+2x^2+10x-20=0$ by Newton's Raphson method.

Solution:

Let $f(x)=x^3+2x^2+10x-20$. Then $f'(x)=3x^2+4x+10$.

$$\begin{aligned}x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}\\[7pt]&=x_n-\frac{x_n^3+2x_n^2+10x_n-20}{3x_n^2+4x_n+10}\\[7pt]&=\frac{2(x_n^3+x_n^2+10)}{3x_n^2+4x_n+10}\qquad\text{(i)}\end{aligned}$$
$$\begin{aligned}f(1)&=1^3+2(1)^2+10(1)-20=-7<0\\[7pt]f(2)&=2^3+2(2)^2+10(2)-20=16>0\end{aligned}$$

So the root lies between $1$ and $2$. Let $x_0=1.2$ be the initial approximation, with $f(1.2)=-3.392<0$.

Keep full values in the calculator. The values shown are rounded.

Putting $n=0$ in (i):

$$\begin{aligned}x_1&=\frac{2[(1.2)^3+(1.2)^2+10]}{3(1.2)^2+4(1.2)+10}\\[7pt]&=\frac{26.336}{19.12}\approx 1.3774059\end{aligned}$$

Putting $n=1$ in (i):

$$\begin{aligned}x_2&\approx \frac{2[(1.3774059)^3+(1.3774059)^2+10]}{3(1.3774059)^2+4(1.3774059)+10}\\[7pt]&\approx \frac{29.0210518}{21.2013641}\approx 1.3688295\end{aligned}$$

Putting $n=2$ in (i):

$$\begin{aligned}x_3&\approx \frac{2[(1.3688295)^3+(1.3688295)^2+10]}{3(1.3688295)^2+4(1.3688295)+10}\\[7pt]&\approx \frac{28.8769235}{21.0964001}\approx 1.3688081\end{aligned}$$

Putting $n=3$ in (i):

$$\begin{aligned}x_4&\approx \frac{2[(1.3688081)^3+(1.3688081)^2+10]}{3(1.3688081)^2+4(1.3688081)+10}\\[7pt]&\approx \frac{28.8765666}{21.0961393}\approx 1.3688081\end{aligned}$$

$x_3$ and $x_4$ both round to $1.3688081$.

Answer $x\approx1.3688081$.
Common mistake / Note: For $x_1$ the book prints the numerator $6.336$. It should be $26.336$.
Example 6Solve $\sin(x)=1+x^3$ using Newton's Raphson method by taking initial approximation $x_0=-1.1$ up to 6 decimal places.

Solution:

Let $f(x)=\sin x-1-x^3$. Then $f'(x)=\cos x-3x^2$.

$$\begin{aligned}x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}\\[7pt]&=x_n-\frac{\sin x_n-1-x_n^3}{\cos x_n-3x_n^2}\\[7pt]&=\frac{x_n\cos x_n-\sin x_n-2x_n^3+1}{\cos x_n-3x_n^2}\qquad\text{(i)}\end{aligned}$$

Here $x_0=-1.1$. Use radian mode in the calculator. Keep full values in the calculator. The values shown are rounded.

Putting $n=0$ in (i):

$$\begin{aligned}x_1&=\frac{(-1.1)\cos(-1.1)-\sin(-1.1)-2(-1.1)^3+1}{\cos(-1.1)-3(-1.1)^2}\\[7pt]&\approx \frac{4.05425163}{-3.17640388}\approx -1.27636528\end{aligned}$$

Putting $n=1$ in (i):

$$\begin{aligned}x_2&\approx \frac{(-1.27636528)\cos(-1.27636528)-\sin(-1.27636528)-2(-1.27636528)^3+1}{\cos(-1.27636528)-3(-1.27636528)^2}\\[7pt]&\approx \frac{5.74524665}{-4.59712956}\approx -1.24974652\end{aligned}$$

Putting $n=2$ in (i):

$$\begin{aligned}x_3&\approx \frac{(-1.24974652)\cos(-1.24974652)-\sin(-1.24974652)-2(-1.24974652)^3+1}{\cos(-1.24974652)-3(-1.24974652)^2}\\[7pt]&\approx \frac{5.45840510}{-4.37003617}\approx -1.24905261\end{aligned}$$

Putting $n=3$ in (i):

$$\begin{aligned}x_4&\approx \frac{(-1.24905261)\cos(-1.24905261)-\sin(-1.24905261)-2(-1.24905261)^3+1}{\cos(-1.24905261)-3(-1.24905261)^2}\\[7pt]&\approx \frac{5.45108344}{-4.36417603}\approx -1.24905215\end{aligned}$$

Putting $n=4$ in (i):

$$\begin{aligned}x_5&\approx \frac{(-1.24905215)\cos(-1.24905215)-\sin(-1.24905215)-2(-1.24905215)^3+1}{\cos(-1.24905215)-3(-1.24905215)^2}\\[7pt]&\approx \frac{5.45107853}{-4.36417209}\approx -1.24905215\end{aligned}$$

$x_4$ and $x_5$ both round to $-1.249052$.

Answer $x\approx-1.249052$.

Popular posts from this blog

Chapter 10 Numerical Methods MCQs and Short Questions – 12th Class Math Federal Board

Exercise 10.1 Solutions – 12th Class Math Federal Board (Root Finding by Iteration)

Exercise 10.2 Examples – 12th Class Math Federal Board (Trapezoidal and Simpson Rules)