How to solve the diffusion equation in a ball using fourier series

261 Views Asked by At

This is quite a simple question, but it's been about 7 years since I've solved something like this, so need a little bit of help to refresh me!

Problem

Suppose we have a ball, radius $r_0$, with the diffusion equation $$\frac{\partial c(r,t)}{\partial t} = D\nabla^2 c(r,t), \quad r\in[0,r_0],t\geq 0$$

with robin boundary conditions $$ -D\frac{\partial c}{\partial r} = pc ,\quad \text{on}\ \ r=r_0 $$

with initial conditions $$c(r,0)=c_0\qquad \forall r\in[0,r_0]$$

How far I have got

If we let $$c = R(r)T(t)$$

then we find $T(t)=\exp(-D \lambda^2 t)$ and

$$r^2R''+2rR'+\lambda^2r^2R=0$$

Letting $Q(r):=r\>R(r)$ we find

$$r(Q''+\lambda^2 Q)=r^2R''+2rR'+\lambda^2 r^2R=0$$

Which upon solving and back substitution we find

$$R(r)={1\over r}\sin(\lambda r)$$

BC imply that $$\tan r_0\lambda={D\over D-r_0p}r_0\lambda$$

Which has infinite +ve solutions, giving us

$$c(r,t) = \sum_{n=1}^{\infty}{A_n\over r}\sin(\lambda r)\exp(-D \lambda^2 t)$$

As $\lambda_0=0$. Therefore $$c_0 = \sum_{n=1}^{\infty}{A_n\over r}\sin(\lambda r),\qquad \forall r\in[0,r_0]$$

Question

I know I'm being dense here, but could someone explain how to find $A_n$?

1

There are 1 best solutions below

3
On BEST ANSWER

I wouldn't call it a "quite simple" question.

Generally, the coefficients $A_n$ are found by expanding the initial condition ($c_0$ here) in the basis formed by the eigenfunctions (here $R_n(r) = \frac{1}{r}\sin (\lambda_nr)$). The eigenfunctions are orthogonal for any symmetric differential operator $L$, that is $\langle Lf, g\rangle = \langle f, Lg\rangle$ for all functions $f,g$ that satisfy the boundary conditions. The inner product $\langle \cdot, \cdot\rangle$ here is an integral, possibly with a weight. When the eigenfunctions are orthogonal, their coefficients are $$ A_n = \frac{\langle c_0, R_n\rangle }{\langle R_n, R_n\rangle } $$

In this case, I somehow fail to see $Lf=r^2f''+2rf'+\lambda^2 r^2 f$ as symmetric even with a weight; but even if it is and the eigenfunctions are orthogonal with some weight, the explicit computation of coefficients is hopeless because $\lambda_n$ are not known explicitly.