I have the following equation that I need to solve and find its roots:
$$x^{2}-2x-\sin \frac{\pi x}{2}=0$$
I treid to solve it as so:
let $$z=\sin \frac{\pi x}{2}$$ Then solving the quadratic equation: $$x^{2}-2x-z=0$$ $$x=\frac{-b\pm \sqrt{b^2-4ac}}{2a}$$ $$x=\frac{2\pm \sqrt{4+4z}}{2}$$ $$x=1\pm \sqrt{1+z}$$ $$x=1\pm \sqrt{1+\sin \frac{\pi x}{2}}$$ $$(x-1)^2=1+\sin \frac{\pi x}{2}$$ $$x^{2}-2x-\sin \frac{\pi x}{2}=0$$
And back to square one!
Is it possible to solve it without using calculator or computer software? I know the roots should be 0 and 2 but how to prove it?.
$x=0$ and $x=2$ are the only real solutions. Since $\left|\sin(\cdot)\right|\leq 1$, we have $$ f(x)= x^2-2x+\sin\left(\frac{\pi x}{2}\right) \geq x^2-2x-1 $$ and every zero of $f(x)$ belongs to the interval $I=\left[-\frac{1}{2},\frac{5}{2}\right]$. Over such interval $f(x)$ is a convex function, since $f''(x)>0$. It follows that $f(x)$ cannot have more than two roots in $I$. Since $x=0$ and $x=2$ are roots in such interval, they are the only real roots of $f(x)$.