14 Linear equations with variable coefficients#

14.1 Linear equations with variable coefficients#

A more difficult equation to solve than those met previously is

a(x)d2ydx2+b(x)dydx+c(x)y=g(x)

where the coefficients a, b, c are functions of x. This equation is usually put into the form

d2ydx2+P(x)dydx+Q(x)y=f(x)

by dividing through by a(x). The general method to use is the variation of parameters, because this can be applied to all differential equations. However, it is quite complicated to use and specialized texts should be consulted (Jeffery 1990; Bronson 1994; Aratyn & Rasinariu 2006). There are, however, at least two methods that can still be used: the main one is to solve the equation as a series expansion and the second reduces the equation to a simpler one, but this can be used only in certain cases.

14.1 Reduction to simpler forms by change of variable and substitution#

(i) Substitution#

Sometimes a simple substitution can produce constant coefficients, but success in this depends very much on the exact form of the equation. The equation

cos(x)d2ydx2+sin(x)dydx+acos3(x)y=0

can be simplified with u=sin(x). The derivatives are

dudx=cos(x),d2udx2=sin(x)

and as

dydx=dydududx, then dydx=cos(x)dydu

and

d2ydx2=sin(x)dydu+cos(x)d2ydu2dudx=sin(x)dydu+cos2(x)d2ydu2

substituting into the differential equation produces

d2ydu2+ay=0

which is readily solved by standard methods to find y in terms of u. Notice that if the cos3(x)y term in the original equation was replaced by cos(x)y, then the equation produced is not as simple and is

(1u2)d2ydu2+ay=0

(ii) Euler or Cauchy eqns.#

Equations of the particular type

x3d3ydx3+ax2d2ydx2+bxdydx+cy=f(x)

where terms in x have the same power as the differential are called Euler’s or Cauchy’s equation and can be simplified with the substitution

x=ez

The derivative is dz/dx=ez and if Dd/dz then

dydx=dydzdzdx=ezDy,d2ydx2=d2ydz2(dzdx)2+dydzd2zdx2=e2z(D2D)y

The last derivative here was obtained as

d2ydx2=ddz(dydzdzdx)dzdx

and using the product rule and ddxdzdxddx

The different derivatives can be written down as

xdydx=Dy,x2d2ydx2=(D2D)y,x3d3ydx3=(D33D2+2D)y

and used to simplify the differential equation. Note that the right-hand side has derivatives in dy/dz.

(iii) Using derivatives#

To solve the equation

x2d2ydx2+2xdydxy=0 or (D2+D1)y=0

first find the roots of the characteristic equation which are

512,512

However, the operator D is a function of z not of x, hence, the solution is a function of z, giving the solution

y=Ae(51)z/2+Be(51)z/2

where A and B are constants determined by the initial conditions. As x=ez or z=ln(x), the solution becomes

y=Ae(51)ln(x)/2+Be(51)ln(x)/2

which can be simplified to

y=Ax(1+(5))/2+Bx(1(5))/2

(iv) Special form#

If the equation can be put into the form,

d2ydx2+P(x)dydx+Q(x)y=0

then it can be reduced by the transformation y=uv where

v=e(1/2)pdx

The equation becomes

d2udx2w(x)u=0,w(x)=dPdx+(PQ)2Q

and the final solution is y=uv.

(v) Special form#

The equation

d2ydx2+xdydx+(x1)y=0

can be solved with the transformation method (y=uv) if

v=e(1/2)xdx=ex2/4

and

w=3/2+x2/4x

which produces the equation with which to find u,

d2udx2=(32+x24x)u=0

14.2 Series solution of differential equations#

While many types of equations can be solved using the methods described so far, there are a number of problems whose equations can only be solved by a series expansion. These are often different forms of the Schroedinger equation, examples of which are the quantum harmonic oscillator and the radial and angular solutions to the hydrogen atom.

While the series solution method will be described in general, in quantum mechanics and in some other problems, the equations often have a form whose solution is well known because the equation has a specific name. The harmonic oscillator is solved using Hermite’s differential equation and the hydrogen atom requires Legendre’s and Laguerre’s equations. Other commonly used equations are named after Helmholtz, Laplace, and Bessel.

Many functions can be expanded as a power series that has the form

(38)y=a0+a1x+a2x2+a3x3++anxn+

