Find the operator norm. Let $A$ be an operator on the Hilbert space $L^2([0, \pi])$ defined by
$$ A(f)(x) = \int_0^\pi \cos(x-y)f(y) \ dy ,$$ where $0 \leq x \leq \pi$.

Find the operator norm of $A$.

By definition $\| A \| = \sup_{\| f \| = 1} \| Af \|$. We also have 
\begin{align*}
\| Af \| &= \left( \int_0^\pi \left| \int_0^\pi \cos(x-y)f(y) \ dy \ \right| ^2  \ dx \right)^{1/2} \\
&\leq \| f \| \left( \int_0^\pi \int_0^\pi \left| \cos(x-y) \right|^2 \ dy  \  dx \right)^{1/2} \\
&=\| f \| \left( \int_0^\pi \int_0^\pi \cos^2(x-y)  \ dy  \  dx \right)^{1/2} \\
&= \|f\| \pi/\sqrt{2}
\end{align*}
Thus $\| A\| \leq \pi/\sqrt{2}$. But it is hard to find a function $f$ such that $\| Af \|$ equals $\| f \| \pi/\sqrt{2}$. May be I made a mistake or I need to use some other approach. Could you give me some tips please.
 A: $$
    Af =\left(\int_{0}^{\pi}\cos(y)f(y)dy\right)\cos(x)+\left(\int_{0}^{\pi}\sin(y)f(y)dy\right)\sin(x).
$$
The range of $A$ lies in the two-dimensional space spanned by $\{ \cos(x),\sin(x)\}$. And,
\begin{align}
    A(\cos(x))&=\int_{0}^{\pi}\cos(y)^2dy\cos(x)+\int_{0}^{\pi}\sin(y)\cos(y)dy\sin(x) \\
    &= \int_{0}^{\pi}\frac{1+\cos(2y)}{2}dy\cos(x)+\int_{0}^{2\pi}\frac{\sin(2y)}{2}dy\sin(x) \\
    &=\frac{\pi}{2}\cos(x) \\
   A(\sin(x))&=\int_{0}^{\pi}\cos(y)\sin(y)dy\cos(x)+\int_{0}^{\pi}\sin^2(y)dy\sin(x)\\
   &=\frac{\pi}{2}\sin(x).
\end{align}
So $A=\frac{\pi}{2}I$ on the subspace spanned by $\{\cos(x),\sin(x)\}$. When considered on $L^2[0,1]$, the operator $A$ is $0$ on the orthogonal complement of the space spanned by $\{\cos(x),\sin(x)\}$, making the norm of $A$ equal to $\frac{\pi}{2}$ on $L^2[0,1]$.
For the case on $C[0,\pi]$, note that $|\cos(x)|$ is periodic with period $\pi$, which gives
\begin{align}
      \left|\int_{0}^{\pi}\cos(x-y)f(y)dy\right| &\le \int_{0}^{\pi}|\cos(x-y)|dy\|f\|_{C[0,\pi]} \\
  & = \int_{0}^{\pi}|\cos(y)|dy\|f\|_{C[0,\pi]} =2\|f\|_{C[0,\pi]}.
\end{align}
If you set $f\equiv 1$, then $(Af)(\pi/2)=\int_{0}^{\pi}\sin(x)dx=2$, which gives $\|Af\| \ge 2\|f|$. So $\|A\|_{\mathcal{L}(C[0,1])}=2$.
