A calculus problem by zhida wang

Calculus Level 3

x x = 2 x^x = 2 Find x x to 2 decimal places.


The answer is 1.56.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Steven Chase
Mar 15, 2021

I used Newton Raphson iteration. Start by taking the natural logarithm of both sides of the first equation.

x n x = n 2 x \, \ell n x = \ell n 2

Define a function f f and its derivative:

f = x n x n 2 f = d f d x = 1 + n ( x ) f = x \, \ell n x - \ell n 2 \\ f' = \frac{df}{dx} = 1 + \ell n (x)

Starting with an initial guess, update x x as follows:

x k = x k 1 f k 1 f k 1 x_k = x_{k - 1} - \frac{f_{k-1}}{f'_{k-1}}

Code and results below:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
import math
import random

x = 1.0 + random.random()

for j in range(0,100):

    f = x*math.log(x) - math.log(2.0)

    fp = 1.0 + math.log(x)

    x = x - f/fp

print x
print (x**x)

#>>> 
#1.55961046946
#2.0
#>>> 

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...