The Heat Equation on the bounded interval [0,L]

The PDE is u_t = D u_{xx}.

First type of Dirichlet boundary conditions: u(0,t)=u(L,t)=1

The steady state solution is constant: u_ss(x)=1

First example: eigenmodes

The initial data are the k=1, k=2, and k=3 modes: u(x,0)= 1 + sin(pi x/L), u(x,0) = 1 + sin(2 pi x/L), and u(x,0)=1 + sin(3 pi x/L)

The resultant solutions are u(x,t) = 1 + exp(-D (pi/L)2 t) sin(pi x/L), u(x,t) = 1 + exp(-D (2 pi/L)2 t) sin(2 pi x/L), and u(x,t) = 1 + exp(-D (3 pi/L)2 t) sin(3 pi x/L)

The steady state is denoted with a dashed line.

Note that the k=3 mode decays faster than the k=2 mode which decays faster than the k=1 mode.



Second example: random initial data

The initial data is chosen by choosing random numbers and then multiplying them by sin(k pi x/L) for k=1 to 20.

The steady state is denoted with a dashed line.

Note that the k=1 mode decays the slowest and as the solution relaxes it looks more and more like a multiple of sin(pi x/L).



Third example: top hat initial data

The initial data is a discontinuous function: u(x,0) = 1 if L/4 < x < L/2 and u(x,0) = 0 otherwise.

The steady state u_ss(x)=1 is denoted with a dashed line.

Note that the solution instantaneously smooths. The regions that were flat in the initial data appear to “take a while” to stop being flat if you look away from the two discontinuities. (In reality, there’s infinite speed of propagation and there’s no flatness anywhere, it’s just that our eye can’t see the deviation at first.) The boundary condition is driving the solution down to the steady state; note that the x=0 boundary is “felt” by the solution before the x=L boundary. Again, this has to do with infinite speed of propagation and how the “width” of the fundamental solution depends on time.



Fourth example: witch’s hat initial data

The initial data is a “witch’s hat”. The solution is provided for your amusement; I have nothing to say that I didn’t say for the solution with top-hat initial data.

The steady state u_ss(x)=1 is denoted with a dashed line.



Second type of Dirichlet boundary conditions: u(0,t)=1 and u(L,t)=2

The steady state solution is a line: u_ss(x) =1 + x/L

First example: eigenmodes

The initial data are the k=1, k=2, and k=3 modes: u(x,0) = u_ss(x) + sin(pi x/L), u(x,0) = u_ss(x) + sin(2 pi x/L), and u(x,0) = u_ss(x) + sin(3 pi x/L)

The resultant solutions are u(x,t) = u_ss(x) + exp(-D (pi/L)2 t) sin(pi x/L), u(x,t) = u_ss(x) + exp(-D (2 pi/L)2 t) sin(2 pi x/L), and u(x,t) = u_ss(x) + exp(-D (3 pi/L)2 t) sin(3 pi x/L)

The steady state is denoted with a dashed line.

Note that the k=3 mode decays faster than the k=2 mode which decays faster than the k=1 mode.



Second example: random initial data

The initial data is chosen by choosing random numbers and then multiplying them by sin(k pi x/L) for k=1 to 20.

The steady state is denoted with a dashed line.

Note that the k=1 mode decays the slowest and as the solution relaxes it looks more and more like a multiple of sin(pi x/L) added to the steady state u_ss(x).



Third example: top hat initial data

The initial data is u_ss(x) with a discontinuous function added to it: u(x,0) = u_ss(x) + 1 if L/4 < x < L/2 and u(x,0) = u_ss(x) otherwise.

The steady state is denoted with a dashed line.

Note that the solution instantaneously smooths. The regions that were flat in the initial data appear to “take a while” to stop being flat if you look away from the two discontinuities. (In reality, there’s infinite speed of propagation and there’s no flatness anywhere, it’s just that our eye can’t see the deviation at first.) The boundary conditions are driving the solution down to the steady state; note that the x=0 boundary is “felt” by the solution before the x=L boundary. Again, this has to do with infinite speed of propagation and how the “width” of the fundamental solution depends on time.



Neumann boundary conditions: D u_x(0,t)=0 and D u_x(L,t)=0

The long-time limit is a constant and is determined by the initial data: u_ss(x) = the average of u(x,0). (In the zero-flux boundary condition case, there are infinitely many steady states.)

