1.1.10 Diffusion-Convection. Both ends at zero temperature, no source. (also called advection)

\begin{equation} u_{t}=ku_{xx}+au_{x} \tag{1} \end{equation}

Where \(k>0,a>0\) and \(t>0,0<x<\pi \). BC are\begin{align*} u\left ( 0,t\right ) & =0\\ u\left ( \pi ,t\right ) & =0 \end{align*}

Initial conditions\[ u\left ( x,0\right ) =\sin \left ( x\right ) \qquad 0<x<\pi \] This problem can not currently be solved in Maple nor by Mathematica analytically.

solution

Trying separation of variables. Let \(u=XT\), then the PDE becomes\begin{align*} T^{\prime }X & =kX^{\prime \prime }T+aX^{\prime }T\\ \frac{1}{k}\frac{T^{\prime }}{T} & =\frac{X^{\prime \prime }}{X}+\frac{a}{k}\frac{X^{\prime }}{X}=-\lambda \end{align*}

Where \(\lambda \) is separation constant. Hence\[ T^{\prime }+k\lambda T=0 \] Which has solution \(T\left ( t\right ) =e^{-k\lambda t}\) (the constant of integration is not needed, it will be combined with constant coming from the spatial ODE), and the spatial ODE is\begin{align*} \frac{X^{\prime \prime }}{X}+\frac{a}{k}\frac{X^{\prime }}{X} & =-\lambda \\ X^{\prime \prime }+\frac{a}{k}X^{\prime }+\lambda X & =0\\ X\left ( 0\right ) & =0\\ X\left ( \pi \right ) & =0 \end{align*}

The characteristic equation is \(r^{2}+\frac{a}{k}r+\lambda =0\).

Case \(\lambda =0\) Then \(r^{2}+\frac{a}{k}r=0\) or \(r\left ( r+\frac{a}{k}\right ) =0\). Hence \(r=0\) or \(r=-\frac{a}{k}\). So the solution is\[ X\left ( x\right ) =c_{1}+c_{2}e^{-\frac{a}{k}x}\] At \(X\left ( 0\right ) =0\) the above gives \(0=c_{1}+c_{2}\). Therefore the solution is \(X\left ( x\right ) =c_{1}\left ( 1-e^{\frac{-a}{k}x}\right ) \). At \(X\left ( \pi \right ) =0\) then \(c_{1}\left ( 1-e^{\frac{a}{k}\pi }\right ) =0\). This means this for non-trivial solution \(e^{\frac{-a}{k}\pi }=1\) or \(\frac{-a}{k}\pi =0\). Hence \(\lambda =0\) is not an eigenvalue.

Case \(\lambda <0\) Then \(r^{2}+\frac{a}{k}r+\lambda =0\) or \(r=\frac{-b}{2}\pm \frac{\sqrt{b^{2}-4ac}}{2a}=\frac{-a}{2k}\pm \frac{\sqrt{\frac{a^{2}}{k^{2}}-4\lambda }}{2}\). Since \(\lambda <0\) then the term under the sqrt root is positive. Hence the solution will have real roots. Not complex conjugate. Hence the solution is pure exponentials.  Let \(\frac{a^{2}}{k^{2}}-4\lambda =\alpha \) and \(\frac{a}{2k}=\beta \) then\begin{align*} r_{1} & =-\beta +\sqrt{\alpha }\\ r_{2} & =-\beta -\sqrt{\alpha } \end{align*}

Then \(X\left ( x\right ) =c_{1}\cosh \left ( \left ( -\beta +\alpha \right ) x\right ) +c_{2}\sinh \left ( \left ( -\beta -\alpha \right ) x\right ) \). At \(X\left ( 0\right ) =0\) this gives \(0=c_{1}\). Hence solution is \(X\left ( x\right ) =c_{2}\sinh \left ( \left ( -\beta -\alpha \right ) x\right ) \). At \(X\left ( \pi \right ) =0\), this gives\[ 0=c_{2}\sinh \left ( \left ( -\beta -\alpha \right ) \pi \right ) \] For non-trivial solution, \(\sinh \left ( \left ( -\beta -\alpha \right ) \pi \right ) =0\). But this is zero only when \(\left ( -\beta -\alpha \right ) \pi \) or \(\beta =-\alpha \). Or \(\frac{-a}{2k}=-\sqrt{\frac{a^{2}}{k^{2}}-4\lambda }\). Or \(\frac{a^{2}}{4k^{2}}=\frac{a^{2}}{k^{2}}-4\lambda \) or\begin{align*} 4\lambda & =\frac{a^{2}}{k^{2}}-\frac{a^{2}}{4k^{2}}\\ \lambda & =\frac{3}{16}\frac{a^{2}}{k^{2}} \end{align*}

But \(\lambda \) was assumed negative. Hence this is not possible. \(\lambda <0\) is not eigenvalue.

