Math 260: Solving the heat equation

Similar documents
Lecture 24. Scott Pauls 5/21/07

Partial Differential Equations Summary

Strauss PDEs 2e: Section Exercise 4 Page 1 of 6

Partial Differential Equations Separation of Variables. 1 Partial Differential Equations and Operators

Solving the Heat Equation (Sect. 10.5).

MA 201: Method of Separation of Variables Finite Vibrating String Problem Lecture - 11 MA201(2016): PDE

The One-Dimensional Heat Equation

Analysis III (BAUG) Assignment 3 Prof. Dr. Alessandro Sisto Due 13th October 2017

Wave Equation With Homogeneous Boundary Conditions

Lecture Notes for Math 251: ODE and PDE. Lecture 32: 10.2 Fourier Series

LECTURE 19: SEPARATION OF VARIABLES, HEAT CONDUCTION IN A ROD

6 Non-homogeneous Heat Problems

2.4 Eigenvalue problems

Math Assignment 14

The lecture of 1/23/2013: WHY STURM-LIOUVILLE?

MATH 425, HOMEWORK 5, SOLUTIONS

Midterm 2: Sample solutions Math 118A, Fall 2013

Partial differential equation for temperature u(x, t) in a heat conducting insulated rod along the x-axis is given by the Heat equation:

# Points Score Total 100

Review For the Final: Problem 1 Find the general solutions of the following DEs. a) x 2 y xy y 2 = 0 solution: = 0 : homogeneous equation.

Method of Separation of Variables

Math 2930 Worksheet Final Exam Review

The One Dimensional Heat Equation

CHAPTER 10 NOTES DAVID SEAL

A Guided Tour of the Wave Equation

Partial Differential Equations

a n cos 2πnt L n=1 {1/2, cos2π/l, cos 4π/L, cos6π/l,...,sin 2π/L, sin 4π/L, sin 6π/L,...,} (2)

Connection to Laplacian in spherical coordinates (Chapter 13)

Computer Problems for Fourier Series and Transforms

Homework 6 Math 309 Spring 2016

Separation of Variables. A. Three Famous PDE s

Differential Equations

Sequences and infinite series

Diffusion on the half-line. The Dirichlet problem

Solving Nonhomogeneous PDEs (Eigenfunction Expansions)

Math 201 Assignment #11

Undamped Vibration of a Beam

Boundary value problems for partial differential equations

MAT 372 K.T.D.D. Final Sınavın Çözümleri N. Course. Question 1 (Canonical Forms). Consider the second order partial differential equation

1 Separation of Variables

ENGI 9420 Lecture Notes 8 - PDEs Page 8.01

The General Dirichlet Problem on a Rectangle

The 1-D Heat Equation

Partial Differential Equations

MA 201: Differentiation and Integration of Fourier Series Applications of Fourier Series Lecture - 10

Math Lecture 4 Limit Laws

Math221: HW# 7 solutions

Class Meeting # 2: The Diffusion (aka Heat) Equation

The 1-D Heat Equation

ENGI 9420 Lecture Notes 8 - PDEs Page 8.01

Take Home Exam I Key

Math 251 December 14, 2005 Answer Key to Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

DIFFERENTIAL EQUATIONS

8.5 Taylor Polynomials and Taylor Series

The Heat Equation with partial differential equations

Second-Order Homogeneous Linear Equations with Constant Coefficients

Wave Equation Dirichlet Boundary Conditions

Many problems in physics, engineering, and chemistry fall in a general class of equations of the form. d dx. d dx

swapneel/207

MATH 251 Final Examination August 14, 2015 FORM A. Name: Student Number: Section:

Power series and Taylor series

14 Separation of Variables Method

Overview of Fourier Series (Sect. 6.2). Origins of the Fourier Series.

A proof for the full Fourier series on [ π, π] is given here.

Integrals. D. DeTurck. January 1, University of Pennsylvania. D. DeTurck Math A: Integrals 1 / 61

What is proof? Lesson 1

