I'm studying a book "Applied linear algebra" by Sadun. The book deals linear algebra and functional analysis somewhat informally. Here is a quote from the book. I have some questions about the italicized sentences (italicizing is mine, not of the author).
What we have done is exhibit three orthogonal bases for the same space ($L^2[0,L]$). One orthogonal basis is the set of functions $\sin(n \pi x/L)$. A second orthogonal basis is the set of functions $\sin(2n\pi x/L)$ together with the functions $\cos(2n\pi x/L)$. Closely related to the second basis is the third basis $\{\exp(2n\pi xi /L)\}$ with $n$ now ranging from $-\infty$ to $\infty$. These bases are in turn obtained as the eigenfunctions of the three different operators on $L^2[0,L]$. The first operator is $d^2/dx^2$ with Dirichlet boundary conditions, whose eigenvalues are $-n^2\pi^2/L^2$, and whose eigenfunctions are the functions $\sin(n\pi x/L)$ $\cdots$
i) Are $\sin(n\pi x/L)$ really a basis for $L^2[0,L]$? How can a function whose value is nonzero at the boundaries be represented as a linear combination of them? ii) I'm not comfortable with defining an operator with boundary conditions. Are such definitions of an operator with boundary conditions conventional or usual? I think it is more appropriate to define a subspace by the boundary condition and define an operator on the subspace. Then $\sin(n\pi x/L)$ can be a basis for the subspace in which functions vanish at the boundaries.
I'm not much familiar with rigorous functional analysis nor linear algebra, but the sentences in the book are somewhat wiered for me.
The "linear combination" is actually an infinite series, which converges in the $L^2$ norm but not necessarily pointwise. Thus for example the constant function $1$ is represented by the series $$ \sum_{n=1}^\infty c_n \sin(n \pi x/L)$$ where $c_n = 4/(n \pi)$ if $n$ is odd, $0$ if $n$ is even.
Here is a plot of $1$ and the partial sum $\sum_{n=1}^{25} c_n \sin(n \pi x/L)$ in the case $L=1$:
The approximation $a_{25}(x)$ is not close to the function $1$ near the endpoints $0$ and $1$, but it is close over most of the interval, so that the $L^2$ norm $$ \|1 - a_{25}\| = \left( \int_0^1 (1 - a_{25}(x))^2\; dx \right)^{1/2}$$ is small. In the limit as $N \to \infty$, $\|1 - a_{N}\|$ goes to $0$.