Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd...

34
Differential Equations Problem Sheet 1 3 rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions of the following separable differential equations. Which equations are non-linear? (a) ௬ሺଵା௫ (b) ݔሺ1 െ ݕଵ/ଶ (c) 2 ݎcot ߠ2. Consider the differential equation ݕ ݔݔ/ݕሻ, where the right-hand side is an arbitrary function of ݔ/ݕ. Show that the substitution ݕݑݔݔ(or equivalently, ݑݔሻൌ ݔ/ݕ) in general renders this differential equation separable. Hence find the general solution of ݕ ݔ ݔ ݕݔ ݕ ݔ. 3. Use integrating factors to find the general solutions of the following differential equations: (a) ݕൌ 3 cos ሺ 2ݐ(b) ሺ1 ݐ4 ݕݐሺଵା௧ 4. Use integrating factors to solve the following initial value problems: (a) ݕୡ୭ୱ ௧ , ݕߨሻൌ0 (b) ݐ4 ݐ ݕ, ݕሺെ1ሻ ൌ 0

Transcript of Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd...

Page 1: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Differential Equations

Problem Sheet 1 3rd November 2011

First-Order Ordinary Differential Equations

1. Find the general solutions of the following separable differential equations. Which equations are non-linear?

(a)

(b) 1 /

(c) 2 cot 

2. Consider the differential equation

/  ,

where the right-hand side is an arbitrary function of / . Show that the substitution (or equivalently, / ) in general renders this differential equation

separable. Hence find the general solution of

 .

3. Use integrating factors to find the general solutions of the following differential equations:

(a) 3 cos  2

(b) 1 4

4. Use integrating factors to solve the following initial value problems:

(a)  

, 0

(b) 4 , 1 0

Page 2: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Differential Equations

Problem Sheet 2 14th November 2011

Second-Order Ordinary Differential Equations

1. Find the general solutions of the following two equations:

(a) 3 2 0

(b) 4 4 0 In each case, show that the two functions in the general solution are linearly independent by calculating the Wronskian determinant.

2. Solve both of the equations in Q1 for the initial conditions 0 1 and 0 1.

3. Using the results of Q1, obtain the general solutions of the following differential equations:

(a) 3 2 10

(b) 3 2 Hint: special case

(c) 4 4

4. Find the general solution of the following third-order homogeneous equation:

2 5 6 0

(You will need to factorise the characteristic equation.) Compute the Wronskian determinant of the three functions.

5. The second equation in Q1 has equal roots. In the lectures we used the method of variation of parameters (closely related to the method of reduction of order) to derive the general solution. Another approach looks at the limit as the double root is approached. Starting with the equation:

0

the characteristic equation has two solutions. Instead of the basis , , choose the linear combination , / (are these independent?). Then consider the behaviour of the second function as tends to zero.

Page 3: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Differential Equations

Problem Sheet 3 24th November 2011

Power Series and Generalised Power Series (Frobenius) Solutions

1. Evaluate the radius of convergence for the three series below. Recall that is defined as the distance from the centre (about which the expansion is made) out to which the series converges.

 2

  ,  1

1 ,  

2

2. Hermite’s equation is:

2 2 0 ,

where is a constant. Determine the solution of the equation by expanding as a power series about the origin

. . . , and, in this way, establish the following recurrence relation between successive terms:

21 2

 .

Express your solution as two series, each with an arbitrary constant. Examine your solution for different integer values of 0,1,2,3, and in each case identify which of the two series terminates after a few terms. Compare these polynomials to the Hermite polynomials from quantum mechanics.

3. The first four Legendre polynomials are 1, , 3 1 ,

and 5 3 . The coefficients ℓ of the Legendre series expansion of a

function in the range 1 1 are given by:

ℓ2ℓ 12 ℓ  .

a) Evaluate the integrals to find the first two non-zero terms in the Legendre series

expansion of . Verify that the sum of these two terms is exactly. b) Demonstrate that each of the polynomials , , is orthogonal to

the other two, on the interval 1 1. 4. Using the Frobenius method, show that the differential equation

2 2 0         0

Page 4: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

has the generalised power series solution

42 !

√4

2 1 ! ,

where and are arbitrary constants. 5. Using the Frobenius method, show that the Laguerre differential equation

1 0 ,

has one series solution of the form:

   1 1 2 … 1

! ,

where is an arbitrary constant. Show that this series terminates whenever is a non-negative integer. (The Laguerre polynomials defined in this way are closely related to the energy eigenfunctions of the Hydrogen atom.)

Page 5: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Differential Equations

Problem Sheet 4 5th December 2011

Partial Differential Equations

1. Determine the Fourier sine series that represents a string plucked at its mid-point, i.e. represent the function

   2 / 0 /22 / /2

by its Fourier sine series. [Hint: To evaluate the Fourier coefficients you integrate the product of the function with each sine term. Sketch the relevant functions and identify ways of reducing the number of terms you need to integrate].

2. (From 2007 exam) A taut wire is fixed at points 0, . The displacement , is

governed by the wave equation

1,

where is the speed of propagation.

(i) By assuming a separable solution of the form , , derive ordinary differential equations to be solved for each of the functions , . [6 marks]

(ii) Show that the boundary conditions impose a general solution of the form

sin  sin  cos 

[6 marks]

(iii) At 0 the displacement is everywhere zero, when the wire is hit at the mid point, such that

, 02

                          0 /2

, 0 2 1                  /2

Determine expressions for the coefficients , of the solution. [8 marks]

