Ask your own question, for FREE!
Mathematics 23 Online
OpenStudy (fixxer):

How can I plot a sphere with radius 2 with a cylinder radius 1 inside? both centred at origin

OpenStudy (loser66):

|dw:1481635326792:dw|

OpenStudy (loser66):

|dw:1481635414625:dw|

OpenStudy (fixxer):

Yeah, but with an range for p,theta,phi or in cylindrical

OpenStudy (loser66):

What do you want to find? What is the original problem?

OpenStudy (loser66):

Actually, for \(\rho\), it is from 0 to 1 for \(\alpha\), it is from 0 to \(\pi\) for \(\phi\) , it is from 0 to \(\pi/4\)

OpenStudy (loser66):

that is for cylinder only.

OpenStudy (irishboy123):

if you param the sphere (rad=2) and cylinder (rad=1 ) in spherical, i think you get this ..... NB: \(\phi\) is the polar and \(\theta\) the azimuth For the sphere the usual \(\vec r_s = \left( \begin{matrix} 2 \sin \phi \cos \theta \\ 2 \sin \phi \sin \theta \\ 2 \cos \phi \end{matrix} \right) \) And for the cylinder \(\vec r_c = \left( \begin{matrix} \cos \theta \\ \sin \theta \\ \cot \phi \end{matrix} \right) \) that last z-entry comes from the fact that, let's say the distance from the origin to a point on the cylinder is \(\rho\), then we know that \(\rho \sin \phi = 1\) as that is the rad of the cylinder. Thusly, we can say that \(z = \rho \cos \phi = \cot \phi\) They meet at \(2 \cos \phi = \cot \phi \implies \phi = \pi / 6 \implies z = \sqrt{3}\), that's above the x-y plane but it is symmetric if you do it in Cartesian, it spits out the same numerical answers. Sphere: \(x^2 + y^2 + z^2 = 2^2 \qquad (1)\) Cylinder: \(x^2 + y^2 = 1^2 \qquad (2)\) put (2) into (1): \(1^2 + z^2 = 2^2 \implies z = \pm \sqrt{3}\) But it would be helpful to know what you are actually trying to achieve :-)

OpenStudy (fixxer):

Hi. I´m sorry for late answer, I just had to distance a bit, I was so dissapointed I didnt get this right at my exam. The problem was to set up a volume integral for the element outside the cylinder with radius 1 but inside the sphere of radius 2. since i failed to set up the integral i just took the volume of the sphere and subtracted the volume of the cylinder with hight 2*radius of the sphere. I´m still curius how to set up this integral even if i closed the question

OpenStudy (fixxer):

here is a graph

OpenStudy (irishboy123):

happy to have a look later. maybe @Loser66 is too :) BTW what plotter do you use? i can't find anything online so end up picturing in my head/ sketching = very frustrating. Wolfram only does so much and is very inflexible...

OpenStudy (fixxer):

I am using maplesoft. The question goes even further and requires me to calculate the surface area, both inside and outside

OpenStudy (irishboy123):

