# How to do logarithms?

andyman20
hello everyone~

im having trouble with logarithms. i tried my best to understand at shcool but my stupid teacher couoldnt explain properly. few days passed after the logs lesson, I wasnt sure how to do it.. so i asked the techer,,and he was shouting at me... because i didnt understood him... i shouted back at him and i got a detention.. i want to murder that guy.. any way lol

can you people teach me how to do logarithms?
like giving examples and stuff.

thank you

Homework Helper
Perhaps it would be easier if you'd say what exactly you're having trouble with, the type of exercices etc.

As for the theory, logarithms can be used for e.g. solving exponentials. It's the inverse operation of taking powers.
It's important to really understand the equivalence beneath.

$$\log _b a = x \Leftrightarrow a = b^x$$

Any specific questions?

The Bob
TD said:
$$\log _b a = x \Leftrightarrow a = b^x$$
I must say, this is what I would have written.

As another bit, do you need to know how to determine laws of logs?

futb0l
The laws of logs are pretty important and they're pretty easy to understand.

$$\log_{b} mn = \log_{b} m + \log_{b} n$$

$$\log_{b} \frac{m}{n} = \log_{b} m - \log_{b} n$$

$$\log_{b} a^n = n \log_{b} a$$

Maxos
Are you sure?

Then log(4)=2log(-2)

Homework Helper
Maxos said:
Are you sure?

Then log(4)=2log(-2)
Where does that come from?

$$\log_{b} 4 = \log_{b} 2^2 = 2 \log_{b} 2$$

cscott
Maxos said:
Are you sure?

Then log(4)=2log(-2)

You can't take the log of a negative number AFAIK.

OlderDan said:
Where does that come from?

$$\log_{b} 4 = \log_{b} 2^2 = 2 \log_{b} 2$$

I think he meant $\log_{b} 4 = \log_{b} (-2)^2 = 2 \log_{b} -2$

Nylex
cscott said:
You can't take the log of a negative number AFAIK.

That's what he was implying when he said, "are you sure?".

ssj5harsh
cscott said:
You can't take the log of a negative number AFAIK
Let me prove this. Its quite simple.
$$\log_{b}a=x \Leftrightarrow a=b^x$$

Now, if a is negative, this implies b^x is negative.
We can take some examples and see that,$$10^2 = 100$$
$$10^1 = 10$$
$$10^0 = 1$$
$$10^{(-1)} = 0.1$$
$$10^{(-2)} = 0.01$$
$$10^{(-3)} = 0.001$$
$$10^{(-1000)} = 0.0000...1$$

Thus you can never get to zero and certainly for any real b and x $b^x$ is always positive. (In fact it is zero at -ve infinity)

You can also realize this by looking at the graph of any exponential function.

So, in $a = b^x$, a can never be negative.
Hence, in $log_{b}a=x$, a can never be negative or zero.
It can also be proved that b != 1, b>0, though x can be positive, zero or negative.

As for the tutorials, here is a nice link I know:http://www.counton.org/alevel/pure/purtutlog.htm [Broken] I don't know your level, but this is quite basic and is in essence logarithms.

Last edited by a moderator:
Maxos
Quote:
Originally Posted by cscott
You can't take the log of a negative number AFAIK.

That's what he was implying when he said, "are you sure?".

Yes, of course, thank you Nylex.

you can take a log of a negative number, sure.

trouble is, it's not a real number and there are an infinite number of (complex-valued) solutions.

as far as the usual algebra for real numbers, then the logarithm is undefined for any real number equal to or less than zero.

another property is the change of base formula. some of you guys who know the latex code can put that up here, i guess.

amt
Logarithms are used to make large number calculations in an easily comprehendible format. You have probably seen graphs showing a curved graph going from left to right. The smallest value on the left might be '0' and the largest value on the right might be 100,000,000.

