Skip to main content

Understanding logarithmic functions for complex numbers

Imaginary numbers are not 'imaginary'.
Real numbers are not 'real'.
In fact, they're both in our heads...

We are quite familiar with the logarithmic function. We define it as the inverse of the exponential function.

That is, we say:
$$\log{e^x} = e^{\log{x}} = x$$
(In fact, this is how the inverse of a function is even defined.)

Now, we're all comfortable with the natural log. We use it for various results, but we always keep in mind that the number we're evaluating is POSITIVE.

Why though?

Let's consider some negative number $a$. What does it mean to take it's natural logarithm?

It means to find a number such that $e$ raised to that number gives $a$. And surely since $e$ raised to any power always gives a positive value, it makes no sense to take the log of a negative number, right?

Right?

Complex Numbers: Function Domains

Remember how we extended the existence of real numbers to the complex number system? What did we do?

The square root of number of a negative number does not exist, obviously, because any number multiplied with itself gives a positive number. But then, we extended the domain of this square root function to include negative numbers too.

And for this, we defined:
$$i = \sqrt{-1}$$
And now we know that it makes sense to take the square root of a negative number.

Question: Can we do such extension of domain for other functions too, with the help of complex numbers? (Spoiler: Yes)

Euler's Identity

I hope we're all familiar with the famed Euler's Identity, which goes like this:
$$e^{ix} = \cos{x} + i\sin{x}$$
where $x$ is any real number you like.

(If you have no idea why this true, or what this even means, I'll write a post on this some other time.)

Now, if we substitute for $x = \pi$, we get:
$$e^{i\pi} = -1$$
This, according to many, is the most beautiful equation in the world, because they think it matters that the '5 fundamental constants' ended up in a single equation, when they write it as:
$$e^{i\pi} + 1 = 0$$
Sure, it might be aesthetically pleasing, but what do we get from it, in our previous efforts to understand the log of negative numbers? Consider:
$$e^{i\pi} = -1$$
Taking log on both sides:
$$i\pi = log(-1)$$
And almost magically, we've ended up with not only somewhat defining negative logs, but also finding it's 'value'.

Next, note that this can be extended to any real negative number.
$\log(-69)$, say, is equal to, $\log(69) +  \log(-1) = \log(69) + i\pi$

Onward:

Any complex number can be represented by both it's rectangular and polar forms, or symbolically:
$$z = a + ib = r[\cos\theta + i\sin\theta]$$
Note that in the above expression, $r = \sqrt{a^2+b^2}$ is the modulus, and $\theta = \tan^{-1}{\frac{b}{a}}$, is the argument.

From Euler's Identity, we have:
$$z = r(e^{i\theta})$$
Taking log on both sides, we get:
$$\log{z} = \log{r} + i\theta$$
And that's it. We're done.

Let's try an example to get ourselves familiar with this.

Q. Evaluate $\log{(1+\sqrt{3}i)}$

You should immediately be able to see that this complex number makes an angle of $\frac{\pi}{6}$ with the Real Axis.
Also, note that the modulus of this number is $\sqrt{1^2+\sqrt{3}^2} = 2$

Thus, $1+\sqrt{3}i = 2(e^{i\large\frac{\pi}{6}})$

And so: $\log(1+\sqrt{3}i) = \log{2} + i\large\frac{\pi}{6} = 0.6931 + 0.5235i$, approximately.

As simple as that.

Comments

Popular posts from this blog

Factorials, and the Gamma Function

What is the Gamma function? What does it have to do with the factorial of a number? And why does such a formula even work? The Factorial In our high school combinatorics course, we were introduced to the factorial of a natural number. We defined the factorial of a number $n$ to be the product of all the natural numbers till $n$. Or symbolically: $$n! = 1 . 2 . 3 ... (n-2)  (n-1)  n$$ This is a very useful function in Counting problems. This function also pops up in the exponential function: $$e^x = 1+\frac{x}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+...$$ Setting this aside, we think: can we 'extend' this function to all real number? Surely, even if we were to come up with such a function, what would it mean to take this new 'factorial' of some real number? Well, let's take a look at one important property of the factorial function: $$n! = n(n-1)!$$ and this is true for all natural numbers $n$. So, even if we came up with this homologous function, we...

Integral of $e^{x^2}$

Using the Taylor series is a straight forward method, but let us try to approach the problem in a different manner. Integration by Parts NOTE: This method requires working knowledge of  integration by parts . When I tried to solve this problem, I first started to expand it using the integration by parts method. The pattern I observed was the thing which helped me put myself on the right track to solve this problem. Here is the pattern: $$\int e^{x^2}dx = xe^{x^2} - 2\int x^2e^{x^2}dx$$ $$3\int x^2e^{x^2}dx = x^3e^{x^2} - 2\int x^4e^{x^2}dx$$ $$5\int x^4e^{x^2}dx = x^5e^{x^2} - 2\int x^6e^{x^2}dx$$ To make sure this pattern sustains, I decided to find the integral of $x^{2n}e^{x^2}$. $$Y = \int x^{2n}e^{x^2}dx$$ $$Y = x^{2n+1}e^{x^2} - \int x[2nx^{2n-1}e^{x^2}+2x^{2n+1}e^{x^2}]dx$$ $$(2n+1)Y = x^{2n+1}e^{x^2}-2\int x^{2n+2}e^{x^2}dx$$ $$\therefore Y = \frac{x^{2n+1}e^{x^2}}{2n+1}-\frac{2}{2n+1}\int x^{2n+2}e^{x^2}dx$$ Note that the $\int x^{2n+2}e^{x^2}dx$ is sim...

Problems that deceive you #1

Let us look at one of the most easiest problems in calculus $$\int_0^{\frac{\pi}{2}}\sqrt{4\sin^2\frac{x}{2}-4\sin\frac{x}{2}+1}\; dx$$ Seems pretty simple and straightforward, doesn't it? Inside the square root, the expression evaluates to $(2\sin\frac{x}{2}-1)^2$, and thus the integral will be $$\int_0^{\frac{\pi}{2}}\Bigl(2\sin\frac{x}{2}-1\Bigr)dx$$ This then can be evaluated by the following: $$\biggl[-4\cos\frac{x}{2} -x\biggr]_0^{\frac{\pi}{2}}$$ Hold on for the surprise... Its wrong! What seemed like a really straightforward and easy problem, is designed in such a way to appear easy so that we approach the wrong way. Why is the approach wrong? We did not consider the fact that a simple square root symbol represents its principal square root i.e., the positive square root. That means each and every value the expression inside the original integral evaluates to a positive quantity. But that is not the case when we simplified the integral to  $$\int...