Roots of nonlinear equation 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?
 A: 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.
A: 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.
A: 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.
