Results 1 to 5 of 5

Math Help - log/exponential question

  1. #1
    Junior Member
    Joined
    Jan 2010
    Posts
    30

    log/exponential question

    How to solve \log(x)=-x? log is base e
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,854
    Thanks
    321
    Awards
    1
    Quote Originally Posted by crossbone View Post
    How to solve \log(x)=-x? log is base e
    Numerically. There is no analytic way to solve this.

    -Dan
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Jan 2010
    Posts
    30
    where do you start numerically? I know the solution must be between 0 and 1.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Nov 2010
    From
    Clarksville, ARk
    Posts
    398
    Look at the roots of the function: f(x)=x+\log(x)\,.

    Try f(1/2)=-0.1931...\,. That's negative. f(1)=1\,. That's positive, so the root is between 1/2 and 1.

    Use linear interpolation or the bisection method.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,412
    Thanks
    1328
    Whether or not you can solve it "analytically" depends upon what you mean by "analytically". From log(x)= -x we get x= e^{-x} and the xe^x= 1. From that, x= W(1) where "W" is the "Lambert W function" which is defined as the inverse function to f(x)= xe^x. Of course, values of the W function are calculated numerically, just as values of logarithms, exponentials, or trig functions are.

    "Linear Interpolation", that Sammy S referred to, is also called the "secant method" since you use a line between two points on the curve to approximate the curve rather than the tangent line as Newton's method does. Now that you know that (0.5, -0.9131) and (1, 1) are on the curve, you could calculate the straight line between those two points and and determine where that line crosses the y-axis. Take that together with either 0.5 or 1, depending upon whether the actual value of the function is positive or negative, and do it again.

    If you don't have a computer doing the calculations for you "bisection" is simpler. As SammyS calculated, f(.5)= -0.9131< and f(1)= 1> 0 (f(x)= x+ ln(x)) so there must be a 0 between them. The simplest thing to do is to take half way between: 0.75. Now f(0.75)= 0.75+ ln(0.75)= 0.46231> 0. So there must be a root between 0.5 and 0.75. Half way between is 0.625. Continue until you have an accurate enough result.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Exponential Distribution question
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: July 9th 2010, 09:22 PM
  2. Exponential Question
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: May 8th 2010, 10:19 PM
  3. Exponential Question
    Posted in the Algebra Forum
    Replies: 1
    Last Post: March 28th 2010, 04:56 AM
  4. Help on exponential question
    Posted in the Calculus Forum
    Replies: 2
    Last Post: December 2nd 2009, 01:41 AM
  5. exponential question
    Posted in the Calculus Forum
    Replies: 8
    Last Post: April 28th 2009, 08:49 PM

Search Tags


/mathhelpforum @mathhelpforum