6

My question is as follows:

Is the below a useful elementary way of dealing with negative arguments? If not, what is a better (elementary or not) way of dealing with negative arguments of the logarithm? How could you extend those methods to complex arguments?

Today I was in pre-calculus and was playing around with $\pi$ approximations (having finished my work), because I recently did a probabilistic Buffon's Needle $\pi$ approximation and accompanying proof for an AP stats project, and was interested in other $\pi$ approximations.

While doing this I came upon this reasoning: $$ e^{i\pi} + 1 = 0 \Rightarrow \ln(-1)=i\pi . $$ Which I generalized to: $$ \log_{b}(x) = \log_{b}(x) + \frac{i\pi}{\ln(b)}; x < 0.$$ I then defined the logarithm function in a recursive way for all arguments $ x \in \mathbb{R} \wedge x \not= 0$ as follows: $$ \log_b(x) = \begin{cases} \log_b(x) & x > 0 \\ \log_b(x) + \frac{\pi i }{\ln(b)} & x < 0 \end{cases} $$ Because my pre-calculus teacher had said that the logarithmic function was not defined for negative arguments, and I knew complex analysis extends the logarithm (but I am not there yet, I just started real analysis) to complex arguments, I assumed there was not elementary way of dealing with negative arguments (although from the definition of the natural logarithm in calculus I ascertained, but never proved, that there was a way). There is two obvious problems I can see with my definition, namely it is recursive and in is not continuous at zero

edit:

I have tried to use the approach of using: $$-\int\limits_{-x}^1 \frac{dt}{t} = \ln(-x)$$ but it got nowhere, so I went back to Euler's identity approach, but more generalized.

Here is the argument I came up with:

let $x \in \mathbb{R}$. We now take the natural logarithm to be well defined for the positive reals, and so $\ln(|x|)$ is well defined.

We also take $\log_b(x)$ to be defined as follows: $$ \log_b(x) := \frac{\ln(x)}{\ln(b)} $$

We will show that $$\forall x, \log_b(-|x|) = \frac{\pi i}{\ln(b)}+ \log_b(x)$$

lemma: First we show that $$\ln(-|x|) = \pi i + \ln(|x|)$$

We consider $e^{zi} = \cos(z) + i \sin(z)$ where $z \in \mathbb{R}$ and $z$ is modulo $2 \pi$. we can see that $ln(\cos(z) + i \sin(z)) = zi$, if we let $\cos(z) + i \sin(z) = -1$ then $z \equiv \pi \bmod{2\pi}$.

Now we look back and and expand our original equation: $$\ln(-|x|) = \ln(-1) + \ln(|x|)\ \ .$$ Now we can substitute $\ln(-1)$ with $\ln(\cos(z) + i \sin(z))$, where we have restricted $z$ to $-2\pi \leq z \leq 2\pi $ and we say it is equal to $\pi$. We get $$\ln(-|x|) = \ln(-1) + \ln(|x|) = \ln(\cos(z) + i \sin(z)) + \ln(|x|) \ \ .$$

Now we can see that because $ln(\cos(z) + i \sin(z)) = zi$ we can say: $$\ln(-|x|) = \pi i + \ln(|x|)\ \ \ \Box$$

Now we use this result to show our original conjuncture $$\forall x, \log_b(-|x|) = \frac{\pi i}{\ln(b)}+ \log_b(x) \ \ .$$

Because we defined $\log_b(x)$ as $\frac{\ln(x)}{\ln(b)}$ we can see that $$\log_b(-|x|) = \frac{\ln(-|x|)}{\ln(b)}$$ which, via our lemma, we see is $$\log_b(-|x|) = \frac{\pi i + \ln(|x|)}{\ln(b)}$$ which is simplified to $$\forall x, \log_b(-|x|) = \frac{\pi i}{\ln(b)}+ \log_b(x) \ \ \ \ \blacksquare$$

This argument, I think, is a bit stronger than starting at the special case $e^{\pi i} -1 = 0$.

I have also considered the logarithm through the integral $$\int \frac{dx}{1+ax} = \frac{1}{a}\ln(1+ax) + C$$, but haven't seen if it would be fruitful to follow this path.

  • 1
    Consider $e^{-i\pi} = -1$, then you'd get by the same calculation $\ln(-1) = -i\pi$. – Long Oct 30 '13 at 23:13
  • Hm... Aren't similar things true for a large set of arbitrary powers? Does this mean that my method is not well defined? – Juan Sebastian Lozano Oct 30 '13 at 23:16
  • 2
    It's quite possible to "define the logarithm" for negative arguments in an elementary way. But problems arise if you want your new thing have properties on its new domain like the ones the good old logarithm has on its good old domain (e.g.: try to identify the $x$ and $y$ for which your extended logarithm satisfies $\log_b(xy) = \log_b(x) + \log_b(y)$). It's because of these obstacles that I put quotes around "define the logarithm": if what you get fails to resemble the old logarithm in key ways, maybe it's better not to think of the new thing as "the logarithm" without qualification. – leslie townes Oct 30 '13 at 23:48
  • That is interesting. My extended logarithm has all the properties of the regular logarithm for the positive reals, because it is defined as a piece wise, however your point is well taken, and it offers a perspective I hadn't really considered. – Juan Sebastian Lozano Oct 30 '13 at 23:53
  • Is http://math.stackexchange.com/questions/201991/for-what-values-alpha-for-complex-z-lnz-alpha-alpha-lnz related? – lab bhattacharjee Nov 10 '13 at 09:37
  • Kind of, but my question is mostly about negative arguments, not complex ones. – Juan Sebastian Lozano Nov 10 '13 at 18:01

