Prove $x^2 = \sin(x)$ has exactly two solutions on $[0, \pi/2]$
I believe I obtained a correct solution, but it feels long and sloppy. I was curious if there's a better/more neat way to do it.
My solution:
Let $f(x) = x^2 - \sin(x)$
$f(0) = 0$ and $f(x_0) = 0$ for some $x_0 \in (\pi/6, \pi/2)$
(the above result I have previously proven using Intermediate Value Theorem)
$$f'(x) = 2x - \cos(x)$$
$$f'(0) = -1 < 0 \space\text{ and }\space f'(\pi/6) = \pi/3 - \sqrt{3}/2 > 0$$
Again using the Intermediate Value Theorem, $\exists\space x_1 \in (0, \pi/6)$ such that $f'(x_1) = 0$.
$$f''(x) = 2 + \sin(x) > 0 \space\space\forall x\in \Re$$
Thus, $f'(x)$ is strictly increasing, so that $x_1$ is the only solution to $f'(x_1) = 0$
This further implies that $f'(x) < 0 \space\space\forall x < x_1$ and $f'(x) > 0 \space\space\forall x > x_1$.
In other words, for $0 \le x < x_1$, $f(x)$ is strictly decreasing, implying that $0$ is the only solution to $f(x) = 0$ in this interval.
Likewise, for $x_1 < x_0 < x \le \pi/2$, $f(x)$ is strictly increasing. Therefore, $x_0$ is the only solution to $f(x) = 0$ in this interval.
This means, $f(x) = x^2 - \sin(x) = 0$ has two solutions on $[0, \pi/2]$
A slightly shorter way: observe that $f(x):=x^2-\sin(x)$ is continuous in $\Bbb R$ and
$$\lim_{x\to\infty}f(x)=\infty,\quad \lim_{x\to-\infty}f(x)=\infty,\quad f(\pi/4)=\pi^2/16-\sqrt2/2<\frac{10-8\cdot 1.4}{16}<0$$
what implies, by the intermediate value theorem, that $f$ have at least two zeros. And
$$f''(x)=2+\sin x>0$$ so $f$ is strictly convex, which implies that it has exactly two zeros (convex functions can have, at most, one local extremum, a minimum to be precise). This together with the fact that $f(0)=0$, $f(\pi/4)<0$ and $f(\pi/2)>0$ is enough to say that these zeros are in $[0,\pi/2]$.