- #1
member 428835
Given the PDE $$f_t=\frac{1}{r^2}\partial_r(r^2 f_r),\\
f(t=0)=0\\
f_r(r=0)=0\\
f(r=1)=1.$$
We let ##R(r)## be the basis function, and is determined by separation of variables: ##f = R(r)T(t)##, which reduces the PDE in ##R## to satisfy $$\frac{1}{r^2 R}d_r(r^2R'(r)) = -\lambda^2:\lambda^2 \in \mathbb{R}.$$ To ensure ##R## is orthonormal and satisfies the ODE we find ##R = \sqrt{2} \sin (\lambda_n r)/r:\lambda_n = n\pi## (note we let ##R(0)=R(1)=0##). What happens next I find very confusing:
$$
\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 f_r) \right)\, dr = r^2R f|_{r=0}^{r=1}-\int_0^1R'(r)r^2f_r \, dr\\
= -R'(r)r^2 f|_{r=0}^{r=1}+\int_0^1 \partial_r(r^2 R'(r))f \, dr\\
= -\sqrt{2} \lambda_n (-1)^n-\lambda_n^2 T(t).
$$
However, noting that ##f = R(r)T(t)## and that ##R(r) = \sqrt{2} \sin (\lambda_n r)/r##, Mathematica gives me $$T(t)\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 R'(r)) \right)\, dr = -\lambda_n^2T(t).$$ So, where's my mistake?
f(t=0)=0\\
f_r(r=0)=0\\
f(r=1)=1.$$
We let ##R(r)## be the basis function, and is determined by separation of variables: ##f = R(r)T(t)##, which reduces the PDE in ##R## to satisfy $$\frac{1}{r^2 R}d_r(r^2R'(r)) = -\lambda^2:\lambda^2 \in \mathbb{R}.$$ To ensure ##R## is orthonormal and satisfies the ODE we find ##R = \sqrt{2} \sin (\lambda_n r)/r:\lambda_n = n\pi## (note we let ##R(0)=R(1)=0##). What happens next I find very confusing:
$$
\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 f_r) \right)\, dr = r^2R f|_{r=0}^{r=1}-\int_0^1R'(r)r^2f_r \, dr\\
= -R'(r)r^2 f|_{r=0}^{r=1}+\int_0^1 \partial_r(r^2 R'(r))f \, dr\\
= -\sqrt{2} \lambda_n (-1)^n-\lambda_n^2 T(t).
$$
However, noting that ##f = R(r)T(t)## and that ##R(r) = \sqrt{2} \sin (\lambda_n r)/r##, Mathematica gives me $$T(t)\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 R'(r)) \right)\, dr = -\lambda_n^2T(t).$$ So, where's my mistake?