## MATH1013 Quizzes

Quiz 3: The Newton-Raphson method
Question 1 Questions
Solve the equation ${e}^{x}-4x=0$ using Newton-Raphson iteration.
 a) $x=0.61906$ and $x=1.51213\phantom{\rule{0.3em}{0ex}}.$ b) $x=0.35$ and $x=2.1\phantom{\rule{0.3em}{0ex}}.$ c) $x=0.35740$ and $x=2.15329\phantom{\rule{0.3em}{0ex}}.$ d) Newton-Raphson iteration cannot be used since the answer oscillates between $2$ and $-2\phantom{\rule{0.3em}{0ex}}.$

Choice (a) is incorrect
Choice (b) is incorrect
Choice (c) is correct!
Sketch the curve of $f\left(x\right)={e}^{x}-4x$ and see that there is a solution between $x=0$ and $x=1$ and between $x=2$ and $x=3\phantom{\rule{0.3em}{0ex}}.$ Now ${f}^{\prime }\left(x\right)={e}^{x}-4\phantom{\rule{0.3em}{0ex}}$ so the iterative function is
$F\left(x\right)=x-\frac{{e}^{x}-4x}{{e}^{x}-4}=\frac{{e}^{x}\left(x-1\right)}{{e}^{x}-4},$
giving ${x}_{0}^{}=0.5\phantom{\rule{0.3em}{0ex}}$, ${x}_{1}^{}=0.35060\phantom{\rule{0.3em}{0ex}}$, ${x}_{2}^{}=0.35739\phantom{\rule{0.3em}{0ex}}$, ${x}_{3}^{}=0.35740\phantom{\rule{0.3em}{0ex}},\phantom{\rule{1em}{0ex}}{x}_{4}^{}=0.35740\phantom{\rule{0.3em}{0ex}},$ and ${x}_{0}^{}=2.5\phantom{\rule{0.3em}{0ex}}$, ${x}_{1}^{}=2.23327\phantom{\rule{0.3em}{0ex}}$, ${x}_{2}^{}=2.15874\phantom{\rule{0.3em}{0ex}}$, ${x}_{3}^{}=2.15332\phantom{\rule{0.3em}{0ex}},\phantom{\rule{1em}{0ex}}{x}_{4}^{}=2.15329\phantom{\rule{0.3em}{0ex}}$, ${x}_{5}^{}=2.15329\phantom{\rule{0.3em}{0ex}}.$
Choice (d) is incorrect
Use the Newton-Raphson method to solve $2{x}^{3}-6{x}^{2}+6x-1=0$ to 4 decimal places.
 a) There is no solution since the curve is always increasing. b) $x=0.2063\phantom{\rule{0.3em}{0ex}}.$ c) $x=0.7351.$ d) Newton-Raphson cannot be used because the tangents to the curve do not cut the axes on the interval $0\le x\le 1\phantom{\rule{0.3em}{0ex}}.$

Choice (a) is incorrect
Choice (b) is correct!
Sketching the curve $f\left(x\right)=2{x}^{3}-6{x}^{2}+6x-1$ we see there is a root between $0$ and $0.5\phantom{\rule{0.3em}{0ex}}.$ $f\left(0\right)=-1\phantom{\rule{0.3em}{0ex}}$, $f\left(0.5\right)=0.75$ so the function changes sign on the interval $0\le x\le 0.5\phantom{\rule{0.3em}{0ex}}.$ ${f}^{\prime }\left(x\right)=6{x}^{2}-12x+6=6{\left(x-1\right)}^{2}$ so there is a critical value at $x=1\phantom{\rule{0.3em}{0ex}}.$ ${f}^{″}\left(x\right)=12x-12$ so the second derivative changes sign at $x=1\phantom{\rule{0.3em}{0ex}}.$ The tangent at $x=0$ is $y=6x-1$ which cuts the $x-$axis at $x=\frac{1}{6}\phantom{\rule{0.3em}{0ex}}.$ The tangent at $x=0.5$ is $y=\frac{3}{2}x$ which cuts the $x-$axis at $x=0\phantom{\rule{0.3em}{0ex}}.$ Therefore we can use Newton-Raphson with the iterative function
$F\left(x\right)=x-\frac{2{x}^{3}-6{x}^{2}+6x-1}{6{x}^{2}-12x+6}=\frac{4{x}^{3}-6{x}^{2}+1}{6{x}^{2}-12x+6},$
so ${x}_{0}^{}=0.5\phantom{\rule{0.3em}{0ex}}$, ${x}_{1}^{}=0\phantom{\rule{0.3em}{0ex}}$, ${x}_{2}^{}=\frac{1}{6}\phantom{\rule{0.3em}{0ex}}$, ${x}_{3}^{}=0.20444\phantom{\rule{0.3em}{0ex}},\phantom{\rule{1em}{0ex}}{x}_{4}^{}=0.206295\phantom{\rule{0.3em}{0ex}}$, ${x}_{5}^{}=0.20630\phantom{\rule{0.3em}{0ex}}$, ${x}_{6}^{}=0.2063\phantom{\rule{0.3em}{0ex}}.$
Choice (c) is incorrect
Choice (d) is incorrect
Newton-Raphson method will always converge to a solution for $f\left(x\right)=0$ on the interval $a\le x\le b$ if certain conditions are met. Which of the following is not one of these conditions ?
 a) $f$ is continuous on the interval $a\le x\le b\phantom{\rule{0.3em}{0ex}}.$ b) $f\left(a\right)$ and $f\left(b\right)$ have opposite signs. c) ${f}^{″}\left(x\right)$ does not change sign on the interval $a\le x\le b$. d) ${f}^{\prime }\left(x\right)=0$ on the interval $a\le x\le b$.

