Page 1 of 1

Logarithms?

PostPosted: Mon May 02, 2011 1:22 pm
by Edward
Okay, I am having a little trouble understanding what logarithms are used for. I understand the concept, but I have no clue what they are for, why they were invented, or how they are any different from standard exponents. To me, the logarithm of 8 to base 2 = 3 is the same as 2^3=8, only it takes longer to write out. I have read that they are used in calculating decibels or the acidity of aqueous solutions, but I don't understand why logarithms are favored over exponents. Can anyone help?

So these are my questions
1. Why were logarithms invented, and what are they used for, and why are they used?
2. How are logarithms different from exponents, and is there anything they can do that cannot be done using exponents?

PostPosted: Mon May 02, 2011 1:37 pm
by Midori
Moving this to tutorials (which is one above who's who; I assume you just missed).


As to an answer: logarithms are indeed the inverse of exponents. Just as subtraction is the inverse of addition, and division is the inverse of multiplication. However, if we used only addition and multiplication, we couldn't do any algebra. Suppose we have the equation:

5 * x = x + 4

How do we know what x is? The only way to find out is by doing some algebra and converting the addition and multiplication into subtraction and division, like so:

5 * x = x + 4
x = (x + 4) / 5
x = x/5 + 4/5
x - x/5 = 4/5
4x/5 = 4/5
x = (4/5) / (4/5)
x = 1

It's the same way with a logarithm. If you have the equation:

2^x = 13

you can't put that into a calculator to solve it, but if you convert it into:

x = log₂(13)

then you can solve it.

PostPosted: Mon May 02, 2011 11:27 pm
by Dante
Logarithms preferred over exponentials? Nonsense, you get what nature gives you and often times that's an exponential process.

But why are logarithms cool? Well, you can think of them as the great leveler of mathematics. When the numbers you deal with in a system become obscenely large and small at the same time, a logarithm could really be helpful, because it focuses on the order of magnitude and not on the details. You're data may say 1x10-1, 10, 1000 and 100,000,000,000 but if you throw it into a log base 10, you get -1, 1, 3 and 11. Which set of numbers feels more familiar, the one that you could almost count on one hand, or the one that you would need the sands of the sea-shore to count?

Now where would you use something like this? How about measuring the brightness of different lights in the sky. The brightness of ursa majoris 47 has nothing on alpha centari, which in turn has nothing on the moon which has nothing on the brightest star in our sky, sol. But you can't just label them according to the light that they put out because those numbers vary drastically in orders of magnitude... so how do you save space in your astronomical catalog when printing them? List them in their logarithmic form!

You could just as easily use it in game-setting also. How do you make sure that casual players can still have fun and play a game at the same time as extreme players who play the game out of obsession? Make their skills logarithmically dependent upon their points (I used something like this in the IMAGE system in N&S 2.0 actually). In this manner, a player with 300 points earned over a few hours will be just slightly less powerful then the player with 1500 points. Of course, the person with 1500 points will be MORE powerful, but not 5x as powerful as the casual player.

There are also systems in nature that are logarithmic, one great example being your ear which responds logarithmically to sound. That is, in order to double the perceived loudness of a sound, you have to increase it's intensity by an order of magnitude! You can start to understand then, why the difference between a 20 and a 25 on your MP3 player can be so extreme in terms of damaging your ear. To give the illusion that sound is steadily increasing the MP3 player has to put out exponentially more energy in the sound-output and that energy falls directly on your poor ears. Actually a good number of our senses work off the same principle, that way we can remain sensitive over a wide range of environmental stimuli - allowing us to experience both the intensity of slamming our thumb in the car-door (*yowch!*) or having a fly or mosquito land on our wrist.

One of the most important facts from this whole thing to pick up is the exponential behavior of compound interest. Remember that exponentials don't level off or grow regularly, they EXPLODE in an almost catastrophic manner. The following is an exponential growth rate,

2, 4, 8, 16, 32, 64, 128, 256, 512, 1028, 2056...

In case your wondering, by the 30th term, I've reached 1,073,741,824. Where does this come into play? Credit cards. Credit cards utilize compounding interest - that is, your debt will grow exponentially. But if we had a reasonable saving account program (ah the good old days when banks paid 10% annual interest rates on savings accounts... where did those days of glory go?) you could also flip this on it's head. Say you saved $5,000 at age 20 at a 10% annual interest rate. By the time you reached 65 years of age, that compounded interest will have hit $364,452.42 (you have to worry about a 2-3% inflation rate of course but hey, that is still a fair chunk of change).

But if yous start at age 30? Then you only make $140,512.18. 40? $54,173.53. And if you were an early bird and threw $5,000 into such an account at 16? 533,594.79. And if your parents put $5,000 into such an account at your birth? You would be a multi-millionaire at $2,451,853.63. At 20 years of age, to make similar amounts, you would have to invest over $34,000. So this shows that time is a critical factor for investing in your future and likewise, the longer you let your debt fester, the more cataclysmic the consequence will be to your life.

So yeah... they're pretty important.

PostPosted: Tue May 03, 2011 12:12 am
by Slater
I wish my kilobytes went to 1028.

PostPosted: Tue May 03, 2011 12:05 pm
by R86
The chemist in the room also feels the need to point out that acidity is measured on a logarithmic scale. A solution with a pH of 3 is not merely twice as acidic as a solution with a pH of 6. It's 1000 times as acidic. ;)

PostPosted: Wed May 04, 2011 6:42 am
by Warrior4Christ
Having logarithmic growth in algorithms is also very desirable. That means for very large data sizes, the additional processing time is less. Or rather, look at the sorting algorithm O(N^2) graph vs the O(NlogN) graph here (note the y-axis scales!):
http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/sortingIntro.htm
They both go up to 100,000 elements, but the O(NlogN) is much faster!

PostPosted: Wed May 04, 2011 2:56 pm
by Edward
Thanks for the help guys, I think this has answered my questions very well.

PostPosted: Thu May 05, 2011 6:11 am
by Warrior4Christ
It may also be useful to note that the Turbo Encabulator device is surmounted by malleable logarithmic casing, which is a pretty good feature.

PostPosted: Thu May 05, 2011 1:20 pm
by Mister
my brain hurts and i don't understand any of this...... *passes out*

PostPosted: Thu May 05, 2011 1:46 pm
by Dante
I wish my kilobytes went to 1028.


True. I shouldn't do math at midnight.