We're asked to find an equation
in spherical coordinates for the rectangular equation
x squared plus y squared minus z squared equals zero.
If we graph this rectangular equation
in three dimensions,
it gives us this double cone here
where we have one cone above the xy-plane
and one cone below the xy-plane.
There is more than one way to rewrite this equation
using spherical coordinates.
To begin, let's add z squared to both sides
of the equation which gives us the equation
x squared plus y squared
equals z squared.
One strategy might be to add z squared to
both sides of the equation,
which would give us x squared plus y squared plus z squared
on the left side of the equation,
which we could then substitute with rho squared.
But instead of doing this,
let's go ahead and use these three equations here
and perform a substitution for x squared,
y squared, and z squared.
For x squared, because x equals rho sine phi cosine theta,
if we square both sides of this equation,
we can substitute rho squared sine squared phi
cosine squared theta for x squared.
Let's go ahead and perform this substitution.
And then for y squared,
because y equals rho sine phi sine theta,
if we square both sides of this equation,
we can substitute rho squared sine squared phi
sine squared theta for y squared.
Let's also perform this substitution.
And then finally on the right side of the equation
for z squared,
because z equals rho cosine phi,
if we square both sides of this equation,
we can substitute rho squared cosine squared phi
for z squared.
And let's also perform this substitution.
Notice now the equation does only contain
rho, phi, and theta,
and therefore it is a spherical equation.
Let's work on simplifying this equation.
Looking at the left side of the equation,
notice how these two terms
have the greatest common factor of rho squared
sine squared phi.
Let's go ahead and factor this out,
the two terms on the left.
Factoring out rho squared sine squared phi
leaves us with the quantity cosine squared theta
plus sine squared theta.
On the right side we still have rho squared
cosine squared phi.
Using our trig identities,
cosine squared theta plus sine squared theta
simplifies to one,
and therefore the equation simplifies to
rho squared sine squared phi
equals rho squared cosine squared phi.
Now for the next step,
let's divide both sides of the equation by
rho squared cosine squared phi.
Simplifying on the right side,
notice how rho squared divided by rho squared
simplifies to one,
and so does cosine squared phi divided by
cosine squared phi.
And therefore the right side of the equation
simplifies to one.
On the left side of the equation,
rho squared divided by rho squared simplifies to one,
and sine squared phi divided by cosine squared phi
simplifies to tangent squared phi.
Now we do have a simplified spherical equation
for the given rectangular equation.
However let's continue
and try to solve this equation for phi.
If we take the square root of both sides of the equation,
the square root of tangent squared phi is equal to
tangent phi,
and on the right side we have plus or minus
the square root of one, which gives us plus or minus one.
Having a tangent function value of plus or minus one
should remind us of a 45-45-90 reference triangle,
so if we sketch this on the coordinate plane,
we know tangent is positive in the first quadrant.
So if we sketch a 45-45-90 reference triangle
in the first quadrant,
would look something like this
where the two legs would have a length of one
and the hypotenuse would have a length of square root two.
Because tangent phi is equal to the ratio
of the opposite side to the adjacent side,
this angle here is pi over four radians,
and therefore one solution is phi
equals pi over four radians.
But tangent is negative in the second quadrant,
so if we sketch the same reference triangle
in the second quadrant,
now this leg has a length of negative one,
this leg is positive one,
and the hypotenuse is still square root two.
Again the ratio of the opposite side to the adjacent side
is negative one, and therefore the angle
of the terminal side here does have a tangent function
value of negative one,
and this angle is pi minus pi over four radians
or three pi over four radians.
And therefore phi
can also equal three pi over four radians.
So if we try to solve the equation for phi,
we'll actually need both these equations
because remember phi is the angle formed
by the points on the surface and the positive z-axis,
and therefore phi equals pi over four
is the top cone,
and phi equals three pi over four is the bottom cone.
To better understand this,
if we go back to the graph one last time,
here's the angle phi equals pi over four radians.
So if we think of rotating this ray
about the positive z-axis,
it gives us the top cone or the cone above the xy-plane.
And for phi equals three pi over four radians,
the terminal ray is this right here.
We rotate this ray about the z-axis,
it gives us the bottom cone.
Notice how the angle formed between the negative z-axis
and this ray
is pi over four radians,
but phi is measured from the positive z-axis,
giving us phi equals three pi over four radians.
I hope you found this helpful.