# Solving the PDE $\frac{\partial T}{\partial t} = K\frac{\partial^{2} T}{\partial x^{2}}$

I am trying to find solutions to the following PDE:

$$\frac{\partial T}{\partial t} = K\frac{\partial^{2} T}{\partial x^{2}},$$ With boundary condition: $T(0,t)=T_{0}\cos(\omega t)$, where $\omega = \frac{2K}{a^{2}}$.

I am trying to solve this by separation of variables into $T(x,t) = X(x)F(t)$ so we have:

$$X(x)\frac{\partial F}{\partial t}=KF(t)\frac{\partial^{2} X}{\partial x^{2}}$$

Thus we have the following two conditions:

$$\frac{\partial F}{\partial t}=-\lambda K F(t) \land \frac{\partial ^{2} X}{\partial x^{2}}=-\lambda X(x)$$

Solving these (and taking into account that $\lambda$ can be arbitrary), we have:

$$F(t)=\sum_{\lambda} \alpha_{\lambda} \exp(-\lambda K t) \land X(x)=\sum_{\lambda}\left(A_{\lambda}\cos(\sqrt{\lambda}x)+B_{\lambda}\sin(\sqrt{\lambda}x)\right)$$

We have boundary condition:

$$T(0,t)=T_{0}\cos(\omega t)$$

However, I am having trouble now computing the coefficients $\alpha_{\lambda}$, $A_{\lambda}$ and $B_{\lambda}$.

The question in it's full form is given by:

The temperature $T$ in a one-dimensional bar whose sides are perfectly insulated obeys the heat flow equation: $$\frac{\partial T(x,t)}{\partial t}=K\frac{\partial^{2}T(x,t)}{\partial x^{2}}$$ where $K$ is a constant. The bar extends from $x=0$ to $x=\infty$. The temperature at the end $x=0$ oscillates in time according to $T(x=0,t)=T_{0}\cos(\omega t)$. By looking for solutions that are separated in $x$ and $t$ ($T = X(x)F(t)$) find the solution for all $x \geq 0$ and $t$, which matches the boundary condition at $x=0$. Sketch $T$ versus $x$ for $\omega t = \pi/2$, given that $\frac{\omega}{2K}=\frac{1}{a^{2}}$.

• You need another boundary condition, and an initial condition, i.e. $T(x,0)$. Jan 1, 2015 at 15:42
• @RonGordon I'm not given another boundary condition in the question, and can't infer one from what I'm given (I believe); I'll upload the entire question and it's exposition to my question to see if there's something I've missed. Thanks! Jan 1, 2015 at 15:44
• You have semi infinite domain. Shouldn't you use a Fourier transform instead? Jan 1, 2015 at 16:36
• @dustin Initially I would indeed use a Fourier transform, but here it's specified separation of variables which is where the confusion is arising!! :( Jan 1, 2015 at 16:37
• I think the problem requires a Laplace transform. I've worked it out, but the integral involved is nasty. The problem is specifying the BC at infinity using the separation of variables framework. I'm also not sure that the problem is stated very well. Jan 1, 2015 at 17:47

$\newcommand{\angles}{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\dsc}{\displaystyle{\color{red}{#1}}} \newcommand{\expo}{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}{\,{\rm Li}_{#1}} \newcommand{\norm}{\left\vert\left\vert\, #1\,\right\vert\right\vert} \newcommand{\pars}{\left(\, #1 \,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}{\underline{#1}} \newcommand{\verts}{\left\vert\, #1 \,\right\vert}$ Look for solutions of the form $\ds{\,{\rm T}\pars{x,t} \equiv \bracks{% \,{\rm s}\pars{x}\sin\pars{\omega t} + \,{\rm c}\pars{x}\cos\pars{\omega t}}}$ which satisfies $\ds{\partiald{\,{\rm T}\pars{x,t}}{t} = K\,\partiald{\,{\rm T}\pars{x,t}}{x}}$ with $\ds{\,{\rm s}\pars{0} = 0}$ and $\ds{\,{\rm c}\pars{0} = T_{0}}$.

\begin{align}&\omega\,{\rm s}\pars{x}\cos\pars{\omega t} -\omega\,{\rm c}\pars{x}\sin\pars{\omega t} =K\,{\rm s}''\pars{x}\sin\pars{\omega t} + K\,{\rm c}''\pars{x}\cos\pars{\omega t} \\[5mm]& \imp\quad\,{\rm c}''\pars{x} - {\omega \over K}\,{\rm s}\pars{x} = 0\,,\qquad \,{\rm s}''\pars{x} + {\omega \over K}\,{\rm c}\pars{x} = 0 \\[5mm]&\imp\quad\bracks{\,{\rm c}''\pars{x} + \ic\,{\rm s}''\pars{x}} +\ic\,{\omega \over K}\bracks{\,{\rm c}\pars{x} + \ic\,{\rm s}\pars{x}}=0 \end{align}

Solutions are linear combinations of

\begin{align}&\dsc{\exp\pars{\pm\root{\ic\,{\verts{w} \over K}}x}} =\exp\pars{\pm\pars{1 + \ic}\root{{\verts{w} \over 2K}}x} \\[5mm]&=\exp\pars{\pm\,{x \over a}} \exp\pars{\pm\ic\,{x \over a}} \end{align}

Since the equation is the second order in $\ds{x}$, it will require another condition. Lets require, $\dsc{\mbox{for example}}$, that $\ds{\lim_{x\ \to\ \infty}\,{\rm T}\pars{x,t} = 0}$. In that case the solution becomes: $$\,{\rm c}\pars{x} + \ic\,{\rm s}\pars{x}=T_{0}\expo{-x/a}\cos\pars{x \over a} \quad\imp\quad\left\{\begin{array}{rcl} \,{\rm c}\pars{x} & = & T_{0}\expo{-x/a}\cos\pars{x \over a} \\[2mm] \,{\rm s}\pars{x} & = & 0 \end{array}\right.$$

$$\color{#66f}{\large\,{\rm T}\pars{x,t}} =\color{#66f}{\large T_{0}\expo{-x/a}\cos\pars{x \over a}\cos\pars{\omega t}}$$