Math 353 Lecture Notes Intro to Pdes Eigenfunction Expansions for Ibvps
Total Page:16
File Type:pdf, Size:1020Kb
Math 353 Lecture Notes Intro to PDEs Eigenfunction expansions for IBVPs J. Wong (Fall 2020) Topics covered • Eigenfunction expansions for PDEs ◦ The procedure for time-dependent problems ◦ Projection, independent evolution of modes 1 The eigenfunction method to solve PDEs We are now ready to demonstrate how to use the components derived thus far to solve the heat equation. First, two examples to illustrate the proces... 1.1 Example 1: no source; Dirichlet BCs The simplest case. We solve ut =uxx; x 2 (0; 1); t > 0 (1.1a) u(0; t) = 0; u(1; t) = 0; (1.1b) u(x; 0) = f(x): (1.1c) The eigenvalues/eigenfunctions are (as calculated in previous sections) 2 2 λn = n π ; φn = sin nπx; n ≥ 1: (1.2) Assuming the solution exists, it can be written in the eigenfunction basis as 1 X u(x; t) = cn(t)φn(x): n=0 Definition (modes) The n-th term of this series is sometimes called the n-th mode or Fourier mode. I'll use the word frequently to describe it (rather than, say, `basis function'). 1 00 Substitute into the PDE (1.1a) and use the fact that −φn = λnφ to obtain 1 X 0 (cn(t) + λncn(t))φn(x) = 0: n=1 By the fact the fφng is a basis, it follows that the coefficient for each mode satisfies the ODE 0 cn(t) + λncn(t) = 0: Solving the ODE gives us a `general' solution to the PDE with its BCs, 1 X −λnt u(x; t) = ane φn(x): n=1 The remaining coefficients are determined by the IC, u(x; 0) = f(x): To match to the solution, we need to also write f(x) in the basis: 1 Z 1 X hf; φni f(x) = f φ (x); f = = 2 f(x) sin nπx dx: (1.3) n n n hφ ; φ i n=1 n n 0 Then from the initial condition, we get u(x; 0) = f(x) 1 1 X X =) cn(0)φn(x) = fnφn(x) n=1 n=1 =) cn(0) = fn for all n ≥ 1: Now everything has been solved - we are done! The solution to the IBVP (1.1) is 1 X −n2π2t u(x; t) = ane sin nπx with an given by (1.5): (1.4) n=1 Alternatively, we could state the solution as follows: The solution is 1 X −λnt u(x; t) = fne φn(x) n=1 with eigenfunctions/values φn; λn given by (1.2) and fn by (1.3). 2 1.2 Long-time behavior Note that every term in the solution (1.4) has a negative exponential (since all the eigenvalues are positive). Furthermore, terms further down in the series decay much faster since λn grows quadratically with n. It follows (informally) that lim u(x; t) = 0 t!1 independent of the initial condition f(x) (which just affects the bn's and not the eigenvalues). Moreover, by approximating u by its first term, −λ1t −λ1t u(x; t) ≈ f1e φ1(x) =) decays to zero at least as fast as f1e : Thus, the smallest eigenvalue of a non-zero term gives the (exponential) convergence rate. As an explicit example, suppose the initial condition is f(x) = x(1 − x): After some laborious integration by parts, we get ( 2(1 − (−1)n) 0 n even a = = (1.5) n π3n3 2 π3n3 n odd: The first few terms of the solution are 2 2 2 2 u(x; t) = e−π t sin πx + e−9π t sin 3πx + ··· π3 27π3 Note that u(x; t) is missing a φ2 = sin 2πx term; this does not affect the convergence rate. Missing modes: However, suppose instead that f(x) = x − 1=2: Then we have Z 1 Z 1 a1 = 2 (x − 1=2) sin πx dx = 0; a2 = 2 (x − 1=2) sin 2πx dx = −1=pi: 0 0 the n = 1 term vanishes, so 1 2 u(x; t) ≈ 0 · φ (x) − e−4π tφ (x) + ··· as t ! 1 1 π 2 2 and the convergence rate is given by the second eigenvalue λ2 = 4π (faster convergence!). 3 1.3 Example 2: no source, Neumann BCs A variation - similar to Dirichlet, but with a crucial difference due to the zero eigenvalue. Here we seek a solution u(x; t) to the IBVP ut = uxx; x 2 (0; 1); t > 0 (1.6) with boundary and initial conditions ux(0; t) = 0; ux(1; t) = 0; u(x; 0) = f(x): (1.7) The eigenvalues/eigenfunctions are (again, computed earlier) 2 2 λn = n π ; φn = cos nπx; n = 0; 1; 2; ··· Note that λn = 0 is an eigenvalue, unlike the previous case. Regardless, the process is the same and we end up with a solution (check this!) 1 X −n2π2t u(x; t) = ane cos nπx n=0 for constants an determined by the initial condition f(x). In terms of the basis, 1 X hf; φni f(x) = f φ (x); : n n hφ ; φ i n=0 n n However, we must be careful; the formulas are different for n = 0 and n 6= 0: R 1 f(x) dx Z 1 f = 0 = f(x) dx; 0 R 1 0 1 dx 0 R 1 Z 1 0 f(x) cos nπx dx fn = = 2 f(x) cos nπx dx; n ≥ 1: R 1 2 0 cos nπx dx 0 This gives the formulas for hte coefficients an in the solution since 1 1 X X u(x; 0) = f(x) =) anφn = fnφn: n=0 n=0 4 1.4 Long-time behavior (Neumann) The zero eigenvalue changes the t ! 1 limit. We have 1 X −n2π2t −π2t u(x; t) = a0 + ane cos nπx = a0 + a1e cos πx + ··· n=1 or more abstractly, −λ1t u(x; t) = a0φ0(x) + a1e φ1(x) + ··· As t ! 1; every term with a negative exponential will vanish. However, the n = 0 term does not! Thus, the limit as t ! 1 exists (no terms grow!) and leaves only the n = 0 term: lim u(x; t) = a0φ0(x): t!1 We know the λ = 0 eigenfunction is just φ0 = 1 and we have a formula for a0, which gives lim u(x; t) = constant function t!1 where the value of this constant is Z 1 a0 = f(x) dx = average of f(x) over the interval : 0 The result here makes sense physically. The Neumann problem models heat flow in a closed (insulated) container. Over time, the temperature will reach a (constant) equilibrium, and that value is the average temperature. 5 2 The projection approach We have seen that solutions to the heat equation are actually a superposition of single mode solutions cn(t)φn(x) where cn(t) is governed by a (scalar) ODE. This perspective can be used to guide the solution procedure. Let's go through the procedure for solving the heat equation, but using the idea of projecting onto each mode. Recall that hf; φni f ! = coefficient of the φn component of f: hφn; φni That is, this `projection' selects the coefficient of the n-th mode. Consider again the heat equation problem ut =uxx; x 2 (0; 1); t > 0 u(0; t) = 0; u(1; t) = 0; u(x; 0) = f(x): 2 2 Find the eigenfunctions φn = sin nπx and eigenvalues λn = n π as before. We know that the solution can be written in the eigenfunction basis: 1 X u(x; t) = cn(t)φn(x): n=1 In particular, we've defined cn(t) as the coefficient of the n-th mode of u. From here, we can project, and then only have to solve one-dimensional problems (simple ODEs)! First, project the PDE by taking the `projection' onto the φn component: h·; φni projφn (·) ! hφn; φni We calculated before, using the series, that 0 projφn (ut) = cn(t); projφn (uxx) = −λncn Then for the PDE, we get 0 projφn (PDE) =) cn(t) = −λncn and for the IC, hf; φni projφn (IC) =) cn(0) = = φn coefficient of f: hφn; φni Thus, the coefficient of the n-th mode evolves according to the IVP 0 cn + λncn = 0; cn(0) = φn coefficient of the IC: After solving for each mode, we take the superposition to get the full solution. 6 2.1 Single mode solutions This principle tells us that for the full problem ut =uxx; x 2 (0; 1); t > 0 u(0; t) = 0; u(1; t) = 0; u(x; 0) = f(x): each mode un(x; t) = cn(t)φn(x) solves a `projected' IBVP (un)t = (un)xx; un satisfies the BCs (IBVPn) un(x; 0) = fnφn i.e. it solves the heat equation where the `input' (initial condition) is just the n-th mode of the full IC. By taking the superposition of the solutions to these projected IBVPs, we get the solu- tion to the full one (since the ICs superimpose to give f(x)). This principle means that if there is only one mode in the inputs, then the solution will also have only one mode. For a simple example, consider ut =uxx + 4 sin 2x; x 2 (0; π); t > 0 u(0; t) = 0; u(π; t) = 0; u(x; 0) = 2 sin 2x: The eigenfunctions are φn = sin nx for n ≥ 1. Both the source and IC only have a φ2 term. To be explicit, we have ( X 2 n = 2 u(x; 0) = 2φ2 = fnφn; fn = : n≥1 0 n 6= 2 It follows that only the n = 2 mode of the solution is non-zero (all the other projected problems have un = 0 as their solution), so u(x; t) = c2(t)φ2(x): Indeed, plugging this into the PDE we find that 0 −4t c2(t) = −λ2c2(t) + 4; c2(0) = 2 =) c2 = 1 + e : No other terms need to be solved for (cn(t) = 0 for n 6= 2).