with constants a0,a1, etc. as described in Chapter 5.

By taking derivatives of y based on this expansion, the differential equation can be reconstructed in terms of the powers of x and these constants. To find the constants, the powers of x are collected together and the resulting group of constants solved assuming that each group of them is zero. What results is a recursion formula with which to calculate the constants and so the equation is solved without any formal integration. It is assumed that the solution can be found with this method, because this is ‘usually’ the case for problems in chemical physics. There is a simple way to check if a series solution is possible and if not, a related method due to Frobenius can be tried in these cases.

(i) The basic series method#

The basic series method is illustrated with the equation

d2ydx2+xdydx+y=0

and the solution is assumed to have the form of equation (38). The strategy is

(a) to differentiate the series solution, and substitute the results into the differential equation;

(b) collect together coefficients with the same power of x and set each result to zero;

(c) find a recursion equation in the coefficients a0,a1, using the initial conditions as the starting points.

step (a) The differential equation is formed out of the series solution by taking the derivatives. These are

dydx=a1+2a2x+3a3x2++(n1)an1xn2+nanxn1+(n+1)an+1xnd2ydx2=2a2+6a3x+12a4x2++n(n1)anxn2+n(n+1)an+1xn1

and the n - 2, n - 1 and nth terms are tabulated below as these are needed later on. Notice that these derivatives are the same for all differential equations solved by the expansion in (38). These coefficients are shown in the table and terms that are useful in other equations are also shown.

xn2xn1xnyan2an1any(n1)an1nan(n+1)an+1yn(n1)ann(n+1)an+1(n+1)(n+2)an+2xyan3an2an1xy(n2)an2(n1)an1nan

step (b) The next step is to substitute these derivatives into the differential equation and then to group all the coefficients with x0,x1,x2,x3 together and make each group zero. The groups of coefficients for each power of x must be zero, as the differential equation is itself equal to zero. For this particular equation, substituting produces

2a2+6a3x+12a4x2++(n+2)(n+1)an+2xn++a1x+2a2x2+3a3x3++nanxn++a0+a1x+a2x2+a3x3++anxn+=0

Grouping the coefficients gives

coefficientsa0+2a2=0,x06a3+2a1=0,x112a4+2a2+a2=0,x2(n+2)(n+1)an+2+nan+an=0,xn

step (c) The recursion formula for the xn term is

an+2=(n+1)an(n+1)(n+2)

The first two coefficients are a0,a1 and the other coefficients are expressed in terms of these as

n=0:a2=a0/2,n=1:a3=a1/3,n=2:a4=a2/4=a0/8,n=3:a5=a1/15

The solution is therefore,

y=a0(1x22+x48x648+)+a1(x3+x315x5105+)

The two solutions are independent of one another, and the even powered series is the expansion of ex2/2, while the odd series is not so easily identified. The coefficients are determined by the initial conditions and, if y(0)=a0 and dy/dx= 0 at x = 0, then the solution is y=a0ex2/2.

(ii) Example#

The equation is

d2ydx2+(αβx2)y=0

and following the previous calculation, the recursion equation is

an+2=βan2αan(n+1)(n+2)

and is not valid when n is 0 or 1 because a2 and a1 are not defined. The coefficients of the first two terms in the expansion must then be examined. These are

2a2+αa0and6a3+αa1=0

from which a2 and a3 can be found in terms of a0 and a1 and these then used as the starting points for the recursion formula. The series solution can be obtained using recursion. The first few terms are

a2=αa0/2,a3=αa1/6,a4=αa0/24+βa0/12,a5=α2a1/120+βa1/20

and the solution

y=a0+a1x12αa0x216αa1x3+(124α2a0+112βa0)x4+

There are two series in the result; one with terms in a0 and the other in a1. These are independent solutions.

(iii) The Hermite equation#

The Hermite equation is important because it leads to the solution of the Schroedinger equation for the quantum mechanical harmonic oscillator. This is discussed at the end of this section but first a method of solution is determined. The equation has the form

(39)d2ydx22xdydx+2γy=0

where γ is a real number, Solving as a series leads to the coefficients

2a2+6a3x+12a4x2++(n+1)(n+2)an+2xn+2a1x4a2x22nanxn++2γa0+2γa1x+2γa2x2++2γanxn+=0

