Post Reply 
(11C) X to Power of X Equation
02-20-2018, 09:05 PM (This post was last modified: 02-20-2018 09:08 PM by Dieter.)
Post: #12
RE: (11C) X to Power of X Equation
(02-20-2018 08:19 PM)Dieter Wrote:  The Newton merhod for this particular function does not converge very well. It should work if the initial guess is sufficiently close to the solution. But in other cases the iteration will show very slow convergence or will even lead away from the solution, and you get an error.

To illustrate this point, here are the successive approximations for X^X–1000 = 0 for some different initial guesses, calculated with the exact derivative (and Excel ;-))

Code:
guess = 4

4
5,217892498
4,908845959
4,679436518
4,573633160
4,555955815
4,555535935
4,555535705
4,555535705

Fine. This seems to work.

Code:
guess = 3

3
20,17184124
19,92210893
19,67159726
19,42028894
19,16816596
18,91520959
18,66140031
18,40671780

This leads away from the solution and then moves veeeery slowly back in direction of the solution. It takes about 60 (!) iterations before the result is OK.

Code:
guess = 2

2
149,0634112
overflow

The iteration stops with an error because already the first new approximation becomes so large that the next step (requiring the evaluation of 149^149) will lead to an overflow error.

Code:
guess = 10

10
9,697206924
9,391568393
9,082908763
8,771032596
8,455721550
8,136730955
7,813786685
7,486584276

Again, the iteration converges veeery slowly.

That's why I suggest solving X*ln X = ln 1000 instead.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) X to Power of X Equation - Gamo - 02-15-2018, 12:33 PM
RE: (11C) X to Power of X Equation - Gamo - 02-16-2018, 06:36 AM
RE: (11C) X to Power of X Equation - Gamo - 02-19-2018, 01:00 AM
RE: (11C) X to Power of X Equation - Gamo - 02-20-2018, 01:49 AM
RE: (11C) X to Power of X Equation - Gamo - 02-20-2018, 09:28 AM
RE: (11C) X to Power of X Equation - Dieter - 02-20-2018 09:05 PM
RE: (11C) X to Power of X Equation - Gamo - 02-21-2018, 04:25 AM



User(s) browsing this thread: 1 Guest(s)