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.
 A: Is known that

$$2\cos^2a = 1+\cos 2a.$$

So
$$f(\theta) = \dfrac12\max\left(1+\cos2\theta,2-\left(1+\cos\left(\dfrac\pi2-2\theta\right)\right)\right),$$
$$f(\theta) = \dfrac12+\dfrac12\max(\cos2\theta,-\sin2\theta).$$
Since
$$\cos2\theta+\sin2\theta = \sqrt2\left(\sin\dfrac\pi4\cos2\theta+\cos\dfrac\pi4\sin2\theta\right) = \sqrt2\sin\left(2\theta+\dfrac\pi4\right),$$
then
$$f(\theta) =
\begin{cases}
\dfrac12+\dfrac12\cos2\theta,\quad\text{if}\quad 
2\theta\in\left[2k\pi-\dfrac\pi4,2k\pi+\dfrac{3\pi}4\right]\\
\dfrac12-\dfrac12\sin2\theta,\quad\text{if}\quad
2\theta\in\left[2k\pi+\dfrac{3\pi}4,2k\pi+\dfrac{7\pi}4\right],
\end{cases}$$
where
$$k\in\mathbb Z.$$
If 
$$2\theta\in\left(2k\pi-\dfrac\pi4,2k\pi+\dfrac{3\pi}4\right),$$
then 
$$\min f(\theta) = \dfrac12-\dfrac{\sqrt2}4\quad\text{at}\quad 2\theta=2k\pi+\dfrac{3\pi}4.$$
If 
$$2\theta\in\left[2k\pi+\dfrac{3\pi}4,2k\pi+\dfrac{7\pi}4\right],$$
then 
$$\min f(\theta) = \dfrac12-\dfrac{\sqrt2}4\quad\text{at}\quad 2\theta=2k\pi+\dfrac{3\pi}4.$$
Therefore,
$$\boxed{\min f(\theta) = \dfrac12-\dfrac{\sqrt2}4\quad\text{at}\quad \theta=k\pi+\dfrac{3\pi}8.}$$
A: Prove that $\cos (A + B)\cos (A - B) = {\cos ^2}A - {\sin ^2}B$
$$D=\cos^2t-(1-\cos^2(45^\circ-t))=\cos^2t-\sin^2(45^\circ-t)=\cos(45^\circ)\cos(2t-45^\circ)$$
Case $\#1:$
$\cos^2t$ will be maximum if $D\ge0$ if $\cos(2t-45^\circ)\ge0$
$\iff360^\circ n-90^\circ\le2t-45^\circ\le360^\circ n+90^\circ$
$\iff360^\circ n-45^\circ\le2t\le360^\circ n+135^\circ$
Now in the above range $\cos^2t=\dfrac{1+\cos2t}2$ will be minimum $\iff$ if $\cos2t$ is minimum
which happens if $2t=360^\circ n+135^\circ$
Case $\#2:$
Check when $$1-\cos^2(45^\circ-t)=\sin^2(45^\circ-t)$$ will be maximum
A: 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? 
