What is the problem with Log2?

  • Thread starter asif zaidi
  • Start date
In summary: Problem statement: Given the function f(x)=-5x^2+10x+15, find the 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.In summary, by using the definition of integral and subdividing the interval [1,2] into 1/n intervals, the upper sum for the function f(x)=1/x can be found to be approximately 0.301.
  • #1
asif zaidi
56
0
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 ([tex]\sum[/tex] 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
 
Physics news on Phys.org
  • #2
Because you hit the log button instead of the ln button on your calculator :tongue:
 
  • #3
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
OK - thanks to both.
That explains it and my answer matches.
 
  • #5
HallsofIvy said:
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.

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.
 

1. Why does log2 give me a result that is 2 less than what I expect?

It is important to note that the base 2 logarithm, or log2, is the inverse function of 2^x. This means that if you input a number into log2, the result will be the exponent that 2 needs to be raised to in order to get that number. For example, log2(8) = 3 because 2^3 = 8. Therefore, the result of log2 is always the exponent, not the actual number itself.

2. Can you explain the concept of logarithms in simpler terms?

A logarithm is a mathematical operation that tells you how many times you need to multiply a certain number, called the base, by itself to get a given number. So, for log2, the base is 2 and the result tells you how many times you need to multiply 2 by itself to get the input number. This is useful for solving exponential equations and understanding patterns in numbers.

3. Why is log2 used in computer science and data analysis?

Log2 is commonly used in computer science and data analysis because it is closely related to the binary number system. Since computers use binary code to process and store data, the base 2 logarithm is useful for understanding and manipulating this data. It is also used for measuring the efficiency of algorithms and representing the complexity of data structures.

4. How is log2 related to other logarithmic functions?

All logarithmic functions are based on the same concept, but they just use different bases. For example, the natural logarithm, or ln, uses the base e, which is a mathematical constant approximately equal to 2.718. Logarithms with a base of 10, or log10, are commonly used in chemistry and physics. Log2 is specifically used for working with binary numbers and is also known as the binary logarithm.

5. Are there any practical applications of log2?

Aside from its use in computer science and data analysis, log2 has practical applications in many fields of science and engineering. It is used for measuring signal strength in telecommunications, determining the loudness of sound in decibels, and calculating the rate of decay in radioactive materials. Log2 also has applications in finance, such as calculating compound interest and analyzing stock market trends.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
653
  • Calculus and Beyond Homework Help
Replies
4
Views
308
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
571
  • Calculus and Beyond Homework Help
Replies
3
Views
286
  • Calculus and Beyond Homework Help
Replies
14
Views
247
  • Calculus and Beyond Homework Help
Replies
2
Views
869
  • Calculus and Beyond Homework Help
Replies
7
Views
953
  • Calculus and Beyond Homework Help
Replies
1
Views
959
Back
Top