Solving Non-Homogeneous Equations - Whitman...

3

Click here to load reader

Transcript of Solving Non-Homogeneous Equations - Whitman...

Page 1: Solving Non-Homogeneous Equations - Whitman Peoplepeople.whitman.edu/~hundledr/courses/M367/Sect03_5Extra.pdf · Solving Non-Homogeneous Equations ... (nonhomogeneous) ... Now we

Solving Non-Homogeneous Equations

Term by term differentiation is important when we solve non-homogeneous PDEs.Suppose we want to solve:

PDE: ut = kuxx + q(x, t)BCs: u(0, t) = 0, u(L, t) = 0IC: u(x, 0) = f(x)

Here is our strategy, called the method of eigenfunctions:

1. Obtain the eigenfunctions in x, φn(x), that satisfy the homogeneous PDE and boundaryconditions.

2. Expand u(x, t), q(x, t), and f(x) in series involving φn(x). This converts the PDE intoa system of (nonhomogeneous) ODEs.

3. Solve the ODEs to re-assemble the overall solution.

Applying these steps to this PDE, let’s see what we get. In this case, φn(x) = sin(nπx/L).Now we write the ansatz for u, and expand the other functions as Fourier sine series:

u(x, t) =∞∑n=1

bn(t) sin(nπxL

)

f(x) = u(x, 0) =∞∑n=1

bn(0) sin(nπxL

)⇒ bn(0) =

2

L

∫ L

0

f(x) sin(nπxL

)dx

q(x, t) =∞∑n=1

qn(t) sin(nπxL

)⇒ qn(t) =

2

1

∫ 1

0

q(x, t) sin(nπxL

)dx

These computations show that, given f(x) and q(x, t), we can compute bn(0) and qn(t) foreach n. Next, do the substitution into the PDE and consider the result:

∞∑n=1

b′n(t) sin(nπxL

)=∞∑n=1

(−k(nπ/L)2)bn(t) sin(nπxL

)+∞∑n=1

qn(t) sin(nπxL

)or, simplifying, we get:

∞∑n=1

[b′n(t) + k(nπ/L)2bn(t)− qn(t)

]sin(nπxL

)= 0 for all 0 < x < L

This is a series that converges to zero for all x, so each coefficient must be zero (this is thesine series for the zero function). That gives a system (with an infinite number of equations)of ODEs:

b′n(t) + k(nπ/L)2bn(t) = qn(t)

1

Page 2: Solving Non-Homogeneous Equations - Whitman Peoplepeople.whitman.edu/~hundledr/courses/M367/Sect03_5Extra.pdf · Solving Non-Homogeneous Equations ... (nonhomogeneous) ... Now we

Each of these are linear, first order, non-homogeneous equations which can be solved usingthe integrating factor1. The solution to each of these could be written in the form:

bn(t) = bn(0)e−k(nπ/L)2t + e−k(nπ/L)

2t

∫ t

0

qn(w)ek(nπ/L)2w dw

We don’t want to memorize this solution, however- We want to be able to derive it whenneeded.

EXAMPLE:

Give the solution to the following PDE, using the eigenfunction method:

PDE ut = 4uxx + sin(3πx) 0 < x < 1, t > 0BCs u(0, t) = 0 u(1, t) = 0ICs u(x, 0) = sin(πx)

SOLUTION: With zero boundary conditions, the eigenfunctions are the usual sine functions:

λ = n2π2 φn(x) = sin(nπx) n = 1, 2, 3, · · ·

Therefore, we assume solutions to the non-homogeneous equation are in the form:

u(x, t) =∞∑n=1

bn(t) sin(nπx)

Substitution into the PDE gives the following, where the prime is the derivative in t:

∞∑n=1

b′n(t) sin(nπx) =∞∑n=1

bn(t)(−4n2π2) sin(nπx) + sin(3πx)

This leads to the system of ODEs:

n = 1 b′1(t) = −4π2b1(t) ⇒ b1(t) = b1(0)e−4π2t

n = 2 b′2(t) = −16π2b2(t) ⇒ b2(t) = b2(0)e−16π2t

n = 3 b′3(t) = −36π2b3(t) + 1 ⇒ b3(t) = ce−36π2t + 1

36π2

n ≥ 4 b′4(t) = −4n2π2b4(t) ⇒ bn(t) = bn(0)e−4n2π2t

The values of bn(0) can be found using the initial condition: u(x, 0) = sin(πx), or expanding:

b1(0) sin(πx) + b2(0) sin(2πx) + b3(0) sin(3πx) + b4(0) sin(4πx) + · · · = sin(πx)

Therefore, b1(0) = 1 and all the others are zero. Going back to the system of ODEs, we thenhave:

n = 1 b1(t) = b1(0)e−4π2t ⇒ b1(t) = e−4π

2t

n = 2 b2(t) = b2(0)e−16π2t ⇒ b2(t) = 0

n = 3 b3(t) = ce−36π2t + 1

36π2 ⇒ b3(t) = 136π2 (1− e−36π

2t)

n ≥ 4 bn(t) = bn(0)e−4n2π2t ⇒ bn(t) = 0

1A couple of practice problems are included at the end.

2

Page 3: Solving Non-Homogeneous Equations - Whitman Peoplepeople.whitman.edu/~hundledr/courses/M367/Sect03_5Extra.pdf · Solving Non-Homogeneous Equations ... (nonhomogeneous) ... Now we

Now we can re-assemble the solution to the heat equation:

u(x, t) = e−4π2t sin(πx) +

1

36π2

(1− e−36π

2t)

sin(3πx)

And notice that u(x, 0) = sin(πx)

Extra Review

Recall that, if the ODE is given as:

y′ + ky = q(t)

The integrating factor will be ekt, and multiplying both sides by it,

ekt(y′ + ky) = q(t)ekt ⇒ (y(t)ekt)′ = q(t)ekt

Now integrate both sides. The notation we use below is so that we can express the solutionin terms of the initial condition:

y(t)ekt =

∫ t

0

q(w)ekw dw + y(0)

Isolate y(t). One way to write the solution would be as:

y(t) = e−kt(∫ t

0

q(w)ekw dw + y(0)

)For example, solving for the function b3(t) in the previous problem,

b′3(t) + 36π2b3(t) = 1 ⇒ e36π2ty(t) =

∫e36π

2t =1

36π2e36π

2t + C

Isolate b3(t) and solve for C using b3(0) = 0:

b3(t) =1

36π2+ Ce−36π

2t ⇒ b3(0) = 0 ⇒ C = − 1

36π2

From which we get:

b3(t) =1

36π2(1− e−36π

2t)

3