Transform a vector field

453 Views Asked by At

I was trying to transform a vector field in cartesian coordinates given by:

$$v_{cartesian}=(x^{2}+y^{2},y)$$

to polar coordinates. If I use the transformation law for the components of a vector field

I get $$v_{polar}=(r(r Cos \theta+sin^2 \theta),(-r+cos \theta) sin \theta)$$

However if I use mathematica and the function TransformedField I get

TransformedField[ "Cartesian" -> "Polar", {x^2 + y^2, y}, {x, y} -> {r, \[Theta]}] // Simplify

$$v_{polar}=(r(r Cos \theta+sin^2 \theta),r(-r+cos \theta) sin \theta)$$

Which one is the right answer?

1

There are 1 best solutions below

0
On BEST ANSWER

\begin{align} \left(x^2+y^2\right) \mathbf{i}+y\, \mathbf{j}&= r^2\left(\mathbf{u}_r\cos\theta-\mathbf{u}_\theta \sin\theta\right) +r\sin\theta \left(\mathbf{u}_r\sin\theta+\mathbf{u}_\theta \cos\theta\right)\\ &= r\left(r\cos\theta+\sin^2\theta\right)\mathbf{u}_r+ r\sin\theta\left(-r+\cos\theta\right)\mathbf{u}_\theta\ , \end{align} which agrees with the result given by Mathematica.