Re: Log Error ( ? )
- To: mathgroup at smc.vnet.net
- Subject: [mg78955] Re: Log Error ( ? )
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Fri, 13 Jul 2007 06:12:45 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <f74rf5$7uj$1@smc.vnet.net>
Larry wrote:
> Hi,
>
> I had a question about something I found in Mathematica 5.2... I was plotting Log[x-1]-2 with x = {0,10} and y = {-10,5} and strangely found that the graph crossed the x-axes at approximately x == 8 ...
>
> It should be 101 of course, but it seemed like 8. Then I did an Nsolve with the equation set to 0, and low and behold got an answer x == 8.38906.
>
> Is this a bug in mathematica or am I missing something here?
A quick check to the online documentation tells us that, "Log[z] gives
the natural logarithm of z (logarithm to base e)," whereas, "Log[b,z]
gives the logarithm to base b." Therefore,
In[1]:= Solve[Log[x - 1] - 2 == 0, x]
Out[1]= {{x -> 1 + E^2}}
In[2]:= Solve[Log[10, x - 1] - 2 == 0, x]
Out[2]= {{x -> 101}}
In[3]:= Solve[Log[2, x - 1] - 2 == 0, x]
Out[3]= {{x -> 5}}
Regards,
Jean-Marc