# Homework Help: Log2 - why am I off by 2

1. Dec 12, 2007

### asif zaidi

Problem statement

Find an approximate value for log(2) by subdividing the interval [1,2] into sub-intervals of length 1/n and using this subdivision to compute the upper sum for the function f(x)=1/x. Compute the upper sum for n=1,2,...,10.

My solution
The way I approached this is as follows

Use the definition of integral: as n -> inf ($$\sum$$ f(ci)*partition length)

a. take a partition of size 0.1 (as I have 10 points from 1-2)
b. find f(1.0) + f(1.1) + ... f(1.9) = 1/1 + 1/1.1 + 1/1.2 + .... 1/1.9 = 7.185
c. Multiply 7.185*0.1 = 0.7185

Obviously log2 = 0.301 ~= 0.7185/2. <--- Error.

To see if my understanding of integrals is right, I used same method for f(x) =x^2 from [1,2] and came up with the right answer. So what am I doing wrong with 1/x.

Thanks

Asif

2. Dec 12, 2007

### Office_Shredder

Staff Emeritus
Because you hit the log button instead of the ln button on your calculator :tongue:

3. Dec 13, 2007

### HallsofIvy

You've hit an unfortunate boundary in math notation! In "elementary" course (say introductory calculus and below) typically "log" is used for the common log (base 10) and "ln" is used for the natural logarithm. Most calculators use "log" for common logarithm and "ln" for natural logarithm. But in higher level courses common logarithm is never used and "log" is used for the natural logarithm.

The function you get by integrating 1/x is the natural logarithm.

4. Dec 13, 2007

### asif zaidi

OK - thanks to both.
That explains it and my answer matches.

5. Dec 13, 2007

### kbaumen

Well, in my school, we are taught that 'ln' is natural logarithm, 'lg' is decimal logarithm (base 10) and 'log' is logarithm with any other base.