First example: random initial data

The initial data is chosen by choosing random numbers and then multiplying them by cos(k pi x/L) for k=1 to 20.

The steady state is found by computing the average vaule of the inital data and is denoted with a dashed line.

Note that the k=1 mode decays the slowest and as the solution relaxes it looks more and more like a multiple of cos(pi x/L) added to the steady state.



Second example: top hat initial data

The initial data is a discontinuous function: u(x,0) = 1 if L/4 < x < L/2 and u(x,0) = 0 otherwise.

The steady state is found by computing the average vaule of the inital data and is denoted with a dashed line.

Note that the solution instantaneously smooths. The regions that were flat in the initial data appear to “take a while” to stop being flat if you look away from the two discontinuities. (In reality, there’s infinite speed of propagation and there’s no flatness anywhere, it’s just that our eye can’t see the deviation at first.) The boundary conditions are driving the solution down to the steady state; note that the x=0 boundary is “felt” by the solution before the x=L boundary. Again, this has to do with infinite speed of propagation and how the “width” of the fundamental solution depends on time.



The Heat Equation on the interval [0,L] with non-constant diffusivity.

Here the heat equation is u_t = ( D(x) u_x )_x where D(x) depends on x. It’s one constant on (0,L/2), and a larger constant on (L/2,L). As a result, in the material to the right the diffusion is “faster”.

The boundary conditions are Dirichlet boundary conditions u(0,t) = 0 and u(L,t) = 0. And so the steady state is the same as before: u_ss(x) = a constant function.

The initial data is sin(pi x/L): a single bump with its peak initially at the interface between the two materials.

Note: If the boundary conditions had been u(0,t) = 1 and u(L,t) = 2 then the steady state would be piecewise linear. To find it, you would need to use the fact that both u_ss(x) and the flux D(x) u_ss_x(x) are continuous at x=L/2.



The Wave Equation on the line.

The PDE is u_t = c2 u_xx on the line. No boundary conditions are needed.

First example: top hat initial data

The initial displacement is u(x,0) is a disccontinuous function with a region where u(x,0) equals 1 flanked by regions of zero. The initial velocity is zero.

Note that there is no instantaneous smoothing. In fact the initial data has only two jump discontinuities in it while the solution at t>0 has more than two. Note that if you wait long enough you get two copies of the initial data running away from each other off to infinity and -infinity; their height is half the original height. This is exactly what DAlembert’s formula told you to expect.



Second example: cap initial data

The initial displacement is u(x,0) = a parabolic cap flanked by regions of zero. The initial velocity is zero.

Note that there is no instantaneous smoothing. In fact the initial data has only two “corners” in it while the solution at t>0 has more than two. Note that if you wait long enough you get two copies of the initial data running away from each other off to infinity and -infinity; their height is half the original height. This is exactly what D'Alembert’s formula told you to expect.



The Wave Equation on the bounded inteval [0,L].

The PDE is u_t = c2 u_xx.

The boundary conditions are Dirichlet: u(0,t) = u(L,t) = 0.

First example: standing waves

The first three standing wave solutions are u(x,t) = cos( c pi/L t) sin(pi x/L), u(x,t) = cos( c 2 pi/L t) sin(2 pi x/L), and u(x,t) = cos( c 3 pi/L t) sin(3 pi x/L)

As expected, they don’t decay in amplitude (in contrast with the heat equation) and the larger k is the faster the temporal oscillation.



Second example: random initial data

The initial displacement is chosen by choosing random numbers and then multiplying them by sin(k pi x/4) for k=1 to 20. The initial velocity is zero.

Note there’s no “infinity” for solutions to run off to (in contrast to the wave equation on the line). Things that hit the boundary get sent right back in.

I chose the speed c and the run time so that the final snap-shot is the same as the initial data. Can you figure out how I did this?



Third example: top hat initial data

The initial displacement is u(x,0) is a discontinuous function with a region where u(x,0) equals 1 flanked by regions of zero. The initial velocity is zero.

Note there’s no “infinity” for solutions to run off to (in contrast to the wave equation on the line). Things that hit the boundary get sent right back in.

I chose the speed c and the run time so that the final snap-shot is the same as the initial data. Can you figure out how I did this?