next up previous
Next: Cobweb plots Up: tutorial3 Previous: Use a MATLAB function

Another case: the method fails


Change the MATLAB function g.m to solve the equation \bgroup\color{black}$x=g(x)= \frac{1}{2} \tan x $\egroup, where \bgroup\color{black}$x \in [ -0.5, 1.5]$\egroup. There are two solutions in this domain, one at \bgroup\color{black}$x=0$\egroup. You should find it easy to get the iteration.m to find the \bgroup\color{black}$x=0$\egroup solution, but it turns out that you cannot find the solution for \bgroup\color{black}$x \approx 1.2$\egroup using functional iteration.

\bgroup\color{red}\framebox{\em HAND CALCULATION}\egroup \bgroup\color{black}$\phantom{0}$\egroupDemonstrate theoretically that the computational results found above are to be expected. Show that \bgroup\color{black}$\vert g'(x)\vert<1$\egroup at \bgroup\color{black}$x=0$\egroup and that \bgroup\color{black}$\vert g'(x)\vert>1$\egroup near \bgroup\color{black}$x=1.2$\egroup. Now rewrite \bgroup\color{black}$x=g(x)$\egroup in such a way that the magnitude of the derivative is less than one near \bgroup\color{black}$x=1.2$\egroup.

With your new \bgroup\color{black}$g(x)$\egroup find the root near \bgroup\color{black}$x=1.2$\egroup using iteration.m.

\bgroup\color{blue}\framebox{\em CHECKPOINT: submit solution}\egroup \bgroup\color{black}$\phantom{0}$\egroup \bgroup\color{red}\framebox{ 4.}\egroup Record the value of the variable x(21).



Charlie Macaskill 2004-07-26