Two clarifications on calculus of variations I'm currently studying calculus of variations.  I couldn't find a rigorous definition of a functional on this site.


*

*What is the general definition of a functional?

*Why for calculus of variations in physics, I must to use for a functional a convex function for the space of the admissible functions?

 A: Let $\mathscr F$ be a functional of the form
$$\mathscr F(y) = \int_a^b f(x, y(x), y'(x)) \, dx.$$
We want to find a function $y_0$ that gives a local minimum of $\mathscr F,$ i.e. if we take a "close" function $y_0+\delta y$ then $\mathscr F(y_0+\delta y)$ will not be as small.
The idea is to let $\delta y = \lambda\eta,$ where $\eta$ is some function that is non-zero only in a small region and $\lambda$ is a real parameter. For a fixed $\eta$, then $\mathscr F(y_0+\lambda\eta)$ is a function of $\lambda$ which should have minimum for $\lambda=0.$
Therefore we take the derivative of $\mathscr F(y_0+\lambda\eta)$:
$$
\frac{d}{d\lambda} \mathscr F(y_0+\lambda\eta)
= \frac{d}{d\lambda} \int_a^b f(x, y_0(x)+\lambda\eta(x), y_0'(x)+\lambda\eta'(x)) \, dx \\
= \int_a^b \frac{\partial}{\partial\lambda} f(x, y_0(x)+\lambda\eta(x), y_0'(x)+\lambda\eta'(x)) \, dx \\
= \int_a^b \left( \frac{\partial f}{\partial y}(\cdots) \, \eta(x) + \frac{\partial f}{\partial y'}(\cdots) \, \eta'(x) \right) \, dx \\
$$
where $\frac{\partial f}{\partial y}$ is the partial derivative of $f$ with respect to its second argument (which is $y(x)$ in the defining equation for $\mathscr F$) and $\frac{\partial f}{\partial y'}$ is the partial derivative of $f$ with respect to its third argument (which is $y'(x)$ in the defining equation for $\mathscr F$). Also, $(\cdots)$ stands for $(x, y_0(x)+\lambda\eta(x), y_0'(x)+\lambda\eta'(x)).$
Now we use partial integration to remove the derivative from $\eta'(x)$:
$$
\int_a^b \left( \frac{\partial f}{\partial y}(\cdots) \, \eta(x) + \frac{\partial f}{\partial y'}(\cdots) \, \eta'(x) \right) \, dx \\
= \int_a^b \left( \frac{\partial f}{\partial y}(\cdots) \, \eta(x) - \frac{d}{dx}\left(\frac{\partial f}{\partial y'}(\cdots)\right) \, \eta(x) \right) \, dx \\
= \int_a^b \left( \frac{\partial f}{\partial y}(\cdots) - \frac{d}{dx}\left(\frac{\partial f}{\partial y'}(\cdots)\right) \right) \, \eta(x) \, dx
$$
if $\eta(a) = \eta(b) = 0$ (remember that we said that $\eta$ should be non-zero only in a small region).
We shall have a minimum for $\lambda=0$ so
$$
0 = \frac{d}{d\lambda} \mathscr F(y_0+\lambda\eta)
= \int_a^b \left( \frac{\partial f}{\partial y}(x, y_0(x), y_0'(x)) - \frac{d}{dx}\left(\frac{\partial f}{\partial y'}(x, y_0(x), y_0'(x))\right) \right) \, \eta(x) \, dx
$$
This shall be valid for any choice of $\eta$ which requires
$$0 = \frac{\partial f}{\partial y}(x, y_0(x), y_0'(x)) - \frac{d}{dx}\left(\frac{\partial f}{\partial y'}(x, y_0(x), y_0'(x))\right)$$
Why so? Because if the above expression isn't $0$ everywhere then there exists some interval where it is non-zero (say positive), and then we can take $\eta$ to be positive inside that interval and zero outside of it. Such an $\eta$ would make the integral non-zero, and we get a contradiction.
A: 
What is a functional?

As it is well written in Wikipedia, a functional simply refers to a mapping from a space $X$ into the real numbers. (Technically one might refer to other fields as well. But we can safely restrict our attention to the real numbers here.) Depending on the authors, such maps may or may not be linear. Consider the following example in the context of calculus of variations.
Suppose $U\subset{\bf R}^n$ is a bounded open set with smooth boundary $\partial U$ and we are given a smooth function (the Lagrangian)
$$
L:{\bf R}^n\times{\bf R}\times\overline{U}\to{\bf R}.
$$
We define a map $I$ with
$$
I[w]:=\int_U L(Dw(x),w(x),x)\ dx
$$
for smooth functions $w:\overline{U}\to{\bf R}$ satisfying, say, the boundary condition
$$
w=g\quad\text{on }\partial U.
$$
Now let $X$ be the set of smooth functions $w:\overline{U}\to{\bf R}$ such that $w=g$ on $\partial U$. Then the map $I$ is a functional mapping from $X$ to ${\bf R}$.


Convexity (of the Lagrangian)?

The basic idea of calculus of variation can be summarized as follows: instead of solving a (nonlinear) PDE $A(u)=0$ directly, one associates it with some appropriate "energy" functional $I$ by writing $A$ as the "derivative" of $I$. Symbolically, we write
$$
A(\cdot)=I'[\cdot].
$$
Then the PDE $A(u)=0$ reads as $I'[u]=0$. This new formulation allows us to recognize solutions of $A(u)=0$ as being critical points of the functional $I[\cdot]$. If the functional $I[\cdot]$ has a minimum at $u$, then presumably $I'[u]=0$ is valid and thus $u$ is a solution of the original PDE.
On the other hand, one needs some conditions on the Lagrangian $L$ which ensure that the functional $I[\cdot]$ does indeed have a minimizer within an appropriate function space (the class of "admissible" functions). It turns out that one of the conditions we need is the convexity of $L$ (which together with some other assumptions imply the "weak lower semicontinuity" of the functional $I$, which allows us to take limits in a compactness argument). The convexity assumption of $L$ can be also seen by the second variation of $I[\cdot]$ at the function $u$. 
For more technical mathematical details, see the first two sections in Chapter 8 of Evans's Partial Differential Equations. 

Note: This question has been edited quite a few times. This is an answer to the current version.
A: Here is a rigorous definition:
Let $V$ be a vector space over a field $\mathbb K$.
Then every function $F:V\to\mathbb K$ is called a functional.
An important class of functionals are linear functionals.
If $\mathbb K\in \{\mathbb R, \mathbb C\}$ and $V$ is a normed vector space ( or even a topological vector space)
then the continuous linear functionals are important objects.