3. A cylindrical rod of length is insulated over its curved surface. The end of the rod at 0

is in contact with a heat bath at temperature Θ and the end of the rod at is in contact with a heat bath at temperature Θ . After some time, a steady state is reached.

The heat equation that describes the temperature profile of the rod is

1     ,

where is a constant and Θ , is the temperature at position and time .

Page 6: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

(i) Find the general steady-state (time-independent) solution of the heat equation and hence show that the steady-state temperature distribution is:

Θ Θ  .

(ii) At time 0, the rod is disconnected from the heat baths. Assuming that no heat

subsequently leaves or enters the rod, write down the boundary/initial conditions: (a) at 0; (b) at ; and (c) at 0 for 0 .

(Hint: recall Fourier’s law of heat flow , where is the conductivity.)

(iii) Writing Θ , use the method of separation of variables to derive ordinary

differential equations satisfied by the functions and . Note that the separation constant may be zero, positive ( ) or negative ( ). Using the homogeneous boundary conditions investigate each of these possibilities. In this way show that the distribution of temperature along the rod may be expressed in the form

Θ ,     cos   ,

which is a linear combination of all possible solutions. Here and ( 1,2, …) are constants.

(iv) The initial condition may be satisfied by expanding Θ , 0 , 0 , in a half-range Fourier cosine series. Make a suitable extension of Θ , 0 into the range x 0 and find the required Fourier expansion coefficients. (Note that you will need to include the constant term.) Hence show that:

Θ ,    2

2 1 1cos   ,      0.

(v) What happens as ∞?

4. (From 2005 exam) The partial differential equation:

1  ,               0  ,

with the boundary conditions:

0, 0 ,            , 0 ,                  , 0  , may be solved using the method of separation of variables.

(i) Show that the partial differential equation has separable solutions of the form ,, where

            and                 1

 .

You may assume that the separation constant is negative. [5 marks]

(ii) Solve the ordinary differential equation for subject to the homogeneous boundary

Page 7: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

conditions to find the allowed values of and the corresponding spatial eigenfunctions. Hence show that the separable solutions are:

,  /

1 ,            1,2,3, …,

where is an arbitrary constant. [7 marks]

(iii) Given that

1sin   ,

write down an expression for , . [4 marks]

(iv) As ∞, every term in the summation that gives , tends to zero. Which term tends

to zero the most slowly? Write down an approximation for , valid when is very large but finite. Sketch

, in this limit. [4 marks]

Page 8: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

1

Differential Equations

Problem Sheet 5 13th December 2011

PDEs in polar and spherical coordinates and Sturm-Liouville problems

1. In solving Laplace’s equation in spherical coordinates, separation of variables , , leads to the following equation for :

sin  1              0 .

Using the substitution cos  show that transforming the above differential equation for the function into a differential equation for the function , where cos  , leads to the associated Legendre equation:

1 2 11

0 .

Hint: show that 1 / .

2. (Exam question) The displacement , , of a circular drum head, radius , satisfies

the wave equation: 1 1

   1

 ,

in cylindrical coordinates, where is the wave speed.

a) If the displacement is independent of , show that the wave equation has separable solutions of the form , , where

 ,           ,

and is a separation constant. [7 marks]

b) The homogeneous boundary condition , 0 fixes the eigenvalues and eigenfunctions of the equation for . The eigenvalues , 1,2,3, … , are negative and hence may be written as , where is a positive constant. For the rest of this question, you may assume that the eigenvalues and eigenfunctions

are known. Your answers may be expressed in terms of these quantities. (i) Find the function that appears in the separable solution

, . [4 marks] (ii) Write down the general solution of the wave equation subject to the

homogeneous boundary condition at . [4 marks] (iii) Write down the specific solution that also satisfies the initial conditions

, 0 3  ,          , 0 0    .              [5 marks]

Page 9: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

2

3. Consider a second-order differential equation of the form:

 .

Show that by multiplying this equation by an appropriate function , an equation of the Sturm-Liouville form may be obtained. Find the multiplicative factors required to bring the following equations into Sturm-Liouville form:

Hermite s   equation                      2 2  ,

Laguerre s   equation                    1 ,            0 .

4. (Q4, 5 are for an extra challenge, and are not essential.) It may be shown that the function

Φ ,1

√1 2          | | 1  ,

which is known as the generating function for the Legendre polynomials , satisfies the following useful equation:

Φ ,          .

Recalling the binomial expansion

1 11

2!1 23!

 ,

and setting 2 and , use the generating function to show that

1,      ,      123 1  .

5. The electrostatic potential at the point arising from a charge at the point is

4 | | .

Given that the squared length | | of any vector is equal to , show that

4 | | 4 √ 2   ,

where is the angle between the vectors and . (You have just derived the cosine rule.) Using the generating function from Q4, and considering the case when , show that

4 | |   

4cos   ,         .

This is called the multipole expansion of the Coulomb interaction. It converges rapidly when

and is often used to work out the potential far away from finite charge distributions such as atoms or electronic components.

Page 10: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Differential Equations

Answers to Problem Sheet 1

First-Order Ordinary Differential Equations

1. They are all non-linear because none can be expressed in the formdy

dx+ f(x)y = g(x).

(a)dy

dx=

x2

y(1 + x3)∫y dy =

∫x2

1 + x3dx

12y2 =

13

ln(1 + x3) + c

wherec is an arbitrary constant.

(b) xdy

dx=

(1− y2

)1/2

∫dy

(1− y2)1/2=

∫dx

x∫ cos θdθ

