# Solution to Complex Equation $\cos z = 2i$

I tried solving the equation $\cos{z}=2i$ where $z$ is a complex number. The solution $i$ have ended up with is $z$, $= (4k+1)\frac{\pi}{2} - i\ln{(2+\sqrt{5})}$. However the text book solution is $z=(2k+1)\frac{\pi}{2} - (-1)^k\ln{(2+\sqrt{5})}i$. Are the results geometrically same or my solution is erroneous.

• It would help if you showed how you got your solution. – Thomas Andrews Oct 5 '15 at 14:06
• Related: math.stackexchange.com/q/1242873 – Did Oct 5 '15 at 14:13
• thanx guys...Thomas and H.R. your solns are elegant...I was skipping the 2-sqrt(5) bcoz everytime i took the log it was coming log(2-sqrt(5)) and was thinking log of negative number is not possible. – rotating_image Oct 5 '15 at 15:24

$$\cos z = \frac{1}{2}\left(e^{iz}+e^{-iz}\right).$$ Solve first for $w=e^{iz}$.

$$w^2-4iw + 1=0$$ so: $$w=\frac{4i\pm\sqrt{-16-4}}{2} = (2\pm\sqrt{5})i$$

So we have to deal with two cases with care. If $w=(2+\sqrt{5})i$, you get your solution:

$$z = (4k+1)\frac{\pi}{2} - i\ln(2+\sqrt{5})$$

If $w=(2-\sqrt{5})i$, then using $2-\sqrt{5}=-(2+\sqrt{5})^{-1}$, we have:

$$iz = -\log(2+ \sqrt{5}) +\left(\frac{3\pi}{2}+2\pi k\right)i$$

So:

$$z = \left(\frac{3pi}{2}+2\pi k\right) + \log(2+ \sqrt{5})i$$

In the first case, let $m=2k$ and you have:

$$z = (2m+1)\frac{\pi/2} - (-1)^{m}\ln(2+\sqrt{5})i$$

and the second case $m=2k+1$ then:

$$z = (2m+1)\frac{\pi}{2} - (-1)^{2m+1}\ln(2+\sqrt{5})$$

You can probably write this carefully as one case. The two values of $w$ can be written as $$w=i(-1)^k(2+\sqrt{5})^{(-1)^k}$$. Then:

$$iz = \log w = (-1)^k \log(2+\sqrt{5}) + \frac{\pi}{2}i + k\pi i$$

So:

$$z = \left(k+1/2\right)\pi - (-1)^k \log(2+\sqrt{5}) i$$

Your equation (for $k$) holds, since it is the equation from your book for $\hat{k}=2k$.

If $\hat{k}$ is impair such that the equation from the book holds there can not be a $k$ such that your equation for $k$ becomes the equation from the book for $\hat{k}$ since that would imply that $-1=\left(-1\right)^\hat{k}=+1$.

(two complex numbers coincide iff their real and complex coincide, I considered the complex and devided by $-\ln\left(2+\sqrt{5}\right)$)

The conclusion is, that you found only half of the solutions.

It seems like you used $\cos\left(x\right)=\cos\left(2\pi+x\right)$ but not $\cos\left(x\right)=\cos\left(-x\right)$.

Hint; What I usually do to solve these wrong-proof is write

$\cos x=\frac{e^{ix}+e^{-ix}}{2}$

And let $y:=e^{ix}$

Hint#2: Quadratics can have 2 different solutions.

Here is the solution without explanations:

\eqalign{ & \cos (z) = 2i \cr & \cos (x + iy) = \cos (x)\cos (iy) - \sin (x)\sin (iy) = 2i \cr & \cos (x)\left( {{{{e^{i(iy)}} + {e^{ - i(iy)}}} \over 2}} \right) - \sin (x)\left( {{{{e^{i(iy)}} - {e^{ - i(iy)}}} \over {2i}}} \right) = 2i \cr & \cos (x)\left( {{{{e^{ - y}} + {e^y}} \over 2}} \right) - \sin (x)\left( {{{{e^{ - y}} - {e^y}} \over {2i}}} \right) = 2i \cr & \cosh (y)\cos (x) + {1 \over i}\sinh (y)\sin (x) = 2i \cr & \cosh (y)\cos (x) - i\sinh (y)\sin (x) = 2i \cr & \left\{ \matrix{ \cosh (y)\cos (x) = 0 \hfill \cr \sinh (y)\sin (x) = - 2 \hfill \cr} \right. \cr & \left\{ \matrix{ \cos (x) = 0 \to x = (2n + 1){\pi \over 2}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,n = 0,1,2,... \hfill \cr \left\{ \matrix{ \sinh (y)\sin (x) = \sinh (y){( - 1)^n} = - 2 \to \sinh (y){( - 1)^{n + 1}} = 2 \to \sinh ({( - 1)^{n + 1}}y) = 2 \hfill \cr {( - 1)^{n + 1}}y = {\sinh ^{ - 1}}(2) = \ln (2 + \sqrt 5 ) \to y = {( - 1)^{n + 1}}\ln (2 + \sqrt 5 ) \hfill \cr} \right. \hfill \cr} \right. \cr & z = (2n + 1){\pi \over 2} + i{( - 1)^{n + 1}}\ln (2 + \sqrt 5 ) \cr}

In final steps, I used the fact that $\sinh(y)$ is an odd function of $y$.

• @NimaBavari: Thanks dude. :) – Hosein Rahnama Feb 13 '16 at 8:57
• Khahesh mikonam. – user98186 Feb 13 '16 at 14:01