I'm trying to find the time dependent solution to the heat equation in a very long cylinder (the problem only depends on radius, r, and time, t) with the initial value $T(r,0)=T_1$ and the Dirichlet conditions $T(R,t)=T_2$ and $T(0,t)=T_0$, where $R$ is the radius of the cylinder. The PDE is

$$\partial_tT-a\nabla^2T=0 \, .$$

I started to use the separation of variables method and correctly got the general solution

$$T(r,t)=\sum_{n=1}^\infty A_n J_0(k_nr)e^{-ak_n^2t}$$

where $J_0(k_nr)$ is a Bessel function.

I don't understand how to decide the coefficient $A_n$. My textbook says that I should first use the initial value, which in this case would remove the exponential term, leaving

$$T(r,0)=T_1-T_2=\sum_{n=1}^\infty A_nJ_0(k_nr) \, .$$

Now my book says I should multiply with the function inside the sum and change $n$ to an $m$ and then integrate, which would give me

$$\int_0^R J_0(k_mr)(T_1-T_2)dr=\sum A_n\int_0^R J_0(k_nr)J_0(k_mr)dr \, .$$

However the correct answer to this problem says that you should multiply with $J_0(k_mr)r$ instead of $J_0(k_mr)$ and then puts $m=n$.

My questions are therefore:

- Where does the extra $r$ come from?
- Why can you assume $m=n$?

I feel like I don't understand the theory behind finding these coefficients in series so I hope someone can explain the basics.

## Best Answer

In one way you might say that the $r$ is coming from the fact that you are in cylindrical coordinates, but more importantly, you want to get rid of the infinite sum over $n$. You do so by using a orthogonality relation of the Bessel functions. Here one uses

$$\int_0^1 x J_\alpha(u_{\alpha,m}x)J_\alpha((u_{\alpha,n}x)\mathrm{d}x = \frac{\delta_{m,n}}{2}[J_{\alpha+1}(u_{\alpha,m})]^2$$

where $u_{\alpha,m}$ is the $m$'s zero of $J_\alpha(x)$. Check the wiki. So, you are getting rid of the infinite sum by multiplying with "orthogonal" functions. You do the same in a Fourier series where you would use

$$\int_0^T \sin(\omega_n t) * ... \mathrm{d}t $$

with $\omega_n= 2\pi n/T$ and you know that

$$\int_0^T \sin(\omega_n t) \sin(\omega_m t) \mathrm{d}t \propto\delta_{m,n} \, .$$

It's the same thing. Hence, the trick is actually that this integral requires $m=n$ due to the orthogonality; all other contributions are automatically zero.