Artificial Intelligence 🤖
Differential equations
Ordinary differential equations
Series solutions

Series solutions

In Section 13.2, we outlined a method to solve homogeneous LODEs where the coefficients of the dependent function yy and its derivatives are constants. Examples were carried out on second-order LODEs but the method generalises to higher order LODEs as well. In this section, we solve the homogeneous ODE without requiring that the coefficients are constants. In general equations of the form,

y+P(x)y+Q(x)y=0y^{\prime \prime}+P(x) y^{\prime}+Q(x) y=0

cannot usually be solved in closed form. Often we can find a solution in terms of infinite series.

Power series and their convergence are discussed in Chapter 6. We start off with a brief introduction on when we can find series solutions to differential equations. Consider the following general form of the homogeneous differential equation,

a(x)y+b(x)y+c(x)y=0.a(x) y^{\prime \prime}+b(x) y^{\prime}+c(x) y=0 .

The idea behind this method is to assume that we can write the solution as a power series of the form,

y(x)=n=0an(xx0)n,y(x)=\sum_{n=0}^{\infty} a_{n}\left(x-x_{0}\right)^{n},

as seen in Chapter 6 , where x=x0x=x_{0} is an ordinary point. With regard to Eq. (13.2), x=x0x=x_{0} is an ordinary point provided that the coefficients P(x),Q(x)P(x), Q(x) have a Taylor series [see Section 6.1] around x0x_{0}. A point that is not ordinary is called singular. A series solution of the form (13.102) can be assumed given that x0x_{0} is an ordinary point.

Before we see how series are used to solve ODEs, we discuss index shifting and power series derivatives.

Index shifting

When adding/subtracting multiple series, we first need to have the series starting and ending at the same value of nn. For this reason, sometimes we need to shift a series without changing the value of the series. This is much like changing the variable in integrals. Consider the following series

n=2n2n\sum_{n=2}^{\infty} \frac{n}{2^{n}}

and suppose we wanted to start the series at n=0n=0 without changing its value. We define a new index, ii such that i=n2i=n-2 which implies that n=i+2n=i+2; substituting in the series above, we have,

i=0i+22i+2.\sum_{i=0}^{\infty} \frac{i+2}{2^{i+2}} .

Finally, we can choose any letter to represent the index so we can simply move back to using nn,

n=0n+22n+2\sum_{n=0}^{\infty} \frac{n+2}{2^{n+2}}

Derivatives of power series

Consider the function

f(x)=n=0an(xx0)nf(x)=\sum_{n=0}^{\infty} a_{n}\left(x-x_{0}\right)^{n}

taking the first derivative gives,

f(x)=n=1ann(xx0)n1.f^{\prime}(x)=\sum_{n=1}^{\infty} a_{n} n\left(x-x_{0}\right)^{n-1} .

Note that the series now starts at n=1n=1 since the constant term, a0a_{0} has zero as its derivative.

Power series solutions

We are now ready to move to an example where we use series solutions to approximate solutions to initial value problems. We typically seek a solution of the form

y(x)=n=0an(xx0)ny(x)=\sum_{n=0}^{\infty} a_{n}\left(x-x_{0}\right)^{n}

Note that the initial condition in an IVP dictates where we normally center the series solution. The objective is to determine the ana_{n} coefficients that satisfy the differential equation and initial conditions.

Consider the following IVP,

yxy=0,y(0)=1,y(0)=1.y^{\prime \prime}-x y=0, \quad y(0)=1, \quad y^{\prime}(0)=1 .

Clearly, if a closed form solution is easy to find, a series solution is not preferred; however, the method is very powerful when closed form solutions cannot be found. The differential equation in Eq. (13.104) is known as the Airy equation and its solution cannot be expressed in terms of elementary functions. With the initial condition given at x=0x=0, we choose to start with power series (13.103) taking x0=0x_{0}=0 and so, the assumed form of the solution is

y(x)=n=0anxn.y(x)=\sum_{n=0}^{\infty} a_{n} x^{n} .

We rearrange the ODE given in (13.104) to give

y=xyy^{\prime \prime}=x y

where the LHS is represented by the second derivative of (13.105) and the RHS is represented by the solution form (13.105), multiplied by xx. We need to find conditions that all coefficients ana_{n}, satisfy. Differentiating (13.105) wrt xx yields,

y=n=1nanxn1y^{\prime}=\sum_{n=1}^{\infty} n a_{n} x^{n-1}