hey @fixxer if that's the case, ie this has legs, i'd recommend re-defining/explaining the question, and then also tagging peeps like @HolsterEmission and @eliesaab . Here we are looking at a cylinder of radius 1 unit inside sphere of radius 2 units. Now we know you want the enclosed volume. Initially the question was framed in terms of parameterisation and we got some kinda **surface** parameterisation for that. We can choose the co-ordinates, so we point the cylinder upwards, along the z-direction. in terms of the thing you posted ...... if you're setting up a rotational volume integration, the Volume of Revolution is the most elementary way. But we're beyond that, i reckon(!!), and doing silly stuff for the purpose of learning .... so it seems.... CYLINDRICAL (which works off a Vol of Rev symmetry; about z is the key) We can simulate a sphere using cylindrical coordinates as follows. \(z^2 + r^2 = 4 \implies r = \sqrt{4 - z^2}\) plugging into the cylindrical Volume element \(dV = r ~ dr ~ dt ~ dz\) ....where \(t\) is the angle in the x-y plane ...... ****and doing it for a full sphere of rad=2 just so's we see it works, we have : \(\int\limits_{t = 0}^{2 \pi} ~ \int\limits_{z = - 2}^{2} ~\int\limits_{r = 0}^{\sqrt{4 - z^2}} ~ r ~ dr ~ dz ~ dt \left ( \equiv \int\limits_{t = 0}^{2 \pi} ~ \int\limits_{r = 0}^{2} ~\int\limits_{z = - \sqrt{4 - r^2}}^{\sqrt{4 - r^2}} ~ r ~ dz ~ dr ~ dt \right)\) \(= 2 \pi ~ \int\limits_{z = 0}^{2} (4 - z^2) ~ dz = \dfrac{32 \pi }{3}\) Doing it for a full sphere of rad=2 surrounding a cylinder of rad 1, we have the same several variations but we adjust the limits: \(\int\limits_{t = 0}^{2 \pi} ~ \int\limits_{z = - \sqrt{3}}^{\sqrt{3}} ~\int\limits_{r = 1}^{\sqrt{4 - z^2}} ~ r ~ dr ~ dz ~ dt \left( \equiv \int\limits_{t = 0}^{2 \pi} ~ \int\limits_{r = 1}^{2} ~\int\limits_{z = -\sqrt{4 - r^2}}^{\sqrt{4 - r^2}} ~ r ~ dz ~ dr ~ dt \right) = 4 \sqrt{3} \pi\) SPHERICAL Same thing up to a point. the spherical Volume element is \(dV = r^2 ~ \sin p ~ dr ~ dp ~ dt\) ....where p is the polar angle, ie \(\vec r \cdot \hat z = |\vec r| \cos p = z\); and t is the azimuth (ie in the xy plane). Crucially, r is no longer in the xy plane !! For the sphere \(r \in [0,2]\), spherical gives : \( \int\limits_{t = 0}^{2 \pi} \int\limits_{p = \pi/6}^{ 5 \pi / 6 } \int\limits_{r = 0}^{2} r^2 ~ \sin (p) ~ dr ~ dp ~ dt = \dfrac{16 \pi}{\sqrt 3} \) NB: Spherical, volume-wise, deals with what you might call the ice-cream cone section. And this is where can be misleading, unless we apply the same standard to our integration of the cylinder :) the cylinder has a limited outer radius = 1, in this case, we can connect r to p **in our integration limits** as \(\sin (p) = 1/r \implies r = \csc (p)\). So we can say that \(\int\limits_{t = 0}^{2 \pi} \int\limits_{p = \pi/6}^{ 5 \pi \ 6 } \int\limits_{r = 0}^{\csc p} r^2 ~ sin(p) ~ dr ~ dp ~ dt = \dfrac{4 \pi}{\sqrt 3}\) Delivering the final integration, in the spherical co-ordinate system, as: \(\left(\int\limits_{t = 0}^{2 \pi} \int\limits_{p = \pi/6}^{ 5 \pi / 6 } \int\limits_{r = 0}^{2} - \int\limits_{t = 0}^{2 \pi} \int\limits_{p = \pi/6}^{ 5 \pi \ 6 } \int\limits_{r = 0}^{\csc p} \right) r^2 ~ sin(p) ~ dr ~ dp ~ dt = \dfrac{16 \pi}{\sqrt 3} - \dfrac{4 \pi}{\sqrt 3} = 4 \sqrt{3} \pi\) the cylindrical version you can easily do by hand. i typed the spherical into Wolfram and it agrees. what inspires me to Latex all of this stuff is my lack of belief in the religion of parameterisation. as in, do it when it makes sense, or when you have to!! but i am very keen to learn, too :))

OpenStudy (fixxer):

