I have been going over this post and found myself confused by the calculations given by the OP. $$\color{red}{ shouldn't \space this \space be \space done \space as \space follows:}$$
$$w=\cos z=\frac{1}{2}\left(e^{x+iy}+e^{-(x+iy)}\right)=\frac{1}{2}e^x(\cos(y)+i\sin(y))+\frac{1}{2}e^{-x}(\cos(y)-i\sin(y))$$ $$=\frac{1}{2}\cos(y)\left(e^x+e^{-x}\right)+\frac{i}{2}\sin(y)\left(e^x-e^{-x}\right)$$ $$=\cosh(x)\cos(y)+i\sin(y)\sinh(x)$$
$$\color{green}{u=\cosh(x)\cos(y)\tag{1}}$$ and $$\color{green}{v=\sinh(x)\sin(y) \tag{2}}$$
we are only given constraints for $y$, therefore need to eliminate unknown $x$ in $(1)$ and $(2)$, and this should give us the region $y=k$ transforms to be:
$$\dfrac{u^2}{\cos^2(y)}-\dfrac{v^2}{\sin^2(y)}=\cosh^2(x)-\sinh^2(x)=1$$
$$\dfrac{u^2}{\cos^2(k)}-\dfrac{v^2}{\sin^2(k)}=1$$
$$\dfrac{u^2}{\alpha}-\dfrac{v^2}{\beta}=1$$
of which is a $hyperbola$ and not an $ellipse$ as suggested by 1
The quoted post has been giving me headaches and I just didn't know what to do about it.
Note that $\cos z$ is not $A=(1/2)(e^z+e^{-z}).$ which you begin with. To see this, imagine $z$ is a real number, then $A=\cosh z.$
Better to start with $\cos z=B=(1/2)(e^{iz}+e^{-iz})$ which is correct for real $z.$
Now if one puts $z=x+iy$ we get $$B=\frac12 e^{i(x+iy)}+e^{i(-x-yi)}$$ which, on multiplying out the exponents and applying the real value formula $e^{ix}=\cos x +i \sin x$ (as itself and also with $-x$ for $x$) the relation becomes after algebra that
$$B=\cos x \cosh y -i \sin x \sinh y.$$ Thus when $y$ is held constant one gets ellipses as in the linked answer.