Choice (a) is incorrect
Choice (b) is incorrect
Choice (c) is incorrect
Choice (d) is correct!
The condition should be that ${f}^{\prime }\left(x\right)\ne 0$ on the interval $a\le x\le b$.
The function $f\left(x\right)=2{x}^{3}-2{x}^{2}-3x+2$ has a root between $0$ and $1\phantom{\rule{0.3em}{0ex}}.$ Which of the following conditions fail ?
 a) $f\left(0\right)$ and $f\left(1\right)$ have opposite signs. b) ${f}^{\prime }\left(x\right)\ne 0$ on $0\le x\le 1$. c) ${f}^{″}\left(x\right)$ does not change sign on the interval $0\le x\le 1$. d) The tangents at $0$ and $1$ cut the axes in the interval $0\le x\le 1$.

Choice (a) is incorrect
Choice (b) is incorrect
Choice (c) is correct!
${f}^{″}\left(x\right)$ does change sign on the interval since ${f}^{″}\left(0\right)=-4$ and ${f}^{″}\left(1\right)=8\phantom{\rule{0.3em}{0ex}}.$
Choice (d) is incorrect
As we saw in question 4, we cannot use the Newton-Raphson method to find the root of the function $f\left(x\right)=2{x}^{3}-2{x}^{2}-3x+2$ on the interval $0\le x\le 1\phantom{\rule{0.3em}{0ex}}.$ Find a suitable function to use the Gregory-Dary iteration method and find the solution.
 a) $x=\varphi \left(x\right)=\frac{1}{3}\left(2{x}^{3}-2{x}^{2}+2\right)$ is a suitable function and the solution is $x=0.57318\phantom{\rule{0.3em}{0ex}}.$ b) $x=\varphi \left(x\right)=\frac{1}{3}\left(2{x}^{3}-2{x}^{2}+2\right)$ is a suitable function and the solution is $x=0.57138\phantom{\rule{0.3em}{0ex}}.$ c) $x=\varphi \left(x\right)=1+\frac{3}{2x}-\frac{1}{{x}^{2}}$ is a suitable function and the solution is $x=0.57318\phantom{\rule{0.3em}{0ex}}.$ d) Gregory-Dary cannot be used either.

Choice (a) is correct!
$x=\varphi \left(x\right)=\frac{1}{3}\left(2{x}^{3}-2{x}^{2}+2\right)$ is a suitable function since $|{\varphi }^{\prime }\left(x\right)|<1$ on $0\le x\le 1$ and starting with ${x}_{0}^{}=0.5$ it takes 6 iterations to get the solution ${x}_{5}^{}={x}_{6}^{}=0.57318\phantom{\rule{0.3em}{0ex}}.$
Choice (b) is incorrect
Choice (c) is incorrect
Choice (d) is incorrect
Consider the function $f\left(x\right)={x}^{4}+3{x}^{2}-x-5\phantom{\rule{0.3em}{0ex}}.$ It has one root at $x=-1\phantom{\rule{0.3em}{0ex}}.$ Use the Newton-Raphson method to find the other real root to 9 decimal places.
 a) The other root is $x=1.185037375$. b) The other root is $x=-1.000003000$. c) The other root is $x=1.185038651$. d) The iterations do not converge.

Choice (a) is correct!
$\begin{array}{llll}\hfill {x}_{n+1}& ={x}_{n}-\frac{f\left({x}_{n}\right)}{{f}^{\prime }\left({x}_{n}\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\frac{3{{x}_{n}}^{4}+3{{x}_{n}}^{2}+5}{4{{x}_{n}}^{3}+6{x}_{n}-1}\phantom{\rule{0.3em}{0ex}}.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$
Choice (b) is incorrect
Choice (c) is incorrect
Choice (d) is incorrect
Consider the function $f\left(x\right)=3sin2x-2{e}^{3x}+x\phantom{\rule{0.3em}{0ex}}.$ Use the Newton-Raphson method starting at ${x}_{0}^{}=-2$ and ${x}_{0}^{}=-3$ to find the two roots to 9 decimal places (NB: For this question you should use Mathematica or a programmable calculator to ensure accurate answers).
 a) The two roots are $x=-1.919158972$ and $x=-2.617643267\phantom{\rule{0.3em}{0ex}}.$ b) The root starting at ${x}_{0}^{}=-2$ converges to $x=-1.919255184$ but the other does not converge. c) The two roots are $x=-1.919255184$ and $x=-2.612781943\phantom{\rule{0.3em}{0ex}}.$ d) The iterations do not converge for either starting values.

