# Thread: PDE - Trouble starting

1. ## PDE - Trouble starting

Hi,
I have the question

Use eigenfunction expansion to solve

$\displaystyle u_t = u_{xx} + q(x,t)$

with IC: $\displaystyle u(x,0) = f(x)$ and BC's: $\displaystyle u(0,t) = u_0$ and $\displaystyle u(\pi,t) = u_{\pi}$ where $\displaystyle u_0$ and $\displaystyle u_{\pi}$ are given constants.

With this method, I am supposed to start with a trial solution based on

$\displaystyle u_t = u_{xx}$ which based on the boundary conditions I would guess to be

$\displaystyle \displaystyle u(x,t) = \sum_1^{\infty} b_n (t) \sin (nx)$

but when checking this against the boundary conditions I find that $\displaystyle u(0,t) = u(\pi,t) = 0$ and do not meet the boundary conditions. What am I missing here?

Thanks

2. You will need to transform your PDE to one with BCs fixed to zero. Try $\displaystyle u = v + ax + b$ and choosing $\displaystyle a$ and $\displaystyle b$ such that

$\displaystyle v(0,t) = v(\pi,t) = 0$.

3. Originally Posted by Danny
You will need to transform your PDE to one with BCs fixed to zero. Try $\displaystyle u = v + ax + b$ and choosing $\displaystyle a$ and $\displaystyle b$ such that

$\displaystyle v(0,t) = v(\pi,t) = 0$.
I'm not quite sure what you mean... You say transform the pde by trying $\displaystyle u = v + ax + b$. The only thing I can think of is $\displaystyle \frac{\partial^2 v + ax + b}{\partial t^2} =\frac{\partial^2 v + ax + b}{\partial x^2}$ So confused

4. Let me show you a bit more. First off,

$\displaystyle u_t = v_t$, and $\displaystyle u_{xx} = v_{xx}$ so the PDE $\displaystyle u_t = u_{xx} + q(x,t)$ becomes $\displaystyle v_t = v_{xx} + q(x,t).$

Now for the BC's. You want $\displaystyle v(0,t) = 0, v(\pi,t) = 0$ so

$\displaystyle u(0,t) = v(0,t) + a \cdot 0 + b\;\; \Rightarrow\;\; u_0 = 0 + b$
$\displaystyle u(\pi,t) = v(\pi,t) + a \cdot \pi + b\;\; \Rightarrow\;\; u_\pi = a \cdot \pi + b$. These you solve for a and b.

Next, the IC

$\displaystyle u(x,0) = f(x) \; \text{so}\; v(x,0) + ax + b = f(x) \; \text{so}\; v(x,0) = f(x) - ax - b$

Now you have a new problem

$\displaystyle v_t = v_{xx}$
$\displaystyle v(0,t) = 0, v(\pi,t) = 0$
$\displaystyle v(x,0) = f(x) -ax - b$

This you can solve by the separation of variables. Once you have the solution, then use

$\displaystyle u = v + ax + b$.