(1− sin2 θ)1/2= ln(x) + c (substitutiony = sin θ)

θ = ln(x) + c

arcsin y = ln(x) + c

y = sin(ln(x) + c)

(c)dr

dθ= 2r cot θ

12

∫dr

r=

∫cot θdθ

12

ln r = ln(sin θ) + c

ln r1/2 = ln(c′ sin θ)r = c′2 sin2 θ

wherec, c′ are arbitrary constants.

2. Given the differential equationdy

dx= f(y/x) ,

wheref is an arbitrary function, the substitution

y = xu ,dy

dx= u + x

du

dx,

1

Page 11: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

yields

u + xdu

dx= f(u) , or equivalentlyx

du

dx= f(u)− u ,

which is separable.

Applying this method to

dy

dx=

x2 + xy + y2

x2= 1 + (y/x) + (y/x)2 ,

gives the equation

xdu

dx= (1 + u + u2)− u = 1 + u2 .

Separating variables and integrating:∫du

1 + u2=

∫dx

x∫ sec2 θdθ

1 + tan2 θ= ln(x) + c (substitutionu = tan θ, du = sec2 θdθ)∫

dθ = ln(x) + c (since1 + tan2 θ = sec2 θ)

θ = ln(x) + c

arctan(y/x) = ln(x) + c

y = x tan(ln(x) + c) .

3. (a) The integrating factor for the differential equation

dy

dt+

1ty = 3 cos(2t) is exp

(∫ 1tdt

)= exp (ln t) = t .

After multiplying by this factor, the ODE becomes

tdy

dt+ y = 3t cos(2t) or

d

dt(ty) = 3t cos(2t) .

Integrating:

ty =∫

3t cos(2t)dt

= 3t12

sin(2t)−∫

312

sin(2t)dt (integration by parts)

=32t sin(2t) +

34

cos(2t) + c ,

wherec is an arbitrary constant. So the general solution is

y =32

sin(2t) +34t

cos(2t) +c

t

2

Page 12: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

(b) The differential equation

(1 + t2)dy

dt+ 4ty =

1(1 + t2)2

rearranges tody

dt+

4t

1 + t2y =

1(1 + t2)3

.

So the integrating factor is

exp(∫ 4t

1 + t2dt

)= exp(2 ln(1 + t2)) = exp(ln[(1 + t2)2]) = (1 + t2)2 ,

where the integral was evaluated by noting that2t (half the numerator) is the derivative of(1 + t2) (the denominator). Multiplying by the integrating factor gives

(1 + t2)2dy

dt+ 4t(1 + t2)y =

11 + t2

ord

dt

((1 + t2)2y

)=

11 + t2

.

Integrating:

(1 + t2)2y =∫ 1

1 + t2dt

=∫ 1

1 + tan2 θsec2 θdθ (substitutiont = tan θ, dt = sec2 θdθ)

=∫

dθ (since1 + tan2 θ = sec2 θ)

= θ + c

= arctan(t) + c ,

wherec is an arbitrary constant. Hence, the general solution is

y =arctan(t) + c

(1 + t2)2.

4. (a) By inspection, the integrating factor for the differential equation

dy

dt+

2ty =

cos t

t2

is t2. Multiplying by this factor, the equation becomes

d

dt

(t2y

)= cos t .

Integrating:t2y = sin t + c ,

wherec is an arbitrary constant. So the general solution is:

y =sin t

t2+

c

t2

The initial condition,y(π) = 0, implies thatc = 0 and so the specific solution we seek is

y =sin t

t2

3

Page 13: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

(b) By inspection, the integrating factor for the differential equation

t3dy

dt+ 4t2y = e−t

is t. Multiplying by this factor, the equation becomes

d

dt

(t4y

)= te−t .

Integrating:

t4y =∫

te−tdt

= −te−t +∫

e−tdt (integration by parts)

= −(1 + t)e−t + c ,

wherec is an arbitrary constant. So the general solution is

y = −1 + t

t4e−t +

c

t4

The initial condition,y(−1) = 0, implies thatc = 0. So the specific solution we seek is

y = −1 + t

t4e−t

4

Page 14: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions
Page 15: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions
Page 16: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions
Page 17: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Differential Equations

Answers to Problem Sheet 3

Power Series and Generalised Power Series (Frobenius) Solutions

1. For each of the series, we apply the ratio test for absolute convergence, i.e. compute the ratiorwhich is the limitm →∞ of the ratio between successive terms:

rm =∣∣∣∣ tm+1

tm

∣∣∣∣ .

The series converges over the region wherer < 1.

For a) we have

rm =

∣∣∣∣∣2mxm+1

2m+1xm

∣∣∣∣∣ ,

so

r =∣∣∣∣x2

∣∣∣∣ ,

andr < 1 out to|x| = 2, soR = 2.

For b) we have

rm =

∣∣∣∣∣(−1)m+1(m + 1)xm+2

(−1)m(m + 2)xm+1

∣∣∣∣∣ → | − x|

soR = 1.

For c), the series is expanded about the pointx = a. We have

rm =

∣∣∣∣∣(x− a)2(m+1)2m

(x− a)2m2(m+1)

∣∣∣∣∣ .

So the condition for convergence is

r =

∣∣∣∣∣(x− a)2

2

∣∣∣∣∣ < 1 .

To obtainR we ask how large may|(x−a)| become such that the above condition is true, whichobtains when the above expression is an equality. So the answer isR =

√2.

2. We seek the coefficients of the power series

