# How to derive the approximation $\tan(x)\simeq \frac{x}{1-x^2/3}$

I was wondering how one could derive the

$$\tan(x)\simeq \frac{x}{1-x^2/3}$$

valid for small $x$ values.

This is similar to the ratio of the small $x$ expansions of $\sin(x)$ an $\cos(x)$, however that would yield

$$\tan(x)\simeq \frac{x}{1-x^2/2}$$

so I have been left slightly confused. Many thanks in advance.

EDIT: In my notes this seems to be some sort of recursive fraction approximation. A second version I have written is:

$$\tan(x)\simeq %%% \frac{\lambda} {1-\frac{\lambda^2}{3-\frac{\lambda^2}{5-\lambda^2/2}}}$$

EDIT: Thanks for your great answers! You can also find this derived in the references to Equation 33 here: http://mathworld.wolfram.com/Tangent.html

Wall, H. S. (1948). Analytic theory of continued fractions. pg. 349

C.D., O. (1963). Continued fractions. pg. 138

• If you use the Taylor expansion of sin(x) and cos(x) I believe you would get the one you suggested too. May 23 '18 at 12:28
• @HenryLee: Yes, it's quite frustrating to see where this other one came from. May 23 '18 at 12:31
• Somehow, $3$ gives a smaller error, even though the Taylor expansions would suggest $2$. i.imgur.com/tczqY6G.png
– Jam
May 23 '18 at 12:31
• Yes, I think that's why I used it. I'm digging through thesis notes currently trying to write up. Past me apparently didn't think it was useful to write where this came from. May 23 '18 at 12:33
• what is this for? May 23 '18 at 12:34

This relation con be derived using a Pade approximant. Define a function

$$R(x) = \frac{a_0 + a_1 x + \cdots + a_m x^m}{1 + b_1 x + \cdots + b_n x^n}$$

That agrees with $f$ up to some order

$$\left.\frac{{\rm d}^kf}{{\rm d}x^k}\right|_{x=0} = \left.\frac{{\rm d}^kR}{{\rm d}x^k}\right|_{x=0} ~~~\mbox{for}~~ k = 0, 1, \cdots$$

So in your example, take $m=1$ and $n=2$ and $f(x) = \tan(x)$, this would lead to the equations

\begin{eqnarray} a_0 &=&0 \\ a_1 - a_0 b_1 &=& 1 \\ -2a_1 b_1 + a_0(2b_1^2 - 2b_2) &=&0 \\ 3a_1(2 b_1^2 - 2b_2) + a_0(-6b_1^3 + 12 b_1 b_2) &=& 2 \end{eqnarray}

whose solution is

$$a_0 = 0, a_1 =1, b_1 = 0~~\mbox{and}~~ b_2=-1/3$$

That is

$$\tan(x) \approx \frac{x}{1 - x^2/3}$$

which aggress up to the fourth derivative!

• Ah awesome! That's really helpful of you, and I learnt something new! Thank you very much for your help. May 23 '18 at 12:43
• @Freeman Happy to help May 23 '18 at 12:45
• Today I learned! :) May 23 '18 at 12:47

Recall that

$$\tan(x)= x+\frac13x^3+o(x^3)$$

and by binomial expansion as $x\to 0$

$$\frac{x}{1-x^2/3}=x(1-x^2/3)^{-1}\sim x+\frac13x^3$$

thus

$$\tan(x)\sim x+\frac13x^3\sim \frac{x}{1-x^2/3}$$

Note that from here

$$\tan(x)=\frac{\sin x}{\cos x}$$

to obtain the same result we need to expand to the 3rd order that is

$$\tan(x)=\frac{\sin x}{\cos x}=\frac{x-\frac16x^3+o(x^3)}{1-\frac12x^2+o(x^3)}=(x-\frac16x^3+o(x^3))(1-\frac12x^2+o(x^3))^{-1}=(x-\frac16x^3+o(x^3))(1+\frac12x^2+o(x^3))=x-\frac16x^3+\frac12x^3+o(x^3)=x+\frac13x^3+o(x^3)$$

• That's pretty neat! Thank you! caverac also posted a nice proof about the same time as you, ideally I would like to accept both answers, but as caverac has less reputation than you I will accept theirs. Thanks so much! May 23 '18 at 12:42
• @Freeman You are welcome! Bye
– user
May 23 '18 at 12:44
• @Freeman I add something for the derivation from $\sin x/\cos x$
– user
May 23 '18 at 12:50

• I don't think this answer quite addresses the question, or where the $1/3$ term comes from.
For an alternative derivation, you may use the Shafer-Fink inequality and compute the inverse function of an algebraic function. This gives $$\tan(x) \approx \frac{3x+2x\sqrt{9-3x^2}}{9-4x^2}\quad\text{for }x\approx0$$ which is even more accurate than $\tan x\approx \frac{x}{1-x^2/3}$. As already shown, the last approximation can be derived from Padé approximants or generalized continued fractions.
• @Jam: This proves a sharper approximation, from which $\tan(x)\approx \frac{x}{1-x^2/3}$ can be easily derived in a algebraic fashion. May 23 '18 at 13:24
• A better approximation could be $\tan(x)=\frac{ x-\frac{x^3}{15}}{1-\frac{2 x^2}{5} }$ May 24 '18 at 8:36