If $h(x,t)=\int_{\mathbb R}\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}dy$ why can I permute $\partial _t$, $\partial _x$ and integral? Let $$h(x,t)=\int_{\mathbb R}\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}dy.$$ 
Why $$\partial _th(x,t)=\int_{\mathbb R}\partial _t\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}dy$$
and $$\partial _xh(x,t)=\int_{\mathbb R}\partial _x\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}dy\ \ ?$$

I know that if for a.e. $y$, $x\mapsto p(x,y)$ is differentiable and if there is $k\in L^1$ s.t. $|\partial _xp(x,y)|\leq k(y),$

then $$\partial _x\int_{\mathbb R}p(x,y)dy=\int_{\mathbb R}\partial _x p(x,y)dy.$$ 

Unfortunately, if $p(x,y,t)=\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}$, I can't bound uniformly in $t$ the function $|\partial _t p(x,y,t)|$ neither bound $|\partial _x p(x,y,t)|$ uniformly in $x$. Any idea ? 



In the book PDE of Evans they say : since $\Phi:(x,t)\mapsto \frac{1}{\sqrt{t2\pi}}e^{-\frac{x^2}{2t}}$ is infinitely differentiable on $\mathbb R\times [\delta ,\infty )$ for all $\delta &gt;0$, we have that $$h_t=\int_{\mathbb R}\Phi_t\quad \text{and}\quad h_{xx}=\int_{\mathbb R}\Phi_{xx},$$
but I don't really understand the argument.
For $0 &lt; \delta_1 \leqslant t  \leqslant \delta_2$ we have

$$\left|\partial _t\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}\right| = \left|\frac{-1}{2\sqrt{2\pi}t^{3/2}}e^{-\frac{(x-y)^2}{2t}} + \frac{(x-y)^2}{2\sqrt{2\pi}t^{5/2}}e^{-\frac{(x-y)^2}{2t}}\right| \\\leqslant \frac{1}{2\sqrt{2\pi}\delta_1^{3/2}}e^{-\frac{(x-y)^2}{2\delta_2}} + \frac{(x-y)^2}{2\sqrt{2\pi}\delta_1^{5/2}}e^{-\frac{(x-y)^2}{2\delta_2}}$$

The RHS is integrable with respect to $y$ over $\mathbb{R}$ and by the Weierstrass M-test we have uniform convergence for $t \in [\delta_1, \delta_2]$ of

$$\int_{\mathbb R}\partial _t\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}\,dy$$

Clearly, the uniform convergence holds for $t$ in any compact interval contained in $(0,\infty)$ and that is enough to prove that for all $t &gt;0 $,

$$\tag{*}\partial _th(x,t)=\int_{\mathbb R}\partial _t\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}} \, dy$$

The switching of the partial $x$-derivative and the integral can be justified in a similar way.

We also have

$$\left|\partial _x\frac{1}{\sqrt{2\pi t}}e^{-\frac{(x-y)^2}{2t}}\right| = \left|\frac{-2(x-y)}{\sqrt{2\pi}t^{3/2}}e^{-\frac{(x-y)^2}{2t}} \right| = \frac{2|x-y|}{\sqrt{2\pi}t^{3/2}}e^{-\frac{|x-y|^2}{2t}}$$

Note that for $\delta_1 \leqslant |x| \leqslant \delta_2$ we have $|x-y| \leqslant |x| + |y| \leqslant \delta_2 +|y|$ and $-|x- y|^2 \leqslant -||x| - |y||^2 = -|y|^2 + 2|x||y| - |x|^2$, and, thus, 

$$\exp\left(-\frac{|x-y|^2}{2t}\right) \leqslant \exp\left(-\frac{|y|^2}{2t}\right)\exp\left(\frac{|x||y|}{t}\right)\exp\left(-\frac{|x|^2}{2t}\right) \\ \leqslant \exp\left(-\frac{|y|^2}{2t}\right)\exp\left(\frac{\delta_2|y|^2}{t}\right)\exp\left(-\frac{\delta_1^2}{2t}\right)$$ 

Again, we can find an integrable upper bound independent of $x$ is a compact interval and can apply the Weierestrass M-test to obtain uniform convergence of the integral of the partial $x$-derivative.  This justifies the integral-derivative switch for all $x \in \mathbb{R}$.
THEOREM 1.(Leibnitz)
Let $f(t,x)$ be continuous in $D=\left[t_1,t_2\right]\times\left[a,b\right]$. If exists the partial derivative $\partial f/\partial t$ and is continuous in $D$, then the function $g:\left[t_1,t_2\right]\rightarrow \textbf{R}$, which is defined as
$$
g(t)=\int^{b}_{a}f(t,x)dx,
$$ 
is differentiable in $(t_1,t_2)$ and we have
$$
g'(t)=\int^{b}_{a}\frac{\partial f(t,x)}{\partial t}dx\textrm{, }\forall t\in\left(t_1,t_2\right)
$$