Case \(\lambda >0\) Then \(r^{2}+\frac{a}{k}r+\lambda =0\) or \(r=\frac{-a}{2k}\pm \frac{1}{2}\sqrt{\frac{a^{2}}{k^{2}}-4\lambda }=\frac{-a}{2k}\pm \sqrt{\frac{a^{2}}{4k^{2}}-\lambda }\). Since \(\lambda >0\) then the term under the sqrt root can be negative. Then only when \(\lambda >\frac{a^{2}}{4k^{2}}\) will there be complex roots. Therefore assuming \(\lambda >\frac{a^{2}}{4k^{2}}\), then\begin{align*} r_{1} & =\frac{-a}{2k}+i\sqrt{\lambda -\frac{a^{2}}{4k^{2}}}\\ r_{2} & =\frac{-a}{2k}-i\sqrt{\lambda -\frac{a^{2}}{4k^{2}}} \end{align*}

The solution is\[ X\left ( x\right ) =e^{\frac{-a}{2k}x}\left ( c_{1}\cos \left ( \sqrt{\lambda -\frac{a^{2}}{4k^{2}}}x\right ) +c_{2}\sin \left ( \sqrt{\lambda -\frac{a^{2}}{4k^{2}}}x\right ) \right ) \] At \(X\left ( 0\right ) =0\) this gives \(0=c_{1}\). Hence solution is\[ X\left ( x\right ) =e^{\frac{-a}{2k}x}c_{2}\sin \left ( \sqrt{\lambda -\frac{a^{2}}{4k^{2}}}x\right ) \] At \(X\left ( \pi \right ) =0\), this gives\[ 0=e^{\frac{-a}{2k}\pi }c_{2}\sin \left ( \sqrt{\lambda -\frac{a^{2}}{4k^{2}}}\pi \right ) \] For non-trivial solution, \(\sin \left ( \sqrt{\lambda -\frac{a^{2}}{4k^{2}}}\pi \right ) =0\) or \(\sqrt{\lambda -\frac{a^{2}}{4k^{2}}}\pi =n\pi \). Hence\begin{align*} \lambda -\frac{a^{2}}{4k^{2}} & =n^{2}\qquad n=1,2,3,\cdots \\ \lambda _{n} & =n^{2}+\frac{a^{2}}{4k^{2}}\qquad n=1,2,3,\cdots \end{align*}

And the corresponding eigenfunction is \begin{align*} X_{n}\left ( x\right ) & =e^{\frac{-a}{2k}x}c_{n}\sin \left ( \sqrt{\lambda -\frac{a^{2}}{4k^{2}}}x\right ) \qquad n=1,2,3,\cdots \\ & =e^{\frac{-a}{2k}x}c_{n}\sin \left ( nx\right ) \end{align*}

Therefore the solution is\begin{align*} u\left ( x,t\right ) & =\sum _{n=1}^{\infty }c_{n}e^{-k\lambda _{n}t}e^{\frac{-a}{2k}x}\sin \left ( nx\right ) \\ & =\sum _{n=1}^{\infty }c_{n}e^{-k\left ( n^{2}+\frac{a^{2}}{4k^{2}}\right ) t}e^{\frac{-a}{2k}x}\sin \left ( nx\right ) \end{align*}

\(c_{n}\) is found from initial conditions. At \(t=0\)\begin{align*} \sin \left ( x\right ) & =\sum _{n=1}^{\infty }c_{n}e^{\frac{-a}{2k}x}\sin \left ( nx\right ) \\ e^{\frac{a}{2k}x}\sin \left ( x\right ) & =\sum _{n=1}^{\infty }c_{n}\sin \left ( nx\right ) \end{align*}

Therefore, by orthogonality\begin{align*} \int _{0}^{\pi }e^{\frac{a}{2k}x}\sin \left ( x\right ) \sin \left ( nx\right ) dx & =c_{n}\frac{\pi }{2}\\ \frac{-16nak^{3}\left ( 1+(-1)^{n}e^{\frac{\pi a}{2k}}\right ) }{a^{4}+16k^{4}\left ( n^{2}-1\right ) ^{2}+8a^{2}k^{2}\left ( 1+n^{2}\right ) } & =c_{n}\frac{\pi }{2}\\ c_{n} & =-\frac{1}{\pi }\frac{32nak^{3}\left ( 1+(-1)^{n}e^{\frac{\pi a}{2k}}\right ) }{a^{4}+16k^{4}\left ( n^{2}-1\right ) ^{2}+8a^{2}k^{2}\left ( 1+n^{2}\right ) } \end{align*}

Hence the solution becomes\begin{align*} u\left ( x,t\right ) & =\sum _{n=1}^{\infty }c_{n}e^{-k\left ( n^{2}+\frac{a^{2}}{4k^{2}}\right ) t}e^{\frac{-a}{2k}x}\sin \left ( nx\right ) \\ & =\frac{-32ak^{3}}{\pi }\sum _{n=1}^{\infty }\left ( \frac{n\left ( 1+(-1)^{n}e^{\frac{\pi a}{2k}}\right ) }{a^{4}+16k^{4}\left ( n^{2}-1\right ) ^{2}+8a^{2}k^{2}\left ( 1+n^{2}\right ) }\right ) e^{-k\left ( n^{2}+\frac{a^{2}}{4k^{2}}\right ) t}e^{\frac{-a}{2k}x}\sin \left ( nx\right ) \end{align*}

The first animation is for \(a=1,k=1\) and the second for \(a=1,k=0.1\).

The following first animation is for \(a=5,k=1\) and the second for \(a=10,k=1\). This shows the effect of increasing the convection.