In calculus of variations, what is a functional? I am reading a bit about calculus of variations, and I've encountered the following.

Suppose the given function $F(\cdot,\cdot,\cdot)$ is twice continuously differentiable with respect to all of its arguments. Among all functions/paths $y=y(x)$, which are twice continuously differentiable on the internal $[a,b]$ with $y(a)$ and $y(b)$ specified, find the one which extremizes the functional defined by $$J(y) := \int_a^b F(x, y, y_x) \, {\rm d} x$$


I have a bit of trouble understanding what this means exactly, as a lot of the lingo is quite new. As I currently understand it, the function $F$ is a function, of which is second derivative is constant (like for example $y=x^2)$, and it looks as if $F$ is a function of 3 variables? I'm not too sure what $F(x,y, y_x)$ means, since $y_x$ was earlier specified to mean $y'(x)$.
Also, what is this 'functional' intuitively? I have some trouble understanding it, mainly because of the aforementioned confusion.
 A: Consider the expression
$$ J(y) := \int_a^b F(x,y,y_x) dx. $$
Here, $y$ is a function: $y:[a,b]\rightarrow \mathbb{R}$.
Note: $y_x$ is a common notation for the partial derivative. Since $y$ depends only on one variable, $y_x \equiv y'$. The above expression abuses notation (in a very common way), and a better version is
$$ J(y) := \int_a^b F(x,y(x),y_x(x)) dx. $$
Note that $F$ is not required to have vanishing derivatives of any order; it is just required to be sufficiently smooth. The function $F : \mathbb{R}^3\rightarrow \mathbb{R}$, and is to be evaluated at $x$, $y(x)$, and $y_x(x)$. The integrand is a well-defined function whose integral is guaranteed to exist. 
Thus, $J$ takes a function $y : [a,b] \rightarrow \mathbb{R}$ and computes a number $J(y)$ by the right hand side. Physicists often call such a "function of a function" by the name "functional". When analyzed mathematically, $y$ is often described as an element in an abstract vector space of infinite dimension, call it $X$. Thus, think of $J$ as a map that takes a vector $y$ in $X$(visualize a finite dimension if you like) and produces a number.
The regularity assumtion of $F$ and $y$ lets you compute the change in $J(y)$ when $y$ changes by a "small amount", meaning that a small function is added to $y$. Typically, physicists think intuitively here, but analytst turn to the space $X$ which comes equipped with a rigorous way to measure smallness, for example a norm. 
In physics notation,  $y(x) \rightarrow y(x) + \epsilon \eta(x)$ for such a small change, and then compute the Taylor expansion:
$$ J(y + \epsilon \eta) \approx \int F(x,y+\epsilon\eta,y_x + \epsilon \eta_x) dx = \int F(x,y,y_x) dx + \int F_2(x,y,y_x)\epsilon \eta(x)dx + \int F_3(x,y,y_x)\epsilon y_x dx, $$
where $J_i$ is the partial derivative with respect to argument number $i$ of $F$. Physicists work from this expression and derives the Euler--Lagrange equations.
A: Please, have a look at this answer for all details. 
In summary, a functional $J$ is a map that takes functions from an appropriate functional space and returns numbers. If the functional $J$ is represented through an integral like in the OP, then the Lagrangian $F=F(x,y(x),y'(x))$ is seen as a "function" of the variable $x$ and the functions $y$, $y'$. In any case, $F$ cannot be a function by itself (like your proposed, i.e. $F=F(x)$, with $F(x)=x^2$) because $J$ would be no functional anymore. $F$ can be dependent of $x$ and $y$, i.e. $F=F(x,y(x))$, or dependent of higher derivatives, like in the $F=F(x,y(x),y'(x),y^{''}(x))$ case.
The estremals of $J$, if they exist, are solutions of the equation
$$\delta J=0,$$
with
$$\delta J=\frac{dJ}{d\epsilon}|_{\epsilon=0}:=\lim_{\epsilon\rightarrow 0}
\frac{J[y+\epsilon\varphi]-J[y]}{\epsilon}, $$
for all functions $\varphi$ "near to" $y$ (called variations), such that
$$y(a)\stackrel{!}{=}(y+\epsilon\varphi)(a), $$
$$y(b)\stackrel{!}{=}(y+\epsilon\varphi)(b). $$
In other words, we are searching for those functions perturbing $y$ w.r.t. which the rate of change of $J$ is zero. Expressing $\delta J=0$ w.r.t. the Lagrangian $F$ leads to the well known Euler Lagrange equations.
To finish this short motivation, I would suggest to focus on an easy example and try to understand the formalism (I recocmmend the geodesic problem). I hope it helps.