In case the integral is generalized, for example
$$
\int^{\infty}_{a}f(t,x)dx,
$$
we have the next theorem

THEOREM 2.
We set $D_N=\left[t_1,t_2\right]\times\left[a,N\right]$ and 
$$
g_N(t)=\int^{N}_{a}f(t,x)dx,
$$
for $N$ arbitrary large. If
$$
f(t,x)\textrm{ is continuous in }D_{\infty}\tag 1
$$ 
and
$$
\partial f/\partial t\textrm{ exists and is continuous in }D_{\infty}\tag 2
$$
and
$$
g(t)=\lim_{N\rightarrow\infty}g_{N}(t)&lt;\infty\textrm{, uniformly in }D_{\infty}\tag 3
$$
and
$$
\exists t_0\in\left[t_1,t_2\right]:
\int^{\infty}_{a}f(t_0,x)dx&lt;\infty.\tag 4
$$
Then we have
$$
\frac{d}{dt}\int^{\infty}_{a}f(t,x)dx=\int^{\infty}_{a}\frac{\partial f(t,x)}{\partial t}dx.
$$
PROOF. From Leibnitz theorem we have
$$
g_N'(t)=\int^{N}_{a}\frac{\partial f(t,x)}{\partial t}dx
$$
Taking the limits (since $g_N(t)$ is term by term differentiatable from (3),(4))
$$
g'(t)=\lim_{N\rightarrow\infty}g_N'(t)=\int^{\infty}_{a}\frac{\partial f(t,x)}{\partial t}dx.
$$
QED

NOTE. The integral you investigate is always constant (for all reals $x,t$, with $t&gt;0$) since if we set
$$
I(x,t):=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{-\infty}\exp\left(-\frac{(x-y)^2}{2t}\right)dy.
$$
For the integral to converge we must have $t&gt;0$.
Then with change of variable $y=x+w$, we get $dy=dw$. Hence
$$
I(x,t)=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{-\infty}\exp\left(-\frac{w^2}{2t}\right)dw=\frac{2}{\sqrt{2\pi t}}\int^{\infty}_{0}\exp\left(-\frac{w^2}{2t}\right)dw
$$ 
Set now $w^2=u$. Then
$$
I(x,t)=\frac{2}{\sqrt{2\pi t}}\int^{\infty}_{0}e^{-u/(2t)}\frac{1}{2\sqrt{u}}du=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{0}e^{-u/(2t)}u^{-1/2}du.
$$
Now set $u=2vt$. Hence $du=2tdv$ and the integral becomes
$$
I(x,t)=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{0}e^{-v}(2t)^{-1/2}v^{-1/2}2tdv=\frac{\sqrt{2t}}{\sqrt{2\pi t}}\int^{\infty}_{0}e^{-v}v^{1/2-1}dv.
$$
But we have
$$
\Gamma(s)=\int^{\infty}_{0}e^{-v}v^{s-1}dv\textrm{, }s\neq 0,-1,-2,\ldots.
$$
Hence
$$
I(x,t)=\sqrt{\frac{1}{\pi}}\Gamma\left(\frac{1}{2}\right)=1=const
$$

However for pedagogically reasons I will try to apply Theorem 2.

In your case for $x,t$ you have to show that
$$
I^{(1)}_{N}(x,t):=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{N}\exp\left(-\frac{(x-y)^2}{2t}\right)dy&gt;0
$$
is such that 
$$
\lim_{N\rightarrow\infty}I^{(1)}_N(x,t)=0\textrm{, uniformly
 }
