8

I came across the following approximation for $\arctan(x)$ while working with functional equations:

$\arctan(x) \approx \frac{\pi}{2 (1 + x^k)}$ where $k = -\log_3 4$ and $x>0$

It satisfies the limit conditions, and numerically it stays within about $0.0183$ radians.

The Functional Equation I was working on was:

$f(x)f(\frac{1}x) = f(x) + f(\frac{1}x)$

In above functional equation by hit and trial both $\frac{\pi}{2\arctan(x)}$ and $(1+x^k)$ work. The value of $k$ was found but putting $\frac{\pi}3$ in the equation but there will be a more optimum value of $k$.

My Question:

  • Is there a proof for this close approximation or is it just a coincidence?(I have tried to prove it via its Lagrange and other expansions)
  • Is this approximation a part of a well established infinite series?

Any leads would be helpful... Thanks in advance!

Edit:

On further inspection $k$ when graphed with ln(x) resembles a normal like distribution centered at 1.

$k = -0.27324\left(1+\left(0.3\right)\left(\ln\left(x\right)\right)^{2}\right)^{-\frac{1}{2}}-1$

There will be a more optimum approximation of k...

Integreek
  • 8,530
GammaSum
  • 336
  • 1
    I did not know that approximation, but it is surprisingly accurate. Can you provide a bit more context? Where did you find that formula? How is $k$ determined? – Martin R May 07 '25 at 10:54
  • Perhaps a better question would be: what's $\operatorname{argmin}\alpha\sup{x> 0}\left\lvert\arctan(x)-\frac\pi{2(1+x^\alpha)}\right\rvert$ ? – Sassatelli Giulio May 07 '25 at 10:55
  • @SassatelliGiulio Well, I guess that would be what OP suggested, but how would you come up with the expression in the first place? – Supernerd411 May 07 '25 at 11:08
  • @Supernerd411 My point is that maybe his number is the wrong one. Surely if we solve "my" problem we are not surprised that the approximation is good. That being said, maybe minimizing over this class of functions is a wrong approach in the first place. – Sassatelli Giulio May 07 '25 at 11:21
  • @SassatelliGiulio This might be a stupid question after my first comment, but how would we solve your question? – Supernerd411 May 07 '25 at 12:05
  • @Supernerd411 I don't know. If I knew, I'd have answered. – Sassatelli Giulio May 07 '25 at 12:50
  • If you look for a good and simple approximation, use for example $$\frac{\pi ^2 x}{4+2 \sqrt{\pi ^2 x^2+8}}$$ – Claude Leibovici May 07 '25 at 13:41
  • Thanks for the attention! I came across this formula while working on the functional equation : f(x)*f(1/x) = f(x) + f(1/x). – GammaSum May 07 '25 at 14:06
  • In above functional equation by hit and trial both pi/(2*arctan(x)) and (1+x^k) work. – GammaSum May 07 '25 at 14:14
  • I guess this is totally a coincidence (except smart use of that functional eq), the value $k$ that minimize largest error is definitely not $-\log_{3}4$, but that's close enough, $\epsilon<0.01$ for the best $k$ – Quý Nhân May 07 '25 at 15:12
  • 3
    @ShivangGupta Also please add your work and thoughts in the post, don't left them in comments. – Quý Nhân May 07 '25 at 15:53
  • 3
    For whatever it's worth, answering SassatelliGiulio's question: $\text{argmin}{\alpha}\sup{x>0}\big|\arctan(x)-\frac{\pi}{2(1+x^{\alpha})}\big|=\alpha_0=-1.212688911097...$ ,with $\epsilon=0.0098578...$ . $\alpha_0$ can be defined as a real root of an equation $F(\alpha)=0$ actually (too long for a comment) – Quý Nhân May 07 '25 at 23:10
  • @QuýNhân Thank you for taking the time. – Sassatelli Giulio May 08 '25 at 06:31
  • @ShivangGupta I suspect there is a better answer. You should not accept mine, maybe wait for a bit. – whoisit May 08 '25 at 07:36
  • 1
    fix typo $\epsilon=0.00982578..$ in my previous comment, and for practical, $\alpha_0\approx -\frac{5}{\sqrt{17}}$, then we get: $$\left|\arctan(x)-\frac{\pi/2}{1+x^{-\frac{5}{\sqrt{17}}}}\right|<0.00983$$ – Quý Nhân May 09 '25 at 15:52

1 Answers1

5

We want to know why: $\arctan(x) \approx f(x)$ where $f(x) = \dfrac{\pi}{2 (1 + x^{-k})}$

The function $f(x)$ and the arctan both follow the following three things:

  1. $F(0) = 0$
  2. $F(\infty) = \pi/2 $
  3. $F(x)+F(1/x) = \pi/2$, and thus $F(1) = \pi/4$

Given that the three points are already matching, that they follow a nice inequality, and that they have similar curvatures for the most part; we already have a nice approximation. If we fix another matching point, in addition to the ones already, we expect to get a much better approximation.

Consider $x_0 = \sqrt{3}$, and solve for $f(x_0) = \arctan(x_0)$
(NB: This also gives $f(1/x_0) = \arctan(1/x_0)$)

$\dfrac{\pi}{2 (1 + (\sqrt{3})^{-k})} = \dfrac{\pi}{3} $

This can be simplified to $k = \log_3 4$

I suspect, using other intermediate $x_0$, also returns similar behaviour; but those k values are not this nice.

whoisit
  • 4,028
  • 1
  • 8
  • 29
  • thanks for the answer, but i doubt there would be a better answer considering the fact it is not close to any well known function or group of initial terms of a well known expansion. – GammaSum May 08 '25 at 11:17