3

I'm embarrassed that I don't even know the language for what I'm asking. The result of an operation I'm performing is: $$expression=-dt^2 \left(c + a t\right)^2$$ $dt$ is basically an infinitesimal in a metric and I want to extract everything else. That is, I'm trying to construct a metric tensor from the components of a metric formula. I want a function, f, such that$$f[expression]=-\left(c + a t\right)^2$$ In Mathematica, for what function am I looking?

Quark Soup
  • 1,610
  • 9
  • 14
  • 2
    $dt$ is not an infinitesimal, but rather a linear one-form, i.e., physisicts use to write $dt^2$ instead of $dt \otimes dt$ namely a bilinear form. – Artes Feb 10 '22 at 23:38
  • $g(\partial t, \partial t)= g_{tt};$-that's all. – Artes Feb 10 '22 at 23:43
  • I don't understand that notation. Could you try that in the 'Input' form, please. – Quark Soup Feb 10 '22 at 23:48
  • You should think about your goal once more, if expression is a metric tensor, then the last comment explains how to get the coefficient at $dt \otimes dt$ otherwise your question is not well posed. Nonetheless a slightly more detailed discussion one can find here How to calculate scalar curvature, Ricci tensor and Christoffel symbols in Mathematica?. $\partial t $ is a normalized vector in a tangent vector space to a manifold. – Artes Feb 10 '22 at 23:57
  • Hey, thanks for the suggestion. They're valuable. My issue is not so much with your answer as the fact that I can't translate what you said into Mathematica. If you'd be so kind as to express your thoughts in the 'Input' form of Mathematica, then I could reproduce it and dissect it to understand your meaning. – Quark Soup Feb 10 '22 at 23:59
  • While $dt(\partial t)=1 $, then $dt \otimes dt$ is a tensor product of two one-forms $dt$. Take a closer look at the link above or examine a more sophisticated package for tensor calculus in general relativity. – Artes Feb 10 '22 at 23:59
  • 1
    Coefficient[Dt[t]^2 (c + a t)^2, Dt[t]^2] – Bill Watts Feb 11 '22 at 01:05

1 Answers1

6

OK.

dssq = -dt^2 (c + a t)^2

Coefficient[dssq, dt^2] (* -(a t + c)^2 *)

Bill Watts
  • 8,217
  • 1
  • 11
  • 28