MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Log Error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78832] Re: Log Error
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Wed, 11 Jul 2007 05:59:43 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <f6vnds$qfr$1@smc.vnet.net>

Laurence Kohn 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?

No error from Mathematica here. You should post the exact code you 
tried, because the solution to the equation Log[x - 1] - 2 == 0 is x == 
1 + E^2 (E being the base of the natural logarithms ~= 2.71828). You can 
easily get the solution by hand or with the help of Mathematica.

Log[x - 1] - 2 == 0
     Log[x - 1] == 2
   E^Log[x - 1] == E^2
          x - 1 == E^2
              x == 1 + E^2
              x ~= 8.39 (2 d.p.)

In[1]:= Plot[Log[x - 1] - 2, {x, 0, 10}, PlotRange -> {-10, 5}]

In[2]:= sol = ToRules[Reduce[Log[x - 1] - 2 == 0, {x}]]

Out[2]= {x -> 1 + E^2}

In[3]:= x /. sol

Out[3]= 1 + E^2

In[4]:= N[%]

Out[4]= 8.38905609893065

Regards,
Jean-Marc


  • Prev by Date: Re: the FontType option
  • Next by Date: Re: How to factor a rational
  • Previous by thread: Re: Log Error
  • Next by thread: How to factor a rational