Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Spherical Coordinates and Mathematica

  1. Sep 20, 2008 #1
    Use spherical coordinates to draw the cone z=Sqrt[x^2+y^2].
    Hint: You will need to determine \[Phi].

    How would I go about finding phi?
    Below are the x y and z components, but I cannot figure out how to find the range of phi:

    z^2=x^2 + y^2

    x = sqrt(2x^2+2y^2) sin [Phi] cos [Theta]
    y = sqrt(2x^2+2y^2) sin [Phi] sin [Theta]
    z = sqrt(2x^2+2y^2) cos [Phi]

    Mathematica Code:
    ParametricPlot3D[{sqrt(2x^2+2y^2) Sin[[Phi]]*Cos[[Theta]],
    sqrt(2x^2+2y^2)Sin[[Phi]] Sin[[Theta]], sqrt(2x^2+2y^2) Cos[[Phi]]}, {[Phi], 0,
    Pi}, {[Theta], 0, 2*Pi}, ViewPoint -> {6, 3, 2}]

    Any help would be appreciated.
    Last edited: Sep 20, 2008
  2. jcsd
  3. Sep 20, 2008 #2


    User Avatar
    Science Advisor

    Oh, please don't think of Mathematica as a Panacea. Like any computer program, GIGO! You are mixing Cartesian and Spherical coordinates there: you don't want "x" and "y" in your spherical coordinates formula.

    [tex]x= \rho cos(\theta)sin(\phi)[/tex]
    [tex]y= \rho sin(\theta) sin(\phi)[/tex]
    [tex]x^2+ y^2= \rho^2 sin^2(\phi)(cos^2(\theta)+ sin^2(\theta))= \rho^2 sin^2(\phi)[/tex]
    and so the equation becomes
    [tex]z= \rho cos(\phi)= \sqrt{\rho^2sin(\phi)}= \rho sin\phi[/tex]
    or simply
    [tex]cos(\phi)= sin(\phi)[/tex]
    [tex]tan(\phi)= 1[/itex]

    Of course, there is a much easier way to find [itex]\phi[/itex]! Since the equation is symmetric in x and y, just look in the xz-plane. If y= 0, the equation becomes z= x, a line which makes an angle of [itex]\pi/4[/itex] with the x-axis and so the entire cone makes an angle of [itex]\pi/2- \pi/4= \pi/4[/itex] with the z-axis. That is, [itex]\phi= \pi/4[/itex].
    (And, of course, [itex]tan(\pi/4)= 1[/itex].)
  4. Sep 20, 2008 #3
    so to graph it would I use
    x= (Rho)sin(phi)cos(theta)

    with theta going from 0 to 2pi
    phi = pi/4
    Rho= some range like (0,3)

    or is there a way to solve for Rho?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook