Power Series in Practice

Author: Indigo Curnick

Date: 2025-05-18

#mathematics  



Introduction to Power Series

We saw in previous blogs (here and here) about infinite series of just numbers. In this blog we will look at a similar idea, but now the series will be of a variable. Here, the variable will be x or xโˆ’a, which is called a power series. Power series are actually even more useful in physics than general infinite series, as we shall see.

By definition then, a power series is of the following two forms:

โˆ‘n=0โˆžanxn=a0+a1x+a2x2+a3x3+โ‹ฏ

โˆ‘n=0โˆžan(xโˆ’a)n=a0+a1(xโˆ’a)+a2(xโˆ’a)2+a3(xโˆ’a)3+โ‹ฏ

Where an are constants.

For a given power series, whether it converges depends on what value of x we are evaluating. Recall from earlier blogs the ratio test, where we divide the term n+1 by n and take the absolute value of this to get ฯn and then take the limit of ฯn as n approaches infinity to get ฯ. Then if ฯ<1 the series converges and if ฯ>1 the series diverges.

Consider the following series

1โˆ’x2+x24โˆ’x38+โ‹ฏ(โˆ’x)n2n+โ‹ฏ

The ratio here would be

ฯn=|(โˆ’x)n+12n+1รท(โˆ’x)n2n|=|x2|

Therefore as nโ†’โˆž trivially we have

ฯ=|x2|

Remember that the boundaries for convergence and divergence happen when ฯ>1 and ฯ<1, so for this series it converges when |x|<2 and diverges when |x|>2. In other words, we can think of this series as converging between x=โˆ’2 and x=2, this concept is known as the interval of convergence.

Power series have some interesting properties:

  1. A power series may be differentiated or integrated term by term; the resulting series converges to the derivative or integral of the function represented by the original series within the same interval of convergence as the original series
  2. Two power series may be added, subtracted, or multiplied; the resultant series converges at least in the common interval of convergence. You may divide two series if the denominator series is not zero at x=0, or if it is and the zero is cancelled by the numerator. The resulting series will have some interval of convergence (which can be found by the ratio test)
  3. One series may be substituted in another provided that the values of the substituted series are in the interval of convergence of the other series
  4. The power series of a function is unique, that is, there is just one power series of the form โˆ‘n=0โˆžanxn which converges to a given function

It takes some more advanced calculus than we can really go into here to prove these four properties, so that will be left for another day.

Taylor Series

A Taylor series is a method of approximating a function which is complicated as a simpler polynomial. In effect, we can turn a function like sinโก(x) into a power series. Later on, we'll see some of the uses of such a technique.

We'll work by "expanding" (hence Taylor expansion) the function sinโก(x), and we will start by assuming that such a series exists (in a moment we will discuss this point in a bit more detail). The series would be

sinโก(x)=a0+a1x+a2x2+โ‹ฏ+anxn+โ‹ฏ

This must hold when x=0, so we can substitute that in, and we find that the LHS is 0, and the RHS is just a0, thus a0=0. The next step is to differentiate the whole series:

cosโก(x)=a1+2a2x+3a3x2+โ‹ฏ

Where once more we can substitute in x=0 and find a1=1. Once more we differentiate to get

โˆ’sinโก(x)=2a2+6a3x+12a4x2+โ‹ฏ

a2=0

We can continue the process like so:

โˆ’cosโก(x)=3โ‹…2a3+4โ‹…3โ‹…2a4x+โ‹ฏ

a3=โˆ’13!

sinโก(x)=4โ‹…3โ‹…2a4+5โ‹…4โ‹…3โ‹…2a5x+โ‹ฏ

a5=15!

Which gives us

sinโก(x)=xโˆ’x33!+x55!โˆ’โ‹ฏ

A series obtained in this way is called a Maclaurin series, named after Colin Maclaurin who used this series a lot during the 18th century. The Maclaurin series is actually a special case of the Taylor series, introduced by Brook Taylor. In the Maclaurin series, we consider the derivatives at x=0, but in general we can also consider the derivative at x=a.

Let's now do a generic Taylor series for f(x) (assuming it exists).

