# Math Help - y-log(y)=x

1. ## y-log(y)=x

does any body know how to write an iteration to compute y in y-log(y)=x ?
thank's,
dan

2. 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

3. (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,
$
a_{n+1}=a_n-\frac{f(a_n)}{f'(a_n)}
$

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}$

4. ## 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

5. 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

6. ## 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

7. 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.

8. ## 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

9. 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):

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

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

RonL

10. PH: Some slight errors in your algebra.

Starting from here: $
a_{n+1}=a_n-\frac{a_n^2-a_n\ln a_n-xa_n}{a_n-1}
$

For the next step you wrote:
Originally Posted by ThePerfectHacker
$
a_{n+1}=\frac{a_n^2-a_n-a_n^2+a_n\ln a_n -xa_n}{a_n-1}
$
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}$

11. I realized.

12. 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)

Keep Smiling
Malay

13. 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)

Keep Smiling
Malay
The more direct:

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

seems to converge faster at least near x=10.

14. 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)

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

Keep Smiling
Malay

15. 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