Foxmaths! 2.0

January 7, 2009

The Omega Constant

Filed under: Maths — Fox @ 3:51 pm

The Omega Constant has the approximate value

w = 0.56714329040978387299996866221035554975381578718651...

More to the point, it is defined, using the W-Function to be the principle solution to the equation

1 = w*e^w

It is not easily solvable or invertible – no satisfying way to isolate w at least. My question is, given the above definition of w, how best to calculate it? And, in the process, we find a nice solution to a problem that’s bothered me for years.

One approach would be to re-write the equation in the form

0 = w*e^w - 1

Then, defining f(x) = x*e^x - 1 , we could use something akin to Newton’s Method to find the zeroes of the function. Defining x_0 to some appropriate initial guess, Newton’s Method gives

x_{n+1} = x_n - \frac{ x_n*e^{x_n} - 1 }{ e^{x_n} + x_n*e^{x_n} }

Or, perhaps more simply,

x_{n+1} = x_n - \frac{ x_n - e^{-x_n} }{1 + x_n }

Calculating successive values of x_n will converge on the value of w. But I don’t find this very satisfying. Aside from being correct, the above formula doesn’t really relate to what’s going on. At least, it doesn’t seem to have any relationship to the problem at hand, except through the related calculus. Can we do better? Or at least, more interesting?

Consider taking the original equation, 1 = w*e^w , and dividing each side by the exponential.

w = e^{-w}

This immediately suggests the interesting substitution,

w = e^{-e^{-e^{-e^{...}}}}

And this, in turn, suggests a possible solution. Define w_0 however you like. Say, w_0 = -1 . (I only chose -1 for aesthetic reasons). Then define the sequence

w_{n+1} = e^{-w_n}

Thus, for example,

w_3 = e^{-w_2} = e^{-e^{-w_1}} = e^{-e^{-e^{-w_0}}} = e^{-e^{-e}}

Calculating successive values of w_n will then construct that power tower, approaching it in the limit. So, at least we imagine, w_n will converge on w. Jumping into Mathematica, we find

w_{100} = 0.567143290409783872999968244627...

And our belief seems justified. w_{100} is very close to w, differing in the last few digits presented.

But at this point, you should notice that it took 100 steps to gain 24 correct digits. This is really quite slow.

This leads naturally to the question – just how slow?

Let’s define an error sequence, measuring the difference between our approximation and the real thing.

e_n = w_n - w

As w_n converges to w, clearly e_n will go to zero. But, how fast? Rearranging, we have

w_n = w + e_n

Substituting in, w_{n+1} = e^{-w_n} becomes

w + e_{n+1} = e^{-(w + e_n)}

Not the most enlightening of formulae. Rearranging,

e_{n+1} = e^{-w}*e^{-e_n} - w

But recall that w is defined such that w = e^{-w} . Note too, the Taylor approximation for e^{-x} when x is very very close to zero,

e^{-x} \approx 1 - x

Making both these substitutions, we have

e_{n+1} \approx w*(1 - e_n) - w

e_{n_1} \approx -w*e_n

So at each step, the sign of the error term changes, and the error is multiplied by a factor of w, effectively halving it at each step. This is why convergence is so slow. If w were closer to 1/10th, we would effectively be gaining a correct digit at every step. But w is only about 1/2. Much slower. For comparison, the earlier formula I gave approximately doubles the number of correct digits with every step.

But, while the performance of the formula is perhaps less than satisfying, I appreciate the structure and form of it much more than Newton’s solution.

It also suggests an interesting way of solving a problem that’s bothered me for a long time. Consider the equation

2^x = x^2

The above has three solutions for x, at x = 2, x = 4, and

x = -0.76666469596212309311120442251031484800667534666983...

This third solution has always puzzled me. I guess it’s not really sensible to ask what it’s doing there. But at the very least, what is it? How can I calculate it? The solution can be expressed nicely in closed form as

X = - \frac{W( ln( \sqrt{2} )}{ ln( \sqrt{2} ) }

Where W(x) is the previously discussed W-function. But the previous calculation suggests another way of expressing the solution. Consider re-writing the original equation as

x = -\sqrt{2^x} = - (\sqrt{2})^x

Again, this immediately suggests the power tower construction, which suggests that we apply a similar calculation as before.

x_0 = -1
x_{n+1} = -(\sqrt{2})^{x_n}

Doing the appropriate calculations, we find

x_{10} = -0.766660785691404499291956361085...

Which has good agreement with the previously stated value. But again, slow convergence. This sequence actually converges a little faster than the previous, because the coefficient on the error term is closer to 0.2 than 0.5, but they both converge in the same way. Slowly.

All very interesting.

4 Comments »

  1. Great math this time ’round. I like your step where you inferred e^(-e^(-e^…)). Clever, bro.

    You should consider numbering your equations every so often. It makes it easier to discuss your proofs. It’s a habit my profs got me into that has served me well in the deceding years.

    Comment by Ben — January 7, 2009 @ 4:52 pm

  2. Thanks! Glad you liked it. ProductLog and the W function had popped up in a number of problems I’d been working on lately, so I thought it was worth a post.

    As to equation numbering, you wouldn’t happen to know how to do that in LaTeX, would you? As is usual with these things, I generally know just enough to get myself into trouble, and little more.

    - Fox

    Comment by Fox — January 7, 2009 @ 6:07 pm

  3. I haven’t used LaTeX since I graduated, 4 years ago.

    You could have asked me then, but now I forget.

    Comment by Ben — January 8, 2009 @ 1:21 am

  4. [...] trig. Foxmaths seems preoccupied with calculating values that exist, and some that don’t. The value of omega: exists, but it takes so long to find! The solutions to (when we ignore the leftmost digits of [...]

    Pingback by Carnival of Mathematics 47, where no, well… « JD2718 — January 17, 2009 @ 10:41 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.