# Built on Facts

## Approximately a Power Series

#### July 8th, 2008 · 8 Comments

Lots of times we might have a complicated function which we wish were less complicated. Take the differential equation describing the simple pendulum, for instance:

I can’t solve that one explicitly. Nobody can - the sin term prevents a closed-form solution and so nearly the only practical way to work with it is to use numerical methods. There’s nothing wrong with that, but it’s not necessarily what we’d prefer. A stack of floating point numbers is great but it doesn’t necessarily breed understanding. An approximation might be helpful. For small angles,

Take a look at their graphs. Near the origin they get closer and closer to being the same thing:

So we can just put θ in the differential equation where we used to have sin(θ) and solve it easily. The result will only be valid for small displacements, but most of time a pendulum isn’t swinging at very high angles anyway.

This is just one example of a power series approximation. Basically you assume the function can be written as

And you do some calculus voodoo to find the constants. Then you just keep the first few terms depending on how accurate you want your approximation to be. Talking about this in more detail will be a good topic for a future post, but for now I just want to show off one of my favorite pathological functions.

It’s continuous everywhere except the origin, and even there it’s only a point discontinuity so we can define it to be equal to its limit, which is 0 at that point. That means the function is continuous everywhere, and differentiable everywhere. Its derivatives of all orders are continuous as well.

You can do the calculations to figure out the power series yourself, but here’s the result: its first derivative at the origin is 0. So is its second derivative. So is its third derivative. In fact, all of its derivatives of all orders are 0 at the origin. It’s power series thus seems to be 0, though the function itself is clearly not the zero function.

Why is this? Well, it turns out that power series are intimately connected to the behavior of the function in the complex plane. Though our function is perfectly well-behaved at 0 on the real line, it is horribly behaved at 0 in the complex plane. It has an essential singularity at that point; the limit as you approach 0 depends on how you do the approaching. For example, f(0.1) = 3.7 x 10-44, but f(0.1 i) = 2.7 x 1043. Clearly they’re not approaching the same thing. In fact, Picard’s great theorem guarantees that the limit will approach any given value depending on which direction you approach from. As you might expect, this wrecks the possibility of expanding the function in a power series about the point of singularity.

When you next do a power series approximation, spend a little time being thankful that most functions in physics aren’t so badly behaved.

### 8 responses so far ↓

• 1 Uncle Al // Jul 8, 2008 at 10:20 am

WIRED 16.07 106 (2008) “The Petabyte Age”

Picard’s great theorem guarantees that the limit will approach any given value depending on which direction you approach from.

Data accumulation will do no good at all. You blew Chris Anderson’s philosophical discourse right out of the water.

• 2 Nick // Jul 8, 2008 at 1:02 pm

It’s continuous everywhere except the origin, and even there it’s only a point discontinuity so we can define it to be equal to its limit, which is 0 at that point. That means the function is continuous everywhere, and differentiable everywhere.

Maybe this was one of those days when I fell asleep in calc but I’d never heard this before. It makes some sense but is there ever a case when this applies at a location other than the origin?

Matt replies: Sure! For instance, the function (x^2 - 3x + 2)/(x-2) is exactly equal to x-1 everywhere (you can check by factoring the numerator) except at the point x = 2, where it’s undefined due to the zero in the denominator. But you could take the function (x^2 - 3x + 2)/(x-2) and define it to be equal to 1 at the point x = 2, and then you’d have a function which is everywhere continuous and differentiable. You could then expand it in a power series about that point, though since it’s a polynomial it wouldn’t be very dramatic!

• 3 Ed // Jul 8, 2008 at 2:13 pm

I think you should investigate a continued fraction approximation.

• 4 kiwi // Sep 12, 2008 at 6:12 pm

Actually there is a closed form solution for the nonlinear pendulum equation in terms of elliptic functions.

• 5 Interesting stuff #3 « The Outer Hoard // Sep 15, 2008 at 9:18 am

[...] a vampire from a speck of dust. Now Matt Springer of Built On Facts has recently linked to an old post of his about an unusual function where things aren’t that [...]

• 6 solicitors in nottingham // Apr 17, 2011 at 6:32 am

Good post but I was wondering if you could write a litte more on this topic? I’d be very thankful if you could elaborate a little bit further. Kudos!

• 7 Reduce body fat percentage // May 28, 2011 at 3:26 pm

I happen to be writing to let you know of the nice encounter my friend’s child found checking your blog. She mastered plenty of details, not to mention what it is like to have a very effective helping style to make folks without difficulty comprehend a number of extremely tough things. You truly did more than our expected results. I appreciate you for churning out such practical, dependable, educational and as well as easy thoughts on that topic to Janet.

• 8 draw my thing // Apr 23, 2012 at 6:08 pm

Great sites to visit…

[...]right here are some listings to web sites I always connect to seeing as we believe they are[...]…