# Variational Principles and the Story of Your Life

As I mentioned a few days ago, a colleague asked me if I’d be interested in doing a guest lecture for a class on science fiction. She suggested that a good way to go might be to pick one story to have the class read, and talk about that.

Kicking ideas around with Kate, I latched onto the Ted Chiang story “Story of Your Life,” from the Starlight 2 anthology (and also his collection Stories of Your Life and Others), because it’s got a lot of great stuff in it– linguistics, physics, math, really alien aliens, and fantastic human characters and interactions. If you haven’t read it, it’s a great story– here’s a spoiler-laden review by a linguist, if you’d like to get more of the idea.

Of course, reading the story got me to thinking about Fermat’s Principle and the calculus of variations in general. Which, as usual, led to the realization that I don’t understand the subject as well as I ought to. I’m not sure that Chiang’s presentation works, but explaining my reasoning involves some math and spoilers, which I’ll put below the fold.

The central conceit of the story is that the alien race whose language the narrator is trying to learn have a way of looking at the universe that treats variational principles as more fundamental than the sort of dynamics we usually think about. The example given is the least-action formulation of Snell’s Law for refraction, in which light is always found to take the fastest path between two points, and this can be used to find the optimal angle of refraction at an interface between two positions.

In the context of the story, this is presented as requiring knowledge of both the start and end points in advance. The aliens view this formulation of physics as fundamental because this is how they see the world– they know what’s going to happen in advance, and this has profound effects on their language, and the mind of the human linguist learning to write it.

The thing is, when I try to think about the variational approach, this explanation ends up seeming a little arbitrary, in a manner similar to the ever-popular anthropic principle. You can use variational principles to calculate the optimal path between two points, but the choice of points is essentially arbitrary. It’s true that if you know a given light ray will be at point A and then at point B, you can find the path from A to B using variational principles, but there’s nothing inevitable about point B. Fermat’s Principle doesn’t tell you that a light ray starting at point A will necessarily reach point B, it just tells you what path it will take from A to B if it happens to go through point B. There are an infinite number of light rays emanating from point A that never pass through point B at all.

If you know points A and B in advance, the variational calculus will give you all the points in between, which seems really impressive from point B. But people arriving at point C will be equally impressed. It’s the same problem as with the “anthropic principle” arguments about the values of fundamental constants– if the constants of nature had slightly different values, life as we know it would be impossible, which seems really awesome if looked at in a certain way (being stoned helps, I hear). But there’s no reason there couldn’t be another universe out there in which beings radically different from ourselves write long philosophical tracts marveling at how well-suited their universe is for their form of life.

Knowing point A doesn’t inevitably determine point B, unless you provide enough extra information that you would’ve been able to determine point B using non-variational methods, as well. Which undercuts the whole premise of the story a little bit. It’s still a powerful piece of work, but the implicit inevitability of those events seems a little dubious.

In optics and quantum physics, of course, the variational principle can be justified using something like Huygens’s Principle, in which waves emanate out from every point in all directions, and interfere with each other constructively only along the extremal path predicted by the variational principle. In a sense, the optimization happens because the waves really do take every possible path between A and B (and other points as well), but the non-optimal paths cancel each other out. That formulation makes a great deal more sense to me, and doesn’t require advance knowledge of point B in the same way that Chiang’s presentation does. It’s not nearly as magical, which makes it less fun for stories, but more satisfying as science.

(Yeah, this is really going to bring in the blog traffic… I should go back to ranting about unions…)

1. #1 Moshe
January 10, 2008

Chad, the point is that if the least action principle is true for an arbitrary point B, then it is true also without specifying an endpoint at all, roughly speaking by averaging all choices of endpoint B.

More technically, this is a question of boundary conditions for the action: specifying an endpoint is Dirichlet boundary conditions; by using Legendre transform one gets to another (but equivalent) least action principle, one for which the end point is not specified but is free (Neumann boundary condition), which physically means no momentum is flowing from the endpoint. These two least action principles are mathematically equivalent, related by Legendre transform.

January 10, 2008

Chad, the point is that if the least action principle is true for an arbitrary point B, then it is true also without specifying an endpoint at all, roughly speaking by averaging all choices of endpoint B.

Sorry– I wasn’t clear. I’m not questioning whether the variational principle is true, I’m questioning the way it’s presented in the story, which seems (to me) to presume a certain inevitability of the path.

I know that variational principles always work (though I don’t understand them as well as I ought to), but they allow lots of different possible paths that provide least-action routes to different endpoints.

3. #3 Moshe
January 10, 2008

Sorry, I think I see your point now. I agree, imposing these bizarre teleological boundary conditions has nothing to do with variational principles as such. I suspect the reason is that the author learned just that one variational principle.

4. #4 C
January 10, 2008

You seem to be confusing effect with cause. When a classical object moves from point A to point B, it does so in accordance with Newton’s 2nd Law. This has the effect that when it moves from A to B, then it does so on a path that minimizes the action. And then it turns out to be useful that you can
use variational calculus techniques to generate a set of equations that determine what path the object takes given that it starts at point A. It’s not as if it is magically happening.

5. #5 dr. dave
January 10, 2008

