Prove using calculus or otherwise the following inequality Prove that$$ \frac {2}{\pi -2}\ \le\ \frac {\sin x-x\cos x}{x-\sin x}\ <\ 2$$where $$x\in\left(0,\frac{\pi}{2}\right]$$
My Attempt:$$ f'(x)=\frac{ x\sin x(x-\sin x)-(1-\cos x)(\sin x-x\cos x)}{(x-\sin x)^2}=\frac{ x^2\sin x-(1-\cos x)x-\sin x(1-\cos x)}{(x-\sin x)^2}$$
After this not able to get breakthrough.
 A: Let
$$f(x) = \frac{\sin x - x \cos x}{x - \sin x}$$
Now, notice that:
$$f\Big(\frac{\pi}{2}\Big) = \frac{2}{2-\pi}$$
And when we try to calculate $f(0)$, we run into trouble (can you see why?)
Let's then evaluate:
$$\lim_{x \rightarrow 0} f(x) = \lim_{x \rightarrow 0} \frac{\sin x - x \cos x}{x - \sin x}$$
Applying L'Hopital's rule three times gives us:
$$\lim_{x \rightarrow 0} f(x) = \lim_{x \rightarrow 0} \frac{2\cos x - x \sin x}{\cos x} = 2$$
Hence, we can assume that $f(x)$ "starts" at $2$ and "ends" at $\frac{2}{2-\pi}$. Let's now have a look to $f'(x)$, which you seem to have evaluated correctly:
$$f'(x) = \frac{x^2\sin x−(1−\cos x)x−\sin x(1−\cos x)}{(x−\sin x)^2}$$
Now, given that the equality must hold and that $f(x)$ starts and ends in the given values we previosly determined, it's derivative must be $<0,\forall x$ in the given interval (because $\frac{2}{2-\pi} < 2$) . Since the denominator is always positive, we can look at the sign of the numerator:
$$g(x) = x^2\sin x−(1−\cos x)x−\sin x(1−\cos x)$$
This can be rewritten as:
$$g(x) = x^2 \sin x - (1-\cos x)(x+\sin x)$$
Now, ff $g(x) < 0$ in the interval, we are done: the derivative is always negative, hence the function is strictly decreasing, satisfying then, the equality. The graph of $g(x)$ is shown below:

So we can see that it is, in fact, negative. Hence, $f$ is strictly decrasing in the interval. It starts at $2$, which the maximum value, and ends up and $\frac{2}{2-\pi}$, which is the minimum, hence the inequeality is satisfied.
Note: As alphacapture mentioned now in the comments, you can show that $f'$ is negative in the interval using Taylor series. I personally tought that the graph was quickier and more instructive, however it requires computational tools.
A: If we can show that $f$ is decreasing on $(0,\frac{\pi}{2}]$, then it is easy to finish by checking the endpoints.
To show that $f$ is decreasing on this interval, it is enough to show that $f'$ is negative on this interval.  You computed
$$f'(x)=\frac{ x^2\sin x-(1-\cos x)x-\sin x(1-\cos x)}{(x-\sin x)^2}$$
which is negative if and only if the numerator is negative.
For convenience, we will rewrite the numerator as
$$x^2\sin x-(1-\cos x)(x+\sin x).$$
We can bound the numerator by using that fact that Taylor series for sine and cosine are alternating series, and therefore truncating it gives us bounds.
For $x\in(0,\frac{\pi}{2}]$, we have
$$x^2\sin x\le x^2(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\frac{x^9}{9!})$$
$$(1-\cos x)(x+\sin x)\ge(1-(1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\frac{x^8}{8!}))(x+(x-\frac{x^3}{3!}))$$
where for the second inequality we use that both factors on the right hand side are positive on this interval.  Therefore,
\begin{align*}
&x^2\sin x-(1-\cos x)(x+\sin x)\\
\le &x^2(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\frac{x^9}{9!}) - (1-(1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\frac{x^8}{8!}))(x+(x-\frac{x^3}{3!}))\\
=&-\frac{x^7((x^2-30)^2+108)}{725760}
\end{align*}
and we can see that the right hand side is always negative on the interval.
(How did I know how far to expand each Taylor series?  Trial and error.  There might be some way to see how far to expand each using the fact that they Taylor series for the numerator of $f'(x)$ is $O(x^7)$, but I don't see how at the moment.)
A: I did by using brute force
$$f'(x)=\frac{\sin x\left(x-\frac{1-\cos x}{2\sin x}(1+\sqrt{5+4\cos x})\right)\left(x-\frac{1-\cos x}{2\sin x}(1-\sqrt{5+4\cos x})\right)}{(x-\sin x)^2}=\frac{\sin x\left(x-\tan \frac{x}{2}(1+\sqrt{5+4\cos x})\right)\left(x-\tan \frac{x}{2}(1-\sqrt{5+4\cos x})\right)}{(x-\sin x)^2}$$
Let $$g(x)=x-\tan \frac{x}{2}\left(1+\sqrt{5+4\cos x}\right)$$
$$g'(x)=1-\frac{1}{2}\sec^2\frac{x}{2}\left(1+\sqrt{5+4\cos x}\right)-\tan \frac{x}{2}.\frac{-4\sin x}{2\sqrt{5+4\cos x}}$$
$$=1-\frac{1+\sqrt{5+4\cos x}}{1+\cos x}+\frac{2(1-\cos x)}{\sqrt{5+4\cos x}}$$
$$=\frac{\cos x\left(\sqrt{5+4\cos x}-4\right)-2\cos^2x-3}{(1+\cos x)\sqrt{5+4\cos x}}<0$$
$g(x)$ is a decreasing function. So,if $x>0$,then $g(x)<g(0)$. i.e  $g(x)<0$
Similarly, Let $$h(x)=x-\tan \frac{x}{2}\left(1-\sqrt{5+4\cos x}\right)$$
$$h'(x)=1-\frac{1}{2}\sec^2\frac{x}{2}\left(1-\sqrt{5+4\cos x}\right)-\tan \frac{x}{2}.(-1)\frac{-4\sin x}{2\sqrt{5+4\cos x}}$$
$$=1-\frac{1-\sqrt{5+4\cos x}}{1+\cos x}-\frac{2(1-\cos x)}{\sqrt{5+4\cos x}}$$
$$=\frac{\cos x\left(\sqrt{5+4\cos x}+4\right)+2\cos^2x+8}{(1+\cos x)\sqrt{5+4\cos x}}>0$$
$h(x)$ is a increasing function. So,if $x>0$,then $h(x)>h(0)$. i.e  $h(x)>0$
Thus it can be concluded that $$f'(x)<0$$ and we are done.
