# A second complex analysis question

#### Tranquillity

##### Member
So this time I have to solve cos(z)=2i

My approach:

cos(z)= [ e^(iz) + e^(-iz) ] / 2 = 2i

Rearranging and setting e^(iz) = w

we get a quadratic w^2 - 4iw + 1 = 0

The quadratic yields two solutions:

w=e^(iz) = i(2 + sqrt(5))

or e^(iz) = i(2-sqrt(5))

And now my problem is here.

In the lectures we are only using the principal logarithm ie

"Let D0 be C with the origin and the negative real axis removed. Deﬁne, forz in D0,
w = Logz = ln|z| + iArgz.
Here Argz ∈ (−pi, pi) is the principal argument"

Moreover, we have been given that

"It is not always true that Log (exp(z)) = z. e.g. z = 2πi gives
exp(z) = 1, Log (exp(z)) = Log 1 = 0."

So actually with what I was taught during lectures I cannot just take logarithms of both sides.

How should I solve the equation?

Thank you for all the help!

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Hi Tranquillity!

So this time I have to solve cos(z)=2i

My approach:

cos(z)= [ e^(iz) + e^(-iz) ] / 2 = 2i

Rearranging and setting e^(iz) = w

we get a quadratic w^2 - 4iw + 1 = 0

The quadratic yields two solutions:

w=e^(iz) = i(2 + sqrt(5))

or e^(iz) = i(2-sqrt(5))

And now my problem is here.

In the lectures we are only using the principal logarithm ie

"Let D0 be C with the origin and the negative real axis removed. Deﬁne, forz in D0,
w = Logz = ln|z| + iArgz.
Here Argz ∈ (−pi, pi) is the principal argument"
I think you're mixing things up a bit.
Since $w=e^{iz}$, we'd get that:
$$iz_0 = \text{Log } w = \ln|w| + i \text{Arg } w$$
where $z_0$ is the solution corresponding to the principal value.

Moreover, we have been given that

"It is not always true that Log (exp(z)) = z. e.g. z = 2πi gives
exp(z) = 1, Log (exp(z)) = Log 1 = 0."

So actually with what I was taught during lectures I cannot just take logarithms of both sides.

How should I solve the equation?

Thank you for all the help!
Well... you can take the logarithm of both sides, but you should take the multivalued logarithm instead of the principal one:
$$iz = \ln w = \ln|w| + i \arg w$$
where $\arg w = \text{Arg } w + 2k\pi i$ and $k$ an arbitrary integer.

#### Tranquillity

##### Member
Thank you very much for your reply

But does log(e^(iz)) always equal iz?

For example Log(e^(4i)) = 4i-2*i*pi

Basically by doing an exercise I have realized that

Log(e^(iz)) = iz - 2*k*pi*i, where k is an integer.

So does log(e^(iz)) always equal to iz but Log(e^(iz)) = iz - 2*k*pi*i?

I am confused!

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Thank you very much for your reply

But does log(e^(iz)) always equal iz?
No.
What is true, is that $\log(e^{iz}) = iz + 2k\pi i$ for integers k.
This is multivalued.
Note the use of a lowercase $\log$ which is multivalued instead of the capitalized $\text{Log}$ that denotes the principal value.

For example Log(e^(4i)) = 4i-2*i*pi

Basically by doing an exercise I have realized that

Log(e^(iz)) = iz - 2*k*pi*i, where k is an integer.
Not precisely.
The Log gives $i$ times the principal argument (only 1 value).
$$\text{Log }(e^{iz}) = i \text{ Arg }(iz) = i \cdot (\Im(iz) \text{ mod }2\pi) = i \cdot (\Re(z) \text{ mod }2\pi)$$

#### Tranquillity

##### Member
Ok let's try to do it with the log instead of Log.

I have to solve e^(iz) = i(2+sqrt(5)) and e^(iz) = i(2-sqrt(5))

Take the first equation. Taking logarithms yields

i*z + 2*pi*i*k = ln(2+sqrt(5)) + i*((pi/2) + 2*pi*k), k is integer

pi/2 is the principal argument plus 2*pi*k to obtain arg z!

Solving yields z=(pi/2) - i* ln(2+sqrt(5))

But in the solution shouldn't there exist a term 2*pi*k due to periodicity?

