Lec8 Series
Lec8 Series
Topics covered
• Review of power series:
◦ Motivation
◦ Process for computing power series solutions
◦ Simplifying the process ( ∞
P
n=−∞ )
◦ General solution / basis
1 Introduction
Earlier, we showed that solutions to homogeneous linear ODEs have the form
y = c1 φ1 + c2 φ2
where {φ1 , φ2 } is a basis for the solution space. The problem of ‘solving’ the ODE was
reduced finding a pair of coefficients, at the cost of having to obtain the basis functions -
which might be complicated or impossible to find exactly.
Instead, a more robust approach might be to choose the basis functions ourselves. To this
end, we might try a solution in the form of an infinite series:
∞
X
y= an φn
n=0
where the φn ’s are not solutions, but simple functions we choose. By representing functions
in this way, we can reduce the problem of solving an ODE to a sequence of equations for
the coefficients. Of course, we now have to deal with (potentially) an infinite number of
coefficients, and choose the functions φk in exactly the right way.
1
One possible choice for the φn ’s are polynomials, which leads to power series solutions.
In this section, we seek solutions to linear ODEs like
The disadvantages of the method are that solutions will be useful only near x0 where the
sum converges, and that the solution is an infinite series. On the other hand, the process is
straightforward when it works.
is said to be convergent if
m
X
lim cn exists
m→∞
n=0
We will not need to worry about the difference between the two definitions of convergence;
absolute convergence will be the relevant definition.
2
The series is well-defined only for x within some distance from x0 .The radius of conver-
gence ρ is the largest value such that
∞
X
an (x − x0 )n converges for all x such that |x − x0 | < ρ.
n=0
Within its radius of convergence, a power series converges and is therefore a function:
∞
X
f (x) = an (x − x0 )n , defined for |x − x0 | < ρ.
n=0
Typically, the ratio test is enough to find the radius of convergence. For instance, consider
∞
X (−1)n
ln(1 − x) = xn .
n=1
n
The ratio test (1) says that the series converges for x if the limit is less than one (in absolute
value), so the series converges for |x| < 1. The radius of convergence is 1.
Note that one should take the ratio of successive non-zero terms, e.g. for
∞
X 1 2n
n
x ,
n=0
3
x2n+2 /3n+1 1 2 1 2 √
lim = lim x = x =⇒ ρ = 1/ 3.
n→∞ x2n /3n n→∞ 3 3
The value of the power series (for our purposes) is that it provides ‘local’ approximations to
a function near x0 . For instance, suppose we have a power series for f (x) around zero:
∞
X
f (x) = an x n .
n=0
Define, for m = 0, 1, 2, · · · ,
m
X
Pm (x) = an x n
n=0
3
(the series with terms only up to degree m). Each Pm is a partial sum of the series1 . For
instance, for sin x, the first few partial sums for the series around zero are
x3 x3 x5
P1 = x, P3 = x − , P5 = x − + .
6 6 120
Adding more terms improves the approximation, but all are accurate only near x = 0.
For simplicity, we will assume the power series is around x0 = 0 (but the results hold
for any x0 by just replacinh xn with (x − x0 )n ).
Important technical note: formulas hereafter are valid for x in the radius of conver-
gence of both series; this will be implied and not stated for each formula (the formulas are
correct where they are defined).
Equality
Two power series are equal,
∞
X ∞
X
an x n = bn x n ,
n=0 n=0
if all the terms are equal. The equality above holds, for instance, if an = bn for all n.
1
An ambiguity: there are several ways to count the number of terms. The ’m-th partial sum’ may refer
to the first m non-zero terms, the first m terms (including zero terms) or the terms up to degree m.
4
Addition
Power series can be added term-wise (by each power of x):
∞
X ∞
X ∞
X
n n
an x + bn x = (an + bn )xn .
n=0 n=0 n=0
Often the indexing is different for two series. To add, align powers of x in each sum. For
example,suppose we need to compute
∞
X ∞
X
n
an x + x bn x n .
n=0 n=0
Terms with the same power of x must be added together, so we need to shift the index to
be n + 1 instead of n. In full detail, here is the calculation:
∞
X ∞
X ∞
X ∞
X
n n n
an x + x bn x = an x + bn xn+1
n=0 n=0 n=0 n=0
∞
X ∞
X
= an x n + bm−1 xm (set m = n + 1)
n=0 m=1
X∞ X∞
= an x n + bn−1 xn (relabel m as n)
n=0 n=1
∞
X ∞
X
n
= a0 + an x + bn−1 xn (match starting index)
n=1 n=1
X∞
= a0 + (an + bn−1 )xn .
n=1
The explicit change of index to m (and then back again) is often skipped. A terser ver-
sion of the calculation would look like the following:
∞
X ∞
X ∞
X ∞
X
n n+1 n
an x + bn x = an x + bn−1 xn
n=0 n=0 n=0 n=1
∞
X
= a0 + (an + bn−1 )xn .
n=1
5
Multiplication
The product of two power series
∞
X ∞
X
n
an x , bn x n
n=0 n=0
The most important special case is when one power series is simple, in which case the formula
does not need to be invoked. For instance,
∞
X ∞
X ∞
X
2 n n+2
x an x = an x = an−2 xn .
n=0 n=0 n=2
If there are a few terms, it is not too bad to compute by computing each piece separately:
∞
X ∞
X ∞
X
(x2 − 3x) an x n = an xn+2 − 3an xn+1
n=0 n=0 n=0
∞
X ∞
X
= an−2 xn − 3an−1 xn
n=2 n=1
∞
X
= 3a0 x + (an−2 − 3an−1 )xn .
n=2
Note that the first sum is shifted by 2; the second one is shifted by 1. You could, of course,
only shift one of them by one instead and end up with xn+1 or xn+2 in the result.
Differentiation
Within its radius of convergence, a power series may be differentiated any number of times
and this can be done termwise:
∞
! ∞ ∞
d X n
X d n
X
an x = (an x ) = nan xn−1 .
dx n=0 n=0
dx n=1
Note that since the a0 term is a constant, it vanishes when taking the derivative. The radius
of convergence of all the derivatives is the same as the original series.
6
4 A useful trick (series arithmetic, the easy way)
Note that the ‘extra’ terms (like 3a0 x above) are exceptions that must be outside the sum.
An alternate approach simplifies this process (and is suggested for calculations, if you want).
Instead, we write a power series as a ‘doubly infinite’ sum:
∞
X ∞
X
n
an x → an x n
n=0 n=−∞
an = 0 for n < 0.
an , bn = 0 for n < 0.
Now index-shifting the second term is easier. Below, all sums are from −∞ to ∞ (for
‘all integers n’).
∞
X X
x bn x n = bn xn+1
n=−∞ n
X
= bn−1 xn (shift n → n − 1)
n
Note that since the range is −∞ to ∞, the range doe snot change!
7
which gives a0 x0 + (a1 + b0 )x1 as calculated before.
Differentiation: This method is useul here also, but remember to pay attention to terms
that are zero. For example,
d2 X n
X X
2
a n x = an n(n − 1)xn−2 = an+2 (n + 2)(n + 1)xn .
dx n n
|{z}
n
shift n → n+2
2a2 x0 + 6a3 x1 + · · · .
y 00 = 7.
If y is a power series X
y(x) = an x n
n
then we get X X
an+2 (n + 2)(n + 1)xn = 7 + 0 · xn .
n n≥1
8
5 More on combining power series
Taylor series
Suppose
∞
X
f (x) = an x n .
n=0
The first k − 1 terms vanish; all the others in the ellipsis have an x in them. Evaluating at
zero, we get
f (k) (0) = k!ak
which gives the familiar formula for the Taylor series,
1 (k)
ak = f (0). (3)
k!
Thus we can easily compute power series for functions when we know their derivatives.
9
on how you write it).
Example 1: Suppose
∞
X
f (x) = an x n
n=0
f 00 (x) − xf (x).
For the second step, the first index is shifted so that n − 2 becomes n (m = n − 2) and the
second index is shifted so that n + 1 becomes n (m = n + 1). We’ll use this result shortly to
solve an ODE (see next section).
Example 2: Suppose
∞
X
f (x) = an x n
n=0
Note that when taking f 00 , we lose the x0 and x1 terms, so the indexing starts at 2. Now
replace the index in the first term with m = n − 2 and the index in the second term with
10
m = n + 2 (relabeling the new index as n again) to combine:
∞
X ∞
X
g= an n(n − 1)xn−2 + an nxn+2 .
n=2 n=1
∞
X ∞
X
n
= an+2 (n + 2)(n + 1)x + an−2 (n − 2)xn
n=0 n=3
∞
X
= 2a2 + 6a3 x + 12a4 x2 + [an+2 (n + 2)(n + 1) + an−2 (n − 2)] xn .
n=3
Note that the second sum starts with the x3 term, so the terms up to x2 in the first sum do
not get combined with anything in the second sum (so they get written separately)
It is worth noting that you can sanity check your results at any step by just writing out
a few terms of each sum. For instance,
∞
X
an n(n − 1)xn−2 = (a2 · 2 · 1 · x0 + a3 · 3 · 2 · x1 + · · ·
| {z } | {z }
n=2 n=2 n=3
so they are indeed equal. Writing out a few terms catches most errors in computation (which
are easy to make because of the bookkeeping involved).
11
Continuing with the example, we get
X X
f 00 (x) + x3 f 0 (x) = n(n − 1)an xn−2 + nan xn+2
n n
X X
= (n + 2)(n + 1)an+2 xn + (n − 2)an−2 xn
n n
X
= [(n + 2)(n + 1)an+2 + (n − 2)an−2 ] xn
n
X
= bn x n
n
where
bn = (n + 2)(n + 1)an+2 + (n − 2)an−2 .
You should check that the bn ’s are zero for n < 0, so this result really is a power series as
expected.
The process here suggests that we can use power series to get solutions to ODEs, the subject
of the next section.
12
6 Series solutions: Basics
Our goal is to obtain local approximations to a linear, second order ODE
near x = 0.2 In particular, we seek two linearly independent solutions as power series:
X ∞
X
n
y1 = bn x , y2 = cn x n .
n=0 n=0
4) Conclude that the coefficient of xn in the above must be zero for each n
6) From the general solution (5), identify a solution basis and verify that they are linearly
independent.
Practically, this means we can approximate solutions by a few terms, and then add more as
needed to improve accuracy or understand finer properties of solutions. The process only
works under certain conditions (which we address later).
2
The methods herein work equally well for inhomogeneous ODEs, for higher order linear ODEs and
solutions around other points x0 ; we focus on (4) for simplicity as the general cases does not give any more
insight into the idea.
13
6.1 Illustrative example:
To see how the method works, we find a series solution for
y 00 + y = 0. (6)
For this equation to be true, we need the coefficients of xn to be zero for all n. Setting the
coefficients to zero yields a recurrence relation:
an
an+2 = − , n = 0, 1, 2 · · · . (8)
(n + 2)(n + 1)
Notice that there is no equation for a0 or a1 . We have shown that any sequence satisfying
(8) will make the series (7) a solution to the ODE (6). There is no restriction on a0 or a1 ;
they are arbitrary.
Solve for the coefficients: To find the coefficients, we iterate the recurrence relation.
It tells us that we solve for the an ’s as follows:
a0 → a2 → a4 → a6 , · · ·
a1 → a3 → a5 → a7 , · · ·
14
and it is straightforward to show from this that our guess (9) is correct.
We can therefore split the power series for y into two parts:
∞
X ∞
X ∞
X
n 2n
y= an x = a2n x + a2n+1 x2n+1 .
n=0 n=0 n=1
Now use the formulas (9) and (10) for the coeficients:
∞ ∞ ∞
X
n
X (−1)n 2n
X (−1)n+1 2n+1
y= an x = a0 x + a1 x .
n=0 n=0
(2n)! n=1
(2n + 1)!
Checking linear independence: Last, we need to verify that y1 , y2 are linearly inde-
pendent. This can be done from the series form. The first few terms of each are
1 1
y1 = 1 − x2 + · · · , y2 = x − x3 + · · ·
2 6
From this we can easily compute
y1 (0) = 1, y10 (0) = −x + · · · =0
x=0
and
1
y2 (0) = 0, y20 (0) = 1 − x2 + · · · =1
2 x=0
so the two solutions are linearly independent. (You could also just use Taylor’s theorem
directly instead of computing f 0 (x) then plugging in 0).
15
7 A more difficult example
We find the general series solution to the Airy equation
y 00 = xy
which arises in various applications in physics (e.g. optics, quantum mechanics). Unlike the
previous example, the Airy equation does not have an exact solution, so the series solution
will give information we cannot otherwise obtain!
0 · a0 = 0, 0 · a1 = 0 =⇒ a0 , a1 arbitrary.
0 = a2 = a5 = a8 = · · ·
16
so a3m+2 = 0 for all m.
For the other two parts, observe that a3 , a6 , a9 , · · · are all multiples of a0 :
a3m = c3m a0 for certain coefficients c3m
and similarly
a3m+1 = c3m+1 a1 for certain coefficients c3m+1
Plugging all this into the series and breaking it up into the three parts (the zeros, the a0 and
a1 parts), we find that
∞
X ∞
X
y(x) = a0 c3m x3m + a1 c3m+1 x3m+1
m=0 m=0
= a0 y1 (x) + a1 y2 (x)
which is exactly the desired structure. To verify linear independence, it’s not hard to compute
from the recurrence that the first two terms of y1 , y2 are
1 1 4
y 1 = 1 + x3 + · · · , y2 = x + x + ···
6 12
Since
y1 (0) = 1, y10 (0) = 0, y2 (0) = 0, y20 (0) = 1
the Wronskian is 1 at x = 0 so the solutions are indeed linearly independent.
Extra (formula for the coeffs): To compute the coefficients, it’s convenient to rewrite
n−2
an = an−3 .
n(n − 1)(n − 2)
The reason is that the n(n − 1)(n − 2) in the denominator means that we will get n! in the
denominator for an . The numerator will give factors 1 · 4 · · · and 2 · 5 · · · (each factor goes
up by three each iteration). The result is that
1 · 4 · · · (3m − 2) 2 · 5 · · · (3m − 1)
a3m = a0 , a3m+1 = a1 .
(3m)! (3m + 1)!
Setting a0 = 1 and a1 = 0 we get a solution with only the x3m terms:
∞
X 1 · 4 · · · (3m − 2)
y1 = x3m
m=0
(3m)!
17
8 Theory for series solutions: Ordinary points
We have found, for a few examples, power series solutions to linear equations
• Under what conditions can we find a power series solution to the ODE?
ii) Not analytic because it has a singularity at x = 0. Attempting to use the approach
from (i) gives
1
cos x/x = (1 − x2 /2 + · · · )/x = + · · ·
x
so there is a 1/x-like singularity at x = 0.
iii) Not analytic at x = 0. To have a power series, the function must have derivatives of
all orders at x = 0, but
(x5/2 )000 = Cx−1/2
which is infinite at x = 0.
3
Technicality: This really should be ’real analytic’ for a real-valued function, or the condition should be
for complex numbers with |z − z0 | < ρ, but the distinction is irrelevant here.
18
8.2 Ordinary points (when do power series solutions exist?)
Whether the power series method can be used on a linear ODE depends on whether the
coefficient functions are analytic. For simplicity, we consider second order ODEs of the form
x2 y 00 + xy 0 + (x2 − α2 )y = 0
4x2 y 00 + 4xy 0 − y = 0
We know this as an Euler equation; recall that plugging in xr yields solutions when
19
so the solution is
y(x) = c1 x1/2 + c2 x−1/2
This ODE has a singular point at x = 0 since
1 1
y 00 + y 0 − 2 y = 0
x 4x
has singular coefficients there. Notice that the solution has no power series at x = 0 (because
x1/2 ) has no power series at x = 0), so the power series method cannot work.
and plugging in via the usual procedure will not yield two linearly independent solutions!
For the details: Plug in and move the 1/x, 1/x2 coefficients inside the sum to get
X X 1X
an n(n − 1)xn−2 + an nxn−2 − an xn−2 = 0
n n
4 n
20
an (x − x0 )n , all the operations (derivatives, multiplication, addition)
P
If we can plug in y =
on power series yield another power series, so the result will be
∞
X
(· · · )(x − x0 )n = 0
n=0
n
where each coefficent of (x−x0 ) is an expression involving the unknowns a0 , · · · , an , leading
to a recurrence that can be solved. It turns out that the resulting recurrence will always have
a solution at an ordinary point. The main result (not proven here) confirms this observation:
Theorem on ordinary points: (i) At an ordinary point x0 , The ODE (13) has a power
series solution with a non-zero radius of convergence, which will have the form
∞
X
y= an (x − x0 )n = a0 y1 + a1 y2
n=0
(ii) Moreover, the series for y1 , y2 are guaranteed to converge in the interval
where the series for p and q both converge.
That is, the radius of convergence of y1 (and y2 ) is at least as large as the mini-
mum of the radii of convergence for p and q.
The second part gives us a lower bound on the region where solutions will converge just
by looking at the ODE. We simply need to find where p and q have convergent power series
and take the intersection.
is already a power series, it converges everywhere (the ’sum’ is just one term). Thus the
series solutions to the Airy equation also converge everywhere.
21