<s>[INST] A trigonometric function comparing with $0$ Short Version
We need to solve this problem:

Prove that function $$f(x) = 2\sin\left(\frac{\pi}{x+\frac{1}{x}+1}\right)-\sin\left(\frac{\pi}{x^{2}+x+1}\right)-\sin\left(\frac{\pi}{\frac{1}{x^{2}}+\frac{1}{x}+1}\right)$$ is always larger than to $0$ on $(0,1)$, and is always smaller than $0$ on $(-1,0)$.

Long Version
Me and my friends are working on an extended problem from another forum:

Prove that function $$f(x) = 2\sin\left(\frac{\pi}{x+\frac{1}{x}+1}\right)-\sin\left(\frac{\pi}{x^{2}+x+1}\right)-\sin\left(\frac{\pi}{\frac{1}{x^{2}}+\frac{1}{x}+1}\right)$$ is always larger than or equal to $0$ on $(0,+\infty)$, and is always smaller than or equal to $0$ on $(-\infty,0)$.

Despite our best effort, we failed to solve it. Our initial opinion is that to show that $f'(x)$ is always smaller than or larger than $0$ before or after a constant since we are able to show that $$\lim_{x\to\pm\infty} = 0$$ However we failed.
Every approch or guidance to the problem, if mentioned, will be appreciated. Thanks in advance.

UPD: Calculating $f'(x)$ and determining whether it is positive / negetive throughout is not necessary!
OK, after long thoughts I decided to post an answer to the problem.
Actually, $f(x) = f\left(\frac{1}{x}\right)$ is a very helpful tool.
Via calculating $f'(x)$ we can discover that $f(x)$ is always positive on $(0, 1)$ and always negative on $(-1, 0)$.
Hence, let $g:(0,1)\to(1,+\infty)$ become $g(x)=\frac 1 x$, we know that if $f(x)>0$, then $f(g(x))>0$, and hence the question is proved.
Similarly, the other part can be proved.
Some questioned the inequality, well, you can check the link: https://www.desmos.com/calculator/clfhhlq5zi

Some asked for the proof of "$f(x)$ is always positive on $(0, 1)$"
Firstly, given $$
f'(x)=\frac{\pi  (2 x+1) \cos \left(\frac{\pi }{x^2+x+1}\right)}{\left(x^2+x+1\right)^2}-\frac{2 \pi  \left(1-\frac{1}{x^2}\right) \cos \left(\frac{\pi }{x+\frac{1}{x}+1}\right)}{\left(x+\frac{1}{x}+1\right)^2}+\frac{\pi  \left(-\frac{2}{x^3}-\frac{1}{x^2}\right) \cos \left(\frac{\pi }{\frac{1}{x^2}+\frac{1}{x}+1}\right)}{\left(\frac{1}{x^2}+\frac{1}{x}+1\right)^2}
$$
Concluding from demos graph, $f'(x)$ is negative from a constant, $x_0$, and returns to $0$ at $1$. This conclusion can also be proven by pluging in $f'(x)$.
Hence, $f(1)$ is a minimum point, since $f'(1) = 0$. However, $f(1)>0$ and, also, $f(x_0)>0$, we can now conclude that $\forall x\in(0,1)$, $f(x)>0$.
This, well, is not a rigorous proof, but it seems convincing to me and I hope someone can help me finish this.
Therefore, the problem is not ended since we had a little problem when it comes to $(0,1)$.
 [/INST] Edit: A slightly different approach is described as follows:
Denote $A = \frac{\pi}{x+\frac{1}{x}+1}$, $B = \frac{\pi}{x^{2}+x+1}$ and $C = \frac{\pi}{\frac{1}{x^{2}}+\frac{1}{x}+1}$.
Clearly, $A + B + C = \pi$.
We have
\begin{align}
f(x) &= 2\sin A - \sin B - \sin C\\
&= 2\sin (B + C) - 2 \sin\frac{B+C}{2} \cdot \cos \frac{B-C}{2}\\
&= 2\sin \frac{B+C}{2} \cdot \left(2\cos \frac{B+C}{2} - \cos \frac{B-C}{2}\right).
\end{align}
Thus, if suffices to prove that
$$2\cos \frac{B+C}{2} - \cos \frac{B-C}{2} \ge 0.$$
Similarly, we may use bounds. Omitted.
Proof of $f(x) \ge 0$ on $(0, \infty)$:
Since $f(x) = f(1/x)$ for all $x > 0$, we only need to prove the case $x \ge 1$.
First we give the following auxiliary results (Facts 1 through 5). The proofs are easy and thus omitted.
Fact 1: $\sin u \le u$ for all $u \ge 0$.
Fact 2: $\sin u \ge \frac{2}{\pi}u$ for all $u \in [0, \pi/2]$.
Fact 3: $\sin u \ge \frac{\sqrt{3}}{2} + \frac{1}{2}(u - \pi/3) - \frac{\sqrt{3}}{4}(u - \pi/3)^2$ on $[0, \pi/3]$.
Fact 4: $\sin u \le \frac{\sqrt{3}}{2} + \frac{1}{2}(u - \pi/3) - \frac{\sqrt{3}}{6}(u - \pi/3)^2$ on $[0, \pi/3]$.
Fact 5: $\sin u \le \frac{\sqrt{3}}{2} + \frac{1}{2}(u - \pi/3) - \frac{\sqrt{3}}{4}(u - \pi/3)^2$ on $[\pi/3, \pi]$.
Now, we split into two cases:

*

*$x \ge 8$
It suffice to prove that
$$2\sin\left(\frac{\pi}{x+\frac{1}{x}+1}\right)-\sin\left(\frac{\pi}{x^{2}+x+1}\right)-\sin\left(
\pi - \frac{\pi}{\frac{1}{x^{2}}+\frac{1}{x}+1}\right) \ge 0.$$
By Facts 1-2, it suffices to prove that
$$2\cdot \frac{2}{\pi} \cdot \frac{\pi}{x+\frac{1}{x}+1} - \frac{\pi}{x^{2}+x+1} - \left(\pi - \frac{\pi}{\frac{1}{x^{2}}+\frac{1}{x}+1}\right) \ge 0$$
that is
$$\frac{(4 - \pi)x - 2\pi}{x^2+x+1} \ge 0$$
which is true.


*$1\le x < 8$
Denote $A = \frac{\pi}{x+\frac{1}{x}+1}$, $B = \frac{\pi}{x^{2}+x+1}$ and $C = \frac{\pi}{\frac{1}{x^{2}}+\frac{1}{x}+1}$.
Note that $A \in [0, \pi/3]$, $B \in [0, \pi/3]$ and $C \in [\pi/3, \pi)$.
By Facts 3-5, it suffices to prove that
\begin{align}
&2\cdot \left(\frac{\sqrt{3}}{2} + \frac{1}{2}(A - \pi/3) - \frac{\sqrt{3}}{4}(A - \pi/3)^2\right)\\
&\quad - \left(\frac{\sqrt{3}}{2} + \frac{1}{2}(B - \pi/3) - \frac{\sqrt{3}}{6}(B - \pi/3)^2\right)\\
&\quad - \left(\frac{\sqrt{3}}{2} + \frac{1}{2}(C - \pi/3) - \frac{\sqrt{3}}{4}(C - \pi/3)^2\right) \ge 0
\end{align}
that is
$$\frac{\pi (x-1)^2\Big[(8\pi \sqrt{3} - 54)x^2 + (32\pi \sqrt{3} - 54)x + 5\pi \sqrt{3} - 54\Big]}{108(x^2+x+1)^2} \ge 0$$
which is true.
We are done.
</s>