# About a function approximating the $\arctan(x)$

I found in a paper this function: $$f(x)=\frac{8x}{3+\sqrt{25+\left(\frac{16x}{\pi}\right)^2}}$$ is a good approximation of the $\arctan(x)$. If we consider the difference function: $$d(x)=|\arctan(x)-f(x)|$$ its maximum is about $0.00907$ for $|x|=3.135917295$. Is there a proof about the reason why the $f(x)$ approximates so well the $\arctan(x)$? Is it possible to find function similar to f(x) which are good approximations of other trigonometric functions like $sin(x),cos(x)$, ecc.? Thanks.

• I am throwing out some thought here, but perhaps one can look into their taylor exapnsions? The taylor expansion of the arctan is well known, for the formula above you need the binomial expansion. Compare the coefficients. Perhaps it leads to something... Commented Sep 11, 2013 at 16:00
• @imranfat: I suppose it's obtained using some deeper consideration, but I don't know how. Commented Sep 11, 2013 at 16:03
• Take a look at the Pade approximation. If $f \in C^n(a,b)$ then the difference between Pade approximant of $f$ having its degree $n$ and $f$ has order $e^{-const n}$. Commented Sep 11, 2013 at 16:09
• I certainly wouldn't know at this point, but I am writing down your formula. Maybe I can do something with it for my students. Commented Sep 11, 2013 at 16:49
• What was the paper discussing where you saw it? Maybe there's something in the references which help. Commented Sep 11, 2013 at 17:01

If you are interested in the best approximation of $\arctan(x)$ by the function of the form $$\frac {ax} {b+\sqrt{c+dx^2}},$$ then the Maple global optimizer DirectSearch does the job in such way: the code $$A := proc (alpha, beta, delta, eps) DirectSearch:-GlobalSearch(abs(alpha*x/(beta+sqrt(delta+eps*x^2))-arctan(x)), {x = -infinity .. infinity}, solutions = 1) end proc:$$ $$DirectSearch:-Search(proc (a, b, c, d) -> A(a, b, c, d)[1, 1] , {abs(a) <= 20, abs(b) <= 20, abs(c) <= 20, abs(d) <= 20});$$ produces $$[ 0.0, \left[ \begin {array}{c} 1.76051623816363034 \\ - 0.155583793604506360\\ 1.72404758813357750\\ 1.36875140919455384 \end {array} \right] ,87]$$

• Are the numbers the coefficients $a$, $b$, $c$, $d$ ? Commented Sep 12, 2013 at 7:44
• Yes, of course. Commented Sep 15, 2013 at 13:14

A much better approximation than the one in the question can be obtained by defining $$f(x)=\frac{ax}{b+\sqrt{c+x^2}}$$ and simply matching the values $f'(0)=1$, $f(1)=\pi/4$, and $f(\infty)=\pi/2$. This gives the solution $$a=\frac\pi2, \qquad b=\frac{12-\pi^2}{4(4-\pi)}\approx 0.620, \qquad c=\frac{(6-\pi)^2(2-\pi)^2}{16(4-\pi)^2}\approx 0.903,$$ for which $\max|f(x)-\arctan x|$ is less than $0.00209$.

P.S. I don't understand why $b$ is negative in @user64494's answer.

• $1 - {1 \over 4 - \pi} \approx -0.16494809158$
• @jkabrg: Good catch. That was a typo, it should have been $1-\frac1{4-\pi}+\frac\pi4$.