first variation
In ordinary calculus you find a maximum or minimum by nudging x a tiny bit and seeing whether f changes to first order; at a peak or valley that first-order change is zero. The first variation is exactly this idea lifted to functionals. Instead of nudging a number, you nudge a whole curve: replace the candidate curve y(x) by a wiggled version y(x) + epsilon eta(x), where eta is an arbitrary small bump that vanishes at the fixed endpoints, and epsilon is a tiny dial. The first variation measures how the functional responds to first order in epsilon.
Concretely, J becomes a plain function of the single number epsilon once you fix the bump shape eta, namely g(epsilon) = J[y + epsilon eta]. The first variation, written delta J, is the derivative g'(0) — the rate of change of the functional as you start to deform the curve. Working it out for J[y] = integral of L(x, y, y') dx, you differentiate under the integral sign, then integrate by parts to peel the derivative off eta'. The result is delta J = integral of (dL/dy minus d/dx of dL/dy') eta dx, plus a boundary term that the fixed endpoints kill. For y to make J stationary, delta J must vanish for every allowed bump eta.
The first variation is the engine of the entire subject. Setting delta J = 0 is the analogue of setting a derivative to zero; combined with the fundamental lemma it forces the Euler-Lagrange equation. Just as in ordinary calculus, delta J = 0 is a necessary condition for a minimum or maximum but does not by itself say which — that distinction needs the second variation, the analogue of the second-derivative test. A vanishing first variation only marks a stationary path, also called an extremal.
Take J[y] = integral from 0 to 1 of (y'^2) dx with y(0)=0, y(1)=1. Then g(epsilon) = integral of (y' + epsilon eta')^2 dx, and g'(0) = integral of 2 y' eta' dx = -integral of 2 y'' eta dx after parts (boundary terms vanish). Demanding this be zero for all eta forces y'' = 0, so y = x — the straight line.
Nudge the curve, demand the first-order change vanish for every nudge, and the optimal curve drops out.
delta J = 0 only locates a stationary path, not necessarily a minimum. The path could be a maximum or a saddle in function space; deciding requires the second variation, just as the second-derivative test decides in ordinary calculus.