How to show that $\{\sin{kx}:k\in\mathbb{N}\}$ for $\{f\in\mathcal{L}^2[0,\pi]:f(0)=f(\pi)=0\}$ is an ONB?
(Clearly they are orthogonal to each other but is their span also dense?)
What general route can one follow when one wants to check total?
How to show that $\{\sin{kx}:k\in\mathbb{N}\}$ for $\{f\in\mathcal{L}^2[0,\pi]:f(0)=f(\pi)=0\}$ is an ONB?
(Clearly they are orthogonal to each other but is their span also dense?)
What general route can one follow when one wants to check total?
On
Try the following, if you want to avoid any Fourier series methods: first throw in the function $1$ into your set $\{\sin{kx}\}$. The resulting linear span is a subalgebra of $C(T,\mathbb{R})$, where $T$ is the one-dimensional torus. Then apply Stone-Weierstrass to obtain density in the $C$-norm. Now use the fact that $C(T,\mathbb{R})$ is dense in $L^2(T, \mathbb{R})$ in the $L^2$ norm. Since $T$ is compact, one can control the $L^2$ norm by the $C$-norm, which shows that the subalgebra generated by $1, \{\sin{kx}\}$ is dense in $L^2(T)$. Then remove the constants.
NOTE: There is no such thing as a boundary condition $f(0)=0$ or $f(\pi)=0$ on $L^{2}[0,\pi]$. Functions in $L^{2}[0,\pi]$ are equivalence classes of functions which are equal to each other a.e.. That part should be tossed out of your question. What is true is that $$\left\{ \sqrt{\frac{2}{\pi}}\sin(nx)\right\}_{n=1}^{\infty}$$ is a complete orthonormal basis of $L^{2}[0,\pi]$. There are no conditions required for the $\sin$ series of $f \in L^{2}[0,\pi]$ to converges to $f$ in $L^{2}[0,\pi]$.
To prove this, start with the fact that $\{ \frac{1}{\sqrt{2\pi}} e^{inx}\}_{n=-\infty}^{\infty}$ is a complete orthonormal basis of $L^{2}[-\pi,\pi]$. Every $f \in L^{2}[0,\pi]$ has an odd extension to $\tilde{f}$ on $[-\pi,\pi]$. That is $\tilde{f}(x)=-f(-x)$ for $-\pi \le x < 0$ and $\tilde{f}(x)=f(x)$ for $0 \le x \le \pi$. then $$ \begin{align} \int_{-\pi}^{\pi}\tilde{f}(x)e^{-inx}\,dx & = -\int_{-\pi}^{0}f(-x)e^{-inx}\,dx+\int_{0}^{\pi}f(x)e^{-inx}\,dx \\ & = -\int_{0}^{\pi}f(x)e^{inx}\,dx+\int_{0}^{\pi}f(x)e^{-inx}\,dx \\ & = -2i\int_{0}^{\pi}f(x)\sin(nx)\,dx . \end{align} $$ Therefore the following converges in $L^{2}[-\pi,\pi]$: $$ \tilde{f} = -\sum_{n=-\infty}^{\infty}\frac{2i}{2\pi} \left(\int_{0}^{\pi}f(x')\sin(nx')\,dx'\right)e^{inx}. $$ Because $\tilde{f}$ is odd, then the following converges in $L^{2}[0,\pi]$: $$ f(x)=\frac{1}{2}\left(\tilde{f}(x)-\tilde{f}(-x)\right)=\sum_{n=1}^{\infty} \left(\frac{2}{\pi}\int_{0}^{\pi}f(x')\sin(nx')\,dx'\right)\sin(nx). $$ And that's the result you want.