Results 1 to 15 of 15

Math Help - y-log(y)=x

  1. #1
    dan
    dan is offline
    Member dan's Avatar
    Joined
    Jun 2006
    From
    nebraska usa
    Posts
    113

    y-log(y)=x

    does any body know how to write an iteration to compute y in y-log(y)=x ?
    thank's,
    dan
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by dan
    does any body know how to write an iteration to compute y in y-log(y)=x ?
    thank's,
    dan
    Is x a known constant or a variable?

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    (I assume your question is on Newton's Method cuz that is what you asked the other time).

    You want to solve,
    y-\ln y =x
    Which is equivalent to,
    y-\ln y-x=0
    The iteration sequence is,
    <br />
a_{n+1}=a_n-\frac{f(a_n)}{f'(a_n)}<br />
    Where,
    f=y-\ln y-x
    Thus,
    f'=1-1/y
    Thus,
    f(a_n)=a_n-\ln a_n-x
    f'(a_n)=1-1/a_n
    Thus,
    a_{n+1}=a_n-\frac{a_n-\ln a_n-x}{1-1/a_n}
    Simplfy,
    a_{n+1}=a_n-\frac{a_n-\ln a_n-x}{\left(\frac{a_n-1}{a_n} \right)}
    More simplfying,
    a_{n+1}=a_n-\frac{a_n^2-a_n\ln a_n-xa_n}{a_n-1}
    And yet one more time, (watch those signs )
    a_{n+1}=\frac{a_n^2-a_n-a_n^2+a_n\ln a_n -xa_n}{a_n-1}
    Finally we have,
    a_{n+1}=\frac{a_n(\ln a_n-x-1)}{a_n-1}
    Follow Math Help Forum on Facebook and Google+

  4. #4
    dan
    dan is offline
    Member dan's Avatar
    Joined
    Jun 2006
    From
    nebraska usa
    Posts
    113

    y-log(y)=x

    Ok ,
    I think you might have lost me… I suppose the a with the little n (How do you write that anway?) is your initial value but you lost me on how to compute that.
    Sorry about my slow mind .
    dan
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by dan
    Ok ,
    I think you might have lost me… I suppose the a with the little n (How do you write that anway?) is your initial value but you lost me on how to compute that.
    Sorry about my slow mind .
    dan
    a_0 will be your initial guess, then the itteration formula gives
    a_{n+1} in terms of a_n, so you get a sequence:

    a_0,\ a_1,\ .. \ a_n,\ ..,

    which with luck will converge to the required solution.

    RonL
    Follow Math Help Forum on Facebook and Google+

  6. #6
    dan
    dan is offline
    Member dan's Avatar
    Joined
    Jun 2006
    From
    nebraska usa
    Posts
    113

    Question y-log(y)=x

    so...
    a_0 =1-1/x ???? I think I'm lost. I need a way to calulate a_0 in relation to x...I think I gues they should't let people like me on calculus forums
    dan
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by dan
    so...
    a_0 =1-1/x ???? I think I'm lost. I need a way to calulate a_0 in relation to x...I think I gues they should't let people like me on calculus forums
    dan
    a_0 is the initial guess. You do not calculate you guess.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    dan
    dan is offline
    Member dan's Avatar
    Joined
    Jun 2006
    From
    nebraska usa
    Posts
    113

    y-log(y)=x

    Just any old random guess?? I know that some iterations have a formula for making that guess. But if x = 10 I could just guess 14 and it would still approach??
    Dan
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by dan
    Just any old random guess?? I know that some iterations have a formula for making that guess. But if x = 10 I could just guess 14 and it would still approach??
    Dan
    With x \gg 1, then a_0=x should be OK. But then experimenting with the
    iteration as given by PH it appears to diverge with x=10, a_0=10 or 14!

    It must be a mistake in PH's algebra as the iteration (which is what PH had before he tried simplifying it):

    <br />
a_{n+1}=a_n-\frac{a_n^2-a_n\ln(a_n)-xa_n}{a-1}<br />

    does converge with x=10, a_0=10, to \approx 12.528 after two iterations.

    RonL
    Last edited by CaptainBlack; July 10th 2006 at 01:51 PM.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    MHF Contributor
    Joined
    Oct 2005
    From
    Earth
    Posts
    1,599
    PH: Some slight errors in your algebra.

    Starting from here: <br />
a_{n+1}=a_n-\frac{a_n^2-a_n\ln a_n-xa_n}{a_n-1}<br />

    For the next step you wrote:
    Quote Originally Posted by ThePerfectHacker
    <br />
a_{n+1}=\frac{a_n^2-a_n-a_n^2+a_n\ln a_n -xa_n}{a_n-1}<br />
    When I think it should be:

    a_{n+1}=\frac{a^2_{n}-a_{n}}{a_{n}-1}-\frac{(a_n^2-a_n\ln a_n-xa_n)}{a_{n}-1}

    a_{n+1}=\frac{a^2_{n}-a_{n}-a^2_{n}+a_{n}\ln(a_{n})+xa_{n}}{a_{n}-1}

    And factoring: a_{n+1}=\frac{a_n(\ln(a_n)+x-1)}{a_n-1}
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    I realized.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Super Member malaygoel's Avatar
    Joined
    May 2006
    From
    India
    Posts
    648
    Quote Originally Posted by dan
    does any body know how to write an iteration to compute y in y-log(y)=x ?
    thank's,
    dan
    I don't know whether it is an iteration formula or not.
    You are given x
    Guess any value of a(a is iterating variable, should be greater than x)
    Find \frac{a + loga + x}{2}
    You will get some value
    this is your next value of a
    Substitute it again in the above expression.
    After some steps it will give the answer(when you the same value of a for two times)

    Note: I am not sure about this idea, please someone check it.


    Keep Smiling
    Malay
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by malaygoel
    I don't know whether it is an iteration formula or not.
    You are given x
    Guess any value of a(a is iterating variable, should be greater than x)
    Find \frac{a + loga + x}{2}
    You will get some value
    this is your next value of a
    Substitute it again in the above expression.
    After some steps it will give the answer(when you the same value of a for two times)

    Note: I am not sure about this idea, please someone check it.


    Keep Smiling
    Malay
    The more direct:

    a_{n+1}=\ln(a_n)+x

    seems to converge faster at least near x=10.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Super Member malaygoel's Avatar
    Joined
    May 2006
    From
    India
    Posts
    648
    Quote Originally Posted by malaygoel
    I don't know whether it is an iteration formula or not.
    You are given x
    Guess any value of a(a is iterating variable, should be greater than x)
    Find \frac{a + loga + x}{2}
    You will get some value
    this is your next value of a
    Substitute it again in the above expression.
    After some steps it will give the answer(when you the same value of a for two times)

    Note: I am not sure about this idea, please someone check it.


    Keep Smiling
    Malay
    I checked it.
    It works
    You could take any starting value of a

    Keep Smiling
    Malay
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by malaygoel
    I checked it.
    It works
    You could take any starting value of a

    Keep Smiling
    Malay
    I did check it perhaps the comment the the other iteration converged
    faster disguised the fact that I knew it converged for reasonable starting
    values and values for x.

    Try a_0=0.000001 with x=10

    RonL
    Follow Math Help Forum on Facebook and Google+

Search Tags


/mathhelpforum @mathhelpforum