MathsLearner
New member
- Joined
- Aug 13, 2017
- Messages
- 27
I need to convert from rectangular to spherical coordinates [math] (\sqrt3, -1, 2\sqrt3)[/math]. The formulae are
[math] \rho = \sqrt{(x^2+y^2+z^2)} -eq1 \\ x = \rho \sin\phi \cos\theta; -eq2\\ y = \rho\sin\phi\sin\theta; -eq3\\ z = \rho\cos\phi; -eq4 \\ \rho = \sqrt{(3+1+12)} = 4; \\ \cos\phi = \frac {2\sqrt3} 4; \\ \phi = \frac \pi 6 [/math]The confusion is with the [math] \theta; [/math]. I can have two values using eq 2 and 3,
using eq1
[math] \cos\theta = \frac x {\rho\sin\phi} = \frac {\sqrt3} {4\sin(\frac \pi 6)} \\ \theta = \frac \pi 6; -r1 [/math] using eq2
[math] \sin\theta = \frac y {\rho\sin\phi} = -\frac {1} {4\sin(\frac \pi 6)} = -\frac {1} 2 \\ \theta = -\frac {\pi} 6 [/math].
Since [math] \theta [/math] is negative. The angle is in the anti clockwise direction and lies in the 4th quadrant, the value in terms of clockwise is
[math] 2\pi - \frac \pi 6 = \frac {11\pi} 6 [/math]. It also matches since y is negative.
Does it mean the [math] r1 [/math] is wrong?
[math] \rho = \sqrt{(x^2+y^2+z^2)} -eq1 \\ x = \rho \sin\phi \cos\theta; -eq2\\ y = \rho\sin\phi\sin\theta; -eq3\\ z = \rho\cos\phi; -eq4 \\ \rho = \sqrt{(3+1+12)} = 4; \\ \cos\phi = \frac {2\sqrt3} 4; \\ \phi = \frac \pi 6 [/math]The confusion is with the [math] \theta; [/math]. I can have two values using eq 2 and 3,
using eq1
[math] \cos\theta = \frac x {\rho\sin\phi} = \frac {\sqrt3} {4\sin(\frac \pi 6)} \\ \theta = \frac \pi 6; -r1 [/math] using eq2
[math] \sin\theta = \frac y {\rho\sin\phi} = -\frac {1} {4\sin(\frac \pi 6)} = -\frac {1} 2 \\ \theta = -\frac {\pi} 6 [/math].
Since [math] \theta [/math] is negative. The angle is in the anti clockwise direction and lies in the 4th quadrant, the value in terms of clockwise is
[math] 2\pi - \frac \pi 6 = \frac {11\pi} 6 [/math]. It also matches since y is negative.
Does it mean the [math] r1 [/math] is wrong?