f(x)=a0+a1(xโˆ’a)+a2(xโˆ’a)2+a3(xโˆ’a)3+a4(xโˆ’a)4+โ‹ฏ+an(xโˆ’a)n+โ‹ฏ fโ€ฒ(x)=a1+2a2(xโˆ’a)+3a3(xโˆ’a)2+4a4(xโˆ’a)3+โ‹ฏ+nan(xโˆ’a)nโˆ’1+โ‹ฏ fโ€ฒโ€ฒ(x)=2a2+3โ‹…2a3(xโˆ’a)+4โ‹…3a4(xโˆ’a)2+โ‹ฏ+n(nโˆ’1)an(xโˆ’a)nโˆ’2+โ‹ฏ fโ€ฒโ€ฒโ€ฒ(x)=3!a3+4โ‹…3โ‹…2a4(xโˆ’a)+โ‹ฏ+n(nโˆ’1)(nโˆ’2)an(xโˆ’a)nโˆ’3+โ‹ฏ โ‹ฎ f(n)(x)=n(nโˆ’1)(nโˆ’2)โ‹ฏ1โ‹…an+โ‹ฏ

By the way, as a helpful piece of advice, it's best to not multiply out numbers. For example, keep it of the form 4โ‹…3โ‹…2 because factorials are very very common in Taylor series and this will help you spot them.

We can now substitute x=a

f(a)=a0 fโ€ฒ(a)=a1 fโ€ฒโ€ฒ(a)=2a2 fโ€ฒโ€ฒโ€ฒ(a)=3!a3 f(n)(a)=n!an

Thus the Taylor series about x=a is

f(x)=f(a)+(xโˆ’a)fโ€ฒ(a)+12!(xโˆ’a)2fโ€ฒโ€ฒ(a)+โ‹ฏ1n!(xโˆ’a)nf(n)(a)+โ‹ฏ

And then the specific Maclaurin series when x=0 gives

f(x)=f(0)+xfโ€ฒ(0)+x22!fโ€ฒโ€ฒ(0)+x33!fโ€ฒโ€ฒโ€ฒ(0)+โ‹ฏ+xnn!f(0)(0)+โ‹ฏ

Alternative Methods for Finding Taylor Series

While it's helpful to have these in general for finding series, we often have a few simpler methods we can try. Recall we said earlier that there is a unique power series for each function: therefore, no matter what method we use to obtain it we can be sure we are getting the exact same series.

For using these alternative methods, you usually begin with a power series you already know. The appendix at the end of this blog contains some common series, which you should review!

Multiply a Known Series by Another Polynomial

The first technique is to multiply an already known series by a polynomial or another series. For example, when finding (x+1)sinโก(x) we can actually just multiply the series we already found by x+1

(x+1)sinโก(x)=(x+1)(xโˆ’x33!+x55!โˆ’โ‹ฏ)=x+x2โˆ’x33!โˆ’x43!+โ‹ฏ

Divide a Known Series by Another Polynomial

The second technique is division by a polynomial or series. If we want to find (1/x)lnโก(1+x) then we get

1xlnโก(1+x)=1โˆ’x2+x23โˆ’x34+โ‹ฏ

(again, see appendix!)

Using the Binomial Theorem

The third technique is using the binomial theorem. In the appendix I list the expansion for (1+x)p which you might notice is basically the binomial theorem. Let's try expanding 1+x

(1+x)12=โˆ‘n=0โˆž(1/2n)xn (1+x)12=1+12x+12(โˆ’12)2!x2+12(โˆ’12)(โˆ’32)3!x3+12(โˆ’12)(โˆ’32)(โˆ’52)4!x4+โ‹ฏ 1+x=1+12xโˆ’18x2+116x3โˆ’5128x4+โ‹ฏ

Substitution

The fourth method is to substitute a polynomial or series for a variable in another series. For example, we know the series for ex (see appendix), so to find eโˆ’x2 we really only have to replace x with โˆ’x2

eโˆ’x2=1โˆ’x2+(โˆ’x2)22!+(โˆ’x2)33!+โ‹ฏ eโˆ’x2=1โˆ’x2+x42!โˆ’x63!+โ‹ฏ

Finding General Taylor Series by Using Maclaurin Series

The final series we shall look at is finding a Taylor series using a Maclaurin series. For example, finding the Taylor series for lnโก(x) about x=1 we can start by writing

lnโก(x)=lnโก(1+(xโˆ’1))

And then use the series from the appendix with x replaced by xโˆ’1

lnโก(x)=lnโก(1+(xโˆ’1))=(xโˆ’1)โˆ’12(xโˆ’1)2+13(xโˆ’1)3โˆ’14(xโˆ’1)4+โ‹ฏ

Limitations of Taylor Series

So far, we've essentially been assuming that a Taylor series for a given function exists. As part of this assumption, we've also been assuming this Taylor series converges to the original function. However, this is unfortunately not always the case.

Since this is a practical article, we won't delve deeply into the theory here, but for reference there is a concept called the Lagrange's Remainder Theorem. This theorem helps us understand how good an approximation to the original function we are making. I will cover this in detail in a later article.

