Solution to Diffusion Equation in similar (but slightly different) situations

70 Views Asked by At

On an old PDE exam I'm looking through for my finals, a multiple-part question comes as:

(a) Solve the diffusion equation with mixed Neumann-Dirichlet BC's: \begin{align} &u_t=u_{xx}, \quad 0<x<\frac{1}{2}, \quad t>0\\ &u(0,t)=0\\ &u_x\left(\frac{1}{2},t\right)=0\\ &u(x,0)=\begin{cases}0\quad \text{for } 0 < x<\frac{1}{4}\\ 1 \quad \text{for }\frac{1}{4}<x<\frac{1}{2}\end{cases} \end{align}

This was fairly standard (but quite tedious), I believe the correct solution is: $$\Large{u(x,t) = \frac{2\sqrt{2}}{\pi}\sum_{n=1}^{\infty} \frac{(-1)^{\lfloor\frac{n}{2}\rfloor} }{2n-1} \sin((2n-1)\pi x)e^{-(2n-1)^2\pi^2t}}$$

(b) Explain (without redoing any computations) why the same function $u(x, t)$ found in part (a) also solves this equation with Dirichlet BCs only: \begin{align} u_t=u_{xx}, \quad 0<x<1, \quad t>0\\ u(0,t)=u(1,t)=0\\ u(x,0)=\begin{cases}1\quad \text{for } \frac{1}{4} < x<\frac{3}{4}\\ 0 \quad \text{otherwise}\end{cases} \end{align}

I haven't been to explain this as thoroughly as I'd like to, but the only part in the solution of (a) that depends on $x$ is the $\sin$ function. And on the interval $(0,\pi)$, $\sin$ is symmetric about $\frac{\pi}{2}$, then similarly our function will be dominated by the first term when $n=1$ and hence will attain a maximum when $\sin(\pi x)$ reaches its maximum and hence $x=\frac{1}{2}$. So our fourier series will be symmetric about $\frac{1}{2}$ on the interval $\left(\frac{1}{4} ,\frac{3}{4}\right)$ ?

(c) Now solve the same equation as in part (b) with an inhomogenous Dirichlet BC: \begin{align} &u_t=u_{xx}, \quad 0<x<1, \quad t>0\\ &u(0,t)=0\\ &u(1,t)=1\\ &u(x,0)=\begin{cases}1\quad \text{for } \frac{1}{4} < x<\frac{3}{4}\\ 0 \quad \text{otherwise}\end{cases} \end{align}

For this I tried to devise a solution $w(x,t)=u(x,t)-v(x,t)$, which solves the situation \begin{align} &w_t=w_{xx}, \quad 0<x<1, \quad t>0\\ &w(0,t)=0\\ &w(1,t)=0\\ &w(x,0)=u(x,0)-v(x,0) \end{align} So then $v(x,t)$ solves: \begin{align} &v_t=v_{xx}, \quad 0<x<1, \quad t>0\\ &v(0,t)=0\\ &v(1,t)=1\\ \end{align} To which I took trivially $v(x,t)=x$ causing the initial condition of $w$ to be $$w(x,0)=\begin{cases}-x \quad 0<x<\frac{1}{4}\\ 1-x \quad \frac{1}{4} < x \frac{3}{4} \\ -x \quad \frac{3}{4}<x<1\end{cases}$$

And hence if I find the solution to the PDE involving $w(x,t)$ my final solution should just be $u(x,t)=w(x,t)+x$ (which honestly isn't as simple as it sounds, because the integration to determine the fourier coefficient in the infinite series solution by using the initial condition is quite tedious)?

Does my reasoning on part (b) and (c) seem correct?

Is there a more efficient or elegant way to go about this question ?

1

There are 1 best solutions below

3
On BEST ANSWER

For (b), notice that the initial condition is the even reflection of the initial condition of (a) through $x=1/2$. So you can look at the original $u$ (defined only on $(0,1/2)$) and then extend it to $(0,1)$ by even reflection through $x=1/2$. That is define $u(1/2+x,t)=u(1/2-x,t)$ for $x \in (0,1/2)$. This gives the Dirichlet condition on the left and right for free. Then you note that actually the original function already provides the formula for this reflection (which I don't think has any particular deep significance).

Now why did the right endpoint condition in the original problem need to be homogeneous Neumann? One way to view that is to notice that the even reflection will only be $C^1$ for $t>0$ with that condition, because the even reflection automatically has the property $u_x(1/2^-,t)=-u_x(1/2^+,t)$.

Regarding (c) I don't really see any better way than yours. The requisite integrals can be done, though.