19. TAYLOR SERIES AND TECHNIQUES

Some Review Problems for Exam 1: Solutions

Methods of Mathematics

THE METHOD OF SEPARATION OF VARIABLES

Homogeneous Linear Systems and Their General Solutions

Reverse engineering using computational algebra

Fourier and Partial Differential Equations

Lecture 11: Fourier Cosine Series

17 Source Problems for Heat and Wave IB- VPs

Lecture Notes for Math 251: ODE and PDE. Lecture 30: 10.1 Two-Point Boundary Value Problems

Problem set 3: Solutions Math 207B, Winter Suppose that u(x) is a non-zero solution of the eigenvalue problem. (u ) 2 dx, u 2 dx.

Math 425 Fall All About Zero

MATH 241 Practice Second Midterm Exam - Fall 2012

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

MATH 308 COURSE SUMMARY

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

8.7 MacLaurin Polynomials

Number Systems III MA1S1. Tristan McLoughlin. December 4, 2013

Eigenvalue Problem. 1 The First (Dirichlet) Eigenvalue Problem

Mathematical Methods: Fourier Series. Fourier Series: The Basics

Math53: Ordinary Differential Equations Autumn 2004

Chapter 18. Remarks on partial differential equations

This Week. Professor Christopher Hoffman Math 124

Week 2 Techniques of Integration

Homework #04 Answers and Hints (MATH4052 Partial Differential Equations)

LEGENDRE POLYNOMIALS AND APPLICATIONS. We construct Legendre polynomials and apply them to solve Dirichlet problems in spherical coordinates.

Examples of the Fourier Theorem (Sect. 10.3). The Fourier Theorem: Continuous case.

More on Fourier Series

MATH 312 Section 4.5: Undetermined Coefficients

MATH 124B Solution Key HW 03

Solutions to the Sample Problems for the Final Exam UCLA Math 135, Winter 2015, Professor David Levermore

Continuum Limit and Fourier Series

Physics 486 Discussion 5 Piecewise Potentials

Partial Differential Equations for Engineering Math 312, Fall 2012

Transcription:

Math 260: Solving the heat equation D. DeTurck University of Pennsylvania April 25, 2013 D. DeTurck Math 260 001 2013A: Solving the heat equation 1 / 1

1D heat equation with Dirichlet boundary conditions We derived the one-dimensional heat equation u t = ku xx and found that it s reasonable to expect to be able to solve for u(x, t) (with x [a, b] and t > 0) provided we impose initial conditions: u(x, 0) = f (x) for x [a, b] and boundary conditions such as u(a, t) = p(t), u(b, t) = q(t) for t > 0. We showed that this problem has at most one solution, now it s time to show that a solution exists. D. DeTurck Math 260 001 2013A: Solving the heat equation 2 / 1

Linearity We ll begin with a few easy observations about the heat equation u t = ku xx, ignoring the initial and boundary conditions for the moment: D. DeTurck Math 260 001 2013A: Solving the heat equation 3 / 1

