1. Intersection of surfaces

I want to find the equation of the intersection between a sphere and cylinder (in the first octant) but it's kind of weird.

Sphere: x^2 + y^2 +z^2 = 4
Cylinder: x^2 + y^2 - 2y = 0

If I just sub one of them into the other I get:
2y + z^2 = 4

but that doesn't make sense to me since that is an equation of a surface since x can vary. There should be some sort of restriction on x... but how do I get this?

2. Originally Posted by eddi
I want to find the equation of the intersection between a sphere and cylinder (in the first octant) but it's kind of weird.

Sphere: x^2 + y^2 +z^2 = 4
Cylinder: x^2 + y^2 - 2y = 0

If I just sub one of them into the other I get:
2y + z^2 = 4

but that doesn't make sense to me since that is an equation of a surface since x can vary. There should be some sort of restriction on x... but how do I get this?
The intersection will be a curve, not a surface, and that is best described parametrically. Write the equation of the cylinder as $x^2 + (y-1)^2=1$, and you see that this can be parametrised as $x = \sin\theta,\:y = 1+\cos\theta$. Then $x^2 + y^2 = 2+2\cos\theta$, and if you substitute that into the equation of the sphere you see that $z^2 = 2(1-\cos\theta) = 4\sin^2(\theta/2)$.

Therefore the part of the curve in the positive octant can be described by the parametric representation $(x,y,z) = (\sin\theta, 1+\cos\theta, \sin(\theta/2))\;(0\leqslant\theta\leqslant\pi)$.

3. Originally Posted by Opalg
The intersection will be a curve, not a surface, and that is best described parametrically. Write the equation of the cylinder as $x^2 + (y-1)^2=1$, and you see that this can be parametrised as $x = \sin\theta,\:y = 1+\cos\theta$. Then $x^2 + y^2 = 2+2\cos\theta$, and if you substitute that into the equation of the sphere you see that $z^2 = 2(1-\cos\theta) = 4\sin^2(\theta/2)$.

Therefore the part of the curve in the positive octant can be described by the parametric representation $(x,y,z) = (\sin\theta, 1+\cos\theta, \sin(\theta/2))\;(0\leqslant\theta\leqslant\pi)$.
Thanks. So to reiterate (for myself), I have to parametrize the cylinder aka:
x = sin(t)
y = 1 + cos(t)
z = p

Then transform my sphere to use t and p:
x^2 + y^2 + z^2 = 4 turns into sin(t)^2 + (1+cos(t))^2 + p^2 = 4.

Then I can solve for p in terms of t, substitute that back into the parametrization for the cylinder, and voila I have a set of parametric equations describing my curve. Haha cool.