How to obtain equations for the intersection of two cylinders and how does one plot the intersection in Maple?

155 Views Asked by At

Given two cylinders

$$x^2+z^2=4$$

$$x^2+y^2=4$$

What is the correct way to parametrize their intersection?

In spherical coordinates:

$$\rho^2 \sin^2{\phi} \cos^2{\theta}+\rho^2 \cos^2{\phi}=4$$ $$\rho^2 \sin^2{\phi} \cos^2{\theta} + \rho^2 \sin^2{\phi} \sin^2{\theta}=4 \implies \rho^2 \sin^2{\phi}=4$$ $$\implies 4 \cos^2{\theta}+\rho^2 \cos^2{\phi}=4\tag{1}$$

I believe $(1)$ gives the spherical coordinates for the intersection.

If we equate the first two equations, we are able to get rid of $\rho$ however.

$$\rho^2 \sin^2{\phi} \cos^2{\theta} +\rho^2 \cos^2{\phi}=\rho^2 \sin^2{\phi}$$ $$\implies \rho^2 \sin^2{\phi}(1-\cos^2{\theta} = \rho^2 \cos^2{\phi}$$ $$\implies \rho^2 \sin^2{\phi} \sin^2{\theta}= \rho^2 \cos^2{\phi}$$ $$\implies \sin^2{\phi} \sin^2{\theta}=\cos^2{\phi}\tag{2}$$

What is the difference between $(1)$ and $(2)$? It seems information has been lost in $(2)$.

Finally, what is the correct way to plot the intersection in Maple?

with(plots);
implicitplot3d(sin(p)^2*sin(t)^2 = cos(p)^2, r = 1 .. 1.1, t = 0 .. 2*Pi, p = 0 .. Pi, coords = spherical);

Attempt at plotting intersection of two cylinders

The above command produces a result which looks roughly correct, but something seems off. In particular, I had to specify a range for $\rho$, and that is making the graph a surface and not a curve. At least that is what I think. How do we get the correct curves in Maple?

1

There are 1 best solutions below

0
On

Starting from $$x^2+y^2=4$$ $$x^2+z^2=4$$ $$\implies z^2=y^2$$ we obtain the following parameterization:

$$f(t)=(\pm \sqrt{4-t^2}, t, \pm t)$$

This is in fact four parameterized curves, considering the plus and minus signs in their four combinations.

We plot this in Maple as follows

plot3d([[sqrt(-y^2 + 4), y, y], [-sqrt(-y^2 + 4), y, y], [sqrt(-y^2 + 4), y, -y], [-sqrt(-y^2 + 4), y, -y]], y = -2 .. 2)

enter image description here

Interpretation We started with two equations and three variables, but given any one of the variables we could solve for the other two. We can parameterize the resulting 3d curves with just one parameter, and in the parameterization above I chose y to be the parameter.

In spherical coordinates we have a similar situation, but with the three variables being $\rho, \theta$ and $\phi$

$$x^2 + y^2 = 4 \implies \rho^2 \sin^2 \phi \cos^2 \theta + \rho^2 \cos^2 \phi = 4 \tag{1}$$

$$x^2 + z^2 = 4 \implies \rho^2 \sin^2 \phi \cos^2 \theta + \rho^2 \sin^2 \phi \sin^2 \theta=4 \implies \rho^2 \cos^2 \phi = 4 \tag{2}$$

Note that once again, if we specify any of the three variables in these equations we can solve for the other two. We only need one parameter to obtain a parametrizations for the 3d curves.

Let's use $\theta$ as our parameter. We need $\rho$ and $\phi$ as functions of $\theta$.

From $(2)$ we obtain

$$\sin^2 \phi = \frac{4}{\rho^2}\tag{3}$$ and $$cos^2 \phi = \frac{\rho^2-4}{\rho^2}\tag{4}$$

Insert $(3)$ and $(4)$ into $(1)$

$$4 \cos^2 \theta + \rho^2 - 4 = 4$$ $$\implies \rho = \pm \sqrt{8-4 \cos^2 \theta}$$

Our parametrization is $$f(\theta) = \big(\pm \sqrt{8-4 \cos^2 \theta}, \theta, \sin^{-1} \big(\pm \frac{2}{\pm \sqrt{8-4 \cos^2 \theta}}\big) \big)$$

Note the $\pm$ signs. We have a curve where $\rho$ is positive, and another where it is negative. These two curves actually trace out the entirety of the intersection we want. If we add the cases of signs that appear in the $\phi$ term it turns out we simply retrace portions of the intersection we already have. We can thus simply specify a positive sign for the argument to the $sin^{-1}$ in the $\phi$ component.

If we plot this in Maple, we obtain the same result as displayed in the first figure above:

plot3d([[sqrt(8 - 4*cos(theta)^2), theta, arcsin(2/sqrt(8 - 4*cos(theta)^2))], [-sqrt(8 - 4*cos(theta)^2), theta, arcsin(2/sqrt(8 - 4*cos(theta)^2))]], theta = 0 .. 2*Pi, coords = spherical)

Finally, in the original question there was the following equation $(2)$:

$$\sin^2{\phi} \sin^2{\theta}=\cos^2{\phi}$$

And it was asked what this equation represents. It is simply another equation derived from the original equations and represents another way to solve for one of the variables. Since we chose to use $\theta$ as the parameter so far, we could solve for $\phi$ and obtain an alternative parametrization for $\phi$:

$$\tan^2 \phi = \frac{1}{sin^2 \theta} \implies \phi = \tan^{-1} \big({\pm \frac{1}{sin^2 \theta}} \big)$$

Given this expression, $\theta$ as the parameter, and a parameterized equation for $\rho$, we obtain the same correct result which is the 3d plot above.

As an extra, in cylindrical coordinates the parametric form of the intersection is quite simple.

$$x^2 + y^2 = 4 \implies r^2 = 4 \implies r= \pm 2$$

$$x^2+z^2=4 \implies r^2 \cos^2 \theta +z^2=4 \implies z^2=4 \sin^2 \theta \implies z=\pm 2 \sin \theta$$

$\theta$ is the parameter and the parametric equations for the curves are

$$f(t)=(\pm 2, \theta, \pm 2 \sin \theta)$$