The big take away is that not all functions can be approximated to arbitrary precision everywhere by a Taylor series expansion. Some can. Some can be approximated to arbitrary precision near to some points. But in general, the approximation is only an approximation.

Applications of Taylor Series

Numerical Computation

One of the primary uses of the Taylor series is computing functions which are under normal circumstances tricky to do. Let's try evaluating f(x)=lnโก((1+x)/(1โˆ’x))โˆ’tanโก(x) at x=0.0015. If you try this on a calculator, it will likely get the answer wrong. Let's compute it (mostly) by hand

lnโก((1+x)/(1โˆ’x))=x+x33+x55+x77+โ‹ฏโ‰ˆ0.001500001125001518752441

tanโก(x)=x+x33+2x515+17x7315+โ‹ฏโ‰ˆ0.001500001125001012500922 Thus

f(x)=x515+4x725+โ‹ฏโ‰ˆ5.0625ร—10โˆ’16

The difference is in the 16th decimal place of those two numbers, so any computer making any kind of approximation before then will lose precision and get it wrong!

Approximating Integrals

Integration is HARD, and even some "trivial" integrals do not have nice neat analytic solutions. Consider the Fresnel integrals (sinโก(x2) and cosโก(x2)). However, if we use Taylor series we can actually do it fairly easily

โˆซ0tsinโก(x2)dx=โˆซ0t(x2โˆ’x63!+x105!+โ‹ฏ)dx=t33โˆ’t77โ‹…3!+t1111โ‹…5!โˆ’โ‹ฏ

Differential Equations

Taylor series are often solutions to ordinary differential equations and partial differential equations. I won't give an example here as this is WELL beyond the scope of this blog, but rest assured once I have written a blog on series solutions to differential equations I will link it here! Just be aware that this is commonly seen in physics.

As a taste of this, let's see reducing a complex equation into a simpler equation.

The motion of a pendulum is given by

ฮธยจ+gLsinโก(ฮธ)=0

Which is pretty nasty to deal with! But what if we could simplify it? As we know

sinโก(ฮธ)=ฮธโˆ’ฮธ33!+ฮธ55!โˆ’โ‹ฏ

Notice how if ฮธ is pretty small, then ฮธ3 is triply small, not to mention divided by 3!. So as long as the angle is small we can make the following approximation

sinโก(ฮธ)=ฮธ

and so

ฮธยจ+gLฮธ=0

Which is so much easier to deal with!

Appendix: Common Maclaurin Series Expansions

This appendix contains some common Taylor series about x=0. It also contains the convergence limits. If you are a student of the physical sciences or mathematics, you would do well to memorise the expansions of sinโก(x), cosโก(x), ex, lnโก(1+x) and (1+x)p

sinโก(x)=โˆ‘n=0โˆž(โˆ’1)nx2n+1(2n+1)!=xโˆ’x33!+x55!โˆ’x77!+โ‹ฏ,all x

cosโก(x)=โˆ‘n=0โˆž(โˆ’1)nx2n(2n)!=1โˆ’x22!+x44!โˆ’x66!+โ‹ฏ,all x

ex=โˆ‘n=0โˆžxnn!=1+x+x22!+x33!+x44!+โ‹ฏ,all x

lnโก(1+x)=โˆ‘n=1โˆž(โˆ’1)n+1xnn=xโˆ’x22+x33โˆ’x44+โ‹ฏ,โˆ’1<xโ‰ค1

(1+x)p=โˆ‘n=0โˆž(pn)xn=1+px+p(pโˆ’1)2!x2+p(pโˆ’1)(pโˆ’2)3!x3+โ‹ฏ,|x|<1

11โˆ’x=โˆ‘n=0โˆžxn=1+x+x2+x3+โ‹ฏ,โˆ’1โ‰คx<1

11+x=โˆ‘n=0โˆž(โˆ’1)nxn=1โˆ’x+x2โˆ’x3+โ‹ฏ+(โˆ’1)nxn+โ‹ฏ,โˆ’1<xโ‰ค1

lnโก(1โˆ’x)โˆ’โˆ‘n=1โˆž1nxn=โˆ’xโˆ’x22โˆ’x33โˆ’โ‹ฏโˆ’xnnโˆ’โ‹ฏ,โˆ’1<xโ‰ค1

tanโˆ’1โก(x)=โˆ‘n=0โˆž(โˆ’1)nx2n+12n+1=xโˆ’x33+x55โˆ’x77+x99โˆ’โ‹ฏ,1โ‰คxโ‰ค1

References

Boas, M., L. (2005). Mathematical Methods in the Physical Sciences (3rd ed.). Wiley

Abbott, S. (2015). Understanding Analysis (2nd ed.). Springer