Why my calculator is showing a weird result.

106 Views Asked by At

I was trying to solve the equation $x^{\pi}-\pi^x=0$ using numerical analysis(Using Bisection method ,Regula Falsi method). I thought $0$ would be a good start. So I plugged $0^{\pi} $ and it showed up in red as "Infinite ?". Now I am thinking what could be the reason for such a weird answer. Any ideas?

1

There are 1 best solutions below

6
On

If you want solve numerically with a recursive method such as Newton-Raphson or bissection, or similar..., you need guessed starting values. Don't chose $0$ because (depending of the software) the $0^x$ might cause trouble. Start with for example $1$ or $3$.

In addition, an analytical approach :

$$x^\pi=\pi^x$$ $$\text{Let}\quad x=e^{-X}\quad\to\quad e^{-\pi X}=e^{x\ln(\pi)}=e^{e^{-X}\ln(\pi)}$$ $$-\pi X=e^{-X}\ln(\pi)$$ $$Xe^X= -\frac{\ln(\pi)}{\pi}$$ The roots of the equation $\quad Xe^X=C\quad$ cannot be expressed with a finit number of elementary functions. They requires either an infinite series or a special function, in fact the Lambert's W function :$\quad X=\text{W}(C).\quad$ Thus : $$X=\text{W}\left(-\frac{\ln(\pi)}{\pi}\right)$$ $$x=e^{-\text{W}\left(-\frac{\ln(\pi)}{\pi}\right)}$$

The function W$(x)$ is multi-valuated if $\quad e^{-1}<x<0.\quad$ The two real branches are named W$_0(x)$ and W$_{-1}(x)$.

$e^{-1}<-\frac{\ln(\pi)}{\pi}<0.\quad$ Thus they are two real roots :

$X=\text{W}_0\left(-\frac{\ln(\pi)}{\pi}\right)\simeq -0.868015651983...\quad\to\quad x=e^{-X}\simeq 2.38217908799305...$

and $\quad X=\text{W}_{-1}\left(-\frac{\ln(\pi)}{\pi}\right)= -\ln(\pi)\quad\to\quad x=e^{-X}=e^{\ln(\pi)}=\pi$

NOTE : For the numerical computation :

http://m.wolframalpha.com/input/?i=exp%28-LambertW%280%2C-ln%28pi%29%2Fpi%29%29

http://m.wolframalpha.com/input/?i=exp%28-LambertW%28-1%2C-ln%28pi%29%2Fpi%29%29