Prove inequality $\tan \left( \frac\pi2 \frac{(1+x)^2}{3+x^2}\right) \tan \left( \frac\pi2 \frac{(1-x)^2}{3+x^2}\right)\le\frac13 $ How to determine the range of the function
$$f(x)=\tan \left( \frac\pi2 \frac{(1+x)^2}{3+x^2}\right)
\tan \left( \frac\pi2 \frac{(1-x)^2}{3+x^2}\right)
$$
It it is straightforward to verify that $f(x)$ is even and
$$f(0)= \frac13, \>\>\>\>\> \lim_{x\to\pm \infty} f(x) \to -\infty$$
which implies $f(x) \in (-\infty,\frac13]$, i.e.
$$\tan \left( \frac\pi2 \frac{(1+x)^2}{3+x^2}\right)
\tan \left( \frac\pi2 \frac{(1-x)^2}{3+x^2}\right)\le \frac13
$$
and is visually confirmed below

However, it is not obvious algebraically that $f(x)$ monotonically decreases away from $x=0$. The standard derivative tests are not viable due to their rather complicated functional forms.
So, the question is how to prove the inequality  $f(x) \le \frac13$ with rigor.
Note that it is equivalent to proving
$$\cot \left(\frac{\pi(1+x)}{3+x^2}\right)
\cot \left(\frac{\pi(1-x)}{3+x^2}\right)\le \frac13
$$

Note: $f(1) \triangleq
\lim_{x\to 1} \tan ( \frac\pi2 \frac{(1+x)^2}{3+x^2})
\tan ( \frac\pi2 \frac{(1-x)^2}{3+x^2}) = 0$.
Since $f(x)$ is even, we only need to prove the case $x \in [0, \infty)$.
Clearly $f(x) < 0$ for all $x > 1$. Also, $f(1) = 0$.
Thus, we only need to prove the case $0\le x < 1$.
(Inspired by @pisoir's 1st equation) Let $A =  \frac\pi2 \frac{(1+x)^2}{3+x^2}, B = \frac\pi2 \frac{(1-x)^2}{3+x^2}$.
Clearly $A, B \in (0, \frac{\pi}{2})$.
It suffices to prove that $\sin A \sin B \le \frac{1}{3}\cos A \cos B$ or
$$\frac{1}{2}[\cos (A - B) - \cos ( A + B)] \le \frac{1}{3}\cdot \frac{1}{2}[\cos (A - B) + \cos (A + B)]$$
or
$$\cos \frac{2\pi x}{x^2 + 3} \le 2 \cos \frac{\pi (x^2 + 1)}{x^2 + 3}. $$
Let $C = \frac{2\pi x}{x^2 + 3}$ and $D = \frac{\pi (x^2 + 1)}{x^2 + 3}$.
We split into two cases:

*

*$\frac{1}{3} \le x < 1$:

Clearly, $\frac{\pi}{3} \le D \le \frac{\pi}{2}$ and $0 \le \frac{\pi}{2} - C \le 2(\frac{\pi}{2} - D) \le \frac{\pi}{2}$. We have
\begin{align}
\cos C &= \sin (\tfrac{\pi}{2} - C) \\
&\le \sin [2(\tfrac{\pi}{2} - D)]\\
&= 2\sin (\tfrac{\pi}{2} - D) \cos (\tfrac{\pi}{2} - D) \\
&\le 2\sin (\tfrac{\pi}{2} - D) \\
&= 2\cos D.
\end{align}


*$0 \le x < \frac{1}{3}$:

We give the following auxiliary results (Facts 1-2). The proofs are easy and thus omitted.
Fact 1: $\cos u \le 1 - \frac{1}{3}u^2$ for all $u$ in $[0, \pi/4]$.
Fact 2: $\cos v \ge \frac{1}{2} - \frac{5}{9}\sqrt{3}\, (v - \tfrac{\pi}{3})$ for all $v \in [\pi/3, \pi/2]$.
Let us proceed. Clearly $C \in [0, \pi/4]$ and $D \in [\pi/3, \pi/2]$.
By Facts 1-2, it suffices to prove that
$$1 - \frac{1}{3}C^2 \le
2\left[\frac{1}{2} - \frac{5}{9}\sqrt{3}\, \left(D - \frac{\pi}{3}\right)
\right]$$
that is
$$\frac{4\pi x^2 [9\pi - 5\sqrt{3}(x^2 + 3)]}{27(x^2 + 3)^2}\ge 0$$
which is true.
We are done.
