Using a FT to solve Heat Eqn Use an appropriate Fourier transform to solve the inhomogeneous heat equation
$$\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2} + \delta^{\prime}(x)$$ 
on $−\infty<x<\infty$  with the initial condition $U(x,0)=0$ , the delta function is the Dirac delta function.
I was able to use Fourier transformation on the diff eq. and I ended up with this eq: 
$\dfrac{\partial u}{\partial t} -\lambda^2 u + i\lambda$ where $u$ is the Fourier transformation of $U$.
Any help will be much appreciated. Thanks
 A: You are on the right track.  Let's define
$$U(k,t) = \int_{-\infty}^{\infty} dx \, u(x,t) \, e^{i k x}$$
Then, as you say, this transforms the PDE into an ODE:
$$\frac{d}{dt} U(k,t) + k^2 U(k,t) = i k$$
$$U(k,0) = 0$$
We may solve this ODE by using an integrating factor of $e^{k^2 t}$:
$$\frac{d}{dt} \left [e^{k^2 t} U(k,t) \right ] = i k e^{k^2 t} \implies e^{k^2 t} U(k,t) = C + i k \frac{e^{k^2 t}}{k^2}$$
or
$$U(k,t) = C e^{-k^2 t} + \frac{i}{k}$$
Applying the initial condition, we find that $C=-i/k$; thus
$$U(k,t) = i \frac{1-e^{-k^2 t}}{k}$$
Now we perform in inverse Fourier transform to get the solution:
$$u(x,t) = \frac{i}{2 \pi}  \int_{-\infty}^{\infty} dk \, \frac{1-e^{-k^2 t}}{k} e^{-i k x}$$
Here, we actually split up the integral because we know that
$$\int_{-\infty}^{\infty} dk \, \frac{1}{k} e^{-i k x} = i \pi\, \text{sgn}(x)$$
To get the other piece, differentiate with respect to $x$ to get the FT of a Gaussian, then integrate to reveal that
$$\int_{-\infty}^{\infty} dk \, \frac{e^{-k^2 t}}{k} e^{-i k x} = i \pi\, \text{erf}\left ( \frac{x}{2 \sqrt{t}}\right )$$
Putting this all together, we finally get for the solution $u$:
$$u(x,t) = \frac12 \left [\text{erf}\left ( \frac{x}{2 \sqrt{t}}\right ) - \text{sgn}(x) \right ] = -\frac12 \text{sgn}(x) \, \text{erfc}\left ( \frac{|x|}{2 \sqrt{t}}\right )$$
ADDENDUM
Here is a plot of the solution for values of $t$ ranging from $0.001$ to $5$.  Note that the initial condition is satisfied in the sense of the average at the point of discontinuity.  You should expect the discontinuity by the nature of the Dirac delta (or its derivative) in the equation:

A: $\newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert #1 \right\vert}%
 \newcommand{\yy}{\Longleftrightarrow}$

Let's define ${\rm f}\pars{x,t} = {\rm u}\pars{x,t} + \Theta\pars{x}$. Then,
${\rm f}\pars{x,t}$ satisfies:
$$
\partiald{{\rm f}\pars{x,t}}{t} = \partiald[2]{{\rm f}\pars{x,t}}{x}\,,
\qquad
{\rm f}\pars{x,0} = \Theta\pars{x}
\tag{1}
$$

$$
{\rm f}\pars{x,t}
=
\int_{-\infty}^{\infty}\tilde{\rm f}\pars{k}\expo{\ic\pars{kx - \omega_{k}\,t}}
\,{\dd k \over 2\pi}
\tag{2}
$$
By replacing in Eq. $\pars{1}$ we get the condition $-\ic\omega_{k} = -k^{2}$
such that ${\rm f}\pars{x,t}$ becomes:
$$
{\rm f}\pars{x,t}
=
\int_{-\infty}^{\infty}\tilde{\rm f}\pars{k}\expo{\ic kx - k^{2}t}
\,{\dd k \over 2\pi}
\qquad\mbox{and}\qquad
{\rm f}\pars{x,0}
=
\int_{-\infty}^{\infty}\tilde{\rm f}\pars{k}\expo{\ic kx}
\,{\dd k \over 2\pi}
$$
such that
$$
\tilde{\rm f}\pars{k}
=
\int_{-\infty}^{\infty}{\rm f}\pars{x,0}\expo{-\ic kx}\,\dd x
$$
${\rm f}\pars{x,t}$ becomes
\begin{align}
&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!{\rm f}\pars{x,t}
=
\int_{-\infty}^{\infty}\bracks{%
\int_{-\infty}^{\infty}{\rm f}\pars{x',0}\expo{-\ic kx'}\,\dd x'}
\expo{\ic kx - k^{2}t}\,{\dd k \over 2\pi}
=
\int_{-\infty}^{\infty}{\rm f}\pars{x',0}{\rm K}\pars{x - x',t}\,\dd x'
\\[3mm]&=
\int_{0}^{\infty}{\rm K}\pars{x - x',t}\,\dd x'
=
\int_{-\infty}^{0}{\rm K}\pars{x',t}\,\dd x'
+
\int_{0}^{x}{\rm K}\pars{x',t}\,\dd x'
\tag{3}
\end{align}
where we used the boundary condition given in $\pars{1}$ and
\begin{align}
{\rm K}\pars{x,t}
&\equiv
\int_{-\infty}^{\infty}\expo{\ic kx - k^{2}t}\,{\dd k \over 2\pi}
=
\int_{-\infty}^{\infty}\expo{-t\pars{k - \ic x/2t}^{2} - x^{2}/4t}
\,{\dd k \over 2\pi}
=
{\expo{-x^{2}/4t} \over 2\pi}\
\overbrace{\int_{-\infty}^{\infty}\expo{-tk^{2}}\,\dd k}
^{\ds{\root{\vphantom{\large A}\pi/t}}}
\\[3mm]&=
{\expo{-x^{2}/4t} \over 2\root{\pi t}}
\end{align}
Expression $\pars{3}$ is reduced to
\begin{align}
{\rm f}\pars{x,t}
&=
{1 \over 2\root{\pi t}}\
\overbrace{\int_{-\infty}^{0}{\expo{-x'^{2}/4t}}\,\dd x'}
^{\ds{\root{\pi t}}}
+
{1 \over 2\root{\pi t}}\,\int_{0}^{x}{\expo{-x'^{2}/4t}}\,\dd x'
\\[3mm]&=
{1 \over 2}
+
{1 \over 2}\
\overbrace{{2 \over \root{\pi}}\,\int_{0}^{x/2\root{\vphantom{\large A}t}}
{\expo{-x'^{2}}}\,\dd x'}
^{\ds{{\rm erf}\pars{x/2\root{t}}}}
=
{1 \over 2} + {1 \over 2}\,{\rm erf}\pars{x \over 2\root{t}}
\end{align}
Then
$$
{\rm u}\pars{x,t}
=
{\rm f}\pars{x,t} - \Theta\pars{x}
=
\overbrace{{1 \over 2} - \Theta\pars{x}}
^{\ds{-\,{1 \over 2}\sgn\pars{x}}}
+
{1 \over 2}\,{\rm erf}\pars{x \over 2\root{t}}
$$
$${\large%
{\rm u}\pars{x,t}
=
{1 \over 2}\bracks{{\rm erf}\pars{x \over 2\root{t}} - \sgn\pars{x}}}
$$