That is a very detailed solution!! Thanks alot. This community gives me motivation to keep getting better! Whenever i´m stuck there is a couple of very inteligent persons to help out here which is deeply apperciated. The spherical coordinates seems way harder then cylindrical in this case! I will take notes that cylindrical is prefered in the case where we deal with spherical and cylindrical mix. At the exam I sat trying to plot this thing in spherical and couldnt figure out how to get the cylindrical hole. Thank you very much for your accurate and detailed response! I appology for being so short handed at the start, I was just very dissapointed! Probably going to get a terrible grade so I guess I have to redo the exam next semester to improve!

OpenStudy (holsteremission):

As far as volume goes, I wonder how strict your instructor might have been about the solution you provide? I would have tried making the volume integral slightly easier to set up as \(\dfrac43\pi r^3\) minus the volume of the cylinder inside the cylinder. Using cylindrical coordinates: \[\frac43\pi (2^3)-2\int_0^{2\pi}\int_0^1\int_0^{\sqrt{4-r^2}}r\,\mathrm dz\,\mathrm dr\,\mathrm d\theta=4\sqrt3\pi\]I don't see anything about having to use a specific coordinate system, but if you wish to use spherical, see Irish's comment. Let's move on to parameterizing the surface components. The cylindrical part is the easiest. We can use \[\mathbf x(\theta,z)=\langle\cos\theta,\sin\theta,z\rangle\quad\text{with }0\le\theta\le2\pi,~|z|\le\sqrt3\]Then this area is \[\begin{align*} \iint_{\mathrm{cyl}}\mathrm dS&=\int_{-\sqrt3}^{\sqrt3}\int_0^{2\pi}\left\|\frac{\partial\mathbf x}{\partial \theta}\times\frac{\partial\mathbf x}{\partial z}\right\|\,\mathrm d\theta\,\mathrm dz\\[1ex] &= \int_{-\sqrt3}^{\sqrt3}\int_0^{2\pi}\mathrm d\theta\,\mathrm dz=\color{red}{4\sqrt3\pi} \end{align*}\]For the spherical portion, we can use the parameterization \[\mathbf y(\theta,\varphi)=\langle2\cos\theta\sin\varphi,2\sin\theta\sin\varphi,2\cos\varphi\rangle\quad\text{with }0\le\theta\le2\pi,~\frac\pi6\le\varphi\le\frac{5\pi}6\]which gives area \[\begin{align*} \iint_\mathrm{sph}\mathrm dS&=\int_0^{2\pi}\int_{\pi/6}^{5\pi/6}\left\|\frac{\partial\mathbf y}{\partial\theta}\times\frac{\partial\mathbf y}{\partial\varphi}\right\|\,\mathrm d\varphi\,\mathrm d\theta\\[1ex] &=4\int_0^{2\pi}\int_{\pi/6}^{5\pi/6}\sin\varphi\,\mathrm d\varphi\,\mathrm d\theta=\color{red}{8\sqrt3\pi} \end{align*}\]

OpenStudy (holsteremission):

Whoops, I meant "minus the volume of the cylinder inside the *sphere*" in that first paragraph...

OpenStudy (fixxer):

Thank you Holster this is really helpful, can I ask how you in general come up with the bounds for \[\frac{ \pi }{ 6 }\le \rho \le \frac{ 5\pi }{ 6 }\]

OpenStudy (holsteremission):

That's \(\varphi\), the polar angle, not \(\rho\). We know it falls between \(\dfrac\pi6\) and \(\dfrac{5\pi}6\) because those are the angles that occur for the intersection of the cylinder and sphere. \[\begin{cases}x^2+y^2+z^2=4\\x^2+y^2=1\end{cases}\implies z^2=3\implies z=\pm\sqrt3\]From this we can get the polar angle with basic trig. |dw:1481999944190:dw| \[\sin\varphi=\frac12\implies\varphi=\frac\pi6\]By symmetry, you know the other angle for the intersection occurs for \(\varphi=\dfrac{5\pi}6\).

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!