Spherical Coordinates and Mathematica

In summary, to draw the cone z=Sqrt[x^2+y^2] using spherical coordinates, you will need to determine the value of phi. This can be done by setting the equation in the xz-plane and finding that the cone makes an angle of pi/4 with the z-axis, so phi = pi/4. You can then use the formulas x = (Rho)sin(phi)cos(theta), y = (Rho)sin(phi)sin(theta), z = (Rho)cos(phi) to graph the cone, with theta going from 0 to 2pi and Rho being a range such as (0,3).
  • #1
StephenDoty
265
0
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
(Rho)=sqrt(2x^2+2y^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.
Thanks
Stephen
 
Last edited:
Physics news on Phys.org
  • #2
StephenDoty said:
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
(Rho)=sqrt(2x^2+2y^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.
Thanks
Stephen
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]
and
[tex]y= \rho sin(\theta) sin(\phi)[/tex]
so
[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].)
 
  • #3
so to graph it would I use
x= (Rho)sin(phi)cos(theta)
y=(Rho)sin(phi)sin(theta)
z=(Rho)cos(phi)

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?
Thanks
Stephen
 

1. What are spherical coordinates and why are they useful?

Spherical coordinates are a type of coordinate system that is used to locate points in three-dimensional space. They are useful because they allow us to describe the position of a point using angles and distances, which can be more intuitive in certain situations than the Cartesian coordinates we are used to.

2. How do I convert between spherical and Cartesian coordinates in Mathematica?

In Mathematica, the function SphericalCoordinates can be used to convert from spherical coordinates (specified as {r, θ, ϕ}) to Cartesian coordinates (specified as {x, y, z}). The function InverseSphericalCoordinates can be used to convert from Cartesian coordinates to spherical coordinates.

3. Can I plot functions in spherical coordinates using Mathematica?

Yes, you can plot functions in spherical coordinates using the ParametricPlot3D function in Mathematica. Simply specify the function in terms of r, θ, and ϕ and the range of values for each variable, and Mathematica will generate a 3D plot.

4. How can I calculate the volume and surface area of a sphere using Mathematica?

The built-in functions in Mathematica, Volume and SurfaceArea, can be used to calculate the volume and surface area of a sphere in spherical coordinates. Simply specify the radius of the sphere and the function will return the values.

5. Are there any special considerations when using spherical coordinates in Mathematica?

Yes, it is important to note that Mathematica uses the convention of θ representing the angle from the positive z-axis, and ϕ representing the angle in the x-y plane from the positive x-axis. This may differ from other conventions, so it is important to double check the orientation of your coordinates when using Mathematica's functions.

Similar threads

Replies
3
Views
614
  • Calculus
Replies
29
Views
684
Replies
3
Views
1K
  • Calculus
Replies
3
Views
2K
Replies
2
Views
258
Replies
4
Views
310
Replies
11
Views
5K
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
542
Replies
8
Views
2K
Back
Top