Question: Iteration exercise

Hi I have been given an example of a iteration exercise for my course however with very little accompaning rescources to solve it. I have tried numerous methods and most vary around my most recent attempt but still to no avail. None of my fellow students and myself combined still can't manage to solve this. I was wondering if you could give some insight as to what we need to do differently from what we are currently.

The question is as follows:

A simple iteration procedure with a0 = 1 and
an+1 = 2 + ln an, n  0,
is being used to find an approximate solution to the equation ln x = x − 2. Use a
for. . .while loop to find the first value of an such that |an − an−1| < 10−5. Display this
value of an to 10 significant figures. Do NOT allow Maple to display any of the earlier
values of an.
[Don’t forget that you need to use evalf in stating conditions and you will probably need
to assign values to both a[0] and a[1] before starting your loop.]

Now our most recent variation on our attempt is as follows (and doesn't contain any attempt to get maple to display it to 10 sigfig):

>an:=2

>while |an-a1|<10^(-5)

>t=an

>an:= 2+ln(an)

>a1:=an-t

>end do
 

We have gone through varous different ways of attempting this question which seemed far more logical than this but this is what we are at now. We would all be very much appreciative for any and all help or pointers anyone could give us.

Thanks in advance

Brotherbread and Co.

Please Wait...