The recursion is therefore

an+2=2nγ(n+1)(n+2)an

and evaluating the coefficients gives the series

yγ=a0(1γx2(2γ)γ6x4(4γ)(2γ)γ90x6)+a1(x+1γ3x3+(3γ)(1γ)30x5+)+

These series form the Hermite polynomials when γ is a positive integer. For example when γ = 3 the odd power series terminates to give

y3=a1(x23x3)

and when γ = 4 the even power series terminates and is

y4=a0(14x2+43x4)

Each series is limited to a few terms because of the way the coefficients are formed. The first few Hermite polynomials are

H0(x)=1H1(x)=xH2(x)=4x22H3(x)=8x3+12xH4(x)=16x448x2+12H5(x)=32x5160x3+120x

and choosing the constants as

a0=(1)γ/2γ!(γ/2)!

with γ as an even integer and

a1=(1)(γ+1)/2(γ+1)!((γ+1)/2)!

with γ as an odd integer, converts the series solution to the differential equation into the sum of two Hermite polynomials.

The general solution can then be written as

yγ=c1Hγ(x)+c2Hγ+1(x)

where c1 and c2 are two new constants that are determined by the initial conditions.

The equation

(40)d2ydx2+(2γ1x2)y=0

with γ as a constant is related to the Hermite equation if y=vex2/2, where v is a function of x, then the second derivative is

d2ydx2=(d2vdx22xdvdx+(x21)v)ex2/2

and substituting this into eqn (40) and simplifying this becomes

d2vdx22xdvdx+2γv=0

which is identical to (39). The solutions of (40) are therefore Hermite polynomials multiplied by the Gaussian ex2/2.

The Schroedinger equation for the harmonic oscillator can be written as

d2ψdx2+2m2(Ek2x2)ψ=0

where k is the force constant related to the frequency as ω=k/m. The equation can be simplified to

d2ψdx2+(ab2x2)ψ=0

with the abbreviations a=2mE/2 and b2=mk/2. Next, the substitution z=bx is used to make the equation similar to (40). The solutions are Hermite polynomials multiplied by exp(z2/2) and these have the characteristic form of the harmonic oscillator wavefunctions. These decay exponentially to zero when z has a large positive or negative value but oscillate near to zero. The different wavefunctions are found by substituting E=ω(n+1/2) for each quantum number n. The next figure (19a) shows some wavefunctions for parameters corresponding to the iodine molecule, assuming that it has a harmonic potential. Of course any diatomic molecule does not have a harmonic potential since all real molecules must dissociate into their respective atoms if given enough energy, but the harmonic potential is a good approximation at low energy.

Drawing

Figure 19a. harmonic oscillator wavefunctions assuming a harmonic potential. The frequency is 214.5 cm1 and the force constant 172 N/m. The levels have quantum numbers n= 0, 1, 2,.


14.3 Checking whether a series solution is possible#

A solution is usually expanded as a series about x = 0; therefore, the first thing to check is whether the series method is applicable. This means examining the differential equation to ensure that x = 0 is analytic, hence not singular, which in turn means that x = 0 does not produce infinity when substituted into the equation. The general equation is

d2ydx2+P(x)dydx+Q(x)y=f(x)

If the equation is

d2ydx2+dydx+y=0

then this is analytic at x = 0, as P and Q are both 1.

The equation

d2ydx2+xx1dydx+1x1y=0

is also analytic at x = 0, and an expansion about 0 is possible. The point x = 1 is singular, and the function 1/(x1) is then not defined, so the series expansion will not be possible here and the series solution is valid only in the range -1 <x< 1. In contrast the equation

d2ydx2+x(x1)dydx+(x1)y=0

can be expanded, because the x(x1) and (x1) are polynomials and every point is normal.

Bessel’s equation is

x2d2ydx2+xdydx+(x2n2)y=0

where n is a constant and when rearranged is

d2ydx2+1xdydx+(x2n2)x2y=0

so has a singular point at x=0. In this case, the equation can be shown to have solutions

y=xmk=0akxk

and where a0 0. Using this series is often called Frobenius’ method and both the index m and coefficients ak have to be determined. The method is very similar to that already described and is given in more advanced textbooks (Boas 1983; Jeffery 1990; Bronson 1994; Aratyn & Rasinariu 2006).