y = C0 + C1x + C2x2 + C3x

3 + ...

that satisfies Hermite’s equation

d2y

dx2− 2x

dy

dx+ 2py = 0 .

Differentiating the series successively we have:

1

Page 18: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

dy

dx= C1 + 2C2x + 3C3x

2 + 4C4x3...

d2y

dx2= 2C2 + 6C3x + 12C4x

2 + 20C5x3 + ...

So writing out each element of the equation, and lining up the terms, we have:

2py = 2pC0 +2pC1x +2pC2x2 +2pC3x

3 ...−2x dy

dx = −2C1x −4C2x2 −6C3x

3 ...d2ydx2 = 2C2 +6C3x +12C4x

2 +20C5x3 ...

The first column in which all elements have a term isx1, so we start the series there.

2py = 2pC0 +∑∞

n=1 xn2pCn

−2x dydx = −

∑∞n=1 xn2nCn

d2ydx2 = 2C2 +

∑∞n=1 xn(n + 1)(n + 2)Cn+2

So summing the elements and equating to zero yields:

0 = 2pC0 + 2C2 +∞∑

n=1

xn[2pCn − 2nCn + (n + 1)(n + 2)Cn+2] .

We now set the coefficients of each power to zero. Forx0, the orphan terms giveC2 = −pC0.Looking at the sum term, we find the recursion relationCn+2 = 2(n−p)

(n+1)(n+2)Cn. Because thisrelatesCn+2 to Cn we can anticipate that this will lead to two series. Note also that the recursionrelation works even forn = 0, i.e. givesC2 in terms ofC0. Nevertheless, this does not alwaysapply, and as a general rule the orphan terms should be treated separately. Insertingn = 1, weget C3 = 2(1−p)

6 C1, and then inserting successivelyn = 3, 5, 7, we can get an odd series interms ofC1, and inserting successivelyn = 2, 4, 6, we can get an even series in terms ofC0.The general solution of the differential equation may be written:

y = C0y1 + C1y2 ,

wherey1 is the even series:

y1 = 1− px2 − 4(2− p)p4!

x4 − 8(4− p)(2− p)p6!

x6 ...

andy2 is the odd series:

y2 = x +2(1− p)

3!x3 +

4(3− p)(1− p)5!

x5 +8(5− p)(3− p)(1− p)

7!x7 ...

Then, ifp is a non-negative integer, we find that one or other of these two series terminates. Wemay write down the terminating series, successively,for p = 0

y = C0(1) ,

for p = 1y = C1(x) ,

2

Page 19: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

for p = 2y = C0(1− 2x2) ,

for p = 3

y = C1(x−23x3) ,

for p = 4

y = C0(1− 4x2 +43x4) ,

for p = 5

y = C1(x−43x3 +

415

x5) .

The terms in brackets, when suitably normalised (i.e. multiplied by constants), are the Hermitepolynomials.

3. (a) If f(x) = x3, the first few coefficients are:

c0 = 12

∫ 1−1 x3 dx = 0 (odd integrand)

c1 = 32

∫ 1−1 xx3 dx = 3

2

[x5

5

]1

−1= 3

5

c2 = 52

∫ 1−1

12(3x2 − 1) x3 dx = 0 (odd integrand)

c3 = 72

∫ 1−1

12(5x3 − 3x)x3 dx = 7

2

[514x7 − 3

10x5]1

−1= 2

5 .

Hence, the first two non-zero terms in the Legendre series are

35P1(x) +

25P3(x) =

35x +

15(5x3 − 3x) .

The sum of these two terms givesx3 exactly. This is an example of a general result: anynth order polynomial may be expanded exactly in terms of the Legendre polynomials upto and includingPn(x). The integrals for the expansion coefficientsc` with ` > n are allequal to zero.

(b) We need to show that (i)P1 andP2 are orthogonal, (ii)P1 andP3 are orthogonal, and (iii)P2 andP3 are orthgonal, which is to say that, in each case, the integral of the product ofthe two functions over the interval−1 < x < 1 is zero.

For (i):

I =∫ 1

−1P1P2dx =

∫ 1

−1x

12(3x2 − 1)dx =

12

∫ 1

−13x3 − xdx =

[12(x4 − x2/2)

]1

−1.

Evaluated this is

I =12[(1− 1/2)− (1− 1/2)] = 0 ,

as required. Clearly if the integrand is an odd function, the result will always be zero.

For (ii):∫ 1

−1P1P3dx =

∫ 1

−1x

12(5x3 − 3x)dx =

12

∫ 1

−15x4 − 3x2dx =

[12(x5 − x3)

]1

−1.

Evaluated this is

I =12[(1− 1)− (−1 + 1)] = 0 ,

3

Page 20: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

as required.

For (iii):

I =∫ 1

−1P2P3dx =

∫ 1

−1

12(3x2 − 1)

12(5x3 − 3x)dx =

14

∫ 1

−115x5 − 14x3 + 3xdx

Since the integrand is n odd function, from (i) we know that the integral is zero, as required.

4. We insert the generalised power series solution:

y = C0xr + C1x

r+1 + C2xr+2 + C3x

r+3 ...

into the equation. Differentiating once, and then again, we obtain:

dy

dx= rC0x

r−1 + (r + 1)C1xr + (r + 2)C2x

r+1 + (r + 3)C3xr+2 ...

d2y

dx2= r(r − 1)C0x

r−2 + (r + 1)rC1xr−1 + (r + 2)(r + 1)C2x

r + (r + 3)(r + 2)C3xr+1 ...

