1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How do I do log to the base 2?

Tags:
  1. Jul 21, 2010 #1
    On my calculator I have a log button which is log to the base 10 and I also have a natural log button. How do I input log to the base 2 on a calculator?

    So far the only way I know is to go log(x)/log2 = y

    for instance if I'm trying to find log to the base 2 of the number 24
    I go log24/log2 = 4.58

    But this is time consuming when you have a long equation with lots of log to the base to 2's in it.

    My calculator is a Casio fx-9750G Plus.
     
  2. jcsd
  3. Jul 21, 2010 #2

    Mentallic

    User Avatar
    Homework Helper

    Well one could ask the same question for log of any reasonable base. I'm sure they didn't bother adding a button to allow for any log base because it's really not that much extra effort to divide by log2 in my opinion.

    And when you say you have lots of log base 2's in the equation, what form do they usually come in?

    [tex]log_2a+log_2b+log_2c[/tex] etc.? In this case just factorize out the [tex]\frac{1}{log2}[/tex]

    or

    [tex]log_2a*log_2b*log_2c[/tex], in this case factorize out [tex]\frac{1}{(log2)^3}[/tex]

    It might come in handy to try simplify some things on paper first before punching it into the calculator.
     
  4. Jul 21, 2010 #3

    HallsofIvy

    User Avatar
    Science Advisor

    If [itex]y= log_a(x)[/itex], then
    [tex] x= a^y= e^{ln(a^y)}= e^{y ln(a)}[/tex]

    Now take ln of both sides of that: [itex]ln(x)= y ln(a)[/itex] so
    [tex]y= \frac{ln(x)}{ln(a)}[/tex].

    In particular,
    [tex]log_2(x)= \frac{ln(x)}{ln(2)}[/tex]
     
  5. Jul 21, 2010 #4
    What about storing log(2) in the calculator's memory and using the memory key, perhaps that's less time consuming than hitting log and 2?
     
  6. Jul 22, 2010 #5
    So if I have an equation which is say -0.5log0.5 - 0.5log0.5 (where the logs are to the base 2)
    I would type this into my calculator as log0.5/log2 * -0.5 - log0.5/log2*0.5 = 1 ?

    Is this how everyone else does it on their calculators?
     
  7. Jul 22, 2010 #6

    Mentallic

    User Avatar
    Homework Helper

    Well, like I said, you should simplify on paper first. I don't know about you but I'm much more prone to making arithmetic mistakes punching things into a calculator than I would simplifying the question first on paper.

    You must've given a bad example, because [tex]-0.5log_20.5 - 0.5log_20.5=-log_20.5=log_22=1[/tex] which you can see can be easily done on paper. But let's say it wasn't this easy and it wasn't immediately obvious how to simplify.

    First factorize the constants: [tex]-0.5(log_20.5-log_20.5)[/tex]

    Then factorize the [tex]1/log2[/tex]: [tex]\frac{-0.5}{log2}(log0.5-log0.5)[/tex]

    Now, since the part in the parenthesis isn't immediately obvious to solve from our assumption that this example is harder, you can now start plugging it into the calculator.
     
  8. Jul 22, 2010 #7
    use the property of logarithms:

    [tex]
    \log_{a}{c} = \frac{\log_{b}{c}}{\log_{b}{a}}
    [/tex]

    Proof:

    Using the fundamental property of logarithms:

    [tex]
    a^{\log_{a}{c}} = c
    [/tex]

    and taking the logarithm with base [itex]b[/itex] on both sides, we get:

    [tex]
    \log_{b}{a^{\log_{a}{c}}} = \log_{b}{c}
    [/tex]

    Using the rule for logarithms of exponents, the left hand side can be transformed to:

    [tex]
    \log_{a}{c} \, \log_{b}{a} = \log_{b}{c}
    [/tex]

    which, after solving for [itex]\log_{a}{c}[/itex], yields the quoted formula. Q.E.D.

    In your case you use [itex]a = 2[/itex] and for [itex]b[/itex] you use one of the standard bases for logarithms (10 or [itex]e[/itex]).
     
  9. Jul 22, 2010 #8

    Mentallic

    User Avatar
    Homework Helper

    Is it just me or is it becoming a habit for PF'ers to stop reading after the first line in the OP's post and avoid reading any other responses thereon?
     
  10. Jul 22, 2010 #9

    HallsofIvy

    User Avatar
    Science Advisor

    Yeah, it saves time! (Well, not for others of course!)

    Now, my great failing is that I just can't resist putting in my oar!
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook