# Solving PDE using Separation of Variables with Dirichlet boundary conditions

Solve the following PDE, $$u_t(x,t)=ku_{xx}(x,t)-bu(x,t)$$ where $b>0$, with boundary conditions $$u(0,t)=u(c,t)=0$$

My attempt

Assume $u(x,t)=X(x)T(t)$ and plugging into the diffirential equation,

$$X(x)T'(t)=kX''(x)T(t)-bX(x)T(t)$$

$$\dfrac{T'(t)}{T(t)}=k\dfrac{X''(x)}{X(x)}-b=-\lambda$$

Then solving $X(x)$ gives the ODE

$$kX''(x)+(\lambda-b)X(x)=0$$

with boundary conditions,

$$X(0)=X(c)=0$$

How to go from here?

Edit

Setting up the characteristic equation, $$r^2+\dfrac{\lambda-b}{k}=0$$ gives, $$r=i\mkern1mu\sqrt{\dfrac{\lambda-b}{k}}$$ which gives a general solution, $$X(x)= c_1\cos\bigg(\sqrt{\dfrac{\lambda-b}{k}}x\bigg)+c_2\sin\bigg(\sqrt{\dfrac{\lambda-b}{k}}x\bigg)$$ And from here her I don't know

• Well, did you solve $kX''(x)−(b+\lambda)X(x)=0$? – Hyperplane Oct 2 '17 at 22:05
• and once you have the general solution to the ODE for $X(x)$, what has to be true of $\lambda$ to make your solution satisfy the boundary conditions? – Brian Borchers Oct 2 '17 at 22:06
• Would I have to consider the cases $\lambda =b$, $\lambda > b$, and $\lambda <b$ ? – Alex Oct 3 '17 at 0:01
• Now you apply your boundary condition. What does it tell you about the constants $c_1, c_2$ and $\lambda$? – Hyperplane Oct 3 '17 at 9:41

You can rewrite the equation as $$u_t(x,t)+bu(x,t)=ku_{xx}(x,t)$$ Multiplying by $e^{bt}$ gives the more standard form: $$(e^{bt}u)_{t}=(e^{bt}u)_{xx}$$ Therefore $v(x,t)=e^{bt}u(x,t)$ satisfies $$v_{t}=kv_{xx} \\ v(0,t)=0=v(c,t).$$ Using separation of variables gives a solution $$v(x,t) = \sum_{n=1}^{\infty}A_ne^{-n^2\pi^2kt/c^2}\sin(n\pi x/c).$$ The constants $A_n$ are determined through orthogonality from the initial data $v(x,0)$. Then $u(x,t)=e^{-bt}v(x,t)$.