2
$\begingroup$

Is it possible to take a time derivative of a vector given in some curvelinear coordinate system (i.e. spherical)? Mathematica would need to take into account the time dependence of the basis vectors.

$$ \frac{d}{dt}\vec{r}=\dot{r}\hat{r}+r\dot{\theta}\hat{\theta}+r\sin[\theta]\dot{\phi}\hat{\phi} $$

I bet that there is something built into mathematica already to get the above result, but I can't figure it out.

Edit: Thanks for your answers, they already helped me a lot. In the end I was hoping for a quick way to get:

$$ \frac{d}{dt}\left( \begin{array}{c} f(r,\theta,\phi) \\ 0 \\ 0 \end{array} \right)=\left(\frac{d}{dt}f(r,\theta,\phi)\right) \left( \begin{array}{c} \dot{r} \\ r\dot{\theta} \\ r\sin[\theta]\dot{\phi} \end{array} \right) $$

just by typing

$$ Dt[\{f(r,\theta,\phi),0,0\},t] $$

in Mathematica. I could get this behavior by multiplying the time derivative of $f$ with the result from TransformedField, but this could quickly become tedious with higher time derivatives and more vector components. Is there a more direct way to do it?

Thanks a lot

$\endgroup$
2
  • $\begingroup$ Well, if you concluded that there's something built-in why didn't you take a Documentation Centre tour ? As a starter take a look here $\endgroup$
    – Sektor
    Mar 22, 2014 at 10:55
  • $\begingroup$ The documentation center tour didn't really show me any examples on what I want to achieve. But my question was not clear in that regard, for which I apologize. I have updated it (see my edit). $\endgroup$
    – ftiaronsem
    Mar 22, 2014 at 12:01

1 Answer 1

3
$\begingroup$

You can do :

TransformedField["Cartesian" -> "Spherical", Dt[{x, y, z}, t], {x, y, z} -> {r, θ, ϕ}] 
 // Simplify
(* {Dt[r, t], r Dt[θ, t], r Dt[ϕ, t] Sin[θ]} *)
$\endgroup$
2
  • $\begingroup$ Thanks a lot, that already started me in the right direction, but I was wondering for a more direct way of taking the time derivative of vectors (arrays) (see my edit). $\endgroup$
    – ftiaronsem
    Mar 22, 2014 at 12:00
  • $\begingroup$ I think you already get the time derivative of vectors; if you want it in a different basis, which is what your edit suggests, then this is a different question. $\endgroup$ Mar 22, 2014 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.