3

I've got this for a while and, as far as I know, this is a novel approximation of $\tan(x)$:

$$f(x) = \frac{x(\pi^2-4x^2(1-\frac{8}{\pi^2}))}{\pi^2-4x^2} \approx \tan(x)~\quad\text{with}\quad{-\frac{\pi}{2} \lt x \lt \frac{\pi}{2}}$$

It has a very interesting property, which is the one I'd like to prove, that the limit at $x=\pm\frac{\pi}{2}$, is finite, a rather interesting property for an approximation, at least to my knowledge, as they generally tend to have, at most, a ratio that approaches $1$, and the difference tends to diverge to infinity, like Stirling's. Thus allowing the creation of a simple correction term to minimise the difference even more.


$$\lim_{x\to\frac\pi 2}(\tan(x) - f(x))$$

According to WolframAlpha, this equates to $\frac{5}{\pi}-\frac{\pi}{2}\approx 0.0207531$, which seems about right, but it doesn't show how it got there. I'm just a hobbyist, so my abilities mostly stop at L'Hôpital's...

2 Answers2

4

If you use Taylor series around $x=\frac \pi 2$, you have $$\tan(x)-f(x)=\frac{10-\pi ^2}{2 \pi }+\frac{21-2 \pi ^2}{3 \pi ^2}\left(x-\frac \pi 2\right)+O\left(\left(x-\frac{\pi }{2}\right)^2\right)$$ Then the result.

By the way, you can have a slightly better approximation if you consider $$\Delta=\tan(x)-\frac{x \left(a+b\, x^2\right)}{\pi ^2-4 x^2}$$ and expand it as a Taylor series around $x=\frac \pi 2$. Then

$$\Delta=\frac{4 a+\pi ^2 b-32}{32 \left(x-\frac{\pi }{2}\right)}+\frac{4 a+5 \pi ^2 b}{32 \pi }+\left(x-\frac{\pi }{2}\right) \left(\frac{7 \pi ^2 b-4 a}{32 \pi ^2}+\frac{1}{3}\right)+O\left(\left(x-\frac{\pi }{2}\right)^2\right)$$

Cancel the first and second coefficient to get $a=10$ and $b=-\frac{8}{\pi ^2}$ that is to say $$\Delta=\frac{\pi ^2-9}{3 \pi ^2}\left(x-\frac{\pi }{2}\right)+O\left(\left(x-\frac{\pi }{2}\right)^2\right)$$

Edit

If you want to use L'Hospital rule, write $$\Delta=f(x)-\tan(x)=f(x)-\frac {\sin(x)}{\cos(x)}=\frac {f(x)\cos(x)-\sin(x)}{\cos(x)}$$

After simplifications $$\Delta=\frac{x \left(-4 \pi ^2 x^2+32 x^2+\pi ^4\right) \cos (x)-\pi ^2 \left(\pi ^2-4 x^2\right) \sin (x) } {\pi ^2 \left(\pi ^2-4 x^2\right) \cos(x) }$$

Use L'Hospital twice and make $x=\frac \pi 2$ for the result.

1

Following Martin R's suggestion, you have: $$\tan x-f(x)=\tan x +\frac 1{x-\pi/2} +\frac 1{x+\pi/2} - \left(1-\frac{8}{\pi^2}\right)x=\tan x+\frac1{x-\pi/2}+g(x) $$ Note that when $x\to \pi/2^+$, $g(x)$ is continuous and the problematic term is $\tan x +\frac1{x-\pi/2}$. To solve the limit, you can perform the substitution $x-\pi/2=u$: $$\lim_{x\to \pi/2^+} \left(\tan x+\frac1{x-\pi/2}\right)=\lim_{u\to 0} \left(\frac1u-\cot u\right)=\lim_{u\to 0}\frac{\sin u-u\cos u}{u\sin u}=0 $$ To conclude, $$\tan(x)-f(x)\to g(\pi/2)=\frac1{\pi} -\left(1-\frac8{\pi^2}\right)\frac{\pi}2=\frac5{\pi}-\frac{\pi}2 $$