Now for example if you want to plot a graph that is a function that contains values 0,1,2,3,4,5,6, 100,000 and 100,000,000(on the X axis) then you see it would be very hard to graph this on a paper because there is a lot of points under 10 and then suddently the values get to an extremely large value. To make this easy, they developed logarithms (I think it was developed by a scientist at Bell Labs).

Consider this:
Log 1= 0 (there are no zeros in 1)
Log 10=1 (There is 1 zero)
Log 100=2 (there are 2 zeros)
Log 1000=3 (there are 3 zeros)
Log 10000=4(there are 4 zeros)

And so on...you simply count the number of zeros.

If you are trying to do some calculations in the head, then if you were given the value of 5, then you can make a guess that Log(5) has to be between 1 and 0, because Log(1)=0 and Log(10)=1.

If you want to find the value of Log 500, then you can make a guess that it has to be between 2 and 3, because Log Log(100)=2 and Log(1000)=3 and so on.

Hope this helps... :uhh:

Last edited:
Homework Helper
another property is the change of base formula. some of you guys who know the latex code can put that up here, i guess.
$$x = a^{\log_a{x}}$$

$$\log_b{x} = (\log_a{x}) \log_b{a}$$

$$\log_a{x} = \frac{\log_b{x}}{\log_b{a}}$$

Homework Helper
you can take a log of a negative number, sure.

trouble is, it's not a real number and there are an infinite number of (complex-valued) solutions.

as far as the usual algebra for real numbers, then the logarithm is undefined for any real number equal to or less than zero.

another property is the change of base formula. some of you guys who know the latex code can put that up here, i guess.

Not quite true about the log of a negative number. It will return a complex number. The imaginary part will always be $$\pi i$$

If you exponentiated the real part, you'd notice that the result always equals the absolute value of the number you originally input. Which is why you'll often see formulas use $$ln \vert x \vert$$. Taking the log of the absolute value of 'x' avoids getting a complex number as your answer.

BobG said:
Not quite true about the log of a negative number. It will return a complex number. The imaginary part will always be $$\pi i$$

If you exponentiated the real part, you'd notice that the result always equals the absolute value of the number you originally input. Which is why you'll often see formulas use $$ln \vert x \vert$$. Taking the log of the absolute value of 'x' avoids getting a complex number as your answer.

actually, the imaginary part of the solution for taking the complex-valued logarithm (denoted as "log" in the textbook i used for my complex variables course this very summer ) will be pi (1 + 2n) and not just pi:

log(z) = ln|z| + i arg(z), (where z is any element of the complex numbers not equal to 0 := (0,0) )

in general. since the principal argument of a negative number is pi, arg(z) = pi + 2n pi = pi (1 + 2n).

so ln|z| is a real number, as mod(z) is a real number and the natural logarithm of a real number is a real number. and the imaginary unit multiplied by, in this case, pi (1 + 2n) is a pure imaginary number.

the sum of a real number and a pure imaginary number is a complex number. the "n" is any integer, and as there are an infinite number of integers, there are an infinite number of complex-valued solutions.

why you decided that this contradicted anything i had said is completely up in the air.

Last edited:
OlderDan said:
$$x = a^{\log_a{x}}$$

$$\log_b{x} = (\log_a{x}) \log_b{a}$$

$$\log_a{x} = \frac{\log_b{x}}{\log_b{a}}$$

thanks, older dan.

nice proof.

BobG said:
Not quite true about the log of a negative number. It will return a complex number. The imaginary part will always be $$\pi i$$

OH! now i see why you thought i was wrong!

you thought that there was a single value for the solution!

this is not true.

there is a function called the principal logarithm, and in my textbook (by brown and churchill), it was called Log(z).

the PRINCIPAL logarithm is single valued: Log(z) = ln|z| + i Arg(z), where as usual z is any element of the complex numbers not equal to 0.

Arg(z) is single-valued: it's simply the value of the angle the line segment defined by the distance from the origin to the point z makes with the real-axis, with values in the set (-pi, +pi].