$$ 
and the same with
$$
I^{(2)}_N(x,t)=\frac{1}{\sqrt{2\pi t}}\int^{-N}_{-\infty}\exp\left(-\frac{(x-y)^2}{2t}\right)dy=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{N}\exp\left(-\frac{(x+y)^2}{2t}\right)dy
$$
The first of which ($I^{(1)}_{N}(x,t)$) for $y=x+w$ and $N$ large $N&gt;x$, gives
$$
I^{(1)}_N(x,t)=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{N-x}\exp\left(-\frac{w^2}{2t}\right)dw.
$$ 
As above notes I make the change of variables $z=w^2$. Hence $dw=\frac{dz}{2\sqrt{z}}$, $z&gt;0$. Then
$$
I^{(1)}_N(x,t)=\frac{1}{\sqrt{2\pi t}}\int^{\infty}_{(N-x)^2}\exp\left(-\frac{z}{2t}\right)\frac{dz}{2\sqrt{z}}.
$$
Make now the change of variable $u=z/(2t)$. This will give us:
$$
I^{(1)}_N(x,t)=\frac{1}{\sqrt{2\pi t}}\frac{2t}{2\sqrt{2t}}\int^{\infty}_{(N-x)^2/(2t)}e^{-u}\frac{du}{\sqrt{u}}.
$$
Hence
$$
I^{(1)}_N(x,t)=\frac{1}{\sqrt{2\pi t}}\sqrt{\frac{t}{2}}\int^{\infty}_{(N-x)^2/(2t)}e^{-u}u^{1/2-1}du=\frac{1}{2\sqrt{\pi}}\Gamma\left(\frac{1}{2},\frac{(N-x)^2}{2t}\right).
$$
Hence for $N$ large such that $\frac{(N-x)^2}{2t}=M&gt;1$, then 
$$
0&lt;I^{(1)}_{N}(x,t)\leq\int^{\infty}_{M}e^{-u}du=e^{-M}=\exp\left(-\frac{(N-x)^2}{2t}\right)\rightarrow 0 \textrm{, when }N\rightarrow\infty.
$$

The same holds and for $I^{(2)}_N(x,t)$.

Hence we can write according Theorem 2
$$
\frac{d}{dx}\int^{\infty}_{0}\exp\left(-(x-y)^2/(2t)\right)dy=-\int^{\infty}_{0}\frac{x-y}{t}\exp\left(-(x-y)^2/(2t)\right)dy\tag 5
$$
Also in the same way
$$
\int^{0}_{-\infty}\exp\left(-(x-y)^2/(2t)\right)dy=-\int^{0}_{\infty}\exp\left(-(x+y)^2/(2t)\right)dy=
$$
$$
=\int^{\infty}_{0}\exp\left(-(x+y)^2/(2t)\right)dy.
$$
Hence
$$
\frac{d}{dx}\int_{-\infty}^{0}\exp\left(-(x-y)^2/(2t)\right)dy=-\int^{\infty}_{0}\frac{x+y}{t}\exp\left(-(x+y)^2/(2t)\right)dy=
$$
$$
\int^{-\infty}_{0}\frac{x-y}{t}\exp\left(-(x-y)^2/(2t)\right)dy=-\int^{0}_{-\infty}\frac{x-y}{t}\exp\left(-(x-y)^2/(2t)\right)dy\tag 6
$$
From (5) and (6) (adding them) we get 
$$
\frac{d}{dx}\int^{\infty}_{-\infty}\exp\left(-\frac{(x-y)^2}{2t}\right)dy=-\int^{\infty}_{-\infty}\frac{x-y}{t}\exp\left(-\frac{(x-y)^2}{2t}\right)dy=
$$
$$
=-\int^{\infty}_{-\infty}\frac{w}{2}e^{-w^2/(2t)}dw=0
$$
Because $we^{-w^2/(2t)}$ is odd function.

About $t$ you have
$$
\frac{d}{dt}\frac{1}{\sqrt{2\pi}}\int^{\infty}_{-\infty}\frac{\exp\left(-(x-y)^2/(2t)\right)}{\sqrt{t}}dy=
$$
$$
\int^{\infty}_{-\infty}\exp\left(-(x-y)^2/(2t)\right)\frac{(x-y)^2}{2t^{5/2}}dy-\int^{\infty}_{-\infty}\exp\left(-(x-y)^2/(2t)\right)\frac{dy}{2t^{3/2}}=
$$
$$
=\frac{1}{t^{5/2}}\int^{\infty}_{0}e^{-w^2/(2t)}w^2dw-\frac{1}{t^{3/2}}\int^{\infty}_{0}e^{-w^2/(2t)}dw=
$$
$$
=\frac{1}{t^{5/2}}\int^{\infty}_{0}e^{-z/(2t)}z\frac{dz}{2\sqrt{z}}-\frac{1}{t^{3/2}}\int^{\infty}_{0}e^{-z/(2t)}\frac{dz}{2\sqrt{z}}=
$$
$$
=\frac{2t 2 t}{2t^{5/2}\sqrt{2t}}\int^{\infty}_{0}e^{-u}u^{1/2}du-\frac{2t}{2t^{3/2}\sqrt{2t}}\int^{\infty}_{0}e^{-u}u^{-1/2}du=0
$$
QED