Hi,

Le lundi 30 mai 2016 23:12:01 UTC+2, Zach Elgood a écrit :
>
> Thank you for your response. I haven't actually tried the example, as my 
> expression is much more complex. However, let's say I want to take the 
> covariant derivative of the following vector with respect to the 
> Schwarzschild metric: (1-M/r)dt^2.
>

I am not sure to understand:  (1-M/r)dt^2 is not a vector...

How would one construct that to take a covariant derivative? 
>
>
Here is an example with the vector  d/dt + (-2*m/r + 1) d/dr :

sage: M = Manifold(4, 'M')
sage: X.<t,r,th,ph> = M.chart(r't r:(0,+oo) th:(0,pi):\theta 
ph:(0,2*pi):\phi')
sage: m = var('m'); assume(m>=0)
sage: g = M.lorentzian_metric('g')
sage: g[0,0], g[1,1] = -(1-2*m/r), 1/(1-2*m/r)
sage: g[2,2], g[3,3] = r^2, (r*sin(th))^2 
sage: v = M.vector_field(name='v')
sage: v[0], v[1] = 1, 1-2*m/r
sage: v.display()
v = d/dt + (-2*m/r + 1) d/dr
sage: nabla = g.connection(); nabla
Levi-Civita connection nabla_g associated with the Lorentzian metric g on 
the 4-dimensional differentiable manifold M
sage: nab_v = nabla(v); nab_v
Tensor field nabla_g(v) of type (1,1) on the 4-dimensional differentiable 
manifold M
sage: nab_v.display()
nabla_g(v) = m/r^2 d/dt*dt - m/(2*m*r - r^2) d/dt*dr - (2*m^2 - m*r)/r^3 d/
dr*dt + m/r^2 d/dr*dr - (2*m - r)/r^2 d/dth*dth - (2*m - r)/r^2 d/dph*dph

Best wishes,

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to