I’ve always wanted to do some kind of hands-on, algebra only, discrete approximation to variational calculus with my Liberal Arts Physics class. For example… to have them show that a parabola is the “right” path for a projectile rather than one that goes stright up…over… and straight down by calulating the “action” at some discrete set of points along both paths. I’ve never been able to figure out how exactly to make it work, though.

6. #6 Ben L
January 10, 2008

Just to throw another twist into the story:

The variational principle actually shows that it’s an extrema of the action, not necessarily a minimum that produces the classical trajectory. In fact, one can construct a simple example using a simple harmonic oscillator with appropriate boundary conditions where the classical trajectory is actually a maximum of the action. (I forget exactly how to set the problem up, since it’s been a while, but I think you fix the oscillator at t=0 and after one period to be in the same place.)

7. #7 C
January 10, 2008

dr dave,

The problem with a square path as you mention is that you don’t know what the kinetic energy is on that path. You could try calculating the action on the path of a parabola, and maybe a bigger and smaller circle. In this case, we know that it does have to move slower in the smaller circle, and faster in the big one. If you have the Feynman lectures he has chapter on this, and he makes these same observations regarding the interplay of kinetic and potential energy on each of the paths. The problem is that you have to justify the value to use for T, but on a circular path v is fixed, and so is T. That still doesn’t prove anything though. The question is really what makes the parabola the “right” path for a projectile. The answer is that it’s the solution to the differential equation describing it’s behavior. So where did you get that? If you decide to start with Newton’s Laws you use the 2nd Law, right. If you start with the principle of least action, then you write down the Lagrangian, and use the Euler-Lagrange equation to produce the differential equation. The physics is the same. It’s the just the justification is different.

8. #8 andy.s
January 10, 2008

What always bugged me about it was that they’d (teachers) always say, “well, if you pick the Langrangian 1/2 m x’^2 – V(x) and extremize it you get Newton’s laws isn’t that wonderful?”

They never explained why they picked that Lagrangian in the first place.

Did they just pull it out their butts in order to get the right answer, or is there some physical reason why it has to be T-V (for a single particle in a conservative potential)?

9. #9 C
January 10, 2008

Here’s a justification for L = T – V. First, we’re looking to extremize some sort of intergral over time, and the question is what do we intergrate, correct? If you think about what is occurring is that in each little time span dt, the force of gravity does work dW on the particle. Now we’re talking about a conservative situation so the amount of energy the particle has at any one time is fixed. Suppose that as the particle is on its way up, the particle instead moved on a different path for some time dt, which took it farther up by dy. In this case, less work was done by the force (because it’s moving and the force of gravity is acting to pull the particle down). If less work is done, then the particle now has to have more kinetic energy, and since energy is conserved in this scenario, the particle then has to have less potential energy. Thus, L = T – V is what we integrate.

10. #10 Ted Chiang
January 10, 2008

Hi Chad. I began reading this blog after we met at the World Fantasy Convention, but I hadn’t checked it recently, so it’s a bit of a coincidence to see a story of mine being discussed on my first visit here in a few weeks.

When I wrote the story, I knew that the QM version of variational principles stripped out all the teleology, but it was the teleological interpretation that I found the most interesting. I was influenced by the discussion in chapter 14, “Significance of Variational Principles in Natural Philosophy,” of Yourgrau and Mandelstam’s Variational Principles in Dynamics and Quantum Theory. It includes this quote from Planck:

“In fact, the least-action principle introduces an entirely new idea into the concept of causality: The causa efficiens, which operates from the present into the future and makes future situations appear as determined by earlier ones, is joined by the causa finalis for which, inversely, the future – namely, a definite goal – serves as the premise from which there can be deduced the development of the processes which lead to this goal.”

Planck is starting to wander away from physics and into metaphysics here, which I recognize can be a dangerous thing for physicists to do. On the other hand, the goals of an SF story are a bit different from those of a physics lecture; I tried to make the story’s explanation of variational principles serve the story’s metaphorical requirements, while keeping it from becoming outright misleading.

Anyway, I hope you have fun giving your guest lecture.

11. #11 Waterdog
January 11, 2008

Wow, Chad, you know Ted Chiang. That is fabulous. Mr. Chiang, I don’t know if you’ll be checking back in on the comments here, but I’d just like to say that besides being a vociferous speculative reader, I also enjoy a lot of anthologies and some collections in that genre, and I’ve never been as impressed with a uniformly high quality of story as with yours.

I read your more recent story in F&SF a few months ago and it was also pretty good, if not my favourite story of yours (though there’s a lot of competition there).

12. #12 Carl Brannen
January 11, 2008

The method of writing L = T – V and using a variational principle to find the equations of motion is backwards in Newton’s case. Newton’s equations themselves are already as simple as it is possible to write. They should be considered fundamental instead of T-V.

The preference for Lagrangian comes from the fact that modern physics is basically glorified curve fitting. You look for soemthing that is approximately conserved. You fit a curve under the assumption that the approximation is perfect. If there are still errors, you break the symmetry.

Instead, I’d rather suppose that nature is defined as some very simple differential equation whose solutions are very difficult to find. Then the conserved quantities are derived objects and don’t have to be broken.

This suggests replacing GR with a QFT force that only approximates GR. But to do that, you first have to guess at the natural coordinates. And then, well, you have a calculus of variations problems to solve instead of the usual geodesic equations.