What method can i use to find the first 3 roots of y(t)=tan(t)+t?

237 Views Asked by At

Just by looking at the function: $$y(t) = \tan(t)+t$$ I can immediately see that there is a root at $t=0$, though after graphing it I can see many more roots and I can calculate them using computer aided programs; i.e. the next root is at $t=2.0288$.

What I want to know is: what methods I can use to solve this second, third.... $n$th root with only a scientific calculator.

2

There are 2 best solutions below

2
On BEST ANSWER

Newton's method will usually converge more quickly, but the following is conceptually simpler and converges reasonably quickly, too.

If $\tan(t)+t=0$, then $t=-\tan^{-1}(t)$. However, $\tan^{-1}(t)$ does not give all the angles whose tangent is $t$; we also have $t=k\pi-\tan^{-1}(t)$.

Since $\left|\frac{\mathrm{d}}{\mathrm{d}t}\left(k\pi-\tan^{-1}(t)\right)\right|=\left|-\frac1{1+t^2}\right|\lt1$, for $t\ne0$, iterating $$ t_{n+1}=k\pi-\tan^{-1}(t_n) $$ will converge to a $t$ so that $t=k\pi-\tan^{-1}(t)$. Different values of $k$ will result in different roots.

Ironically, since $\frac1{1+t^2}=1$ at $t=0$, the convergence is horribly slow for $k=0$. However, for all other $k\ne0$, the convergence is fast.

Example: $k=1$

$ 0\\ 3.1415926535897932385\\ 1.8789653979108815550\\ 2.0598769463967624418\\ 2.0227491907172732544\\ 2.0299351569119332764\\ 2.0285278142735938783\\ 2.0288028051139481365\\ 2.0287490485391734838\\ 2.0287595562193554631\\ 2.0287575022708491895\\ 2.0287579037572144421\\ 2.0287578252784178117\\ 2.0287578406187164237\\ $
The error decreases by a factor of about $5$ each time since $\frac1{1+t^2}\approx\frac15$; therefore, we are getting about $0.7$ digits per iteration. for larger $k$, the convergence will be faster.

Example: $k=10$

$ 0\\ 31.415926535897932385\\ 29.876950453740738200\\ 29.878588336796730238\\ 29.878586504059023443\\ 29.878586506109684979\\ 29.878586506107390481\\ 29.878586506107393048\\ 29.878586506107393045\\ 29.878586506107393045\\ $
Since $\frac1{1+t^2}\approx\frac1{900}$, we get almost $3$ digits per iteration.

3
On

As you know, equations which mix polynomials and trigonometric functions do not have explicit solutions and numerical methods should be used for solving them.

As you noticed from the graph, the solutions are closer and closer to the vertical asymptotes and there are an infinite number say $$t_n=(2n-1)\frac{\pi}{2}+\epsilon_n$$ Because of the vertical asymptotes, the function is quite poorly conditions and, personally, I should solve instead $$f(t)=\sin(t)+t\cos(t)=0$$ which looks much better (have a look to the plot).

For the solution, Newton method is simple. Starting from a "reasonable" guess $t_0$, the method will update it according to $$t_{n+1}=t_n-\frac{f(t_n)}{f'(t_n)}$$ which, in your case would write $$t_{n+1}=t_n+\frac{\sin (t_n)+t_n \cos (t_n)}{t_n \sin (t_n)-2 \cos (t_n)}$$

Added after robjohn's answer

If we take into account the first remark, we can see that a good estimate can be generated according to $$t_k^0=\frac{2}{(2k-1) \pi }+\frac{(2k-1) \pi }{2}$$ so, for the first root, the very first estimate is $2.20741609916248$ and, for the tenth root, the very first estimate is $29.8786365129119$.

For the first root,Newton iterates are then $2.03597131803008$, $2.02877485165832$, $2.02875783820645$, $2.02875783811043$ which is the solution for fifteen significant digits.

For the tenth root, Newton iterates are then $29.8785865061909$, $29.8785865061074$ which is the solution for fifteen significant digits.