I have tried to solve the exercise before using Log instead of log and the second equation which was giving z = 2*k*pi - (pi/2)-ln(2-sqrt(5)) * i and when inputting in wolfram alpha, I was getting

-1.99999999999 i and with my previous solution for the first eqn I was getting 1.9999999999 i.

So two strange things: I don't get exact solution 2i and secondly my second solution was not giving
the correct sign.

Note that the principal argument of 2-sqrt(5) = -pi/2 and so my signs are correct!

Last edited:

#### Prove It

##### Well-known member
MHB Math Helper
Ok let's try to do it with the log instead of Log.

I have to solve e^(iz) = i(2+sqrt(5)) and e^(iz) = i(2-sqrt(5))

Take the first equation. Taking logarithms yields

i*z + 2*pi*i*k = ln(2+sqrt(5)) + i*((pi/2) + 2*pi*k), k is integer

pi/2 is the principal argument plus 2*pi*k to obtain arg z!

Solving yields z=4*pi*k + (pi/2) - i* ln(2+sqrt(5))

But in the solution shouldn't be 2*pi*k only?

I have tried to solve the exercise before using Log instead of log and the second equation which was giving z = 2*k*pi - (pi/2)-ln(2-sqrt(5)) * i and when inputting in wolfram alpha, I was getting

-1.99999999999 i and with my previous solution for the first eqn I was getting 1.9999999999 i.

So two strange things: I don't get exact solution 2i and secondly my second solution was not giving
the correct sign.

Note that the principal argument of 2-sqrt(5) = -pi/2 and so my signs are correct!
\displaystyle \displaystyle \begin{align*} e^{i\,z} &= i \left( 2 + \sqrt{5} \right) \\ e^{i \left( x + i\, y\right) } &= \left( 2 + \sqrt{5} \right) e^{i\left(\frac{\pi}{2}\right)} \\ e^{-y + i\,x} &= \left( 2 + \sqrt{5} \right) e^{i\left( \frac{\pi}{2} \right)} \\ e^{-y}\,e^{i\,x} &= \left( 2 + \sqrt{5} \right) e^{i\left( \frac{\pi}{2} \right)} \\ e^{-y} &= 2 + \sqrt{5} \textrm{ and } x = \frac{\pi}{2} \\ y &= -\ln{\left( 2 + \sqrt{5} \right)} \textrm{ and } x = \frac{\pi}{2} \end{align*}

So \displaystyle \displaystyle \begin{align*} z = \frac{\pi}{2} - i\ln{\left( 2 + \sqrt{5} \right)} \end{align*}.

#### Tranquillity

##### Member
That is a brilliant method avoiding any logarithms and any ambiguities!
Thank you very much!

The only thing I can add is that x could be (pi/2) + 2*k*pi where k is an integer for a complete solution, would you agree with that?

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Let z= a+ib :

$$\displaystyle \cos(a+ib)=2i$$

$$\displaystyle \cos(a)\cosh(b)-i\sin(a)\sinh(b)=2i$$

Then solve the system of equations :

$$\displaystyle \cos(a)\cosh(b)=0$$

$$\displaystyle \sin(a)\sinh(b)=-2$$

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Then solve the system of equations :

$$\displaystyle \cos(a)\cosh(b)=0$$

$$\displaystyle \sin(a)\sinh(b)=-2$$

Now, from the first equation we know that $\cosh(b)\neq 0$ so we have have
$\cos(a)=0$ .

Let us use for example that $a=\dfrac{\pi}{2}$ and substitute in the second so we get $\sinh(b)=-2$ so $b=\text{arcsinh} (-2)$ but we know that :

$$\displaystyle \text{arcsinh(x)} =\ln \left( x+\sqrt{x^2+1}\right)$$

putting x = -2 we have :

$$\displaystyle \text{arcsinh}(-2) = \ln \left( -2+\sqrt{5}\right)$$

so one solution is: $$\displaystyle z=\frac{\pi}{2}+i\ln \left( -2+\sqrt{5}\right)$$

EDIT :

Clearly we can see that the other solution occurs when $a=\dfrac{3\pi}{2}$

So , the second solution is :

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

Last edited:

#### Tranquillity

##### Member
Terrific! There are so many ways to solve this exercise, the thing is that we have learned only a particular material in order to use!

