Diffusion equation in sphere with boundary conditions

767 Views Asked by At

I have the diffusion equation in a sphere of radius R given by:

$$\frac{\partial U(r,t)}{\partial t} = D\left[\frac{\partial^2 U(r,t)}{\partial r^2} + \frac{2}{r}\frac{\partial U(r,t)}{\partial r}\right]$$

$D$ is a constant greater than $1$, with boundary conditions:

$$\begin{array} UU(r,0)&=\frac{4}{r}\sin^3 \left(\frac{\pi r}{R }\right) \\ U(R,t)&=0 \end{array}$$

and $|U (0,t)|$ is finite for all $t$.

Using separation of variables I have:

$$U=T(t)R(r)$$

with

$$T=c\exp(pDt)$$

where $c$ is a constant, and

$$R=A \frac{\sin ((\sqrt p)r)}{r}+B\frac{\cos((\sqrt p)r)}{r}$$ with $A$ and $B$ as constants.

I'm now confused how to implement the boundary conditions,normally I just get $B$ to be $0$ but this time I have a different boundary condition dealing with the boundary,so I'm missing the eigenvalue equation I normally have.

I think after that I can use the formula for $\sin 3r$ to compare coefficients in the infinite sum to find my solution but how do I get the $\frac{\pi }{R}$ in my infinite sum?

.