Remove the derivative on v′ using integration by parts:
∫ab∂u′∂Lv′dx=[∂u′∂Lv]ab−∫abdxd(∂u′∂L)vdx.
If boundary values are fixed, we require v(a)=v(b)=0, so the boundary term vanishes. Then:
δJ[u](v)=∫ab(∂u∂L−dxd(∂u′∂L))vdx.
For this to be zero for all admissible v, the only way out is:
∂u∂L−dxd(∂u′∂L)=0
This is the Euler–Lagrange equation.
That is the main engine of classical calculus of variations.
Boundary conditions (quick sanity)
If the endpoints are fixed: u(a),u(b) prescribed, then v(a)=v(b)=0.
If an endpoint is free, the boundary term does not automatically vanish, and you get a natural boundary condition:
∂u′∂Lx=a=0or∂u′∂Lx=b=0,
depending on which end is free (details depend on the exact constraints).
A tiny example (so this feels real)
Minimize “smoothness energy”:
J[u]=∫ab21(u′)2dx,with u(a)=α,u(b)=β.
Here L=21(u′)2. Then:
∂u∂L=0,∂u′∂L=u′.
Euler–Lagrange gives:
0−dxd(u′)=−u′′=0⇒u(x)=cx+d.
So the minimizer is a straight line between the boundary values. This matches the intuition: among all curves that hit the endpoints, the least “bendy” one is linear.
Multi-dimensional version (PDE form)
If u:Ω⊂Rn→R and
J[u]=∫ΩL(x,u(x),∇u(x))dx,
then the Euler–Lagrange equation becomes:
∂u∂L−∇⋅(∂(∇u)∂L)=0.
So calculus of variations is one of the cleanest “factories” for producing PDEs.
What to remember
A derivative is “rate of change under perturbation”.
A gradient is how that derivative looks in Euclidean coordinates.
A functional J[u] eats a function and outputs a scalar.
The first variation δJ[u](v) is the functional analogue of a directional derivative.
Setting δJ[u](v)=0 for all admissible v yields the Euler–Lagrange equation.
That’s basically the whole game. Everything else is: “what kind of J?”, “what constraints?”, and “how do I solve the resulting ODE/PDE?”.