I have to the following diffusion problem , which is given by the one-dimensional diffusion equation:
\begin{equation} \frac{d^2}{dx^2}f=\frac{1}{a^2}\frac{d}{dt}f \end{equation}
It is given that the diffusion constant is $1/4$, so I take that is $a$. So we have to solve:
\begin{equation} \frac{d^2}{dx^2}f=16\frac{d}{dt}f \end{equation}
The initial conditions are
\begin{equation} u(x,0)= \begin{cases} 2 \ \ \ 0\leq x\leq1\\ 0 \ \ \ x>1 \end{cases} \end{equation}
I assume that since this is a time-dependent problem, the solution must be a function in the form $f(x,t)$. So f can be represented as $f=\Psi(x)T(t)$, and we can obtain the solution by separation of variables. This gives:
\begin{equation} \begin{array} s16f_{xx}=f_t\\ 16\Psi_{xx}T=T_t\Psi \\ 16\frac{\Psi_{xx}}{\Psi}=\frac{T_t}{T} \\ 16\frac{\Psi_{xx}}{\Psi}=\frac{T_t}{T}=k^2 \end{array} \end{equation}
Giving the two ODEs:
\begin{equation} \begin{array} a16\Psi_{xx}-k^2\Psi=0\\ T_t-k^2T=0 \end{array} \end{equation}
The former is solved by the characteristic determinant:
\begin{equation} \begin{array} 16\Psi_{xx}-k^2\Psi=0\\ m=\frac{1}{2}\pm\sqrt{-4\cdot(-\frac{k^2}{16}}\\ \Psi(x)=Ae^{kx/4}+Be^{-kx/4} \end{array} \end{equation}
Since the I.C. shows existence at the origin of the solution, then the cosine terms vanish, and we have:
\begin{equation} \Psi(x)=A\sin{kx/4} \end{equation}
The second equation is solved by
\begin{equation} \begin{array} l T_t-k^2T=0\\ \frac{1}{t}dT=k^2dt\\ T(t)=Ce^{k^2t} \end{array} \end{equation}
Combining the two in one form, $f=\Psi T$:
\begin{equation} f(x,t)=A\sin(k/4x)e^{k^2t} \end{equation}
But when I apply the IC I run into a problem:
For $0\leq x\leq 1$, where $f(x,0)=0$
\begin{equation} \begin{array} 1 A\sin(kx/4)e^{0}=0\\ k=\frac{4n\pi}{x} \rightarrow \\ f(x,t)=A\sin(n\pi)e^{k^2t} \end{array} \end{equation}
So there is no $x$variable anymore. And with the second IC, A=0. So this has not worked. What is wrong?
Thanks