Calculus of variation is concerned with maximizing or minimizing certain types of functions given in the form of  integrals called functionals.
We need to find a function $y(x)$ such that the integral
$I$ =  $\int_{x_{1}}^{x_{2}}$ $f(x, y, y')dx$
will be a maximum or minimum.
Let $S$ be a set of functions of a variable $x$ defined over an interval $(a, b)$. Then a function which assigns to every element in $S$ a unique real number is called a functional. In the 18th century Euler and Lagrange laid the foundations to calculus of variations with the classical problems of determining a closed curve in the plane.
Domain of a functional is a set of admissible functions. In ordinary functions the values of the independent variables are numbers. Whereas with functionals, the values of the independent variables are functions.

The problem of finding a function $y(x)$ for which the functional,
$I(y)$  =  $\int_{x_{1}}^{x_{2}}$$f(x, y, y')dx$
is extremum (maxima or minima), under the condition $y(x_{1})$ = $y_{1}$  and $y(x_{2})$ = $y_{2}$  is called a variational problem or fundamental problem of calculus of variation. Euler's method serves as a method of solving the variational problem.
Statement : A necessary condition for
$I(y)$ = $\int_{x_{1}}^{x_{2}}$$f(x, y, y')dx$ 

to be an extremum is that

$\frac{\delta f}{\delta y}$  - $\frac{d}{dx}$($\frac{\delta f}{\delta y'}$) = 0

The equation
$\frac{\delta f}{\delta y}$ - $\frac{d}{dx}$($\frac{\delta f}{\delta y'}$) = 0
is called Euler's equation for solving the underlying variational problem.

Alternative forms:

1) If $f$ is a function of $x, y, y$'.

Then $\frac{df}{dx}$ = $\frac{\delta f}{\delta x}$ + $\frac{\delta f}{\delta y}$ .$\frac{dy}{dx}$ + $\frac{\delta f}{\delta y'}$ . $\frac{dy'}{dx}$
Then the expression turns to:

$\frac{d}{dx}$ [$f - y'$ $\frac{\delta f}{\delta y'}$]  -  $\frac{\delta f}{\delta x}$ = 0

2) If $f$ is a function of $x, y, y$'. Thus $\frac{\delta f}{\delta y'}$ is also a function of $x, y, y$'
Then the expression turns to:

$\frac{\delta f}{\delta y}$ $\frac{\delta ^{2}f}{\delta x \delta y'}$ - y' $\frac{\delta ^{2}f}{\delta y \delta y'}$ - y'' $\frac{\delta ^{2}f}{\delta y'^{2}}$
 This is an extended form of Euler's equation.
Example 1: Find the curve on which the functional

$I$ = $\int_{0}^{1}$ $\frac{dy}{dx}^{2}$ $dx$ + 12$xy$ $dx$

with $y(0)$ = 0 and $y(1)$ = 1 can be extremed.

Solution : Here, $f$ = ($\frac{dy}{dx}$)$^{2}$ + 12$xy$

$\frac{\delta f}{\delta y}$ = 12$x$, $\frac{d}{dx}$ ($\frac{\delta f}{\delta y'}$) = 2$\frac{d^{2}y}{dx^{2}}$ = 2$y$''

Hence the Euler's equation

$\frac{\delta f}{\delta y}$ - $\frac{d}{dx}$($\frac{\delta f}{\delta y'}$) = 0
becomes
12$x$ - 2$y$'' = 0

$\frac{d^{2}y}{dx^{2}}$ = 6$x$

$\frac{dy}{dx}$ = 3$x^{2}$+$A$
$y$ = $x^{3}$ + $Ax$ + $B$

where $A$ and $B$ are constants

By data $y$ = 0 when $x$ = 0

$B$ = 0

Again $y$ = 1 when $x$ = 1

1 = 1 + $A$

$A$ = 0

Thus we have $y$ = $x^{3}$ which is the curve on which extremum can be obtained.

Example 2: Show that the extremal of
$I$ = $\int_{x_{1}}^{x_{2}}$ $\frac{(y')^{2}}{y^{2}}$ dx can be expressed in the form  of $y$ = $Ae^{Bx}$

Solution : $f$ = $\frac{(y')^{2}}{y^{2}}$ which is independent of $x$.

Thus the corresponding Euler's equation is

$f - y$'$\frac{\delta f}{\delta y'}$ + $C$ = 0

Now $f$ = $\frac{(y')^{2}}{y^{2}}$

$\frac{\delta f}{\delta y'}$ = $\frac{2y'}{y^{2}}$

Thus Euler's equation becomes

$\frac{(y')^{2}}{y^{2}}$ - 2$\frac{(y')^{2}}{y^{2}}$ + $C$ = 0

=> $(y')^{2}$ = $Cy^{2}$

$\frac{dy}{dx}$ = $By$

 where $B$ = $\sqrt{C}$

$\int$ $\frac{dy}{y}$ + $log D$ = $\int B dx$

$log y$ + $log D$ = $Bx$

$log(y.D)$= $Bx$

$yD$ = $e^{Bx}$

$y$ = $Ae^{Bx}$

where $A$ = $\frac{1}{D}$