How can we prove $\int_1^\pi x \cos(\frac1{x}) dx<4$ by hand?

Hint:

$$\begin{align} ∫_1^π x \cos \left(\frac1{x}\right)dx&=∫_{1}^{1/π}\frac{\cos {u}}{u}\left(-\frac{du}{u^2}\right)\\ &=∫_{1/π}^{1}\frac{\cos {u}}{u^3}du\\ &\leq∫_{1/π}^{1}\frac{1-\frac12u^2+\frac{1}{24}u^4}{u^3}du \end{align}$$


First of all,

$$∫_{x=1}^π x\cos \frac{1}{x}dx=∫_{t=1}^\frac{1}{π} \frac{1}{t}*\cos \left(t\right)*\frac{-1}{t^2}dt$$

Next we have $$\cos \left(t\right) < 1 - \frac{t^2}{2}+\frac{t^4}{24}$$

Hence the given integral is smaller than

$$∫_{t=1}^\frac{1}{π} \frac{-1}{t^3}\left(1-\frac{t^2}{2}+\frac{t^4}{24}\right)dt=3.8811597.. $$


The integral of x dx is only a little bit greater than 4. For x < pi, cos (1/x) is not just ≤ 1. It's ≤ cos (1/pi). For x ≤ 2, it's ≤ cos (1/2).