<s>[INST] find minimum of maximum of two functions 
I need to find the angle $\theta$ so that: $$\max(\cos^2(\theta),1-\cos^2(45-\theta))$$ is minimized. 

OK, so I wrote \begin{align*}f(\theta)&=\max(\cos^2(\theta),1-\cos^2(45-\theta))\\
&=\frac{\cos^2(\theta)+1-\cos^2(45-\theta)+|\cos^2(\theta)-1+\cos^2(45-\theta)|}{2}\end{align*}
Then I'm stuck.
 [/INST] A little nudge in the right direction (hopefully!):
Now, using the required formula (which?), we can simplify: \begin{align} 1 - \cos^2(45^\circ - \theta) & = \sin^2(45^\circ - \theta) \\ & = \frac{1 - \sin 2\theta}{2}\end{align}

We are now required to find: $$\min(\max(\frac{1+\cos 2\theta}{2}, \frac{1-\sin 2\theta}{2}))$$

We can see that in the interval $[0, \pi]$, the solutions to $\cos 2\theta = - \sin 2\theta$ are: $\frac{3\pi}{8}, \frac{7\pi}{8}$. Also, the points $\frac{3\pi}{4}$ and $\pi$ may be of interest (why?)

Can you take it from here? 
</s>