MathematicsDiscussion
Natural Logarithm of a Complex Number


ajinx999Aug 30, 2007 4:02am
I'm a high school class 12 student. All the textbooks which I referred till now defined log for positive real numbers and for the rest it is indeterminate. But, my mobile's calc gave log of complex numbers too. So, I tried to derive a general formula for it.
I got this,

ln(a + ib) = (1/2)ln{(a^2) + (b^2)} + {sgn(b)}acos[(a^2)/{(a^2) + (b^2)}]

Here, 'a' and 'b' are real numbers. 'sgn(b)' is signum function or the sign function of 'b'.
sgn(b) = abs(b) for b not equal to 0
= 0 for b = 0
abs(x) = absolute value of x or the modulus function of x

I have verified the experimental and calculated values. They, fortunately, match.
So, my questions are
1. Is the formula correct?
I have written the derivation below. And, the derivation is NON-GRAPHICAL.
2. How will a graph for the logarithmic function look like?
I expect it to be 3D

DERIVATION:

z = r[e^{i(theta)}]
Here, z = a + ib and r = (a^2) + (b^2)
Taking natural log of both sides
ln(z) = ln(r) + ln[e^{i(theta)}]
ln(z) = ln(r) + i(theta)
Here, (theta) is the argument of z, (theta) = arg(z)
Therefore, (theta) = acos[{Re(z)}/r]
It doesn't work with asin[{Im(z)}/r]. It didn't match the calc.
Then, I tried for different sign values of Im(z). To match with the calc, I introduced the signum function.
Example:
ln(-2-i) = (1/2)ln(5) + (-1)acos[-2/{5^(0.5)}]


Sponsor
gwicks56Aug 30, 2007 4:19am
You're formula is very similar to the formula definition of Ln(a+ib):

From a textbook/tables on complex numbers:

z (or a+bi) can be expressed as z = A*exp^(i*theta).
Where A = sqrt(a^2 + b^2), and theta = atan(b/a)/

So Ln(z) = Ln(A*exp^(i*theta))

Which in turn gives Ln(A) + Ln(exp^(i*theta))

And in turn, if you compare with what you derived, you've come remarkably close. I hope you continue with Maths.

As for graphing it, see if you can find some open-source CAS (computer algebra system) like Octave, Scilab, or Maxima - they might have the capability of graphing it.

Good work!


ajinx999Aug 30, 2007 4:27am
CORRECTION in the formula:
ln(a + ib) = (1/2)ln{(a^2) + (b^2)} + {sgn(b)}acos[a/{(a^2) + (b^2)}^(1/2)]
I mistyped before; ... acos[(a^2)/{(a^2) + (b^2)}]
In short, the formula is
ln(a+ib) = ln(r) + {sgn(b)}acos(a/r)
where r = [(a^2)+(b^2)]^(1/2)

To gwicks56:
(theta) = atan(b/a)
This equation should not be taken into consideration.
In that case,
ln(a+bi) = ln(-a-bi)
which is false.
Hence we have to consider,
(theta) = acos[a/{(a^2)+(b^2)}^(1/2)]


Sponsor
gwicks56Aug 30, 2007 8:07pm
Ajinx999,

