0

Let $f(x) = x-tan(x)$.

I am trying to develope a scheme to find its zeros using a particular numerical technique. Let: $$ g(x) = x -mf(x) $$ then $g(r)=r-f(r)=r-0=r$, where $r$ is any of the zeroes of $f$. So $r$ is a fixed point of $g$.

For a given $r$, let $I$ be an interval containing $r$, where $|g'(x)|<1$ in $I$. If we pick any $x_0 \in I$, then it is guaranteed that the sequence $x_n = g(x_{n-1})$ will converge to the (unique) fixed point of $g$ in $I$.

So, for each root, my goal is to find a suitable $m$, a suitable interval, and a $x_0$ in that interval to guarantee convergence.

Issue: Other than the root $r=0$, I am having trouble derive a general way to find an interval for each of the other roots.

It can be seen that $f$ has a root in every neighboorhood $n\pi, n=0,\pm1,\pm2,...$ But I find it hard to estimate their values unless using a graphing calculator, which is not what I want to do.

Moreover, after estimating the other roots, I still have to derive a general way to pick the corresponding $m$'s and the intervals.

Could you show me a general way to find the roots of this function, using the method above?

  • Do you have to use this $f$? Could you alternatively use $f(x)=\sin(x)-x\cos(x)$ or $f_n(x)=n\pi+\arctan(x)-x$? – Lutz Lehmann Mar 27 '19 at 20:20
  • @LutzL I would prefer to use the original one. However, if it is concluded that there is no way to derive a general method to solve the original one, then using the ones in your comment is ok, as long as we can show that they have the same zeroes. – A Slow Learner Mar 27 '19 at 20:26
  • By the second formula used as fixed point iteration, the solutions are close to $x_n=n\pi+\arctan(n\pi)\approx(n+\frac12)\pi-\frac1{n\pi}$. You might want to use a value close to $-f'(x_n)^{-1}$ for $m$, with the original $f$. At a first glance, this gives $m=-n^2\pi^2$. This large value suggests that the interval of convergence is extremely small. – Lutz Lehmann Mar 27 '19 at 20:36
  • @LutzL Could you explain a bit more about the second formula? Why are its solutions close to the original formula's solutions? – A Slow Learner Mar 27 '19 at 20:43
  • Because the formula $x_{k+1}=g(x_k)=n\pi+\arctan(x_k)$ is a contracting fixed point iteration. Start with $x_0=0$ then $x_1=n\pi$, $x_2=n\pi+\arctan(n\pi)=n\pi+\frac\pi2-\arctan(\frac1{n\pi})\approx (n+\frac12)\pi-\frac1{n\pi}$. – Lutz Lehmann Mar 27 '19 at 21:01
  • As LutzL commented, work with $f(x)=\sin(x)-x\cos(x)$ since the solutions are closer and closer to the asymptotes. Have a look at http://mathworld.wolfram.com/TancFunction.html – Claude Leibovici Mar 28 '19 at 05:53
  • @LutzL Could you explain to me how you came up with the alternative functions? There is no way I could think of them by myself. – A Slow Learner Mar 29 '19 at 02:27
  • It is bad to have roots and poles close together, so multiply with the (common) denominator. // The tangent function is extremely expanding, it maps some bounded intervals to the whole of $\Bbb R$. Thus the inverse function in all of its branches is likewise extremely contracting and gives a good fixed-point iteration. – Lutz Lehmann Mar 29 '19 at 06:51
  • @LutzL I will edit my question and could you provide an answer then? I'd like to have more explanation about how you choose the value for $m \approx f'(x_n)^{-1}$. – A Slow Learner Mar 29 '19 at 09:46
  • That is just following the simplified Newton method, in $x_{n+1}=x_n-Af(x_n)$ you take $A$ so that $A^{-1}$ is close to $f'$ in the region of the root you are looking for. However the region where $|I-Af'(x)|<1$, where the fixed-point iteration works, might be rather small. – Lutz Lehmann Mar 29 '19 at 10:07

0 Answers0