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,
$\displaystyle y-\ln y =x$
Which is equivalent to,
$\displaystyle y-\ln y-x=0$
The iteration sequence is,
$\displaystyle a_{n+1}=a_n-\frac{f(a_n)}{f'(a_n)}$
Where,
$\displaystyle f=y-\ln y-x$
Thus,
$\displaystyle f'=1-1/y$
Thus,
$\displaystyle f(a_n)=a_n-\ln a_n-x$
$\displaystyle f'(a_n)=1-1/a_n$
Thus,
$\displaystyle a_{n+1}=a_n-\frac{a_n-\ln a_n-x}{1-1/a_n}$
Simplfy,
$\displaystyle a_{n+1}=a_n-\frac{a_n-\ln a_n-x}{\left(\frac{a_n-1}{a_n} \right)}$
More simplfying,
$\displaystyle 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 )
$\displaystyle 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,
$\displaystyle 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
$\displaystyle a_0$ will be your initial guess, then the itteration formula gives
$\displaystyle a_{n+1}$ in terms of $\displaystyle a_n$, so you get a sequence:

$\displaystyle 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
$\displaystyle 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 $\displaystyle x \gg 1$, then $\displaystyle a_0=x$ should be OK. But then experimenting with the
iteration as given by PH it appears to diverge with $\displaystyle x=10$, $\displaystyle a_0=10$ or $\displaystyle 14$!

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

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

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

RonL

10. PH: Some slight errors in your algebra.

Starting from here: $\displaystyle 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
$\displaystyle 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:

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

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

And factoring: $\displaystyle 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 $\displaystyle \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 $\displaystyle \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:

$\displaystyle 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 $\displaystyle \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