-1

Hello I am solving the following problem:

Use a fixed-point iteration method to determine a solution accurate to within $10^{-4}$ for x=tanx, for x in [4. 5].

using g(x)=tanx and $p_0=4$ yields $p_1 = g(p_0)=1.158$ is not in the interval [4,5] so we need a different fixed-point function. hence,

$\frac{1}{x}=\frac{1}{tanx}$

which gives you

$g(x)=x+\frac{1}{x}=\frac{1}{tanx}$

and then we iterate for the first four terms.

this all makes sense except for the last step which says,

$g(x)=x+\frac{1}{x}=\frac{1}{tanx}$.

how did they come up with this?

  • I don't follow here. If $1/x=1/\tan(x)$ then $x+1/x=x+1/\tan(x)$. Also (perhaps more importantly), you can start a fixed-point iteration from anywhere, not just $4$. – Zim Sep 20 '21 at 02:19
  • This could be a duplicate of https://math.stackexchange.com/questions/917846/fixed-point-iteration-for-x-tanx? See also https://math.stackexchange.com/questions/2942400/selection-of-the-numerical-method, https://math.stackexchange.com/questions/3203518/what-would-be-the-gx-of-fixed-point-iteration-method – Lutz Lehmann Sep 20 '21 at 09:30

1 Answers1

1

The proposed $g(x)$ makes no sense, but the underlying strategy is good. A natural choice for $g$ would be $g(x)=x-\frac 1x +\frac{1}{\tan x}$. In fact, this $g$ is invariant and contractive on the interval $[4,5]$ and you can easily use the fixed point theorem to establish that $$ |x_n- x^*| \leq L^n |x_0-x^*| \leq L^n,\quad x_0 \in [4,5] $$

with $L=\frac{17}{16} -\frac{1}{\sin^2 4}\approx 0.68$, which allows you to establish a priori the necessary number of iterations to reach a given accuracy.

PierreCarre
  • 20,974
  • 1
  • 18
  • 34