Conversion of spherical coordinates to cartesian

425 Views Asked by At

For the flow $A = \frac{c}{r}$ with $r=\sqrt{x^2+y^2+z^2}$ I wanted to calculate the velocity field with $\nabla A$ As a result I get $(-\frac{c}{r^2},0,0)$. So far so good. When I tried converting it to cartesian coordinates I'm stuck. I would have inserted the given $r$ in my solution however wolfram alpha & the solution suggest the solution in cartesian coordinates is: enter image description here

Converting with $x=\sqrt{x^2+y^2+z^2} \cos(0)$ does not really work. I'm sure I'm currently having a major blackout in seeing something elemental missing here.

1

There are 1 best solutions below

1
On BEST ANSWER

You cannot simply convert your expression for polar coordinates to cartesian because the operator is different in the systems. But the cartesian calcuation is easy (using $c=1$): $$\nabla A = \left(\frac{\partial}{\partial x}A, \frac{\partial}{\partial y}A\right) = \left(\frac{\partial}{\partial x}\frac{1}{\sqrt{x^2+y^2}}, \frac{\partial}{\partial y}\frac{1}{\sqrt{x^2+y^2}}\right) = \left(\frac{-x}{(x^2+y^2)^{3/2}}, \frac{-y}{(x^2+y^2)^{3/2}}\right) $$