<s>[INST] Prove, that $\sin x- a^3\cos x\leq \frac 1 3 \sqrt{1+a^6}$ Let a and $x$ be natural numbers with the property that $\sin x\leq a\cos x$.
Prove that $\sin x- a^3  \cos x\leq \frac 1 3 \sqrt{1+a^6}$.
Again, I'm looking for a second solution. I don't know how to use LaTex and my solution is hard to write here. It would be very nice to see a different solution from mine.
 [/INST] Since $\sin(x)-a\cos(x)\le0$,
$$
\sin(x)-a^3\cos(x)\le(a-a^3)\cos(x)\tag{1}
$$
Since $a\in\mathbb{N}$, $a-a^3\le0$. If $\cos(x)\ge0$, then $(1)$ implies that $\sin(x)-a^3\cos(x)\le0$. So assume wlog that $\cos(x)\le0$. Therefore, $\sin(x)\le a\cos(x)\le0$, and thus,
$$
a\le\tan(x)\tag{2}
$$
Since $x$ is in the third quadrant, $(2)$ implies that
$$
\sin(x)-a^3\cos(x)\le\frac{a^3-a}{\sqrt{1+a^2}}\tag{3}
$$
Maximizing
$$
f(a)=\dfrac{a^3-a}{\sqrt{1+a^2}}\dfrac1{\sqrt{1+a^6}}\tag{4}
$$
with
$$
f'(a)=-\dfrac{a^4+1}{\sqrt{(a^6+1)^3(a^2+1)}}(a^4-4a^2+1)\tag{5}
$$
gives $f'(a)=0$ at $a=\sqrt{2+\sqrt3}\implies f(a)\le\frac13$.
Therefore, putting $(3)$ and $(4)$ together yields
$$
\sin(x)-a^3\cos(x)\le\frac13\sqrt{1+a^6}\tag{6}
$$
However, since $a\in\mathbb{N}$ and $f(2)=\dfrac{6}{5\sqrt{13}}$, we can improve the $\dfrac13$ to $\dfrac{6}{5\sqrt{13}}$. That is, with the restriction that $a\in\mathbb{N}$, we have a slightly stronger inequality:
$$
\sin(x)-a^3\cos(x)\le\frac{6}{5\sqrt{13}}\sqrt{1+a^6}\tag{7}
$$

For $x\le1000000$, the closest we get to equality in $(7)$ is $x=11270$ and $a=2$. For those values,
$$
\sin(x)-a\cos(x)=-0.00000638535498889561
$$
and
$$
\frac{\sin(x)-a^3\cos(x)}{\sqrt{1+a^6}}=0.33281742491402203493
$$
where
$$
\frac{6}{5\sqrt{13}}=0.33282011773513747321
$$
</s>