For example we did not do any other complex functions except sin, cos, exp and Log,
we are not even supposed to use the multivalued logarithm!

So I suppose the way we were supposed to solve it was by z=x+iy,
say that y = ln(...) and that e^(ix) = e^(i*pi/2) if and only if ix= i*pi/2 + 2*k*pi*i!

Thank you all guys for the replies and the valuable help!

Good to know there are still people trying to help with other people problems!

Have a good day all!

Last edited:

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
So we can conclude that the general solution is :

$$\displaystyle z=\frac{(2k+1)\pi}{2}+i\ln \left( (-1)^k2+\sqrt{5}\right)$$

#### Tranquillity

##### Member
Shouldn't be z= (pi/2) + 2*pi*k - ln (2+/- sqrt(5))*i, where k in Z ?

Since following Prove it's way, we have for e^(iz) = i(2+sqrt(5))

that y=-ln(2+sqrt(5)) and that e^(ix) = e^(i*pi/2) which holds if and only if ix=i*pi/2 + 2*pi*k

Similarly for e^(iz) = i(2-sqrt(5))

that y=-ln(2-sqrt(5)) and that e^(ix) = e^(i*pi/2) which holds if and only if ix=i*pi/2 + 2*pi*k

and so the general solution becomes

z=x+yi = (pi/2) + 2*pi*k - ln (2+/- sqrt(5))*i, where k in Z

Last edited:

#### Prove It

##### Well-known member
MHB Math Helper
Shouldn't be z= (pi/2) + 2*pi*k - ln (2+/- sqrt(5))*i, where k in Z ?

Since following Prove it's way, we have for e^(iz) = i(2+sqrt(5))

that y=-ln(2+sqrt(5)) and that e^(ix) = e^(i*pi/2) which holds if and only if ix=i*pi/2 + 2*pi*k

Similarly for e^(iz) = i(2-sqrt(5))

that y=-ln(2-sqrt(5)) and that e^(ix) = e^(i*pi/2) which holds if and only if ix=i*pi/2 + 2*pi*k

and so the general solution becomes

z=x+yi = (pi/2) + 2*pi*k - ln (2+/- sqrt(5))*i, where k in Z
The most general solution for \displaystyle \displaystyle \begin{align*} e^{i\,z} = i\left( 2 + \sqrt{5} \right) \end{align*} is \displaystyle \displaystyle \begin{align*} z = \frac{\pi}{2} + 2\pi \,k - i\ln{\left( 2 + \sqrt{5} \right) } \end{align*}.

To solve \displaystyle \displaystyle \begin{align*} e^{i\,z} = i\left( 2 - \sqrt{5} \right) \end{align*} will take a little bit more work, because \displaystyle \displaystyle \begin{align*} 2 - \sqrt{5} < 0 \end{align*}. This means that \displaystyle \displaystyle \begin{align*} i \left( 2 - \sqrt{5} \right) \end{align*} points DOWNWARDS from the origin, making an angle of \displaystyle \displaystyle \begin{align*} -\frac{\pi}{2} \end{align*} (or any integer multiple of \displaystyle \displaystyle \begin{align*} 2\pi \end{align*} added or subtracted to it), and its magnitude is \displaystyle \displaystyle \begin{align*} \sqrt{5} - 2 \end{align*}.

So that means

\displaystyle \displaystyle \begin{align*} e^{i\,z} &= i\left( 2 - \sqrt{5} \right) \\ e^{i\left( x + i\,y \right)} &= \left( \sqrt{5} - 2 \right) e^{i\left( -\frac{\pi}{2} + 2\pi\,k \right)} \textrm{ where } k \in \mathbf{Z} \\ e^{-y + i\,x } &= \left( \sqrt{5} - 2 \right) e^{i \left( -\frac{\pi}{2} +2\pi \, k \right)} \\ e^{-y}\, e^{i\,x} &= \left( \sqrt{5} - 2 \right) e^{i\left( -\frac{\pi}{2} + 2\pi\,k \right)} \\ e^{-y} &= \sqrt{5} - 2 \textrm{ and } x = -\frac{\pi}{2} + 2\pi\,k \\ y &= -\ln{\left( \sqrt{5} - 2 \right) } \textrm{ and } x = -\frac{\pi}{2} + 2\pi\,k \end{align*}

You can not put the two solutions together as you have done.

Thanks for that!