Prove $x^2-2x+\sin(\frac{\pi}{2}x) \le 0$ I have been searching non-trigonometric approximations for some trigonometric functions and have found myself in need of showing that,
$$x^2-2x+\sin\left(\frac{\pi}{2}x\right) \le 0,$$
in the range $0\le x \le 2$. 
So far, I am not yet satisfied with my proof, in which I managed to argue that one curve is above the other from their geometric properties. Despite the tight argument, it appears cumbersome. Besides, I had to rely on their intercepts, which I was able to observe but not derive algebraically. 
The problem may be a bit more trickier than it appears.
I expect much cleaner and clever approaches and would like to know of them from anybody who could provide.
 A: As you said, the expressions can be a little bit messy. One approach, as below, is to simplify the question as much as possible before hitting it with the standard calculus tools.

Since the expression is symmetric about $x = 1,$ we only need to consider $x \in [0,1]$. Notice that $1 - \sin \theta = (\cos \theta/2 - \sin \theta/2)^2.$ Thus, 
$$ x^2 - 2x + \sin( \pi x /2) =(x-1)^2 - (\cos(\pi x/4) - \sin(\pi x/4))^2 \\ = (1 - x + \cos(\pi x/4) - \sin(\pi x/4) ) (1 - x - \cos( \pi x /4) + \sin (\pi x /4) )$$
The first term above is always non-negative (since on $[0,\pi/4]$ $\cos$ dominates $\sin$).
So the question becomes to show that on $x \in [0,1],$ $$f(x) := 1 - x - \cos(\pi x/4) + \sin(\pi x/4) \le 0.$$
Notice that on $(0,1),$ $$f'(x) = \frac{\pi}{4} \left( \cos (\pi x /4) + \sin(\pi x /4)\right) - 1 \\ f''(x) = \frac{\pi^2}{16} (\cos (\pi x /4) - \sin (\pi x/4) ) > 0.$$
So, $f$ is a convex function on the interval, and it must attain its maxima at the end points (since any internal stationary point must be a minima). But then on $[0,1]$ $$f(x) \le \max(f(0), f(1)) = 0.$$
A: HINT.-. Integrating the function $f(x)=x^2-2x+\sin(\dfrac{\pi x}{2})$, you get a function  $F(x) =\dfrac {x^3}{3}-x^2-\dfrac{2}{\pi}\cos(\dfrac{\pi x}{2})$, which behaves like a cubic that goes continuously from $-\infty$ to $+\infty$ and that then has a maximum at $x = 0$ and a minimum at $x =2$. (where obviously the derivative is canceled). This means that $F(x)$ is decreasing in the interval $[0.2]$ that is to say that its derivative is negative.
Thus $$f(x)=x^2-2x+\sin\left(\frac{\pi}{2}x\right) \le 0$$ in the interval$[0,2]$
A: By defining $f(x)=x^2-2x+\sin {\pi\over 2}x$, we have $$f'(x)=2x-2+{\pi\over 2}\cos {\pi\over 2}x$$since for $x\le 0$ we have $$2x-2+{\pi\over 2}\cos {\pi\over 2}x\le -2+{\pi \over 2}<0$$and for $x\ge 2$ we obtain $$2x-2+{\pi\over 2}\cos {\pi\over 2}x\ge 2-{\pi \over 2}>0$$therefore the function is strictly increasing in $[2,\infty)$ and strictly decreasing in $(-\infty,0]$. Since $f(0)=f(2)=0$, then the function is non-negative over $\Bbb R-[0,2]$. This function has three roots: $0,1,2$. Since the $f'(1)=0$, therefore $f(x)$ is tangent to x-axis in $x=1$ and hence does not change its sign there. This proves that the function remains non-positive over $[0,2]$ and the proof is complete $\blacksquare$
A: The function $(x-1)^2$ has a maximum value of $1$ on the interval $[0,2].$ It follows that $(x-1)^2-1$ has a maximum of $0$ there too. Now we know that for $0\le x\le2,$ we have that $$0\le \sin(\frac{πx}{2})\le 1.$$ Thus, $$(x-1)^2-1-\sin(\frac{πx}{2})=x^2-2x-\sin(\frac{πx}{2})\le 0$$ on this interval.
