Post Reply 
(11C) X to Power of X Equation
02-15-2018, 08:04 PM (This post was last modified: 02-15-2018 08:21 PM by Dieter.)
Post: #2
RE: (11C) X to Power of X Equation
(02-15-2018 12:33 PM)Gamo Wrote:  Here is the approximation of the equation of X^X=Y
X to the power of X for the given Y

There is a closed form solution for this: X = eW(ln Y).
Here W is the Lambert W function, for instance featured on the WP34s.

(02-15-2018 12:33 PM)Gamo Wrote:  Program:
...

Gamo, this program will not work. When it passes LBL 1 for the first time the X-value is 0,01201 so that the program continues with the log of this counter value. It looks like a CLX + between STO I and LBL 1 might work – try it.

Also the program does essentially the same in the first steps and then during the iteration loop. Finally the 0,01201 can simply be replaced with ,012. Or, even better, initialize the counter with 12 and use DSE instead of ISZ.

(02-15-2018 12:33 PM)Gamo Wrote:  To check for answer [STO] answer then [ENTER] [RCL] [Y^X]

Simply type [ENTER] [yx]. ;-)

Here is a version that calculates an initial guess and then uses your approximation method. Press [R/S] to see the iteration converge. You may use [X<>Y] to compare the last and current approximation.

Code:
LBL A
LN
STO 0
1
+
LN
ENTER
LN
x<0?
CLX
-
e^x
LBL 1
R/S
ENTER
ENTER
ENTER
RCL 0
X<>Y
LN
/
+
2
/
GTO 1

Example (assuming FIX 6 mode):

1000 [A]  3,824155
[R/S]  4,487028
[R/S]  4,544273
[R/S]  4,553629
[R/S]  4,555211
[R/S]  4,555480
[R/S]  4,555526
[R/S]  4,555534
[R/S]  4,555535
[R/S]  4,555536
[R/S]  4,555536

I still am not quite satisfied with the initial guess. It can be improved so that one or two iterations can be saved. Also the proposed algorithm does not work for any X. Maybe someone else has a better idea.

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 - Dieter - 02-15-2018 08:04 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 - Gamo - 02-21-2018, 04:25 AM



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