Use of $L^2$ norm in calculus of variations I am trying to make an introduction to the calculus of variations. This field has many connections with  functional analysis, in which I do not have an experience. I recently learned about function spaces, for example the space of all continuous functions $C[a,b]$ on the interval $[a,b]$ and the space of square integrable functions $L^2[a,b]$ on the interval $[a,b]$. It seems that in many resources about Calculus of Variations, the functional derivative in the direction of a function $v$ is given with the inner product $\langle \nabla J[u],v\rangle$ where $\nabla J[u]$ is the functional gradient. The inner product is defined as the $L^2$ norm of the form $\langle f, g \rangle = \int_{b}^{a}f(x)g(x)dx$. From there it follows the derivation of the Euler-Langrange formula, etc.
My question is, why does one chooses the $L^2$ norm here specifically, in the context of Calculus of Variations? It seems that there are different norms associated with different function spaces in functional analysis: Doesn't this limit the candidate functions in an optimization problem to be in $L^2$ space? Maybe the reason is that $L^2$ norm can be seen as a natural expansion of the dot product in finite Euclidean spaces to infinite dimensional function spaces? I have not well understood this point; maybe I am asking something too obvious, excuse me if it is so, since I am a beginner in this field.
 A: I am not a true expert of Calculus of Variations, however I may say that (spaces based on) $L^2$ are particularly useful when you deal with action functionals containing the first (weak) derivative. Among the scale of $L^p$ spaces, with $1 \leq p < \infty$, $L^2$ is the only Hilbert space and this may make your life easier.
