Heat transfer in a cylinder. Inhomogeneous PDE I have a problem of heat distribution in a solid cylinder with the heater in the middle, which I take as $\exp(-r^2)$.
$$\frac{\partial u(t,r)}{\partial t}=a^2\frac{\partial^2 u(t,r)}{\partial r^2}+\frac{\partial u(t,r)}{r\partial r}+\exp(-r^2)$$
The initial and boundary conditions are the following.


*

*$u(0,r)=T_s=\text{const}$,

*$u(t,R)=T_e=\text{const}$,

*$0{\le}r{\le}R$,

*$a=\text{const}$.
I tried using Fourier series, but only the complex one seems to give the solution, but that gives complex values for temperature that is not what I expect.
Can anybody help me solve this? Thanks.
 A: First, subtracting $T_e$ gives for $v=u-T_e$ a problem with homogeneous initial and boundary conditions. The eigenfunctions for the Laplace operator in polar coordinates are the Bessel functions of the first kind $J_0\left( \frac{\mu_n}R r \right)$, where $\mu_n$ is the $n$-th positive root of $J_0$. They are orthogonal on $[0,R]$ with the weight function $r$. Denote 
$$
j_n(r)=\frac{J_0 \left( \frac{\mu_{n}}R x \right) }{\sqrt{\frac12} RJ_{1}(\mu_n)}
$$
the normalized eigenfunctions, $\int_0^Rrj_m(r)j_n(r)\,dr=\delta_{mn}$.
The corresponding Green function for the heat equation in the polar coordinates is
$$
G(r,r',t)=\sum_{n=1}^\infty e^{-a^2\frac{\mu_{n}^2}{R^2}t}j_n(r)j_n(r').
$$
Solution $v$ can be written out as a volume potential:
$$
v(r,t)=\int_0^t\int_0^RG(r,r',t-\tau)r'e^{-r'^2}\,dr'd\tau.
$$
Expanding $e^{-r^2}$ into the Fourier-Bessel series 
$$
e^{-r^2}=\sum_{n=1}^\infty c_nj_n(r),\quad r\in[0,R], 
$$
where
$$
c_n=\int_0^Rrj_n(r)e^{-r^2}\,dr,
$$
we have
$$
v(r,t)=
\int_0^t\int_0^Rr'\sum_{n=1}^\infty e^{-a^2\frac{\mu_{n}^2}{R^2}(t-\tau)}j_n(r)j_n(r')e^{-r'^2}\,dr'd\tau=
$$
$$
\sum_{n=1}^\infty j_n(r)\left(\int_0^t e^{-a^2\frac{\mu_{n}^2}{R^2}(t-\tau)}d\tau\right) \left(\int_0^Rr'j_n(r')e^{-r'^2}\,dr'\right)=
$$
$$
\frac {R^2}{a^2}\sum_{n=1}^\infty c_n\frac{1-e^{-a^2\frac{\mu_{n}^2}{R^2}t}}{\mu_n^2}j_n(r).
$$