Linearity We ll begin with a few easy observations about the heat equation u t = ku xx, ignoring the initial and boundary conditions for the moment: Since the heat equation is linear (and homogeneous), a linear combination of two (or more) solutions is again a solution. So if u 1, u 2,... are solutions of u t = ku xx, then so is c 1 u 1 + c 2 u 2 + for any choice of constants c 1, c 2,.... (Likewise, if u λ (x, t) is a solution of the heat equation that depends (in a reasonable way) on a parameter λ, then for any (reasonable) function f (λ) the function is also a solution. U(x, t) = ˆ λ2 λ 1 f (λ)u λ (x, t) dλ D. DeTurck Math 260 001 2013A: Solving the heat equation 3 / 1

Linearity and initial/boundary conditions We can take advantage of linearity to address the initial/boundary conditions one at a time. D. DeTurck Math 260 001 2013A: Solving the heat equation 4 / 1

Linearity and initial/boundary conditions We can take advantage of linearity to address the initial/boundary conditions one at a time. For instance, we will spend a lot of time on initial-value problems with homogeneous boundary conditions: u t = ku xx, u(x, 0) = f (x), u(a, t) = u(b, t) = 0. D. DeTurck Math 260 001 2013A: Solving the heat equation 4 / 1

Linearity and initial/boundary conditions We can take advantage of linearity to address the initial/boundary conditions one at a time. For instance, we will spend a lot of time on initial-value problems with homogeneous boundary conditions: u t = ku xx, u(x, 0) = f (x), u(a, t) = u(b, t) = 0. Then we ll consider problems with zero initial conditions but non-zero boundary values. D. DeTurck Math 260 001 2013A: Solving the heat equation 4 / 1

Linearity and initial/boundary conditions We can take advantage of linearity to address the initial/boundary conditions one at a time. For instance, we will spend a lot of time on initial-value problems with homogeneous boundary conditions: u t = ku xx, u(x, 0) = f (x), u(a, t) = u(b, t) = 0. Then we ll consider problems with zero initial conditions but non-zero boundary values. We can add these two kinds of solutions together to get solutions of general problems, where both the initial and boundary values are non-zero. D. DeTurck Math 260 001 2013A: Solving the heat equation 4 / 1

Symmetry Some more observations: If u(x, t) is a solution, then so is u(a ± x, b + t) for any constants a and b. Note the ± with the x but only + with t you can t reverse time with the heat equation. This shows that the heat equation respects (or reflects) the second law of thermodynamics (you can t unstir the cream from your coffee). D. DeTurck Math 260 001 2013A: Solving the heat equation 5 / 1

Symmetry Some more observations: If u(x, t) is a solution, then so is u(a ± x, b + t) for any constants a and b. Note the ± with the x but only + with t you can t reverse time with the heat equation. This shows that the heat equation respects (or reflects) the second law of thermodynamics (you can t unstir the cream from your coffee). If u(x, t) is a solution then so is u(a 2 t, at) for any constant a. We ll use this observation later to solve the heat equation in a surprising way, but for now we ll just store it in our memory bank. D. DeTurck Math 260 001 2013A: Solving the heat equation 5 / 1

Polynomial solutions Now it s time to at least find some examples of solutions to u t = ku xx. One thing we can try is polynomial solutions. Certainly any linear function of x is a solution. D. DeTurck Math 260 001 2013A: Solving the heat equation 6 / 1

Polynomial solutions Now it s time to at least find some examples of solutions to u t = ku xx. One thing we can try is polynomial solutions. Certainly any linear function of x is a solution. Next, taking our cue from the initial-value problem, suppose u(x, 0) = p 0 (x) for some polynomial p 0 (x), and try to construct a solution of the form u(x, t) = p 0 (x) + tp 1 (x) + t 2 p 2 (x) + D. DeTurck Math 260 001 2013A: Solving the heat equation 6 / 1

Polynomial solutions Now it s time to at least find some examples of solutions to u t = ku xx. One thing we can try is polynomial solutions. Certainly any linear function of x is a solution. Next, taking our cue from the initial-value problem, suppose u(x, 0) = p 0 (x) for some polynomial p 0 (x), and try to construct a solution of the form u(x, t) = p 0 (x) + tp 1 (x) + t 2 p 2 (x) + We have u t = p 1 (x) + 2tp 2 (x) + 3t 2 p 3 (x) + and u xx = p 0(x) + tp 1(x) + t 2 p 2(x) + D. DeTurck Math 260 001 2013A: Solving the heat equation 6 / 1

Polynomial solutions So the heat equation tells us: p 1 = kp 0, p 2 = k 2 p 1 = k2 2 p 0, p 3 = k 3 p 2 = k3 3! p(6) 0,..., p n = kn n! p(2n) 0 This process will stop if p 0 is a polynomial, and we ll get a polynomial solution of the heat equation whose x-degree is twice its t-degree: u(x, t) = p 0 (x) + kt 1! p 0 + k2 t 2 2! p 0 + + kn t n n! p (2n) 0 +. D. DeTurck Math 260 001 2013A: Solving the heat equation 7 / 1

But... The trouble with polynomial solutions, or even with extending the idea of polynomials to power series in two variables (ick!), is that it would be very difficult if not impossible to figure out how to choose the coefficients of the polynomial p 0 so that the boundary values, even simple ones, would be matched at both ends. There are also tricky convergence questions, etc for power series, and we don t want to get overwhelmed with these. D. DeTurck Math 260 001 2013A: Solving the heat equation 8 / 1

Separation of variables A more fruitful strategy is to look for separated solutions of the heat equation, in other words, solutions of the form u(x, t) = X (x)t (t). D. DeTurck Math 260 001 2013A: Solving the heat equation 9 / 1

Separation of variables A more fruitful strategy is to look for separated solutions of the heat equation, in other words, solutions of the form u(x, t) = X (x)t (t). If we substitute X (x)t (t) for u in the heat equation u t = ku xx we get: X dt dt = k d 2 X dx 2 T. D. DeTurck Math 260 001 2013A: Solving the heat equation 9 / 1

Separation of variables A more fruitful strategy is to look for separated solutions of the heat equation, in other words, solutions of the form u(x, t) = X (x)t (t). If we substitute X (x)t (t) for u in the heat equation u t = ku xx we get: X dt dt = k d 2 X dx 2 T. Divide both sides by kxt and get 1 dt kt dt = 1 d 2 X X dx 2. D. DeTurck Math 260 001 2013A: Solving the heat equation 9 / 1

Separation of Variables So if u(x, t) = X (x)t (t) then T kt = X X. D. DeTurck Math 260 001 2013A: Solving the heat equation 10 / 1

Separation of Variables So if u(x, t) = X (x)t (t) then T kt = X X. In this last equation, everything on the left side is a function of t, and everything on the right side is a function of x. This means that both sides are constant, say equal to λ which gives ODEs for X and T : X λx = 0 T kλt = 0 D. DeTurck Math 260 001 2013A: Solving the heat equation 10 / 1

Separation of Variables So if u(x, t) = X (x)t (t) then T kt = X X. In this last equation, everything on the left side is a function of t, and everything on the right side is a function of x. This means that both sides are constant, say equal to λ which gives ODEs for X and T : X λx = 0 T kλt = 0 The power of this method comes in the application of boundary conditions, which we turn to next. D. DeTurck Math 260 001 2013A: Solving the heat equation 10 / 1

Boundary conditions ODEs for X and T : X λx = 0 T kλt = 0 As an example, let s suppose the x-interval goes from 0 to L, and we have homogeneous Dirichlet conditions: u(0, t) = u(l, t) = 0 for all t. D. DeTurck Math 260 001 2013A: Solving the heat equation 11 / 1

Boundary conditions ODEs for X and T : X λx = 0 T kλt = 0 As an example, let s suppose the x-interval goes from 0 to L, and we have homogeneous Dirichlet conditions: u(0, t) = u(l, t) = 0 for all t. This implies that λ can t be positive or zero (since solutions to X λx = 0 with λ 0 can t be zero twice without being identically zero) D. DeTurck Math 260 001 2013A: Solving the heat equation 11 / 1

Boundary conditions ODEs for X and T : X λx = 0 T kλt = 0 As an example, let s suppose the x-interval goes from 0 to L, and we have homogeneous Dirichlet conditions: u(0, t) = u(l, t) = 0 for all t. This implies that λ can t be positive or zero (since solutions to X λx = 0 with λ 0 can t be zero twice without being identically zero) So let λ = α 2. The general solution of X + α 2 X = 0 is X = c 1 cos αx + c 2 sin αx D. DeTurck Math 260 001 2013A: Solving the heat equation 11 / 1

Boundary conditions ODEs for X and T : X λx = 0 T kλt = 0 As an example, let s suppose the x-interval goes from 0 to L, and we have homogeneous Dirichlet conditions: u(0, t) = u(l, t) = 0 for all t. This implies that λ can t be positive or zero (since solutions to X λx = 0 with λ 0 can t be zero twice without being identically zero) So let λ = α 2. The general solution of X + α 2 X = 0 is X = c 1 cos αx + c 2 sin αx The easiest way to satisfy the boundary conditions on u is to insist that X (0) = X (L) = 0. What does this imply? D. DeTurck Math 260 001 2013A: Solving the heat equation 11 / 1

Restrictions on α We have X = c 1 cos αx + c 2 sin αx, X (0) = 0, X (L) = 0. D. DeTurck Math 260 001 2013A: Solving the heat equation 12 / 1

Restrictions on α We have X = c 1 cos αx + c 2 sin αx, X (0) = 0, X (L) = 0. First, note that X (0) = c 1. The condition X (0) = 0 then forces c 1 = 0. D. DeTurck Math 260 001 2013A: Solving the heat equation 12 / 1

Restrictions on α We have X = c 1 cos αx + c 2 sin αx, X (0) = 0, X (L) = 0. First, note that X (0) = c 1. The condition X (0) = 0 then forces c 1 = 0. Now we need to reconcile three things: X = c 2 sin αx, X (L) = 0 and we don t want X to be identically zero (i.e., we want c 2 0). D. DeTurck Math 260 001 2013A: Solving the heat equation 12 / 1

Restrictions on α We have X = c 1 cos αx + c 2 sin αx, X (0) = 0, X (L) = 0. First, note that X (0) = c 1. The condition X (0) = 0 then forces c 1 = 0. Now we need to reconcile three things: X = c 2 sin αx, X (L) = 0 and we don t want X to be identically zero (i.e., we want c 2 0). This gives a condition on α: sin αl = 0, or αl = nπ for some integer n. D. DeTurck Math 260 001 2013A: Solving the heat equation 12 / 1

Restrictions on α We have X = c 1 cos αx + c 2 sin αx, X (0) = 0, X (L) = 0. First, note that X (0) = c 1. The condition X (0) = 0 then forces c 1 = 0. Now we need to reconcile three things: X = c 2 sin αx, X (L) = 0 and we don t want X to be identically zero (i.e., we want c 2 0). This gives a condition on α: sin αl = 0, or αl = nπ for some integer n. Since sin( x) = sin x, we need only consider positive integers n. Thus α = nπ L, n = 1, 2, 3,... and X = c 2 sin nπx L, n = 1, 2, 3,... D. DeTurck Math 260 001 2013A: Solving the heat equation 12 / 1

Implications for λ and T Now, recall that λ = α 2, and the T equation was T kλt = 0. D. DeTurck Math 260 001 2013A: Solving the heat equation 13 / 1

Implications for λ and T Now, recall that λ = α 2, and the T equation was T kλt = 0. And we know that α = nπ/l for n = 1, 2, 3,..., so we have to solve T + n2 kπ 2 L 2 T = 0, n = 1, 2, 3.... D. DeTurck Math 260 001 2013A: Solving the heat equation 13 / 1

Implications for λ and T Now, recall that λ = α 2, and the T equation was T kλt = 0. And we know that α = nπ/l for n = 1, 2, 3,..., so we have to solve T + n2 kπ 2 L 2 T = 0, n = 1, 2, 3.... The general solution of these are T = ce n2 kπ 2 t/l 2, n = 1, 2, 3,.... D. DeTurck Math 260 001 2013A: Solving the heat equation 13 / 1

Implications for λ and T Now, recall that λ = α 2, and the T equation was T kλt = 0. And we know that α = nπ/l for n = 1, 2, 3,..., so we have to solve T + n2 kπ 2 L 2 T = 0, n = 1, 2, 3.... The general solution of these are T = ce n2 kπ 2 t/l 2, n = 1, 2, 3,.... Putting this together with our X solutions, we get solutions u(x, t) of the form: u(x, t) = b n e n2 kπ 2 t/l 2 sin nπx L, n = 1, 2, 3,... D. DeTurck Math 260 001 2013A: Solving the heat equation 13 / 1

Superposition, again We can put these solutions together to get solutions of the form u(x, t) = b 1 e kπ2 t/l 2 sin πx L + b 2e 4π2 t/l 2 sin 2πx L + + b N e N2 kπ 2 t/l 2 sin Nπx L. D. DeTurck Math 260 001 2013A: Solving the heat equation 14 / 1

Superposition, again We can put these solutions together to get solutions of the form u(x, t) = b 1 e kπ2 t/l 2 sin πx L + b 2e 4π2 t/l 2 sin 2πx L + + b N e N2 kπ 2 t/l 2 sin Nπx L. This function u(x, t) automatically satisfies the boundary conditions u(0, t) = u(l, t) = 0, since all of the pieces do. And it would be great for satisfying initial conditions given in trigonometric form for example u(x, 0) = 3 sin πx L 2 sin 3πx L 6πx + sin L. D. DeTurck Math 260 001 2013A: Solving the heat equation 14 / 1

Taking things to the limit But what if the initial condition isn t trigonometric? Could we consider adding together an infinite number of pieces? As in u(x, t) = n=1 b n e n2 kπ 2 t/l 2 sin nπx L D. DeTurck Math 260 001 2013A: Solving the heat equation 15 / 1

Taking things to the limit But what if the initial condition isn t trigonometric? Could we consider adding together an infinite number of pieces? As in u(x, t) = n=1 b n e n2 kπ 2 t/l 2 sin nπx L Then the initial values would be f (x) = b n sin nπx L. n=1 D. DeTurck Math 260 001 2013A: Solving the heat equation 15 / 1

Taking things to the limit But what if the initial condition isn t trigonometric? Could we consider adding together an infinite number of pieces? As in u(x, t) = n=1 b n e n2 kπ 2 t/l 2 sin nπx L Then the initial values would be f (x) = b n sin nπx L. n=1 So the question is, which functions f (x) (for x in the interval [0, L]) can be expressed as an infinite series of sines? D. DeTurck Math 260 001 2013A: Solving the heat equation 15 / 1

Taking things to the limit But what if the initial condition isn t trigonometric? Could we consider adding together an infinite number of pieces? As in u(x, t) = n=1 b n e n2 kπ 2 t/l 2 sin nπx L Then the initial values would be f (x) = b n sin nπx L. n=1 So the question is, which functions f (x) (for x in the interval [0, L]) can be expressed as an infinite series of sines? The (somewhat surprising) answer is, ALL OF THEM! Let s see how this might work in practice (and we ll take up the question of proving this claim later). D. DeTurck Math 260 001 2013A: Solving the heat equation 15 / 1

The Fourier ansatz Just for something concrete, let s suppose we want to solve the problem u t = 1 5 u xx, u(0, t) = u(3, t) = 0, u(x, 0) = 3x x 2 for t > 0 and 0 x 3. D. DeTurck Math 260 001 2013A: Solving the heat equation 16 / 1

The Fourier ansatz Just for something concrete, let s suppose we want to solve the problem u t = 1 5 u xx, u(0, t) = u(3, t) = 0, u(x, 0) = 3x x 2 for t > 0 and 0 x 3. We ll assume that we can express u as u(x, t) = b n e n2 π 2t/45 sin nπx 3 n=1 (this is the ansatz) and see if we can figure out what the constants b n should be we know that the boundary conditions are automatically satisfied, and perhaps we can choose the b n s so that 3x x 2 = n=1 b n sin nπx 3. D. DeTurck Math 260 001 2013A: Solving the heat equation 16 / 1

Integrals rather than derivatives We re trying to find b n s so that 3x x 2 = n=1 b n sin nπx 3. By contrast with Taylor series, where you find the coefficients by integration rather than differentiation. D. DeTurck Math 260 001 2013A: Solving the heat equation 17 / 1

Integrals rather than derivatives We re trying to find b n s so that 3x x 2 = n=1 b n sin nπx 3. By contrast with Taylor series, where you find the coefficients by integration rather than differentiation. We ll use two basic facts: If n m then If n = m then ˆ 3 0 sin nπx 3 ˆ 3 0 sin nπx 3 sin mπx 3 sin mπx 3 dx = ˆ 3 0 dx = 0. sin 2 nπx 3 dx = 3 2. D. DeTurck Math 260 001 2013A: Solving the heat equation 17 / 1

Finding the coefficients We re still trying to find b n s so that 3x x 2 = n=1 b n sin nπx 3. Motivated by the facts on the previous slide, we multiply both sides by sin mπx 3 and integrate both sides from 0 to 3: ˆ 3 0 (3x x 2 ) sin mπx 3 dx = = ˆ 3 0 ( n=1 ˆ 3 b n n=1 = 3b m 2 0 b n sin nπx 3 sin nπx 3 ) sin mπx 3 sin mπx 3 dx dx D. DeTurck Math 260 001 2013A: Solving the heat equation 18 / 1

Integration by parts It s an exercise in integration by parts to show that ˆ 3 0 (3x x 2 ) sin mπx 3 dx = 54 m 3 π 3 (1 ( 1)m ) D. DeTurck Math 260 001 2013A: Solving the heat equation 19 / 1

Integration by parts It s an exercise in integration by parts to show that ˆ 3 0 (3x x 2 ) sin mπx 3 dx = 54 m 3 π 3 (1 ( 1)m ) Therefore, b m = 36 m 3 π 3 (1 ( 1)m ) = 0 m even 72 m 3 π 3 m odd D. DeTurck Math 260 001 2013A: Solving the heat equation 19 / 1

Integration by parts It s an exercise in integration by parts to show that ˆ 3 0 (3x x 2 ) sin mπx 3 dx = 54 m 3 π 3 (1 ( 1)m ) Therefore, b m = 36 m 3 π 3 (1 ( 1)m ) = 0 m even 72 m 3 π 3 m odd So we arrive at a candidate for the solution: 72 π u(x, t) = 2t/45 (2n + 1)πx (2n + 1) 3 π 3 e (2n+1)2 sin 3 n=0 D. DeTurck Math 260 001 2013A: Solving the heat equation 19 / 1

Validating the solution The series u(x, t) = n=0 72 π 2t/45 (2n + 1)πx (2n + 1) 3 π 3 e (2n+1)2 sin 3 converges for t 0, and certainly satisfies the boundary conditions. What about the initial condition u(x, 0) = 3x x 2? D. DeTurck Math 260 001 2013A: Solving the heat equation 20 / 1

Validating the solution The series u(x, t) = n=0 72 π 2t/45 (2n + 1)πx (2n + 1) 3 π 3 e (2n+1)2 sin 3 converges for t 0, and certainly satisfies the boundary conditions. What about the initial condition u(x, 0) = 3x x 2? Well,. u(x, 0) = n=0 72 (2n + 1)πx (2n + 1) 2 sin π3 3 D. DeTurck Math 260 001 2013A: Solving the heat equation 20 / 1

Graphical evidence Red graph: 3x x 3, Blue graph: sum One term: Three terms: D. DeTurck Math 260 001 2013A: Solving the heat equation 21 / 1

Plotting the solution Here is a plot of the sum of of the first three terms of the solution: D. DeTurck Math 260 001 2013A: Solving the heat equation 22 / 1

Another example Now, let s look at a problem with insulated ends: u t = 1 5 u xx, u x (0, t) = u x (3, t) = 0, u(x, 0) = 3x x 2 for t > 0 and 0 x 3. D. DeTurck Math 260 001 2013A: Solving the heat equation 23 / 1

Another example Now, let s look at a problem with insulated ends: u t = 1 5 u xx, u x (0, t) = u x (3, t) = 0, u(x, 0) = 3x x 2 for t > 0 and 0 x 3. This time, with the boundary conditions in mind, we ll assume that we can express u as u(x, t) = n=0 a n e n2 π 2 t/45 cos nπx 3 (and see if we can figure out what the constants a n should be the boundary conditions are automatically satisfied, and we will choose the a n s so that 3x x 2 = n=0 a n cos nπx 3. D. DeTurck Math 260 001 2013A: Solving the heat equation 23 / 1

Useful integrals We re trying to find a n s so that 3x x 2 = n=0 a n cos nπx 3. D. DeTurck Math 260 001 2013A: Solving the heat equation 24 / 1

Useful integrals We re trying to find a n s so that 3x x 2 = n=0 Again, we ll use two basic facts: If n m then If n = m > 0 then ˆ 3 0 ˆ 3 0 cos nπx 3 cos nπx 3 cos mπx 3 a n cos nπx 3. cos mπx 3 dx = ˆ 3 0 dx = 0. whereas if n = m = 0 we get 3 0 12 dx = 3. cos 2 nπx 3 dx = 3 2 D. DeTurck Math 260 001 2013A: Solving the heat equation 24 / 1

Finding the coefficients We re still trying to find a n s so that 3x x 2 = b n cos nπx 3. n=0 Motivated by the facts on the previous slide, we multiply both sides by cos mπx 3 and integrate both sides from 0 to 3. For m > 0 we get: ˆ 3 (3x x 2 ) cos mπx ˆ ( 3 ) dx = a n cos nπx sin mπx dx 0 3 0 3 3 n=0 ˆ 3 = a n cos nπx mπx cos dx 3 3 n=0 = 3a m 2 and we get 3a 0 for m = 0. 0 D. DeTurck Math 260 001 2013A: Solving the heat equation 25 / 1

Integration by parts It s an exercise in integration by parts to show that ˆ 3 (3x x 2 ) cos mπx 0 m odd 9 dx = 3 2 m = 0 0 27 m 2 π 2 m > 0. even D. DeTurck Math 260 001 2013A: Solving the heat equation 26 / 1

Integration by parts It s an exercise in integration by parts to show that ˆ 3 (3x x 2 ) cos mπx 0 m odd 9 dx = 3 2 m = 0 0 27 m 2 π 2 So we arrive at a candidate for the solution: u(x, t) = 3 2 n=1 m > 0. even 36 π 2t/45 (2n) 2 π 2 e (2n)2 cos 2nπx 3 D. DeTurck Math 260 001 2013A: Solving the heat equation 26 / 1

Validating the solution The series u(x, t) = 3 2 n=1 36 π 2t/45 (2n) 2 π 2 e (2n)2 cos 2nπx 3 converges for t 0, and certainly satisfies the boundary conditions. What about the initial condition u(x, 0) = 3x x 2? D. DeTurck Math 260 001 2013A: Solving the heat equation 27 / 1

Validating the solution The series u(x, t) = 3 2 n=1 36 π 2t/45 (2n) 2 π 2 e (2n)2 cos 2nπx 3 converges for t 0, and certainly satisfies the boundary conditions. What about the initial condition u(x, 0) = 3x x 2? Well, u(x, 0) = 3 2 n=1 36 2nπx (2n) 2 cos π2 3 D. DeTurck Math 260 001 2013A: Solving the heat equation 27 / 1

Graphical evidence Red graph: 3x x 3, Blue graph: sum One term, two terms: Four terms, thirteen terms: D. DeTurck Math 260 001 2013A: Solving the heat equation 28 / 1

Plotting the solution Here is a plot of the sum of of the first three terms of the solution: D. DeTurck Math 260 001 2013A: Solving the heat equation 29 / 1

Other boundary conditions Questions for discussion: How would you handle boundary conditions u x (0, t) = 0, u(3, t) = 0? What about u(0, t) = 0, u x (3, t) = 0? What about something like u(0, t) = 0, u x (3, t) + u(3, t) = 0? D. DeTurck Math 260 001 2013A: Solving the heat equation 30 / 1