First, the natural logarithm for a complex number isn't indeterminate: it just does not result in a real number - it results in a complex number. I can only venture a guess as to the reason why your textbooks ignore the results of the computation of the natural logarithm of a complex number is that you've probably already surpassed your textbooks for grade 12 (and you will most likely do very well in a university - you'll probably be my boss someday soon).

In any event, offhand, there is an example of an operation on a complex number that maps the complex number to a real number: it's the magnitude operation (which, it sounds like you already are aware of).

But the natural logarithm function still maps a complex number (with a non-zero imaginary component) to another complex number (again, with a non-zero imaginary component).

Complex Analysis really does live up to it's name: it can be quite complex!

There are, I believe, several websites that may offer downloadable math books, probably complex analysis books, in PDF file format - which would be of value to you.

Wikipedia tends to a very good resource for math. Here is an entry that might help explain much better than I can:

en.wikipedia.org/wiki/Euler [en.wikipedia.org/wiki/Euler]'s_formula

That's actually a very good starting point.

Cheers, g.


ajinx999Aug 31, 2007 2:56am
Thanks gwicks56!

Once again, I'm sorry. I forgot to add 'i' in the formula.
THE SECOND TERM OF THE FORMULA IS AN IMAGINARY COMPONENT.

ln(a+ib) = (1/2)ln{(a^2)+(b^2)} + i{sgn(b)}acos[a/{(a^2)+(b^2)}^(1/2)]

Also, I understood why the formulaic answer doesn't match the calculator's answer if I introduce 'asin[{Im(z)}/r]' instead of 'acos[{Re(z)/r}]' in the imaginary component of the right hand side of the equation.
The range of the function
f(x) = asin(x)
is [-(infinity),+(infinty)] (It is closed interval)
That is, x can take any real value from the set of Real Numbers (R)
But, a calculator only considers a limited range which is called 'principal value range'.
For
f(x) = asin(x)
the principal range is [-(pi)/2,+(pi)/2]
This implies that the (theta) should lie between -(pi)/2 and +(pi)/2. Therefore, the modified formula (which includes asin... instead of acos...) will be be applicable only for complex numbers in the I and IV quadrants of the Argand plane (or the complex plane).
In the original formula, I have introduced the function acos(x)
For
f(x) = acos(x)
The range is the set of real numbers. But for a calculator, the principal range is [0,+(pi)].
So, in this case the formula holds good for complex numbers in I and II quadrants. Then, I thought about the remaining quadrants, and I realised that the sign of Im(z) also contributes in determining the position of the complex number in the Argand plane. That's why I added a signum function on Im(z).

'Im(z)' is 'imaginary component of complex number z = a+ib'
'Re(z)' is 'real component of complex number z = a+ib'

Anyone can provide me with a graph of the formulaic equation?
It should be 3D (I suppose) because the ln(z) is a function in 2 variables.

IN CASE OF LOGARITHMS OF NEGATIVE REAL NUMBERS THE SIGNUM FUNCTION IS DISCARDED!

Finally, I got the answer to my questions.
First, my formulaic equation

ln(a+ib) = (1/2)ln{(a^2)+(b^2)}+i{f(b)}acos[a/{(a^2)+(b^2)}^(1/2)]

where f(b) (similar to signum function but there is a subtle difference) is a function of b in this way
f(b) = abs(b)/b if b is not equal to zero
= 1 if b is equal to zero
This complex logarithmic function (the top formulaic equation and not f(b)) is an injective function. It is because there is only one unique value of a particular complex logarithm. That is, the range of the function is the 'principal range' (as in inverse trigonometric functions)
According to Wikipedia en.wikipedia.org/wiki/Complex_logarithm [en.wikipedia.org/wiki/Complex_logarithm] , the complex logarithmic function seems to be simpler than mine. But, both the equations are almost same.
The only difference is the addition of the term 2(pi)k to the imaginary component of the formula (which I didn't thought about). Wikipedia manifests complex logarithm as a multi-valued function. My formula is actually a single-valued function. (The microscopic, or rather, feeble advantage of my formula is that you can get a single numerical answer just by substituting the values of a and b with required ones, without worrying about the argument.)
By adding the term (i2(pi)k) to the formula, it becomes a multivalued function!
For example,
ln(2+i) = (1/2)ln(5)+iacos{2/(5)^(1/2)} = (1/2)ln(5) + iacos{2/(5)^(1/2)}+i2(pi) = (1/2)ln(5)+iacos{2/(5)^(1/2)}+i4(pi) = ...
Also, don't forget to check out the Reimann surface (graph of complex logarithm) on the above link.


Natural Logarithm of a Complex Number

You need to Sign-up for StumbleUpon to post to this forum