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.
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.$