2 Answers2

3

A one line concrete example of how your method runs into trouble is that $\log(-2) + \log (-3) =_{\textit{def}} \log 6 + 2 \pi i$ rather than $\log 6$, which you obviously want.

The workaround is to generalise your thinking to the whole complex plane (except the origin): if $z \in \mathbb{C}\setminus \{0\}$, then we can write, in polar coordinates, $z = r \exp (i \theta) = \exp (l + i \theta)$ where $l$ is uniquely defined (as $\log(|z|) \in \mathbb{R}$) and $\theta$ is defined up to a multiple of $2 \pi i$. Winding the real half-line a whole $2\pi$ radians clockwise about the origin brings it back to where it started, but adds $2\pi i$ to the logarithm.

So if you are happy to define your logarithm $\log(z)$ not as a function giving a single complex number, but as a multifunction:

$$\log( r \exp(i \theta)) =_\mathit{def} \log (r) + i \theta + 2 \pi i \mathbb{Z}$$ $$ = \{\log (r) + i \theta, \log(r) + i(\theta + 2\pi), \log (r) + i( \theta - 2\pi), \ldots\} $$

then it works just fine. (Equivalently you can define $\log$ as taking values in the tube-shaped quotient space $\mathbb{C}/(2\pi i\mathbb{Z})$, if that feels more natural.)

As long as you don't mind throwing away multiples of $2\pi i$ every so often as you calculate, or (going backwards) searching among multiples of $2\pi i$ for the value that works, this gives a completely practical way of calculating. Also, though I've been silently using the natural logarithm, it can just about be forced to work with other bases too though you need to worry about scaling the real component as you twist around, so the multivalues don't line up so nicely: the better answer is to define $\log_a(z) = \log(z) / \log (a)$ throughout.

As you observe, this all breaks down horribly at the origin (where all angles are equivalent, not just multiples of $2\pi i$) and there is nothing you can do about that.

HTFB
  • 3,007
2

The problem you came across is the definition of complex logarithm. What is a logarithm? Well, we came to the logarithm as an inverse to the exponential function. So, by writing $$\mathrm{e}^{iπ}+1=0\quad\implies\quad \ln(−1)=iπ$$ you assumed there is an inverse.

The problem is that on the complex plane exponential function hits the same value for multiple parameters. The usual way to deal with this is to restrict the arguments of the function so that on this restricted domain each argument maps to different value. This is standard in calculus, and allows us to have an inverse to the restricted function. In case of exponential function, such inverse is called a logarithm. What is well understood is that a logarithm can not be continuous on the whole complex plane, that is it has to be restricted to just a part of complex plane in order to be continuous. You can see the Wikipedia article on complex logarithm which incorporates images that can help you visualize the function.

What I mentioned is less important to your original intention of computing the number $\pi$, than the fact that having a formula like $$\pi = \frac{\ln(-1)}{i}$$ is not the end of problems. Even if $\ln(-1)$ is defined, it still has to be computed. Do you expect to use the formula and plug it in some powerful calculator so that it gives you an answer for $\pi$? How will that $\ln$ be computed? If you would like a black box solution than look no further than $$\pi=\arccos(-1)\quad\mbox{or}\quad\pi=4\arctan(1).$$ Even better plug in $\pi$ in the same powerful calculator and it will return very good approximation of the number.

After mentioning all that, and if you are not interested in black box approach, but you would like to approximate $\pi$ yourself, there is still a way to use the formula $$\mathrm{e}^{i\pi}+1=0$$ to do that (note that there are other more optimal ways). By the Euler formula $$ \mathrm{e}^{ix}=\cos x + i \sin x\mbox{ which you would like to be eqal }-1.$$ That is, you would like that $$ \cos x = -1 \quad\mbox{and}\quad \sin x = 0.$$ So, if your calculator knows how to compute sine well, you can try to solve equation $\sin x = 0$ between $x=3$ and $x=4$ by some numerical method. If you are inexperienced try bisection method, if you would like faster convergence try newton's method. If you would like for the computation to stick with just the complex exponentials you could reformulate the equation solving problem to become: $$\mbox{find }x\mbox{ such that }\quad\mathrm{Re}(\mathrm{e}^{ix})=-1$$ where I added $\mathrm{Re}$ just to be sure that whatever comes out of the calculated $\mathrm{e}^{ix}$ is a real number and can be compared to $-1$.

Mate Kosor
  • 332
  • 1
  • 15
  • This was a very clear explanation of the complex logarithm. The part about computing Pi through euler's formula, I would most likely implement through a newton's method approximation. – Juan Sebastian Lozano Nov 11 '13 at 13:11