# Thread: Quick PDEs Question! BVPs: time-dependent heat gen in a bar

1. ## Quick PDEs Question! BVPs: time-dependent heat gen in a bar

Quick question, what would be the general method for solving this type of problem;

(d/dt)u - (d2/dx2)u = h(x, t)

with homogeneous BCs:
u (0, t) = 0
u (L, t) = 0,

and IC u (x, 0) = f(x)

Just not sure how to deal with the RHS h(x,t) being dependent on t as well as x, (corresponding to time-dependent heat generation I think??)
What method should be used?

Thanks,

Squiggles

2. Originally Posted by Squiggles
Quick question, what would be the general method for solving this type of problem;

(d/dt)u - (d2/dx2)u = h(x, t)

with homogeneous BCs:
u (0, t) = 0
u (L, t) = 0,

and IC u (x, 0) = f(x)

Just not sure how to deal with the RHS h(x,t) being dependent on t as well as x, (corresponding to time-dependent heat generation I think??)
What method should be used?

Thanks,

Squiggles
If $\displaystyle h(t,x)=0$, the we would use the usual separation of variables. Because of the fixed endpoints we would obtain

$\displaystyle u = \sum_{n=1}^\infty a_n e^{- \frac{n^2\pi^2}{L^2}t} \sin \frac{n \pi}{L} x$ where $\displaystyle a_n = \frac{2}{L} \int_0^L f(x) \sin \frac{n \pi}{L} x\,dx$

If $\displaystyle h(t,x) \ne 0$, since we still have fixed endpoints we will assume a solutuion of the form

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

and assume that $\displaystyle h(x,t)$ has a fourier since series

$\displaystyle h(x,t) = \sum_{n=1}^\infty h_n(t) \sin \frac{n \pi}{L} x$

Substitute into thet PDE and equate like sin terms. This will give a series of ODEs for $\displaystyle T_n$.