Absolute minimum in closed interval Let $I:=[0,\pi/2]$,let $f:I \rightarrow \mathbb{R}$ be defined 
$f(x):=\sup \{x^2, \cos x\}$ $\forall x \in \mathbb{R}$. Show there exists an absolute minimum $x_0 \in I$ for $f$ on $I$. Show that $x_0$ is the solution for $\cos x  = x^2$.
My attempt.
Since $f$ is continuous on the closed interval $I$, we know that $f$ must have an absolute minimum on $I$, call it $x_0$. I can't show that $x_0$ is the solution for $\cos x  =x^2$. My guess is, we are proving by contradiction. We show that both case $x_0^2 >\cos x_0$ and $x_0^2$ < $\cos x_0$ can not happen. I would guess somehow a contradiction arises.
Any help appreciated.
 A: Your approach would work fine, but it isn't necessary. Instead, try graphing $y=x^2$ and $y=\cos x$ on $I,$ then use that to figure out what the graph of $y=f(x)$ looks like on $I.$ From there, it is very straightforward.
Edit: Monotonicity probably the most direct way to go from there. Point out that $x\mapsto x^2$ is monotone increasing on $I,$ while $x\mapsto\cos x$ is monotone decreasing there. Then, since $0^2<\cos 0,$ while $\left(\frac\pi2\right)^2>\cos\frac\pi2,$ and since both functions are continuous, then the functions intersect exactly once, in the interior of the interval, say when $x=t.$ Then $x\mapsto f(x)$ is monotone increasing to the left of $x=t,$ monotone decreasing to the right of $x=t,$ and so (by continuity) achieves an absolute maximum at $x=t.$ This shows both that an absolute maximum is achieved, and that it is achieved at the unique solution to $x^2=\cos x$ in the interval $I.$
A: Assume that $x_{0}\in[0,\pi/2]$ is such that $\cos x_{0}=x_{0}^{2}$. Note that $\cos(\cdot)$ is strictly decreasing and $(\cdot)^{2}$ is strictly increasing on $[0,\pi/2]$. Assume that $f$ attains an absolute minimum at $y\in[0,\pi/2]$. If $y<x_{0}$, then $\cos y-y^{2}>0$ (prove later), so $\cos y=f(y)\leq f(x_{0})=\cos x_{0}$, this contradicts that $\cos(\cdot)$ being strictly decreasing.
If $y>x_{0}$, then $y^{2}-\cos y^{2}>0$, so $y^{2}=f(y)\leq f(x_{0})=x_{0}^{2}$, this contradicts that $(\cdot)^{2}$ being strictly increasing.
Proof of $\cos y-y^{2}>0$ for $y\in(0,x_{0})$: Let $\varphi(y)=-2y-\sin y$ for $y\in[0,x_{0}]$. Then $\varphi(y)=\varphi(y)-\varphi(0)=\varphi'(\eta)(y-0)=(-2-\cos\eta)y<0$ for $y\in(0,x_{0}]$.
Now consider $\xi(y)=\cos y-y^{2}$ for $y\in(0,x_{0})$, then $\xi(y)=\xi(y)-\xi(x_{0})=\xi'(\zeta)(y-x_{0})=(-\sin\zeta-2\zeta)(y-x_{0})$, but $\zeta\ne 0$, so $-\sin\zeta-2\zeta=\varphi(\zeta)<0$, so $\xi(y)>0$.
Note that we have trivially that $\cos(0)-0^{2}=1>0$. So we establish that $\cos y-y^{2}>0$ for $y\in[0,x_{0})$.