The second derivative is given by,

y=n=2n(n1)anxn2.y^{\prime \prime}=\sum_{n=2}^{\infty} n(n-1) a_{n} x^{n-2} .

We also note that xyx y is given by,

xy=n=0anxn+1.x y=\sum_{n=0}^{\infty} a_{n} x^{n+1} .

Substituting Eqs. (13.108) and (13.109) in Eq. (13.106), we get

n=2n(n1)anxn2=n=0anxn+1.\sum_{n=2}^{\infty} n(n-1) a_{n} x^{n-2}=\sum_{n=0}^{\infty} a_{n} x^{n+1} .

Recall that our objective is to write down conditions that allow us to determine the coefficients ana_{n}. This is achieved by having the same exponent on xx. We observe that, in order to get both series in terms of xnx^{n}, we need to shift the series on the LHS down by 2 and the series on the RHS up by 1 . This yields,

n=0(n+2)(n+1)an+2xn=n=1an1xn.\sum_{n=0}^{\infty}(n+2)(n+1) a_{n+2} x^{n}=\sum_{n=1}^{\infty} a_{n-1} x^{n} .

The next step is to get the two series starting at the same value of nn. One way to achieve this is to consider the n=0n=0 term for the series on the LHS of Eq. (13.111), outside the series, i.e.

2a2+n=1((n+2)(n+1)an+2an1)xn=02 a_{2}+\sum_{n=1}^{\infty}\left((n+2)(n+1) a_{n+2}-a_{n-1}\right) x^{n}=0

From Eq. (13.112), we have that a2=0a_{2}=0 and the following recurrence relation,

an+2=an1(n+2)(n+1),n1.a_{n+2}=\frac{a_{n-1}}{(n+2)(n+1)}, \quad n \geq 1 .

Plugging in values of nn for n1n \geq 1, we obtain the first three terms as

a3=a032,a4=a143,a5=a254=0.a_{3}=\frac{a_{0}}{3 \cdot 2}, \quad a_{4}=\frac{a_{1}}{4 \cdot 3}, \quad a_{5}=\frac{a_{2}}{5 \cdot 4}=0 .

We can perhaps see from Eq. (13.113) that for all n=3kn=3 k where k=1,2,3,k=1,2,3, \cdots, the coefficients a3ka_{3 k} are given in terms of a0a_{0}. Similarly, for all n=3k+1n=3 k+1, the coefficients a3k+1a_{3 k+1} are given in terms of a1a_{1}. For all n=3k+2n=3 k+2, the coefficients are given in terms of a2a_{2} and are therefore 0 . Indeed we have,

a6=a365=a06532,a9=a698=a0986532,\begin{aligned} & a_{6}=\frac{a_{3}}{6 \cdot 5}=\frac{a_{0}}{6 \cdot 5 \cdot 3 \cdot 2}, \\ & a_{9}=\frac{a_{6}}{9 \cdot 8}=\frac{a_{0}}{9 \cdot 8 \cdot 6 \cdot 5 \cdot 3 \cdot 2}, \end{aligned}

and so on. Similarly, we have

a7=a476=a17643,a10=a7109=a11097643.\begin{aligned} a_{7} & =\frac{a_{4}}{7 \cdot 6}=\frac{a_{1}}{7 \cdot 6 \cdot 4 \cdot 3}, \\ a_{10} & =\frac{a_{7}}{10 \cdot 9}=\frac{a_{1}}{10 \cdot 9 \cdot 7 \cdot 6 \cdot 4 \cdot 3} . \end{aligned}

Now that we have the coefficients we can plug them in back to Eq. (13.105) and obtain the general solution as,

y(x)=a0(1+k=1x3k2356(3k1)3k)+a1(x+k=1x3k+134673k(3k+1)).y(x)=a_{0}\left(1+\sum_{k=1}^{\infty} \frac{x^{3 k}}{2 \cdot 3 \cdot 5 \cdot 6 \cdot(3 k-1) \cdot 3 k}\right)+a_{1}\left(x+\sum_{k=1}^{\infty} \frac{x^{3 k+1}}{3 \cdot 4 \cdot 6 \cdot 7 \cdots 3 k \cdot(3 k+1)}\right) .

Note that a0a_{0} and a1a_{1} are constants that are determined through application of the initial conditions. Note also that the solutions found here are only valid within the radius of convergence of the power series (see Section 6.2 in Chapter 6 for details on convergence).