<s>[INST] Parametrization the curve of intersection of sphere $x^2+y^2+z^2=5$ and cylinder $x^2+\left(y-\frac{1}{2}\right)^2=\left(\frac{1}{2}\right)^2$. I've seen similar posts here but none of the answers helped me. I am trying to parametrize a curve of intersection of a (top half $z>0$) sphere $x^2+y^2+z^2=5$ and cylinder $x^2+\left(y-\frac{1}{2}\right)^2=\left(\frac{1}{2}\right)^2$.
I tried $$x=\frac{1}{2}\cos t $$ $$y=\frac{1}{2}+\frac{1}{2}\sin t$$ $$z=\sqrt{5-\left(\frac{1}{2}\cos t\right)^2-\left(\frac{1}{2}+\frac{1}{2}\sin t\right)^2}=\sqrt{\frac{9}{2}-\frac{1}{2}\sin t}$$ for $t \in (0,2\pi)$,  but I don't think it is correct. Even if it was, is there a better (more simple) approach?
Note: I need to find the circulation of a field $F=(y+z,x-z,0)$ over this curve so I need a good parametrizatian so that I was able to integrate it.
 [/INST] Sphere
$$ x^2 +y^2 + z^2= 5 \tag1 $$
simplify given second Cylinder equation
$$ x^2+y^2 -y=0 $$
Subtract
$$z^2+y = 5 \; \tag2 $$
To satisfy this relation now introduce parameter $t$
$$z^2 = 5 \cos^2 t,\;\tag3 $$
so that
$$ y = 5 \sin ^2 t \tag4 $$
From (1) and (4)
$$ z^2= 5 -x^2 -25 \sin ^4 t \tag 5 $$
Equate RHS of $z^2$ from (3) and (5) simplify  to find parametrization for $x$
$$ x = \sqrt{5 \sin^2 t (1-5 \sin^2 t )}\tag6$$
From(3)
$$ z= \sqrt 5 \cos t \tag 7$$
So parametrization for three coordinates
$$ (x,y,z)=\big( \sqrt{5 \sin^2 t (1-5 \sin^2 t )}, 5 \sin ^2 t ,\sqrt 5 \cos t \big) \tag8$$
where positive sign is taken before radical signs for top hemisphere.
</s>