# Solving a heat equation in spherical coordinates

Suppose we have an infinite fluid surrounding a ball. I want to solve the following PDE, which describes the heat diffusion in the fluid (simplifications have been made): $$\partial_t\theta=\alpha\Delta\theta$$ with boundary conditions $\theta(r=R,t)=0$ and $\lim_{r\to\infty}\theta(r,t)=0$, and initial condition $\theta(r,t=0)=f(r)$. Using separation of variables $\theta(r,t)=F(r)G(t)$. So for $G$ I obtain the ODE $$G'+\alpha\lambda^2 G=0$$ which integrates into $G(t)=A\exp\left(-\alpha\lambda^2 t\right)$, where $-\lambda^2$ is the separation constant. Now for $F(r)$ I obtain the ODE $$F''+\frac{2}{r}F'+\lambda^2 F=0$$ which integrates into $F(r)=B\frac{\sin(\lambda r)}{r}+C\frac{\cos(\lambda r)}{r}$. So the second boundary condition is automatically satisfied, and the first one yields $$B\sin(\lambda R)+C\cos(\lambda R)=0.$$ But I don't know how to go further. If I put $B=C=0$, then I obtain the trivial solution, which isn't feasible. I could put $B=0$ and $C\neq 0$, or $B\neq0$ and $C=0$, but then the corresponding values of $\lambda$ would yield two different solutions. Finally if I keep both $B\neq 0$ and $C\neq 0$ then I obtain $D\tan(\lambda R)=1$ where $D=-\frac{C}{B}$, from where I cannot go further.

Thanks for any help, or any textbook that deals with that kind of problem.

• Are you sure you want $r\to \infty$ and not $t\to\infty$? Moreover, are you assuming radial symmetry to get to such simplification? – b00n heT Feb 2 '17 at 11:01
• @b00nheT: Yes I want $r\to\infty$ and I can assume radial symmetry, essentially because the boundary/initial conditions don't make use of the other variables $\theta$ and $\varphi$. – xuanphong Feb 2 '17 at 11:12

The $r$ solution would be $$\frac{\sin(\lambda(r-R))}{r}=\cos(\lambda R)\frac{\sin(\lambda r)}{r}-\sin(\lambda R)\frac{\cos(\lambda r)}{r}.$$ So the heat equation solution is $$\int_{0}^{\infty}e^{-\alpha\lambda^2 t}c(\lambda)\frac{\sin(\lambda(r-R))}{r}d\lambda,$$ where $c(\lambda)$ is a coefficient function determined by the initial condition $$rf(r)=\int_{0}^{\infty}c(\lambda)\sin(\lambda(r-R))d\lambda \\ (r+R)f(r+R) = \int_{0}^{\infty}c(\lambda)\sin(\lambda r)d\lambda.$$ The coefficient function is then determined by the inverse Fourier sine transform: $$c(\lambda) = \frac{2}{\pi}\int_{0}^{\infty}(s+R)f(s+R)\sin(\lambda s)ds$$