Using these, we now assemble the three elements of the equation, with the powers ofx aligned:2y = 2C0x

r +2C1xr+1 +2C2x

r+2 ...dydx = rC0x

r−1 +(r + 1)C1xr +(r + 2)C2x

r+1 +(r + 3)C3xr+2 ...

2x d2ydx2 = 2r(r − 1)C0x

r−1 +2(r + 1)rC1xr +2(r + 2)(r + 1)C2x

r+1 +2(r + 3)(r + 2)C3xr+2 ...

We have orphan terms inxr−1 and can start the series atxr.

2y = +∑∞

n=0 xr+n2Cndydx = rC0x

r−1 +∑∞

n=0 xr+nCn+1(r + n + 1)2x d2y

dx2 = 2r(r − 1)C0xr−1 +

∑∞n=0 xr+nCn+12(r + n + 1)(r + n)

Summing the three elements of the equation and equating to zero, we have:

0 = xr−1C0[r + 2r(r − 1)] +∞∑

n=0

xr+n[2Cn + Cn+1(r + n + 1 + 2(r + n + 1)(r + n))] .

We equate the coefficient of each power ofx to zero, and since we disallowC0 = 0, thexr−1

term gives us the indicial equation:

r + 2r(r − 1) = 0 ,

while the coefficient in the sum term provides a recursion relation betweenCn+1 andCn

Cn+1 =−2Cn

(r + n + 1)(2r + 2n + 1),

from which we can getC1, C2, C3, ... in terms ofC0.

The indicial equation gives2r2 − r = 0, with solutionsr = 0 andr = 1/2. Since these do notdiffer by an integer, we can obtain both series solutions.

In the case whenr = 0, the recursion relation may be written:

Cn+1 =−2Cn

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

−4Cn

(2n + 2)(2n + 1).

4

Page 21: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Hence,n=0 term: C1 = −4

2×1 C0 = (−4)2! C0

n=1 term: C2 = −44×3C1 = (−4)2

4! C0

n=2 term: C3 = −46×5C2 = (−4)3

6! C0

or, generally,

Cn =(−4)n

(2n)!C0 .

In the case whens = 1/2, the recursion relation becomes:

Cn+1 =−2Cn

(n + 32)(2n + 2)

=−4Cn

(2n + 3)(2n + 2).

Hence,n=0 term: C1 = −4

3×2 C0 = (−4)3! C0

n=1 term: C2 = −45×4C1 = (−4)2

5! C0

n=2 term: C3 = −47×6C2 = (−4)3

7! C0

or, generally,

Cn =(−4)n

(2n + 1)!C0 .

The two series are two independent functionsy1, y2. Hence, the generalised series solution ofthe ODE is

y = c1

∞∑n=0

(−4x)n

(2n)!+ c2x

1/2∞∑

n=0

(−4x)n

(2n + 1)!,

wherec1 andc2 are arbitrary constants.

5. Following the same procedure as in 5., above, we substitute the generalised power series solu-tion, and assemble the four elements of the equation, lining up the powers ofx:

py = pC0xr +pC1x

r+1 +pC2xr+2 ...

−x dydx = −rC0x

r −(r + 1)C1xr+1 −(r + 2)C2x

r+2 ...dydx = rC0x

r−1 +(r + 1)C1xr +(r + 2)C2x

r+1 +(r + 3)C3xr+2 ...

x d2ydx2 = r(r − 1)C0x

r−1 +(r + 1)rC1xr +(r + 2)(r + 1)C2x

r+1 +(r + 3)(r + 2)C3xr+2 ...

We have orphan terms inxr−1 and can start the series atxr.

py = +∑∞

n=0 xr+npCn

−x dydx = −

∑∞n=0 xr+n(r + n)Cn

dydx = rC0x

r−1 +∑∞

n=0 xr+n(r + n + 1)Cn+1

x d2ydx2 = r(r − 1)C0x

r−1 +∑∞

n=0 xr+n(r + n + 1)(r + n)Cn+1

Summing the four elements of the equation and equating to zero, we have:

0 = xr−1C0(r+r2−r)+∞∑

n=0

xr+n[pCn−(r+n)Cn+(r+n+1)Cn+1+(r+n+1)(r+n)Cn+1] .

We equate the coefficient of each power ofx to zero, and since we disallowC0 = 0, thexr−1

term gives us the indicial equation:r2 = 0, i.e. a single repeated solutionr = 0, so we can onlyget a single series solution by the standard method.

5

Page 22: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Settingr = 0, the coefficient in the sum term provides the recursion relation:

Cn+1 =−Cn(p− n)

(n + 1)2,

from which we can getC1, C2, C3, ... in terms ofC0, as follows:

n=0 term: C1 = − p(0+1)2

C0 = − p12 C0

n=1 term: C2 = − p−1(1+1)2

C1 = (p−1)p2212 C0

n=2 term: C3 = − p−2(2+1)2

C2 = − (p−2)(p−1)p322212 C0

or, generally,

Cn =(−1)np(p− 1)(p− 2) . . . (p− (n− 1))

(n!)2C0 .

A series solution of the Laguerre equation is thus

y = C0

∞∑n=0

(−1)np(p− 1)(p− 2) . . . (p− (n− 1))xn

(n!)2.

If p=N is an integer, the numerator of every term withn > N contains a factor(N−((N +1)−1)) = 0. The series therefore terminates after theN th term, yielding theN th order LaguerrepolynomialLN (x).

6

Page 23: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Differential Equations

Answers to Problem Sheet 4

