3

I solved this equation by Wolfram Alpha. How can I solve it analytically to find all roots $$\tanh(x)-\tan(x)=0$$

  • this equation has $$\infty$$ roots ,do you want to solve it analytical ? or numerical ? – Khosrotash Nov 11 '14 at 18:22
  • In all likelihood it can't be solved analytically. – Antonio Vargas Nov 11 '14 at 18:23
  • I want solve it analytically –  Nov 11 '14 at 18:23
  • Try using Taylor series, even though that's more of a numerical approach. I can't think of a purely analytical way to do it. – daOnlyBG Nov 11 '14 at 18:27
  • 2
    It's possible to obtain good approximations for the large roots, for example the large positive roots are $$x_n = \pi n + \frac{\pi}{4} - e^{-2\pi n - \pi/2} + O(e^{-4\pi n})$$ as $n \to \infty$, and the negative roots can be found by $x_{-n} = -x_n$. – Antonio Vargas Nov 11 '14 at 18:43
  • Oh, I am surprised, you solved it : I solved this equation by Wolfram Alpha. Wouldn't it be more correct to say I got this answer from WA? Did you really solve it? – Karl Nov 11 '14 at 18:45
  • My answer can't be fixed, but the above is equivalent to $z=e^{x+ix}-e^{-x-ix}$ satisfying $\Re(z)=\Im(z)$. – Thomas Andrews Nov 11 '14 at 18:53
  • Perhaps this question might interest you as well. – Lucian Nov 12 '14 at 01:16

2 Answers2

5

There is a root in each interval $((n-1/2) \pi, (n+1/2)\pi)$, because $\tanh(x)$ is bounded there while $\tan(x)$ goes from $-\infty$ to $+\infty$. If we take $x = n \pi + t$ and $z = \exp(-2 \pi n)$, then $$\tan(t) = \tan(x) = \tanh(n \pi + t) = \dfrac{1 - e^{-2\pi n - 2 t} }{1 + e^{-2 \pi n - 2 t}} = \dfrac{1 - z e^{-2t}}{1 + z e^{-2t}}$$ There is a series solution $$ t = \dfrac{\pi}{4} - e^{-\pi/2} z - 2 e^{-\pi} z^2 - \dfrac{17}{3} e^{-3 \pi/2} z^3 - \dfrac{56}{3} e^{-2\pi} z^4 + \ldots $$ That's the closest you'll come to an "analytical" solution, I think.

Robert Israel
  • 448,999
2

The $n$-th positive roots of $\tan(x)=\tanh(x)$ will be noted $r_n$ with $n>0$.

Since the functions are odd the negative roots are $r_{-n}=-r_n$. Obviously $r_0=0$

For $n$ large, $\tanh(r_n)$ is close to $1$. So, $\tan(r_n)$ is close to 1. As a consequence $r_n$ is close to $\pi n+\frac{\pi}{4}$.

Let $x=\pi n+\frac{\pi}{4}+\epsilon$.

The series expansion of $$f(\epsilon)=\tan\big(\pi n+\frac{\pi}{4}+\epsilon\big)-\tanh\big(\pi n+\frac{\pi}{4}+\epsilon\big)$$ leads to a first approximate of $\epsilon$ so that $f(\epsilon)\sim 0$. This is a boring task. The result is : $$r_n\simeq\pi n+\frac{\pi}{4}-\frac{1+e^{\frac{\pi}{2}(4n+1)}}{1+e^{\pi(4n+1)}}$$ It should be an harder and even more boring task to compute the next term of the series, now starting from $x=\pi n+\frac{\pi}{4}-\frac{1+e^{\frac{\pi}{2}(4n+1)}}{1+e^{\pi(4n+1)}}+\epsilon$

Nevertheless, the first approximate $R_n$ of the $n$-th root is already very accurate : $$r_n\simeq R_n=\pi n+\frac{\pi}{4}-\frac{1+e^{\frac{\pi}{2}(4n+1)}}{1+e^{\pi(4n+1)}}$$ $\tan(R_1)-\tanh(R_1)=3.02\space 10^{-7}$ with $R_1=3.92660246314$

$\tan(R_2)-\tanh(R_2)=1.05\space 10^{-12}$ with $R_2=7.068582745629$

$\tan(R_3)-\tanh(R_3)=1.78\space 10^{-15}$ with $R_3=10.210176122813$

JJacquelin
  • 66,221
  • 3
  • 37
  • 87
  • Note that the approximate given by Antonio Vargas is consistent with my above result (which are more accurate for small $n$). $$\frac{1+e^{\frac{\pi}{2}(4n+1)}}{1+e^{\pi(4n+1)}}=e^{-2\pi n-\frac{\pi}{2}}+O(e^{-4\pi n})$$ – JJacquelin Nov 12 '14 at 10:28