Honestly I must also say that many problems in variational analysis require different spaces (for instance problems with the $p$-Laplacian, or problems where the solution is not expected to be summable and spaces like $BV(\Omega)$ are more natural).
So to say, as a beginner you encountered $L^2$ many times because it is the basic function space where interesting variational problems can be set. But do not believe that other spaces are useless in calculus of variations.
A: Recall the definition of the derivative of a scalar-valued function $G : \mathbb{R}^n \to \mathbb{R}$. We say that $G$ is differentiable at $x$ with derivative $G'_x$ if there is a linear scalar-valued function $G'_x$ such that
$$G(y) = G(x) + G'_x(y-x) + o(\| y - x \|).$$
The definition of a functional derivative is exactly the same, except that we replace $\mathbb{R}^n$ with a normed function space $F$. Note that the norm appears explicitly in this equation. In finite dimensions this does not matter, because all norms are equivalent, so all norms induce the same derivatives. But in infinite dimensions there are non-equivalent norms, so our choice of norm does affect the derivative. Hence we should be careful to ensure that a "good linear approximation" does what we want.
If $F$ is a Hilbert space, then we have the Riesz representation theorem. This tells us that $G'_x(z)=\langle g_x,z \rangle$ for some $g_x \in F$. In light of this, we can view the functional derivative as a functional gradient $\nabla G : F \to F$ if and only if $F$ is a Hilbert space. I think it is clear that this is a nice property. Requiring it rules out a lot of candidates for our choice of function space. In particular it rules out $L^p[0,1]$ for $p \neq 2$ and it rules out all of the $C^k[0,1]$ spaces.
On $L^2$ and the related $L^2$-based spaces, we have the Fourier transform. This is extremely powerful for any problems involving derivatives, and we lose it if we go away from $L^2$-based spaces.
That said, I think the more important thing is that the action functionals should be continuous. For example, in one of the very basic problems you need to minimize
$$L[y] = \int_0^1 y'(s)^2 ds$$
subject to $y(0)=a,y(1)=b$. Assuming you agree with me that you should not assume you have more derivatives or integrability than you are actually using, making $L$ continuous leaves two choices: either you work on the Sobolev space $H^1$ or you work on the continuous function space $C^1$. Since $H^1$ is a Hilbert space and contains $C^1$, it seems natural that this is the better bet. 
But with a different form of action functional, you might need to deal with a different space in order to ensure that the functional is continuous. So it depends rather strongly on the problem.
A: The space $L^2$ is not the only space in which one does this kind of math (others are $L^p, BV, W^{k,p}$ and, e.g. for regularity considerations, $C^{k,\alpha}$, currents, and many more) but, as you noticed yourself, $L^2$ (and the $W^{k,2}$ Sobolev spaces) is a Hilbert space. This equips this space with many extremely useful features. 
First of all, Hilbert space theory is easier than general B-space theory, already in the linear case. Then being a Hilbert space makes the (square of the) norm a smooth function, which makes differential calculus a lot easier -- in the calculus of variations you are searching for critical points of functionals, and, as in finite dimensional case, this implies that the first derivative vanishes, provided it exists.
Then you have a very powerful tool available in $L^2$, the Fourier transform, which is also deeply linked to the theory of differentiability (it transforms differentiation into multiplication with monomials and vice versa) and which, above all, is a nontrivial isometry of $L^2$. 
Then the probably most important second order partial differential operator in existence, the Laplacian, is extremely well behaved on $L^2$ and most of it's well known properties are easily derived by looking at in $L^2$ and the associated Sobolev Spaces $W^{k,2}$, which are Hilbert spaces, too.
There are probably even more reasons to prefer $L^2$ over other space.
In general, though, the choice of space is usually specific to the problem you are looking at, sometimes using $L^2$ is not an option because the functional you are looking at is not well behaved on that space. 
A: The reason for the $L^{2}$ norm for the Dirichlet problem dates back to Dirichlet's proof of uniqueness for solutions of the problem $\nabla^{2}f= g$ subject to Dirichlet boundary conditions on a region. Dirichlet formulated his principle in his work to prove uniqueness of solutions. Dirichlet died in 1859, which was when Riemann created his integral. Riemann used his integral to begin a more thorough and rigorous of study such things. However, Riemann accepted without question that the "energy" integral expression would have a minimum, and he looked at the Dirichlet principle as a means of proving existence of solutions, as well as proving uniqueness. The Dirichlet principle played an important role in the Calculus of Variations approach.
It was slowly realized that sums of squares point to abstract inner products. Sums of squares, especially through Parseval's identity of 1799, predated Fourier's work on trigonometric series, and would eventually drive people to understand inner product in an abstract sense more than a century later. Parseval assumed a function $f$ had a trigonometric expansion, squared the function on one side and the expansion on the other, integrated, and used orthogonality of the functions to write the integral of the square of $f$ in terms of the sums of squares of the coefficients of the trigonometric functions in the expansion of $f$:
$$
    \frac{1}{\pi}\int_{-\pi}^{\pi}f(x)^{2}dx = \frac{1}{2}a_{0}^{2}
             + \sum_{n=1}^{\infty}(a_{n}^{2}+b_{n}^{2}).
$$
Parseval gave his identity more than a century before an abstract inner product space would be defined. This identity was on the mind of Hilbert when he defined what is now denoted by $\ell^{2}$.
Our modern version of inner product space was defined by Hilbert around 1905. Up until then, people struggled to make sense of these ideas, and Dirichlet's principle was just one of many pieces of the puzzle. Hilbert's abstraction freed people to see that the same type of orthogonal projection onto a line or a plane in Euclidean space--which is known to minimize distance from the point to a line or plane--was also at work in general inner product spaces. Then, by completing the inner product spaces to obtain a Hilbert space, a framework was obtained in which unique points of minimization problems would exist. Treating functions as points in a space with Euclidean-like geometry marked a new way of thinking about things, and a critical one for modern Mathematics.
It should be mentioned that the rigorous process of completing the rational numbers to obtain the real numbers had only recently been accomplished in the 1870's when Hilbert began his work. So this technique was on everyone's mind during those years. The functions which minimized energy expressions would lie in the completed space, and would be actual solutions only in a formal or 'weak' sense. The Dirichlet principle was one of many key parts of the evolution of the subject.
