1. ## PDE

Can someone help me solve this PDE:

ut = uxx - (B^2)u, 0 < x < L, t > 0
u(0,t) = U1, u(L,t) = U2, u(x,0) = f(x)

2. Originally Posted by PvtBillPilgrim
Can someone help me solve this PDE:

ut = uxx - (B^2)u, 0 < x < L, t > 0
u(0,t) = U1, u(L,t) = U2, u(x,0) = f(x)
I will assume that U1 and U2 are constants. First you need to move them to zero. So let $\displaystyle u = v + ax + b$ and let $\displaystyle U1 = 0 + a 0 + b,\;\;\; U2 = 0 + aL + b$ which gives $\displaystyle a\, \text{and}\, b$thus

$\displaystyle u = v + \frac{U2-U1}{L} x + U1$

The problem now changes

$\displaystyle v_t = v_{xx} - B^2\left( v + \frac{U2-U1}{L} x + U1 \right)$

subject to $\displaystyle v(0,t) = 0,\;v(L,t) = 0,\; v(x,0) = f(x) - \frac{U2-U1}{L} x - U1$

If there was no source term then a separation of variables would lead to

$\displaystyle u = \sum_{n=1}^{\infty} b_n e^{\omega^2 t} \sin \omega x,\;\;\; \omega = \frac{n \pi}{L}$

but because of the source term we try

$\displaystyle u = \sum_{n=1}^{\infty} T_n (t) \sin \omega x,\;\;\; \omega = \frac{n \pi}{L}$

sub. into the PDE and group terms accordiong to $\displaystyle \sin w x$. You should get an ODE for $\displaystyle T_n$ which you can solve. Remember, you'll need a sine series for the $\displaystyle B^2\left(\frac{U2-U1}{L} x + U1 \right)$

3. I'm having trouble solving the ODE for Tn. Does anyone know how to do it?