you can make log(z) single valued by specifying "branch cuts," which stipulate that mod(z) be greater than 0 and that arg(z) be some range of angles that sweep out a whole circle.

(the principal logarithm, in this sense, is a particular branch cut of the logarithm.)

so... yeah, in general, the logarithm of an element of the complex numbers is multiple-valued.

(in fact, in the complex plane, log(z), where z is a positive real number, takes on an infinite number of complex valued solution. however, Log(z) = ln(z) in this case. but log(z) and ln(z) are different functions--the latter isn't defined for any number that is not a positive real number!)

i think, short of deriving the formula for calculating log(z), i have sufficiently exhausted this topic.

carry on.

Last edited:
i have changed my mind--i'll provide the proof given in "complex variables and applications" by brown and churchill:

(from chapter 3, section 29)

let exp(w) = z, where z is any complex number not equal to 0.

in polar form, z = r exp(i*theta), where theta belongs to the set (-pi, +pi].

also note that w, as a complex number, may be written as w = u + iv.

so

exp(u + iv) = r exp(i theta)
exp(u) exp(iv) = r exp(i theta)

in exponential form, two complex numbers are equal if and only if the "radius" terms are equal and the "angle" terms are equal, up to a factor of 2*n*pi. (discussed in section 8--this is also true about the equivalence of angles in the real plane, too, so it shouldn't be difficult in the least to see this.)

thus

exp(u) = r and
v = theta + 2n pi, where n is some integer.

notice that u = ln r, as both are real-valued.

so w = u + iv = ln r + i (theta + 2n pi)

we define a function of a complex variable to be this very "w." it is called log(z).

also, r is equivalent to |z| and theta is equivalent to Arg(z)

so

log(z) = ln|z| + i (Arg(z) + 2n pi)

but Arg(z) + 2n pi is equal to arg(z), so

log(z) = ln|z| + i arg(z)

(and let me really drive the point home again about how arg(z) is multiple-valued, thus making log(z) multiple-valued!)

let it be known that it was not my intention to turn this thread into one about functions of a complex variable, but i can not allow for misstatements to be unchallenged.

Homework Helper
why you decided that this contradicted anything i had said is completely up in the air.
Poor choice of words on my part. A better choice would have been misleading. There may technically be an infinite number of solutions, i.e. $$\pi , 3\pi, 5\pi, 7\pi$$, etc, but they all represent the same spot on a circle. In other words, the situation's not nearly as hopeless as an infinite number of solutions would imply.

And my reply was aimed more at the general impression given by several posts in a row: that if x ever turns out to be negative, then you've come to a dead end and can't solve the problem.

BobG said:
Poor choice of words on my part. A better choice would have been misleading. There may technically be an infinite number of solutions, i.e. $$\pi , 3\pi, 5\pi, 7\pi$$, etc, but they all represent the same spot on a circle. In other words, the situation's not nearly as hopeless as an infinite number of solutions would imply.

And my reply was aimed more at the general impression given by several posts in a row: that if x ever turns out to be negative, then you've come to a dead end and can't solve the problem.

well, the thing is...

each individual solution is a different point in the complex plane.

log(z) = ln|z| + i arg(z)

this is a RECTANGULAR equation! there aren't any rotations, so this means that each solution is a dinstinct point.

let's take an example...

log(-1). that's equal to ln|-1| + i (pi + 2n pi)

thats 0+i pi(1 + 2n).

let's plot a few solutions on the complex plane...

the solution with n=0 is the ordered pair (0, pi)
" n = 1 is the ordered pair (0, 3 pi)
" n = 2: (0, 5 pi)
" n=-1: (0, -pi)

these are all clearly distinct points in the complex plane. (incidentally, they are pure imaginary numbers.)

it's not like when you take an n-th root of a complex number, where there n-distinct solutions, and then you got a full rotation. we're talking an infinite number of distinctly-valued solutions!