# PDE Heat Equation with Variable Coefficient {Second ODE Variable Coefficient}

Another PDE question:

If I have a non constant coefficients in my heat equation (PDE), how do I solve it? For example we have: $\frac {\partial T}{\partial t} =\frac {\partial ^2 T}{\partial r^2} + \frac 2r \frac {\partial T}{\partial r}$

{The original question is actually $\frac {\partial T}{\partial t} =\frac {1}{r^2} \frac{\partial}{\partial r} ( r^2 \frac {\partial T}{\partial r})$ but I simplified it because I dont see any other way that would help me solve the question, or do I?}

We are supposed to make it separable and so now we have: (with ansatz $T(r,t)=F(r)G(t)$) $\frac{G'(t)}{G(t)}=\frac{F''(r)}{F(r)}+\frac 2r \frac{F'(r)}{F(r)}=\lambda$

So we have two separable equations: $F''(r) +\frac 2r F'(r) - \lambda F(r) =0$ and also $G'(t)-\lambda G(t)=0$

Right. Then how do I proceed with this? I mean we now have a perfectly fine ODE but I could not solve this, because its either using the reduction order, in which we have to know one of the solution, or using the Greene function, in which I don't know how to even do a complimentary function in this question.

-- Edit: Boundary Condition is $\frac {\partial T}{\partial r}(1,t) = 0, t>0$; Initial Condition is $T(r,0)=r^2, 0<r<1$

-- Edit #2: Boundary condition is $\frac{\partial T}{\partial r}(1,t)=0$. I tried doing the eigenvalue thing but with this being the only boundary condition, I can't do anything to eliminate constants.

• Do you have any boundary conditions? And I would be very surprised if your teacher wanted you to simplify. Commented Apr 26, 2015 at 16:02
• which ODE do you mean? Commented Apr 26, 2015 at 16:10
• @Mattos yeah ill edit the question and put in the boundary condition. Oh am I not supposed to simplify? What do I do then? Change variables? Commented Apr 26, 2015 at 17:14
• @Dr.SonnhardGraubner F″(r)+2rF′(r)−λF(r)=0 this ODE Commented Apr 26, 2015 at 17:14
• should i post you the solution? Commented Apr 26, 2015 at 17:21

Hint:

Let $T=\dfrac{U}{r}$ ,

Then $\dfrac{\partial T}{\partial t}=\dfrac{1}{r}\dfrac{\partial U}{\partial t}$

$\dfrac{\partial T}{\partial r}=\dfrac{1}{r}\dfrac{\partial U}{\partial r}-\dfrac{U}{r^2}$

$\dfrac{\partial^2T}{\partial r^2}=\dfrac{1}{r}\dfrac{\partial^2U}{\partial r^2}-\dfrac{1}{r^2}\dfrac{\partial U}{\partial r}-\dfrac{1}{r^2}\dfrac{\partial U}{\partial r}+\dfrac{2U}{r^3}=\dfrac{1}{r}\dfrac{\partial^2U}{\partial r^2}-\dfrac{2}{r^2}\dfrac{\partial U}{\partial r}+\dfrac{2U}{r^3}$

$\therefore\dfrac{1}{r}\dfrac{\partial U}{\partial t}=\dfrac{1}{r}\dfrac{\partial^2U}{\partial r^2}-\dfrac{2}{r^2}\dfrac{\partial U}{\partial r}+\dfrac{2U}{r^3}+\dfrac{2}{r}\left(\dfrac{1}{r}\dfrac{\partial U}{\partial r}-\dfrac{U}{r^2}\right)$

$\dfrac{1}{r}\dfrac{\partial U}{\partial t}=\dfrac{1}{r}\dfrac{\partial^2U}{\partial r^2}-\dfrac{2}{r^2}\dfrac{\partial U}{\partial r}+\dfrac{2U}{r^3}+\dfrac{2}{r^2}\dfrac{\partial U}{\partial r}-\dfrac{2U}{r^3}$

$\dfrac{1}{r}\dfrac{\partial U}{\partial t}=\dfrac{1}{r}\dfrac{\partial^2U}{\partial r^2}$

$\dfrac{\partial U}{\partial t}=\dfrac{\partial^2U}{\partial r^2}$

Let $U(x,t)=R(r)T(t)$ ,

Then $R(r)T'(t)=R''(r)T(t)$

$\dfrac{T'(t)}{T(t)}=\dfrac{R''(r)}{R(r)}=-s^2$

$\begin{cases}\dfrac{T'(t)}{T(t)}=-s^2\\R''(r)+s^2R(r)=0\end{cases}$

$\begin{cases}T(t)=c_3(s)e^{-ts^2}\\R(r)=\begin{cases}c_1(s)\sin((r-1)s)+c_2(s)\cos((r-1)s)&\text{when}~s\neq0\\c_1r+c_2&\text{when}~s=0\end{cases}\end{cases}$

$\therefore T(r,t)=\dfrac{1}{r}\int_0^\infty C_1(s)e^{-ts^2}\sin((r-1)s)~ds+\dfrac{1}{r}\int_0^\infty C_2(s)e^{-ts^2}\cos((r-1)s)~ds$

$\dfrac{\partial T}{\partial r}=\dfrac{1}{r}\int_0^\infty sC_1(s)e^{-ts^2}\cos((r-1)s)~ds-\dfrac{1}{r^2}\int_0^\infty C_1(s)e^{-ts^2}\sin((r-1)s)~ds-\dfrac{1}{r}\int_0^\infty sC_2(s)e^{-ts^2}\sin((r-1)s)~ds-\dfrac{1}{r^2}\int_0^\infty C_2(s)e^{-ts^2}\cos((r-1)s)~ds$

$\dfrac{\partial T}{\partial r}(1,t)=0$ :

$\int_0^\infty sC_1(s)e^{-ts^2}~ds-\int_0^\infty C_2(s)e^{-ts^2}~ds=0$

$\int_0^\infty(sC_1(s)-C_2(s))e^{-ts^2}~ds=0$

$sC_1(s)-C_2(s)=0$

$C_2(s)=sC_1(s)$

$\therefore T(r,t)=\dfrac{1}{r}\int_0^\infty C_1(s)e^{-ts^2}\sin((r-1)s)~ds+\dfrac{1}{r}\int_0^\infty sC_1(s)e^{-ts^2}\cos((r-1)s)~ds$

$T(r,0)=r^2$ :

$\dfrac{1}{r}\int_0^\infty C_1(s)\sin((r-1)s)~ds+\dfrac{1}{r}\int_0^\infty sC_1(s)\cos((r-1)s)~ds=r^2$

$\int_0^\infty C_1(s)\sin((r-1)s)~ds+\int_0^\infty sC_1(s)\cos((r-1)s)~ds=r^3$

$\int_0^\infty C_1(s)\sin rs~ds+\int_0^\infty sC_1(s)\cos rs~ds=(r+1)^3$

$\int_0^\infty C_1(s)\sin rs~ds+\int_0^\infty sC_1(s)\cos rs~ds=r^3+3r^2+3r+1$