Partial Differential Equations

1. The Fouriersin series for

f(x) =

{2hx/L 0 ≤ x ≤ L/22h(L− x)/L L/2 ≤ x ≤ L

is the Fourier series for the periodic antisymmetric extension off(x).

Since the extended function is antisymmetric, its Fourier series only hassin terms, and since itsrepeat length is2L, all thosesin terms must also have repeat length2L. The Fourier representa-tion of the antisymmetric extended function therefore takes the form

fextended(x) =∞∑

n=1

cn sin(

2nπx

2L

),

where

cn =2

2L

∫ L

−Lfextended(x) sin

(2nπx

2L

)dx .

This is the standard formula for the Fouriersin coefficients of a periodic function with repeatlength2L.

Becausefextended is an odd function, the integrand appearing in the integral that givescn is evenand we obtain

cn =2L

∫ L

0fextended(x) sin

(2nπx

2L

)dx =

2L

∫ L

0f(x) sin

(nπx

L

)dx .

This is the standard formula for the coefficients of a half-range Fouriersin series.

To find the Fouriersin series, we have to evaluate the integral

cn =2L

∫ L/2

0

2hx

Lsin

(nπx

L

)dx +

2L

∫ L

L/22h

(1− x

L

)sin

(nπx

L

)dx .

Now start to make your life easy by noting that forn even the second integral will always be thenegative of the first integral (sketch the functions), so the sum will be zero forn even.

Forn odd, observe that the second integral will be equal to the first integral, so we only have toevaluate the integral

cn =8h

L2

∫ L/2

0x sin

(nπx

L

)dx ,

for n odd. Integrating by parts we obtain

cn =8h

L2

[−xL

nπcos

(nπx

L

)+

L2

n2π2sin

(nπx

L

)]L/2

0

=8h

n2π2sin

(nπ

2

).

1

Page 24: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

So the required half-range Fouriersin series is

f(x) =8h

π2

∞∑n=1,3,5,...

1n2

sin(

2

)sin

(nπx

L

).

2. (a) Inserting the trial solution gives

Td2X

dx2=

X

v2

d2T

dt2.

Rearranging this becomes1X

d2X

dx2=

1v2T

d2T

dt2.

Since the LHS depends only onX and the RHS depends only onT each term must be equalto a constant which we write asS = ±k2. Therefore there are two ordinary differentialequations:

d2X

dx2= ±k2X ,

andd2T

dt2= ±k2v2T .

[6 marks]

(b) Considering the first equation, forS = +k2 it is impossible to satisfy the boundary condi-tions, whereas forS = 0 there is only a trivial solutionX = 0. ThereforeS = −k2, andthe solution isX = C1 sin(kx) + C2 cos(kx). To satisfy the boundary conditions,C2 = 0and the eigenvalues arek = nπ/L, n = 1,∞. Therefore the second equation becomes

d2T

dt2= −n2π2v2

L2T ,

with solution

T = C3 sin(

nπvt

L

)+ C4 cos

(nπvt

L

).Therefore the solution for particularn is given by

u = sin(

nπx

L

) [An sin

(nπvt

L

)+ Bn cos

(nπvt

L

)],

whereAn, Bn are arbitrary constants.The general solution is a linear combination of all possible solutions, and therefore equatesto the expression in the question. [6 marks]

(c) Sinceu(x, 0) = 0, Bn = 0 for all n. Then, differentiating yields

∂u

∂t(x, 0) =

∞∑n=1

Annπv

Lsin(

nπx

L) = f(x) ,

wheref(x) is the triangular function given in the question.In the exam you would evaluate the Fourier series, but here we can use the answer toquestion 2 to obtain the coefficientsAn, by simply scaling the result from 2 by the factora0L/(nπvh), i.e.

An =8a0L

n3π3vsin

(nπ

2

)[8 marks]

2

Page 25: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

3. (a) Any functionΘ(x) that satisfies∂2Θ∂x2

= 0

is a steady-state solution of the heat equation. The general steady-state solution is

Θ(x, t) = a + bx ,

wherea andb are arbitrary constants. The boundary conditionsΘ(x = 0) = a = Θ0 andΘ(x = L) = a + bL = ΘL imply that

a = Θ0 and b =ΘL −Θ0

L.

Hence, the initial steady-state temperature distribution is

Θ(x) = Θ0 +ΘL −Θ0

Lx .

(b) i. The boundary condition atx=0 is that no heat is flowing in or out of the end of therod. This implies that the temperature gradient atx=0 is zero:

∂Θ(x, t)∂x

∣∣∣∣x=0

= 0 .

ii. The boundary condition atx=L is that no heat is flowing in or out of the end of therod. This implies that the temperature gradient atx=L is zero:

∂Θ(x, t)∂x

∣∣∣∣x=L

= 0 .

iii. The initial condition att=0 for 0≤x≤L is that the initial temperature distribution isthe steady-state temperature distribution:

Θ(x, t = 0) = Θ0 +ΘL −Θ0

Lx , 0 ≤ x ≤ L .

(c) Writing Θ(x, t) = X(x)T (t) and substituting into the heat equation gives

X(x)D

∂T (t)∂t

= T (t)∂2X(x)

∂x2,

and hence1

DT (t)∂T

∂t=

1X(x)

∂2X

∂x2.

Since the LHS is a function oft only and the RHS is a function ofx only, both sides mustbe equal to the same constant, which we write as±k2:

dT

dt= ±Dk2T (t) ,

d2X

dx2= ±k2X(x) ,

where the equations are written as ordinary differential equations, since in each equationthere is only one independent variable.[In the following, subscript notation is used, e.g.Θx implies∂Θ/∂x.]Consider the equation forX(x) first, treating the three cases (separation constant zero, sep-aration constantk2, and separation constant−k2) separately. Note that the homogeneousboundary conditionsΘx(0, t) = Θx(L, t) = 0 imply thatXx(0) = Xx(L) = 0.

3

Page 26: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Zero separation constant: The general solution ofXxx=0 is

X(x) = α + βx ,

whereα andβ are arbitrary constants. The boundary conditionsXx(0)=0 andXx(L)=0imply thatβ=0, leading to the spatial eigenfunctionX(x) = α. The correspondingfunction of time,T (t), satisfies the equationTt=0, the general solution of which isT (t)=γ, whereγ is another arbitrary constant. The full separable solution for zeroseparation constant is thus

X(x)T (t) = c0 ,

wherec0 = αγ is also an arbitrary constant.Positive separation constant:The general solution ofXxx=k2X is

X(x) = αekx + βe−kx ,

whereα andβ are arbitrary constants. The boundary conditionsXx(0)=0 andXx(L)=0imply that

αk − βk = 0 and αkekL − βke−kL = 0 .

Multiplying the first equation bye−kL and then subtracting it from the second equationgives

αk(ekL − e−kL

)= 0 .

SinceL6=0 andk is positive by assumption, it follows thatα=0 and hence (substitut-ing α=0 back into either of the simultaneous equations obtained from the boundaryconditions) thatβ=0 also. This shows that the only solution with positive separationconstant is the trivial solutionX(x)=0.

Negative separation constant:The general solution ofXxx=−k2X is

X(x) = α cos(kx) + β sin(kx) ,

whereα andβ are arbitrary constants. The boundary conditionsXx(0)=0 andXx(L)=0imply that

kβ = 0 and − kα sin(kL) + kβ cos(kL) = 0 .

The first of these equations implies thatβ=0. For almost all values ofk, the secondequation then implies thatα=0, leading only to the trivial solutionX(x)=0. If k isan integer multiple ofπ/L, however,sin(kL)=0 and the value ofα is undetermined.These special values ofk yield the spatial eigenfunctions

X(x) = α cos(

nπx

L

), n = 1, 2, . . . .

The functionT (t) that corresponds toX(x) satisfies the equation

∂T

∂t= −Dk2T = −n2π2D

L2T ,

the solution of which isT (t) = γ exp(−n2π2D

L2 t), whereγ is an arbitrary constant.

The full separable solution for the negative separation constant−k2 = −n2π2/L2 isthus

X(x)T (t) = an cos(

nπx

L

)e−

n2π2DL2 t ,

wherean = αγ is an arbitrary constant.

4

Page 27: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

Since the separable solutions obtained for zero and negative separation constants all satisfythe heat equation and the homogeneous boundary conditions, so does the arbitrary linearcombination

Θ(x, t) = c0 +∞∑

n=1

an cos(

nπx

L

)e−

n2π2DL2 t .

To obtain the temperature distribution in the rod for all timest>0, we have to find theconstantsc0, a1, a2, a3, . . . for which this linear combination satisfies the initial condition

Θ(x, 0) = Θ0 +ΘL −Θ0

Lx .

(d) We seek coefficientsc0 (which we shall calla0/2), a1, a2, a3, . . . such that

Θ(x, 0) =a0

2+

∞∑n=1

an cos(

nπx

L

)= Θ0 +

ΘL −Θ0

Lx .

To save typing, the constant(ΘL −Θ0)/L will be denoted byΛ from now on. The initialcondition may then be written as

Θ0 + Λx =a0

2+

∞∑n=1

an cos(

2nπx

2L

),

in which form it is clear that the RHS is the Fourier expansion of a symmetric function ofperiod2L. (We know that the function is symmetric because there are nosin terms, andwe know that the repeat length is2L because

cos(

2nπ(x + 2L)2L

)= cos

(2nπx

2L+ 2nπ

)= cos

(2nπx

2L

)for any integern.) This implies that the constantsa0, a1, a2, . . . must be the Fouriercoefficients of the periodic symmetric extension,

fsymm(x) = Θ0 + Λ|x| − L ≤ x ≤ L

fsymm(x + 2Ln) = fsymm(x) n any integer

of the functionΘ0 + Λx.

The Fourier coefficients offsymm(x) may be obtained using the standard procedure, whichis to multiply both sides of the Fourier expansion

fsymm(x) =a0

2+

∞∑n=1

an cos(

2nπx

2L

)

by cos(

2mπx2L

)and integrate over one complete period (e.g., from−L to L):

∫ L

−Lfsymm(x) cos

(2mπx

2L

)dx =

a0

2

∫ L

−Lcos

(2mπx

2L

)dx

+∞∑

n=1

an

∫ L

−Lcos

(2nπx

2L

)cos

(2mπx

2L

)dx .

Since the integral of anysin or cos function over a whole number of periods is zero, thefirst integral on the RHS vanishes unlessm=0, in which case it is equal to2L. Using the

5

Page 28: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

formulacos(a) cos(b) = 12 [cos(a + b) + cos(a− b)], the second integral on the RHS may

be written as

12

∫ L

−Lcos

(2(n + m)πx

2

)+ cos

(2(n−m)πx

2L

)dx ,

which evaluates to zero ifm6=n or toL if m=n. The formula foram, which works for allm (includingm=0), is therefore

am =1L

∫ L

−Lfsymm(x) cos

(2mπx

2L

)dx =

2L

∫ L

0f(x) cos

(2mπx

2L

)dx .

Settingm equal to0 gives

a0 =2L

∫ L

0(Θ0 + Λx) dx = 2Θ0 + ΛL .

For non-zerom, we obtain

am =2L

∫ L

0(Θ0 + Λx) cos

(2mπx

2L

)dx =

2ΛL

∫ L

0x cos

(2mπx

2L

)dx

=2ΛL

[x

2L

2mπsin

(2mπ

2Lx

)]L

0− 2Λ

L

2L

2mπ

∫ L

0sin

(2mπ

2Lx

)dx

= − 2Λmπ

∫ L

0sin

(2mπ

2Lx

)dx =

2Λmπ

2L

2mπ

[cos

(2mπx

2L

)]L

0

=2ΛL

m2π2(cos(mπ)− 1) =

2ΛL

m2π2((−1)m − 1) .

Putting the expressions fora0 andam back into Fouriercos expansion offsymm(x) gives

fsymm(x) = Θ0 + 12ΛL +

2ΛL

π2

∞∑n=1

(−1)n − 1n2

cos(

2nπx

2L

),

or, replacingΛ by (ΘL −Θ0)/L,

fsymm(x) =Θ0 + ΘL

2+

2(ΘL −Θ0)π2

∞∑n=1

[(−1)n − 1]n2

cos(

nπx

L

).

This function is symmetric and periodic with period2L, but equals the initial conditionΘ(x, 0) = Θ0 + ΘL−Θ0

L x when0≤x≤L.

Finally, substituting the Fourier coefficientsa0 (= 2c0), a1, a2, . . ., back into the generalexpression for the solution of the PDE derived in Q3, we obtain

Θ(x, t) =Θ0 + ΘL

2+

2(ΘL −Θ0)π2

∞∑n=1

[(−1)n − 1]n2

cos(

nπx

L

)e−

n2π2DL2 t .

(e) Ast →∞, the temperature at all pointsx tends to the average temperatureΘ0+ΘL2 .

4. (i) Substituting the separable solutionu(x, t) = X(x)T (t) into the PDE gives

TX ′′ = (1 + t)XT ′

6

Page 29: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

and hence, dividing through byXT ,

X ′′

X=

(1 + t)T ′

T.

Since the LHS is a function ofx only, while the RHS is a function oft only, the equalityimplies that both sides must be equal to a constant,−k2, which we are told to assume isnegative. Hence

X ′′

X= −k2 =

(1 + t)T ′

T.

This separates to give two ODEs,

X ′′ = −k2X and T ′ =−k2

1 + tT ,

as required. [5 marks]

(ii) The general solution of the ODEX ′′ = −k2X is X(x) = c1 sin(kx) + c2 cos(kx). Thehomogeneous boundary conditionsu(0, t) = u(L, t) = 0 imply thatX(0) = X(L) = 0and hence

c2 = 0 and c1 sin(kL) = 0 .

The second of these implies that eitherc1 is zero (yielding only the trivial solutionX(x) =0) or kL = nπ, in which casec1 is undetermined. The allowed values ofk and thecorresponding spatial eigenfunctions are thus

kn =nπ

L, Xn(x) = an sin

(nπx

L

), n = 1, 2, 3, . . . ,

wherean is an arbitrary constant.

The functionTn(t) that goes withXn(x) satisfies the ODE

dTn

dt=

−k2n

1 + tTn =

−n2π2

L2(1 + t)Tn .

This is a separable equation:∫dTn

Tn=

−n2π2

L2

∫dt

1 + t

ln(Tn) =−n2π2

L2ln[c(1 + t)]

Tn(t) = bn(1 + t)−n2π2

L2

wherebn is an arbitrary constant.

Combining the two parts,Xn(x) andTn(t), of the separable solutionun(x, t) gives therequired result:

un(x, t) =cn sin(nπx/L)(1 + t)n2π2/L2 , n = 1, 2, 3, . . . ,

wherecn = anbn. [7 marks]

7

Page 30: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions

(iii) By taking an arbitrary linear combination of the separable solutions from part (ii), we canobtain a general solution of the PDE subject to the homogeneous boundary conditions:

u(x, t) =∞∑

n=1

cnsin(nπx/L)

(1 + t)n2π2/L2 .

Since we are told that

u(x, 0) =∞∑

n=1

1n2

sin(

nπx

L

).

it follows thatcn = 1/n2. The solution we require is thus

u(x, t) =∞∑

n=1

sin(nπx/L)n2(1 + t)n2π2/L2 .

[4 marks]

(iv) As t→∞, the(1 + t)n2π2/L2factor appearing in the denominator of thenth term of the

series tends to infinity. Every term in the series therefore tends to zero.

The denominator that diverges the most slowly is the one with the smallest value ofn.Hence, the term that tends to zero the most slowly is then=1 term.

Whent is very large but finite, then=1 term (small though it is) dominates the series andwe can make the approximation

u(x, t) ≈ sin(1πx/L)12(1 + t)12π2/L2 ≈ sin(πx/L)

tπ2/L2 ,

i.e. spatially a half sin wave, decaying as a power law int. [4 marks]

8

Page 31: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions
Page 32: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions
Page 33: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions
Page 34: Differential Equations - Bartholomew Andrews€¦ · Differential Equations Problem Sheet 1 3rd November 2011 First-Order Ordinary Differential Equations 1. Find the general solutions