# Rectangular to Spherical Coordinate conversion...

1. Jul 9, 2017

### Unicow

1. The problem statement, all variables and given/known data
Convert from rectangular to spherical coordinates.
(-(sqrt3)/2 , 3/2 , 1)

2. Relevant equations
We know the given equations are
ρ = sqrt(x^2 + y^2 + z^2)
tan theta = y/x
cos φ = z / ρ

3. The attempt at a solution
My answer was (2, -pi/3, pi/3)
It should be a simple plug and go... Am I doing simple math wrong? The only part I think I could get wrong is the y/x but -3 / 2 / sqrt3 / 2 should be sqrt3 right?

I'm using webassign if that matters at all. I'm sorry for posting such a simple question but I don't understand how that solution is wrong... I guess I'm just having a huge brain fart?

Last edited: Jul 9, 2017
2. Jul 9, 2017

### Staff: Mentor

No, since $x = \frac{-\sqrt 3}{2}$. You are ignoring the sign, so your value for $\theta$ will be wrong.

3. Jul 9, 2017

### Unicow

Sorry I must have deleted the negative sign by accident while I was editing. I've edited it back in and I had counted that into my calculations and that's why my theta is negative pi / 3 instead of positive.

4. Jul 9, 2017

### Staff: Mentor

Your answer of (2, -pi/3, pi/3) looks fine to me. Is it possible that WebAssign doesn't recognize "pi" and wants you to enter a decimal value?

5. Jul 9, 2017

### Unicow

Yeah it's really frustrating especially considering it's such an easy question. I've tried decimal already and the simple "pi" or whatever, is correct for all the other choices...

6. Jul 9, 2017

### Staff: Mentor

The second and third equations above are wrong, according to this wiki article (https://en.wikipedia.org/wiki/Spherical_coordinate_system).
$\theta = \arccos(z/r)$ Here r is the same as your $\rho$.
$\phi = \arctan(y/x)$

7. Jul 9, 2017

### Unicow

There's no way that can be right... I've already done a few questions and gotten them all right except for this one... Also, I might trust the textbook more than wikipedia. I hope you don't take this as an insult or anything because I do appreciate the help.

8. Jul 9, 2017

### Staff: Mentor

No, I don't take it as an insult at all. The wiki formulas seem weird to me, as well, and that's why I qualified my answer.

I checked with wolframalpha, which gives an answer of (2, pi/3, 2pi/3) -- http://www.wolframalpha.com/input/?i=spherical+coordinates(-sqrt(3)/2,+3/2,+1).
Not all books use the notation in the same way. For a point $(\rho, \theta, \phi)$, some books call $\theta$ the inclination (measured away from the z-axis), and others call $\phi$ the inclination. These differences make your formulas correct as far as some books are concerned and incorrect in others.

9. Jul 9, 2017

### Unicow

Ahh I see and understand now haha. Thank you for your help and it completely went over my head about how it could be more than one value of "n * pi / 3" for theta to be the value. I got the correct answer! Thank you so so much.

10. Jul 9, 2017

### Orodruin

Staff Emeritus
The typical convention in physics is that $\theta$ is the polar angle and $\varphi$ the azimuthal angle. In mathematics, the convention is usually the other way around. The Wikipedia page shows both conventions.