Sign up ×

Many equations of motion can be derived from a variational principle. To take a simple example, the wave equation $h^{ij} \partial_i \partial_j u = 0$ (where $h^{ij}$ is the Minkowski metric $\mathrm{diag}[-1,+1,+1,+1]$) can be derived from the Lagrangian density

$L = \frac{1}{2} h^{ij} (\partial_i u) (\partial_j u)$ :

It is $\frac{\delta L}{\delta \partial_i u} = h^{ij} \partial_j u$, from which follows the equation of motion via the usual ansatz $\frac{\delta L}{\delta u} - \partial_i \frac{\delta L}{\delta \partial_i u} = 0$.

This calculation neglects boundary conditions, which it should not since the ansatz implies an integration by parts which has a boundary term. Assuming e.g. I want to solve the wave equation in a box $0 \le x \le 1$, how would I e.g. impose Dirichlet or von Neumann boundary conditions?

I can think of two approaches:

(1) Assume that $u$ lives in a function space that already satisfies the boundary condition. However, this seems complicated in general -- is this workable?

(2) Impose a constraint (via a Lagrange multiplier) that corresponds to the boundary condition. This seems weird because the multiplier would live only on the boundary of the domain.

Do these approaches work? Is there another way?

share|cite|improve this question
I am a little uncertain about this. Variational principles are formulated with the start and end points of the dynamics fixed. – Lawrence B. Crowell Feb 6 '11 at 1:00
Vanishing of the boundary terms via Neumann and Dirichlet boundary conditions was also discussed here:… – Luboš Motl Feb 6 '11 at 5:52

2 Answers 2

The boundary term when you vary your action is $\int \delta u n^i \partial_i u$ where $n^i$ is a unit normal vector to the boundary and the integral is over the boundary. You want this term to be stationary under the variation. You can achieve this by taking $n^i \partial_i u=0$, that is Neumann boundary conditions, or you can demand that $u$ has a fixed value at the boundary which requires that one only consider variations $\delta u$ that vanish on the boundary, that is Dirichlet boundary conditions. Both lead to a consistent variational principle.

share|cite|improve this answer
What was up with the editing of your posts to replace the content by xxxx's? I'm assuming it's not something you did intentionally, since you've been around long enough to know that we try not to delete good content en masse. – David Z Mar 2 '11 at 2:26
@David: I'm guessing his account got hacked or something. Is it possible to temporarily lock him from any edits until we get this straightened out? – Colin K Mar 2 '11 at 3:28
@Colin: yeah, I had a feeling, but I wanted to ask first in case it was a temporary thing. There are mod tools to deal with this sort of thing. – David Z Mar 2 '11 at 3:45

Normally when one does a variational calculation, the action at the boundary is held fixed. So the variation at the boundary is zero by definition. Note that the goal of the variational technique is to derive a differential equation, that is, a relationship between various rates of change. As such, boundary conditions don't come into play.

If you do need to impose boundary conditions, you do that when you solve the differential equation.

share|cite|improve this answer

Your Answer


