# Deriving f(R) field equations

1. Sep 5, 2009

### ramparts

Hi all,

I'm following along the derivation of the field equations for f(R) gravity, and there's one step I don't understand entirely. There's just something in the math that's eluding me. So wiki has a pretty good explanation:

http://en.wikipedia.org/wiki/F(R)_gravity#Derivation_of_field_equations

So there's a step where you have:

$$\delta S = \int \frac{1}{2\kappa} \sqrt{-g} \left(\frac{\partial f}{\partial R} (R_{\mu\nu} \delta g^{\mu\nu}+g_{\mu\nu}\Box \delta g^{\mu\nu}-\nabla_\mu \nabla_\nu \delta g^{\mu\nu}) -\frac{1}{2} g_{\mu\nu} \delta g^{\mu\nu} f(R) \right)\, d^4x$$

Now the next important step, the wiki article says, is to integrate the second and third terms by parts to yield:

$$\delta S = \int \frac{1}{2\kappa} \sqrt{-g}\delta g^{\mu\nu} \left(\frac{\partial f}{\partial R} R_{\mu\nu}-\frac{1}{2}g_{\mu\nu} f(R)+[g_{\mu\nu}\Box -\nabla_\mu \nabla_\nu] \frac{\partial f}{\partial R} \right)\, \mathrm{d}^4x$$

In other words, integrating by parts should yield:

$$\int \sqrt{-g} \left(\frac{\partial f}{\partial R} (g_{\mu\nu}\Box \delta g^{\mu\nu}-\nabla_\mu \nabla_\nu \delta g^{\mu\nu}) \right)\, d^4x = \int \sqrt{-g}\delta g^{\mu\nu} \left([g_{\mu\nu}\Box -\nabla_\mu \nabla_\nu] \frac{\partial f}{\partial R} \right)\, \mathrm{d}^4x$$

And from there getting the usual f(R) field equations is trivial. What I'm confused by is how to integrate by parts to get that. Naïvely I think that the left side should be 0, since the connection has metric compatibility so any covariant derivatives of $$g_{\mu \nu}$$ should vanish. But apparently they don't, and somehow integrating by parts ends up moving the $$\partial f / \partial R$$ into the covariant derivatives. Any help here? I'm pretty confused by how the math is supposed to work.

Thanks!

2. Sep 5, 2009

### ramparts

I should add: I see how this makes sense if integrating by parts means that instead of taking normal derivatives, you somehow take a couple of covariant derivatives. In other words, something like:

$$\int F(R) g_{\mu \nu} \Box \delta g^{\mu \nu} dV = \int g_{\mu \nu} \delta g^{\mu \nu} \Box F(R) dV$$

where $$F(R) = \partial f / \partial R$$, $$dV = \sqrt{-g} d^4 x$$ is the volume element, and you have something like:

$$u = F(R)$$, $$dv = g_{\mu \nu} \Box \delta g^{\mu \nu} dV$$

$$du = \Box F(R) dV$$, $$v = g_{\mu \nu} \delta g^{\mu \nu}$$

And the boundary terms vanishing at infinity, but I totally don't see why integration by parts should work like that :)

3. Sep 6, 2009

### Staff: Mentor

If you don't take covariant derivatives, the equation won't be invariant under a change of coordinates. To put it another way, in a tensor equation in GR, you can't just take ordinary derivatives, because of the curvature of spacetime; you have to include extra terms involving the connection coefficients for the equation to remain correct. Taking covariant derivatives includes all that for you automatically.

4. Sep 6, 2009

### ramparts

Got it - that makes sense. So are we integrating by parts twice for each term (one for each covariant derivative)? I've never really seen the "rules" for integration in curved spacetimes so if anyone knows where to go for that, I'd appreciate it :)

5. Sep 6, 2009

### ramparts

Ah, and also I was wondering why the covariant derivative of variations of the metric wouldn't vanish (like the covariant derivative of the metric would).

6. Sep 6, 2009

### Staff: Mentor

Actually, it doesn't look to me like they're integrating the third term by parts. It looks like this:

$$- \frac{\partial f}{\partial R} \nabla_\mu \nabla_\nu \delta g^{\mu\nu}$$

both before and after (they just factor out the $$\delta g^{\mu\nu}$$ in the "after" formula). Maybe I'm missing something.

For the second term, it looks like v in the integration by parts is $$\delta g^{\mu\nu}$$ and u is $$\frac{\partial f}{\partial R}$$; there's only one covariant derivative in the term, and it just switches from v to u.

As for the general rule, the same rule basically applies to everything involving derivatives and integrals: stick a $$\sqrt{- g}$$ in front of each $$d^{4} x$$, and replace all ordinary derivatives with covariant derivatives.

7. Sep 6, 2009

### Staff: Mentor

I don't think it does, in general. I haven't worked through your specific example in detail, so I don't know why the metric itself is just carried through the integration by parts without any change.

8. Sep 6, 2009

### ramparts

Can you show me how you're working that out? I think that would be helpful so I can see how integration by parts is supposed to work here. Having something like:

$$u = \frac{\partial f}{\partial R}$$ and $$dv = \nabla_\mu \nabla_\nu \delta g^{\mu\nu} \sqrt{-g} d^4 x$$

becoming:

$$du = \nabla_\mu \nabla_\nu \frac{\partial f}{\partial R} \sqrt{-g} d^4 x$$ and $$v = \delta g^{\mu\nu}$$

makes intuitive sense to me, but again I've never done a calculation like that before.

Do you mean the v would be $$g_{\mu \nu} \delta g^{\mu\nu}$$? I don't think you can split those two, because of the summation. And I believe there are two covariant derivatives, it's a d'Alembertian.... $$\nabla^\mu \nabla_\mu$$

9. Sep 6, 2009

### Staff: Mentor

Oops, I misread the equations. Your

$$u = \frac{\partial f}{\partial R}$$ and $$dv = \nabla_\mu \nabla_\nu \delta g^{\mu\nu} \sqrt{-g} d^4 x$$

becoming:

$$du = \nabla_\mu \nabla_\nu \frac{\partial f}{\partial R} \sqrt{-g} d^4 x$$ and $$v = \delta g^{\mu\nu}$$

looks right to me.

You're right, I left out the $$g_{\mu \nu}$$ in the second term.

Technically, yes, it's two derivatives, but they act like a single derivative operator, because of the summation.

10. Sep 6, 2009

### ramparts

Good point - so in both cases (for $$\Box$$ and for $$\nabla_\mu \nabla_\nu$$) do you really just integrate by parts twice, treating $$\Box$$ or $$\nabla_\mu \nabla_\nu$$ as the relevant derivative operators?

11. Sep 7, 2009

### Staff: Mentor

For $$\Box$$ you would only need to integrate by parts once, since it's a single derivative operator and it's "self-contained" (i.e., it doesn't share any summation indices with any other factors). For $$\nabla_\mu \nabla_\nu$$, it's a little tricky, because the summation in that case is with the factor, $$\delta g^{\mu \nu}$$, that's being moved "out from under" the derivative. I *think* that you can still treat $$\nabla_\mu \nabla_\nu$$ as a single derivative operator in that case, but I haven't worked out the calculation in detail to be sure. In any case, I think you've got the basic mechanics of integrating by parts correct.