# Log rules…

Here is a very simple problem which appeared with my first year calculus students. Consider the function

$f(x)=\log(x^2)$

Its domain is ${\mathbb R}-\{0\}$. But now, we may take the exponent down, using the rules of the logarithm…

$f(x)=2\log(x)$

and now, the domain is $(0,\infty)$… What happens??? Try to explain it: (a) without complex numbers, (b) with them…

## 8 thoughts on “Log rules…”

1. Oh, now i understand with a nephritic spasm is called calculus
Can this be done counting with fingers?

2. I don´t know exacly what happens but i used octave to plot both graphs and they are the same, the have the same domain R-{0}.
So I try to find a explanation, but wikipedia doesn´t help very much xD.

3. Octave does funny things, you have to be careful. Try log(-1), and you get a complex number (0.000 + 3.14159 i = i pi). Yet, when you plot it, it only plots the modulus! So, if you try to plot log(x), it is as if its domain was the whole of R and the function is even. So, don’t rely much on octave for these things…

I can’t imagine any explanation with real numbers only, so I’ll give it with complex.

I start with exp(i pi)=-1, so log(-1)=i pi. Now, let us consider a negative x, so x=-|x|. Then, log(x)=log(-1*|x|) = log(-1) + log(|x|) = i pi + log(|x|).

So, 2 log(x) = 2pi i + 2 log(|x|), if x<0

But 2pi i is the log of 1! So you have 2 log(x) = log(1) + 2 log(|x|) = 2 log(|x|)

Of course, you've changed sheet in the Riemann surface, but who cares? :)

Anyway, I feel the explanation is too difficult… I’m striving for ideas!

4. The best explanation is yours (maybe it can be written in a more elegant way). We need to think that log (x) has a discontinuity in x=0, so the best way to work with is to rewrite it as a piecewise function.