1

Can anybody help me finding a good way to (approximately) figure out the first, lets say $200$, positive roots of $$\tan(x) + 2 \ell x - \ell ^2 x^2 \tan(x) = 0,$$ where $\ell$ is just a constant?

I believe there will be no analytic expression, so is there a better idea than just running Newtons method for each of these $200$ roots?

3 Answers3

2

Since the function for which you are trying to find roots has many poles, I have serious doubts about how well Newton's method will succeed on its own. I would recommend something like a bisection method until you get $|f(x)|<10^{-3}$ and then one or two Newton iterations (if you need better precision than this) with the given $x$ as a starting point. You can then take your next interval for the bisection method (using the approximate root $x^{*}$ just found) to be something like $[x^{*}+a(x^{*}),x^{*}+b(x^{*})],$ where $a(\cdot)$ and $b(\cdot)$ are some positive, increasing functions (since the roots are gradually getting farther apart from one another), and the goal would be to ensure that $f(x^{*}+a(x^{*}))>0$ and $f(x^{*}+b(x^{*}))<0$ or vice versa. It appears that depending on $\ell,$ the first couple of roots might have some different behavior (compare $\ell=1/4$ with $\ell=1$ or $\ell=2,$ for example), but after these first few, it seems that all of the roots have $f(x)>0$ for $x$ immediately to the left of the root and $f(x)<0$ for $x$ immediately to the right of the root.

  • Thank you, sounds plausible, I will try this. According to $\ell$: Yes, the behavior changes after the first few roots. I think, that the "last ones" are not too challenging, because they coincide almost with the roots of $\sin(x)$. Starting from them $2$ or $3$ newton steps should leave quite good results. And for the first one the only observation I've made so far, which might be useful for the bisection method, is, that any root of my objective lies between two consecutive roots of the $\sin(x)$. Maybe this helps and turns out to be useful... I'll (have to) figure out ;) Thanks :) – Konstantin Jan 11 '18 at 17:49
  • Sure, and upon some further consideration, we know that the poles of $f$ occur exactly at the roots of $\cos(x),$ which are at $\pi/2+\pi k,$ $k\in\mathbb{Z},$ so it seems that intervals $[5\pi/8+\pi k,3\pi/8+\pi(k+1)]$ might be good intervals for initializing the bisection method. – RideTheWavelet Jan 11 '18 at 18:27
0

Set $x = 2u$; then it comes down to solving $2\ell u = -\tan u$ or $\cot u$. The graphs for $-\tan u$ and $\cot u$ are parallel curves at intervals of $\pi/2$ in $u$. This may or may not help.

  • I somehow don't see the point. Why should it boil down to solving $2\ell u = -\tan(u)$ or $\cot(u)$? Might you be a bit more precise? – Konstantin Jan 10 '18 at 18:30
0

You can simplify the equation somewhat by treating the equation as a quadratic equation and "solving" for x in terms of trig functions. Then if you can generate a list of good initial guesses, for example for large values of x the zeros should approximately satisfy lx*tanx=2, you can possibly use this form to iterate on x until you converge on a solution. I'm not sure if it will or not.

Andrew
  • 349