Prove that a functional in $L^2(0, \pi)$ is bounded Let $\Phi$ be a functional defined on $L^2(0, \pi)$ such that $\Phi(\sin(nx))=a_n$ on the basis $\{\sin(nx)\}_{n=1}^{\infty}$ with $\{a_n\}$ sequence of complex numbers. What are the conditions on $\{a_n\}$ for which $\Phi$ is bounded?
My attempt. For any $f\in L^2(0, \pi)$, I can write $f(x)=\sum_{k=1}^\infty f_k\sin(kx)$. Then $\Phi(f)=\sum_{k=1}^\infty f_ka_k$. By Cauchy-Schwarz inequality, we have that
$$
|\Phi(f)|^2\leq\sum_{k=1}^n|f_k|^2\sum_{k=1}^n|a_k|^2.
$$
Now, 
$$
\|f\|_{L^2(0, \pi)}^2=\sum_{k=1}^\infty\int_0^{\pi}f_k^2\sin^2(kx)\ dx=\frac{\pi}{2}\sum_{k=1}^\infty f_k^2
$$
and then $\sum_{k=1}^\infty |f_k|^2=\frac{2}{\pi}\|f\|_{L^2(0, \pi)}$. It follows that, if $\sum_{k=1}^\infty|a_k|^2=s<\infty$, then
$$
|\Phi(f)|^2\leq\frac{2s}{\pi}\|f\|^2_{L^2(0, \pi)}<\infty.
$$
Is my attempt correct?
Thank You
 A: Your proof shows that $\sum_{k=1}^\infty |a_k|^2 < \infty $ is a sufficient condition for $\Phi$ to be bounded.
To show that $\sum_{k=1}^\infty |a_k|^2 < \infty $ is also a necessary condition for $\Phi$ to be bounded, we can perhaps consider the action of $\Phi$ on the functions
$$ f_N(x) : = \sum_{k=1}^N a^\star_k \sin(kx) \in L^2(0, \pi), \ \ \ {\rm for \ } N \in \mathbb N,$$
where $a^\star_k$ denotes the complex conjugate of $a_k$. [Since the sums in the definitions of these $f_N$ are finite sums, these $f_N$'s are guaranteed to be in $L^2(0, \pi)$.]
By a simple calculation, we can show that
$$ |\Phi(f_N)| = \left(\frac 2 \pi\sum_{k=1}^N |a_k|^2 \right)^{\frac 1 2 } \| f_N \|_{L^2(0, \pi)}, \ \ \ {\rm for \ } N \in \mathbb N,$$
and from here, it should be easy to see that $$\sum_{k=1}^\infty |a_k|^2 < \infty$$ is a necessary condition for $\Phi$ to be bounded.
[In fact, by combining your argument with mine, we can even conclude that $\left(\frac 2 \pi \sum_{k=1}^\infty |a_k|^2 \right) ^{\frac 1 2 } $ is the norm of $\Phi$.]
A final remark: This whole argument is based on the fact that $L^2(0, \pi)$ is isomorphic to $l^2$, via the mapping $\sqrt{\tfrac 2 \pi} \sum_{k=1}^\infty f_k \sin(kx) \mapsto \{ f_k \} $. So essentially, all we have done is we have reproduced the standard proof of the fact that the dual of $l^2$ is $l^2$.
