# Action principle for the Electromagnetism and Gravity

Here is the formula for the stress energy tensor: $$T_{\mu\nu} = - {2\over\sqrt{ |\det g| }}{\delta S_{EM}\over \delta g^{\mu\nu}}$$ (This follows from varying the total action $S = S_H + S_{EM}$, where $S_H={c^4\over 16\pi G} \int R \sqrt{ |\det g_{\mu\nu}| } d^4 x$ is the Hilbert action and it gives the Einstein's equations, and $S_{EM}$ are other terms in the Lagrangian, that contribute to the right hand side of the Einstein's equations in form of the $T_{\mu\nu}$ above.) The Lagrangian of the electromagnetic field is:

$$S_{EM1} = -\int {1\over 4\mu_0} F_{\alpha\beta} F^{\alpha\beta} \sqrt{ |\det g| } d^4 x$$

and using the formula above, we get for the stress energy tensor:

$$T_{\mu\nu} = {1\over \mu_0} \left( F_{\mu\beta} F_\nu{}^\beta -{1\over 4} F_{\alpha\beta} F^{\alpha\beta} g_{\mu\nu} \right)$$ which is the correct elmag. stress energy tensor. However, the interaction part of the elmag. Lagrangian is $$S_{EM2} = -\int j_\mu A^\mu \sqrt{ |\det g| } d^4 x$$ and if we interpret this as a function of $g^{\mu\nu}$ it would also contribute to the stress energy tensor like this: $$\delta S_{EM2} = -\delta\int j_\mu A^\mu \sqrt{ |\det g| } d^4 x =-\int \delta (g^{\mu\nu} j_\mu A_\nu \sqrt{ |\det g| }) d^4 x =$$ $$=-\int (\delta g^{\mu\nu}) (j_\mu \sqrt{ |\det g| })) A_\nu d^4 x$$

where the $j_\mu \sqrt{ |\det g| }$ is treated as the current density (and thus not depending on $g^{\mu\nu}$ when varying), however, clearly the stress energy tensor corresponding to this would be: $$T_{\mu\nu} = 2 j_\mu A_\nu$$ (Possibly only the symmetric part contributes, because the antisymmetric part cancels with $g^{\mu\nu}$, so we would get $T_{\mu\nu} = j_\mu A_\nu + j_\nu A_\mu$.) In either case, such terms should then appear on the right hand side of the Einstein's equations. However, I don't think that this is correct.

Does anybody know what is wrong here?

