Recent content by ramparts

  1. R

    Graduate Why don't scalar fields propagate superluminally?

    This is a really basic question, but... Say I have a massive scalar field obeying the Klein-Gordon equation linearized about flat space, \partial_t^2 \phi + (k^2 + m^2)\phi = 0. This has solutions \phi \sim e^{\pm \sqrt{k^2 + m^2}t} and the sound speed should be \omega_k/k =...
  2. R

    Mathematica Change variables and expand around new variable (Mathematica)

    I think the problem boils down to this: given a differential expression (like the one I posted) I don't know how, in Mathematica, to change variables and have Mathematica do all the chain rule through. I've since learned that Maple can do this (and indeed I've been using Maple for what I need to...
  3. R

    Mathematica Change variables and expand around new variable (Mathematica)

    I have a differential expression that I want to expand to some order around infinity (it's for calculating weak-field limits in GR). I have two functions, B(r) and n(r), and some expression involving them along the lines of n[r] (3 r B'[r]^2 - 4 B[r] (2 B'[r] + r B''[r])) Basically I want...
  4. R

    Graduate Matter Lagrangian for perfect fluid

    So I've checked a couple of books and the paper PeterDonis posted (thanks!) and it seems the perfect fluid Lagrangian is actually just -ρ. Frankly that makes sense because the thing I thought it was vanishes for a radiation fluid, which is clearly wrong. L=-ρ fits the usual form for the...
  5. R

    Graduate Matter Lagrangian for perfect fluid

    Thanks. It looks like there's a copy in my department's library which I'll look at, but for the benefit of people reading who don't have that, is there an executive summary you could give us?
  6. R

    Graduate Matter Lagrangian for perfect fluid

    Paywall is fine by me, I'm at a university. I'll take a look through that paper, thanks - most of the actions have more information than I need (since it should just be a function of density and pressure) but I'll read through in more depth soon. I just had a go at doing something very simple...
  7. R

    Graduate Matter Lagrangian for perfect fluid

    The stress-energy tensor is usually defined in standard GR treatments as T_{\mu\nu} = -\frac{2}{\sqrt{-g}}\frac{\delta(\sqrt{g}L_m)}{\delta g^{\mu\nu}}) with the Lm the matter Lagrangian. I'm curious what Lm is for a perfect fluid with density ρ and pressure P that would lead to the...
  8. R

    Mathematica Mathematica: Extracting pairs of points from a matrix

    Still trying to figure out why that works, particularly why I need the &/@ and can't just replace the # with "data". I've found that this works equivalently (again for getting, e.g., first and third columns): Transpose[{data[[All, 1]], data[[All, 3]]}]
  9. R

    Mathematica Mathematica: Extracting pairs of points from a matrix

    Thanks! I've got it working, and I don't see a need to define a separate function so I've decided to use this command: ({#[[1]], #[[3]]} & /@ data) To get the first and third columns, etc. I still have no idea why it works so I'll dig through the documentation. Thanks!
  10. R

    Mathematica Mathematica: Extracting pairs of points from a matrix

    Honestly, I have no idea what that's doing. So we're defining a function GetDataSetForColumn... do I define it as is and then apply it to my matrix? Let's say I've called my matrix "data", and then I run GetDatasetForColumn[data,1] I get out {{1, Slot}[{11, 12, 13, 14, 15}], {1, Slot}[{21...
  11. R

    Mathematica Mathematica: Integrating over data sets?

    Update: ran into another question while doing this which, since it's a separate question, I've posted separately to aid Googlers of the future: https://www.physicsforums.com/showthread.php?p=3640475#post3640475 Once I've got this sorted I should be able to do the integral in no time...
  12. R

    Mathematica Mathematica: Extracting pairs of points from a matrix

    Probably a basic Mathematica question but after trying a few things I'm stumped. I have a table with some x values and a range of data that are dependent on those values, call them a(x), b(x), c(x), etc. So the table looks like { {x1, a1, b1, c1}, {x2, a2, b2, c2}, {x3, a3, b3, c3}, etc. }...
  13. R

    Mathematica Mathematica: Integrating over data sets?

    Thanks, this looks like exactly what I need, I'll try this!