Show that $\int_a^b \sin\left(x+\frac{1}{x}\right) dx <3.$ Show that $$\int_a^b \sin\left(x+\frac{1}{x}\right) dx <3$$ for all $a,b \in \mathbb{R}.$
Here is my solution:
\begin{align*}
\int_a^b \sin\left(x+\frac{1}{x}\right) dx&=\int_a^b \left(\sin x\cos \frac{1}{x}+\cos x\sin \frac{1}{x}\right) dx\\
&\le \int_a^b( \sin x+\cos x )dx\\
&=\sqrt{2}\int_a^b \sin \left(x+\frac{\pi}{4}\right)d\left(x+\frac{\pi}{4}\right)\\
&\le2\sqrt{2}<3.
\end{align*}
But this seems to be incorrect, since we can not guarantee $\sin x,\cos x\ge 0$ in the first line.
 A: Claim. For any interval $I\subset\Bbb R$ we have $\int_I\sin(x+1/x)\,dx<3$.
Proof: Since $F(x)=\sin(x+1/x)$ is odd, the statement becomes $\int_a^bF(x)\,dx<3$ where $a,b>0$. By fixing $a$, we see by differentiation that the integral is optimised when $F(b)=0$. Similarly, we have $F(a)=0$, so $a,b$ are of the form $f_\pm(k)=(k\pi\pm\sqrt{(k\pi)^2-4})/2$ for $k\in\Bbb Z$.
When $a,b\in(0,f_-(1)]$, the sign of the integral alternates between consecutive roots, and the difference between these roots decreases as $k$ increases. Hence\begin{align}\int_{a=f_-(k)}^{b=f_-(\ell)_{\ell<k}}F(x)\,dx&<\sum_{n=2}^\infty(f_-(2n)-f_-(2n+1))\\&=\sum_{n=2}^\infty\frac{-\pi+\sqrt{(2n+1)^2\pi^2-4}-\sqrt{(2n)^2\pi^2-4}}2\\&<\sum_{n=2}^\infty\frac1{n^2}=\zeta(2)-1.\end{align} When $a,b\in[f_-(1),f_+(1)]$, we have $F(x)\le F(1)=\sin2$ so $$\int_{a=f_-(1)}^{b=f_+(1)}F(x)\,dx<(f_+(1)-f_-(1))\sin2=\sqrt{\pi^2-4}\sin2.$$ When $a,b\in[f_+(k),f_+(m)_{m>k}]$, letting $t=x+1/x$ yields $$\int_{a=f_+(k)}^{b=f_+(k+1)}F(x)\,dx=\int_{k\pi}^{(k+1)\pi}p(t)\sin t\,dt$$ where $p(t)=1/(1-f_+(t/\pi)^{-2})$. Since $p(t)$ is strictly decreasing, we have $$\left|\int_{k\pi}^{(k+1)\pi}p(t)\sin t\,dt\right|<\left|\int_{(k-1)\pi}^{k\pi}p(t)\sin t\,dt\right|$$ for all $k$, with limit $\left|\int_{k\pi}^{(k+1)\pi}\sin t\,dt\right|=2$ as $\lim\limits_{t\to\infty}p(t)=1$. Thus $\int_IF(x)\,dx$ is bounded above by any consecutive combination of terms in the sequence $$\{\zeta(2)-1,\sqrt{\pi^2-4}\sin2,-2p(2\pi),2p(2\pi),-2p(4\pi),2p(4\pi),\cdots\},$$ so $$\int_I\sin\left(x+\frac1x\right)\,dx<\max\left\{\zeta(2)-1+\sqrt{\pi^2-4}\sin2,2p(2\pi)\right\}<3.\tag*{$\square$}$$
A: Partial answer :
We use the triangle inequality so we want to show :
$$f(a,b)=\left|\int_{b}^{a}\cos\left(x\right)\sin\left(\frac{1}{\left(x\right)}\right)dx\right|+\left|\int_{b}^{a}\sin\left(x\right)\cos\left(\frac{1}{\left(x\right)}\right)dx\right|<3$$
With the inequality due to Ostrowski (see my last comment) we have $a,b\geq 4$:
$$f(a,b)\leq 2\left(\left|\cos\left(\frac{1}{\left(a+\frac{\pi}{2}\right)}\right)-\cos\left(\frac{1}{\left(b+\frac{\pi}{2}\right)}\right)\right|+\left|\cos\left(\frac{1}{\left(b+\frac{\pi}{2}\right)}\right)\right|\right)+2\left(\left|\sin\left(\frac{1}{\left(a\right)}\right)-\sin\left(\frac{1}{\left(b\right)}\right)\right|+\left|\sin\left(\frac{1}{\left(b\right)}\right)\right|\right)$$
The rest is smooth !