-
The variables that you're varying are $A_{\mu}$ and $g^{\mu \nu}$. Since $A_{\mu}$ naturally appears with a lowered index, the variation of $j^{\mu}A_{\mu}$ with respect to the inverse metric is zero, unless there are factors of $g^{\mu \nu}$ hidden in the $j^{\mu}$. Also, you're missing the factor of $R$ that gives you the dynamics of gravity, though that might be intentional. –  Jerry Schirmer Nov 29 '11 at 13:51
Hi Jerry, I think that this is it. (Yes, I skipped the factor $R$ for Einstein's equations here.) But how do I know, that sometimes I need to use the $g^{\mu\nu}$ factor (and then vary it), and sometimes I don't? It seems to me that it is completely arbitrary. –  Ondřej Čertík Nov 29 '11 at 17:22
You have to make a decision about what term you're going to vary. There is no factor of $g^{\mu \nu}$ in $A_{\mu}j^{\mu}$, because $A_{\mu}$ naturally appears with a down index. That term is a form acting on a vector, which happens independently of the metric. And $j^{\mu}$ is naturally a vector and not a one form, because it typically is defined by $j^{\mu} \equiv \frac{\delta L_{\rm charged matter}}{\delta A_{\mu}}$. –  Jerry Schirmer Nov 29 '11 at 17:41
So, therefore, there is, in the natural sense, no dependence on the metric in either term. –  Jerry Schirmer Nov 29 '11 at 17:42
Jerry, thanks a lot. What you write makes great sense to me. But what about a term like $p_\mu p^\mu$ (see physics.stackexchange.com/questions/17604/…)? Could it be that because it is a mixed term with $p_\mu$ and $p^\mu$ one has to convert it to only use $p_\mu$ (let's say) and one gets $g^{\mu\nu}p_\mu p_\nu$ and the metric is (naturally?) there. While for a term like $j^\mu A_\mu = j_\mu A^\mu$, the metric is not naturally there. But I guess I really have to assume (specify) this beforehand, right? –  Ondřej Čertík Nov 29 '11 at 19:48

The comments by Jerry Schirmer tell you the main idea, but I would like to give them more explicitly, and in answer form. When you vary the action with respect to $A_\mu$, the metric variation does not give the unwanted term you mention. But if you vary with respect to $A^\mu$, you do get this term, and it should not appear on the right hand side of Einstein's equations, since we already know those equations from the A 1-form version of the variation.

But the equations of motion shouldn't care whether you choose to vary with respect to $A^\mu$ or with respect to $A_\mu$, you should get the same equations. Formally

$$\delta S = {\delta S\over \delta g_{\mu\nu}}\delta g_{\mu\nu} + {\delta S \over \delta A_\mu} \delta A_\mu$$

And the Einstein equations are the coefficients of $\delta g$, while the (vector potential non-vacuous) Maxwell equations are the coefficients of $\delta A$.

The variations in $A^{\mu},g_{\mu\nu}$ can be easily expressed in terms of the variations in $A_{\mu},g_{\mu\nu}$,

$$\delta A_{\nu} = \delta A^{\mu} g_{\mu\nu} + A^{\mu}\delta g_{\mu\nu}$$

Which, when expressing the total variation of the action, linearly mixes up the Einstein and Maxwell parts:

$$\delta S = ( {\delta S\over \delta g_{\mu\nu}} + {\delta S \over \delta A_{\mu}} A^{\nu})\delta g_{\mu\nu} + {\delta S\over\delta A_{\mu}} g_{\mu\nu} \delta A^{\nu}$$

Where the variational derivatives are all the old variational derivatives, with respect to the pair $g_{\mu\nu},A_{\mu}$ holding the other fixed. These linear combinations give the new variations. It is trivial to see that the new equations of motion are satisfied if and only if the old ones are, so nothing has changed.

The new Maxwell equations are, after multiplying by the inverse metric, the same as the old ones. But the new Einstein equation has an extra source term in it:

$${\delta S \over \delta A_\mu} A^{\nu}$$

This extra source term is obviously zero, by the Maxwell equations, but $\delta S \over \delta A_\mu$ includes the term $J^\mu$, so the term that was bothering you appears here. This variation gives a right hand side of Einstein's equations which includes an extra stress which includes the source term, in the form of the Maxwell equation times the vector potential

$$( D_{\mu} F^{\mu\nu} - J^{\nu}) A^\mu$$

But now it is obvious that the stress contribution vanishes (as it always was, because this is just a variation with respect to different variables of the same action).

### On the density variations

Jon's answer calculates an additional term from varying $\sqrt{g}$, but this term is not present. This is for the reason explained in the answer to this question: Lagrangian for Relativistic Dust derivation questions .

When you vary the metric with EM and, say, a charged dust source, you hold $J\sqrt{g}$ fixed. This is for the same reason that the momentum density is held fixed, you keep the number of worldlines constant when you vary g, so that the conserved currents and charges are preserved under metric variations.

-
Thanks! I was thinking about your answer in "Lagrangian for Relativistic Dust derivation questions" and it is now clear to me, that you need to hold $J\sqrt{g}$ fixed. So you don't get any extra terms coming from varying $\sqrt{g}$, that is clear now. I will think about the rest of your answer for some time (and work it out myself to understand it well) before accepting it. –  Ondřej Čertík Dec 7 '11 at 20:16
Correction: $\delta A_{nu}$ above should be $\delta (A^\mu g_{\mu\nu})$. –  Ondřej Čertík Dec 7 '11 at 20:23
@Ondrej: yes, that was a tex typo for $\delta A_\nu$ fixed. –  Ron Maimon Dec 7 '11 at 21:04

I think that, in the expression $$S_{EM2} = -\int j_\mu A^\mu \sqrt{ -g } d^4 x$$ you have to derive also the determinant. If you do so you will get $$\frac{1}{2}\sqrt{-g}(j_\nu A_\mu+j_\mu A_\nu) \delta g^{\mu\nu} -\frac{1}{2}g_{\mu\nu}\sqrt{-g}j\cdot A\delta g^{\mu\nu}.$$ So, you will get $$T^{(2)}_{\mu\nu}=-\frac{2}{\sqrt{-g}}\frac{\delta S_{EM2}}{\delta g^{\mu\nu}} =-(j_\nu A_\mu+j_\mu A_\nu)+g_{\mu\nu}j\cdot A.$$ This should be the right result.

-
The stress energy formula is $T^{(2)}_{\mu\nu}=-\frac{2}{\sqrt{-g}}\frac{\delta S_{EM2}}{\delta g^{\mu\nu}}$ so you don't get the $1\over 2$ in the final answer. –  Ondřej Čertík Nov 29 '11 at 10:17
If the determinant also needs to be varied, then your derivation is correct (although Dirac doesn't vary it). However, I have never seen such stress energy tensor before (composed of $j$ and $A$). Only $T_{\mu\nu} = {1\over \mu_0} \left( F_{\mu\beta} F_\nu{}^\beta -{1\over 4} F_{\alpha\beta} F^{\alpha\beta} g_{\mu\nu} \right)$. Do you have some pointer into literature about this? What is its physical interpretation? –  Ondřej Čertík Nov 29 '11 at 10:20
Minor comment: I think you got the overall sign wrong, there is minus in the action, minus in the definition of the stress energy tensor and a minus by varying the determinant, so I think the right answer is $$T^{(2)}_{\mu\nu}=-\frac{2}{\sqrt{-g}}\frac{\delta S_{EM2}}{\delta g^{\mu\nu}} =+(j_\nu A_\mu+j_\mu A_\nu)-g_{\mu\nu}j\cdot A.$$. But anyway, the sign is not important for this discussion. –  Ondřej Čertík Nov 29 '11 at 10:54
Thanks, I have fixed 1/2 factor. You can check here en.wikipedia.org/wiki/Maxwell%27s_equations_in_curved_spacetime. The interaction term gives a contribution to the rhs of Einstein equations. This can be understood as, wheh there is charge matter, this adds a contribution to the stress energy tensor. –  Jon Nov 29 '11 at 10:54
Thanks. So just that we understand each other, you are saying that the right hand side of the Einstein's equations will contain: $T_{\mu\nu}^{(1)}+T_{\mu\nu}^{(2)}$, where $T_{\mu\nu}^{(1)}={1\over \mu_0} \left( F_{\mu\beta} F_\nu{}^\beta -{1\over 4} F_{\alpha\beta} F^{\alpha\beta} g_{\mu\nu} \right)$ and $T^{(2)}_{\mu\nu} =-(j_\nu A_\mu+j_\mu A_\nu)+g_{\mu\nu}j\cdot A$. I went to the wiki, and I can see there the $T^{(1)}_{\mu\nu}$ term, but not the $T^{(2)}_{\mu\nu}$ term. Am I missing something? –  Ondřej Čertík Nov 29 '11 at 11:04

Actually your initial formula is wrong: the $\delta(S_{EM})/\delta(g(u,v))$ should be $\delta(L_{EM}/\delta(g(u,v))$, where $L$ (the Lagrangian) is the thing that is integrated over space to get the action $S$.

It's an apple and oranges thing: the action is the integral of the Lagrangian, $\delta$ (action) remains a number, not a space function as required.

Interestingly, Wald's book and MTW book both have this wrong, just like you do, so it is understandable. If you look at other sources on Lagrangian field theory, or even the Wikipedia article on the stress-energy tensor under Hilbert stress-energy tensor, they have it correct, taking delta of the density function L rather than the integral of it, S, when defining the stress-energy tensor (which is a space function).

This has no effect on your working the problem, but it is remarkable that these two widely-used textbooks on GR would write this thing which makes no sense and everyone just accepts it and proceeds as if it made sense. Students are very accepting people.

-
Can you be more specific and use Latex notation to write what you think the correct formula should be? I think the way I wrote it is correct. You take Lagrangian density, integrate over spacetime (4D integral) to get the action. Then you apply the functional derivative to the action, not the Lagrangian density. That's at least the standard definition, as far as I know. –  Ondřej Čertík Nov 17 '12 at 20:01