Is 0^0 a number?


It is believed that 0^0 is undefined.

One way to think about it is that whenever you have X^0, you'll get 1, but 0^X and you'' get 0, hence as you can see the function kind of “alternates” with no clear convergence. 

What if we write a simple program to show that?

We’ll have a function F(X) = X^X, and we can vary X from say 0.9 all the way to smaller numbers in decrements of 0.001. At each step we’ll calculate F(X). We’ll take, say, 900 of those points. 

What we’re doing is simulating Lim(x->0) x^x.

If X^X converges, we should see a straight line, either approaching zero, or approaching one. The chart, however, is intriguing:

It starts by coming down nicely towards zero (hence we might have guessed that 0^0 goes to 0), however and intriguingly it eventually takes off in the opposite direction towards 1! 

By no means this is any proof that 0^0 won’t converge, but computationally it is not looking promising that 0^0 reaches the end of the tunnel. 

Code is below, cheers, ACC.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZeroZero
{
       class Program
       {
             static void Main(string[] args)
             {
                    PlotZeroZero();
             }

             static void PlotZeroZero()
             {
                    double val = 0.9;
                    double inc = 0.001;

                    for (int i = 1; i <= 1000; i++)
                    {
                           double result = Math.Pow(val, val);
                           Console.WriteLine("{0};{1}", i, result);
                           val -= inc;
                    }
                   
             }
       }
}

Comments

  1. lim x->0 x^x actually does exist and equals 1! One way to prove it is by rewriting as x^x = e^(x ln x). You can then calculate that lim x->0 x ln x equals zero (one way is by using l'Hopital's rule). Therefore the original limit is equal to e^0 = 1 by continuity.
    However.. it still makes a lot of sense to say 0^0 is not a number, for the reasons you mention at the beginning of your blog :)

    ReplyDelete
  2. Cool, but what about this? https://www.bing.com/search?q=ln(0)&form=APIPH1&PC=APPL

    ReplyDelete

Post a Comment

Popular posts from this blog

Advent of Code - Day 6, 2024: BFS and FSM

Golang vs. C#: performance characteristics (simple case study)

Advent of Code - Day 7, 2024: Backtracking and Eval