Choice (a) is incorrect
Choice (b) is incorrect
Choice (c) is correct!
$\begin{array}{llll}\hfill {x}_{n+1}& ={x}_{n}-\frac{f\left({x}_{n}\right)}{{f}^{\prime }\left({x}_{n}\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\frac{6{x}_{n}cos2{x}_{n}-\left(6{x}_{n}-2\right){e}^{3{x}_{n}}-3sin2{x}_{n}}{6cos2{x}_{n}-6{e}^{3{x}_{n}}+1}.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$
Choice (d) is incorrect
How many times do we need to iterate using the Newton-Raphson method to find the root of the function $f\left(x\right)=4x{e}^{2x}-2$ to 4 decimal places starting with ${x}_{0}^{}=0.5$ ?
 a) The method cannot be used since the derivative is zero when $x=-0.5\phantom{\rule{0.3em}{0ex}}.$ b) 15 iterations. c) 6 iterations. d) 4 iterations.

Choice (a) is incorrect
Choice (b) is incorrect
Choice (c) is incorrect
Choice (d) is correct!
$\begin{array}{llll}\hfill {x}_{n+1}& ={x}_{n}-\frac{f\left({x}_{n}\right)}{{f}^{\prime }\left({x}_{n}\right)}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\frac{8{{x}_{n}}^{2}{e}^{2{x}_{n}}+2}{4{e}^{2{x}_{n}}\left(1+2{x}_{n}\right)},\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$ so ${x}_{0}^{}=0.5\phantom{\rule{0.3em}{0ex}}$, ${x}_{1}^{}=0.3420\phantom{\rule{0.3em}{0ex}}$, ${x}_{2}^{}=0.2887\phantom{\rule{0.3em}{0ex}}$, ${x}_{3}^{}=0.2836$
${x}_{4}^{}=0.2836\phantom{\rule{0.3em}{0ex}}$. The answer is obtained in 4 iterations when starting with ${x}_{0}^{}=0.5$. Compare this with the Gregory-Dary iteration method for the same function where it took 15 iterations to get the answer.
Use the Newton-Raphson method to find the second iterate to 5 dec. places of the solution of
$f\left(x\right)=\left(37{x}^{2}+1\right){e}^{-x}-40cos2x=0$
starting at ${x}_{0}^{}=0.5$ .
 a) ${x}_{2}^{}=8.57612$ b) ${x}_{2}^{}=0.67150$ c) ${x}_{2}^{}=5.56270$ d) ${x}_{2}^{}=4.84173$

Choice (a) is incorrect
Choice (b) is correct!
The iterative function is
$F\left(x\right)=\frac{{e}^{-x}\left(-37{x}^{3}+37{x}^{2}-x-1\right)+80xsin2x+40cos2x}{{e}^{-x}\left(-37{x}^{2}+74x-1\right)+80sin2x}.$
Note that our starting point will determine which of the many possible solutions we find.
Choice (c) is incorrect
Choice (d) is incorrect
The amount of insulin in microunits per mL in a diabetic patient is given by the function $I\left(t\right)=4.5+40.5t{e}^{-0.26t}$ where $t$ is the number of hours since the last injection. If the next insulin injection must be given after the insulin has peaked and then fallen to 45 microunits per mL, at what time, to the nearest minute, must the next insulin injection be given ?
 a) Using Newton-Raphson we find the injection must be given after 1 hour and 23 minutes. b) Using Newton-Raphson we find the injection must be given after 8 hours exactly. c) Using Newton-Raphson we find the injection must be given after 1 hour and 43 minutes. d) Using the Gregory-Dary method, with $t=\varphi \left(t\right)=lnt$ we find the injection must given after 7 hours and 16 minutes.

Choice (a) is incorrect
Choice (b) is correct!
Consider the graph of $I\left(t\right)$ shown below.

We wish to solve $f\left(t\right)=40.5t{e}^{-0.26t}-40.5=0$. The first root is between 0 and 1 and the second appears to be between 7 and 8.5. Try Newton-Raphson with ${x}_{0}^{}=7.5$ and we get $x=7.994$ or 8 hours to the nearest minute.
Choice (c) is incorrect
Choice (d) is incorrect