Application of the mean value theorem for Integrals Suppose that $f(x)$ is a differentiable function in $[a,b]$, $f^{'}(x)$ is a monotone decreasing function in $(a,b)$, and $f^{'}(b)>0$. So how to prove that


$$
\big \vert \int_a^b \cos f(x)dx \big\vert \leq\frac{2}{f^{'}(b)}
$$


__ 
My main solution is as follow:
$$
\big \vert \int_a^b \cos f(x)\big) dx \big\vert=\big \vert \int_a^b \frac{\cos f(x)}{f^{'}(x)} d\big(f(x)\big)\big\vert\leq\frac{1}{f^{'}(b)}\big \vert \int_a^b \cos f(x)d\big(f(x)\big)\big\vert\leq\frac{2}{f^{'}(b)}
$$
However, someone pointed out that there are some mistakes. Really? Can you help me find the error(s), or just provide me with a right answer.
 A: This answer aims to show where your mistake is.
Consider $f(x)=\frac{\pi }{3}x(4-x), a=0,b=1.$ It is $f'(x)=\frac{\pi}{3}(4-2x)$ and $f''(x)=-\frac{2\pi}{3}.$ Since $f''(x)<0$ we have that $f'(x)$ is decreasing and  $f'(x)=\frac{\pi}{3}(4-2x)0$ on $[0,1].$ Moreover, $f(0)=0$ and $f(1)=\pi.$ Thus,
$$\int_0^1 \cos (f(x))f'(x)dx=\left. \sin f(x)\right|_0^1=\sin\pi-\sin 0=0.$$ 
However,
$$I=\int_0^1 \cos(f(x)) dx\ne 0.$$
(See http://www.wolframalpha.com/input/?i=integrate+cos+%28pi%2F3++x+%284-x%29%29+dx+from+x%3D0+to+1
Thus, the inequality 
$$\left|\int_a^b \frac{\cos f(x)}{f'(x)} f'(x) dx \right| \le \frac{1}{f'(b)}\left| \int_a^b \cos f(x) f'(x)dx\right|$$ 
$$0<|I|=\left|\int_0^1 \cos(f(x)) dx\right|\le \frac{1}{f'(1)}\left| \int_0^1 \cos f(x) f'(x)dx\right|=0 $$ cannot hold.
Your argument would be correct if you had an inequality as 
$$\int_a^b \left|\frac{\cos f(x)}{f'(x)} f'(x) \right|dx  \le \frac{1}{f'(b)}\int_a^b \left|\cos f(x) f'(x)\right| dx,$$ but this is a completely different question. 
