Hint to show $\tanh(z)=\frac{\sinh(2x)+i\sin(2y)}{\cosh(2x)+\cos(2y)}$?

I really can't figure out how to do this at all. I've been trying to show this for nearly 4 hours now. I've tried working from $\tanh(z)=\frac{\sinh(z)}{\cosh(z)}$ and expanding the top and bottom, but that just becomes a mess that, after trying so hard to put into the desired form, didn't work. I also tried working from the identity

$$\tanh(z)=\tanh(x+iy)=\frac{\tanh(x)+\tanh(iy)}{1+\tanh(x)\tanh(iy)}$$

but I wasn't able to put that into the desired form as well. I've tried working from the right side to the left, using every formula for $\sin(2y)$, $\sinh(2x)$, $\cosh(2x)$, and $\cos(2y)$ I could derive/find. I even tried multiplying the right-side by $\coth(z)$ and working it out to show that it's equal to $1$, but that didn't work.

Could you please give me some hints?

• In $\tanh(z) = \frac{\sinh(z)}{\cosh(z)}$, write out the ratio in terms of exponentials, and then multiply and divide by the conjugate of the denominator (i.e $\cosh(\overline{z})$), – vnd Nov 5 '15 at 3:42
• @vnd Yeah I tried that and it worked. I just saw that somebody had already worked out the solution in an answer (below)! – Arturo don Juan Nov 5 '15 at 4:07

Let me try. We have $$\tanh (z) = \frac{\sinh z}{\cosh z} = \frac{e^z - e^{-z}}{e^z + e^{-z}} = \frac{e^{2z} -1 }{e^{2z}+1} = \frac{e^{2x}(\cos(y) + i\sin(y))^2 -1}{e^{2x}(\cos(y) + i\sin(y))^2 + 1} = \frac{e^{2x}\cos 2y -1 + ie^x\sin 2y}{e^{2x}\cos 2y + 1 + ie^{2x}\sin 2y} = \frac{(e^{2x}\cos 2y -1 + ie^{2x}\sin 2y)(e^{2x}\cos 2y +1 - ie^{2x}\sin 2y)}{(e^{2x}\cos 2y +1)^2 + e^{4x}\sin^22y} = \frac{e^{4x}\cos^2 2y - (1-ie^{2x}\sin 2y)^2}{e^{4x}+1 + 2e^{2x}\cos 2y} = \frac{e^{4x}-1 + 2ie^{2x}\sin 2y}{e^{4x}+1 + 2e^{2x}\cos 2y} = \frac{e^{2x}-e^{-2x} + 2i\sin 2y}{e^{2x}+e^{-2x} + 2\cos 2y} = \frac{\sinh 2x + i\sin 2y}{\cosh 2x + \cos 2y}$$