Counterexamples to differentiation under integral sign, revisited Let $f\colon\mathbb R^2\to\mathbb R$ be a measurable function such that
\begin{equation*}
    F(t):=\int_{\mathbb R}dx\,f(t,x) 
\end{equation*}
exists and is finite for all real $t$. Suppose that
\begin{equation*}
    f_t(t,x):=\frac{\partial f(t,x)}{\partial t}
\end{equation*}
exists and is finite for all real $t,x$, and also suppose that
\begin{equation*}
    \int_{\mathbb R}dx\, f_t(t,x) 
\end{equation*}
exists and is finite for all real $t$.
Then, under certain additional conditions,
\begin{equation*}
    F'(t)=\int_{\mathbb R}dx\, f_t(t,x) \tag{1}\label{1}
\end{equation*}
for all real $t$; see e.g. Folland, Theorem 2.27 or the more general Lemma 2.3.
Among counterexamples to \eqref{1} are this and this. However, in those counterexamples the function $f$ is not continuous.
A question arose whether there is a counterexample to  \eqref{1} with a continuous function $f$. Such an example will be given in the answer below.
 A: $\newcommand{\R}{\mathbb R}$Let us give a counterexample with $f$ continuous and (as a bonus) $f_t(t,x)$ (infinitely) smooth in $t$.
Let $\psi\colon\R\to\R$ be a smooth nonzero nonnegative function supported on the interval $[0,1]$. For instance, one may take $\psi(u)=1(0<u<1)\,\exp-\frac1{(1-u)u}$ for real $u$.
Take any real $p$ and $q$ such that
\begin{equation*}
    1<p<q. 
\end{equation*}
For all real $t$ and $x$, let
\begin{equation*}
    f(t,x):=\int_{-\infty}^t ds\, g(s,x), 
\end{equation*}
where
\begin{equation*}
    g(t,x):=1(x>0)\,x^{-p}\psi(t/x^q)=1(x>0,t>0)\,x^{-p}\psi(t/x^q).  
\end{equation*}
Then $f_t=g$, so that $f_t(t,x)$ is indeed smooth in $t$.
Also, $f(0,x)=0$ for all real $x$ and hence $F(0)=0$. Also, $f=0$ on $\R\times(-\infty,0]$.
Next, for all real $t$ and $x$,
\begin{equation*}
    f(t,x)=1(x>0,t>0)\,x^{-p}\int_0^t ds\, \psi(t/x^q) 
    =1(x>0,t>0)\,x^{q-p}\int_0^{t/x^q} du\, \psi(u)=O(1(x>0)x^{q-p}) 
\end{equation*}
uniformly in real $t$. So, $f$ is continuous at any point $(t,x)$ with $x=0$. That $f$ is continuous at any point $(t,x)$ with $x\ne0$ is obvious. So, $f$ is continuous.
Finally, for real $t>0$,
\begin{equation*}
\begin{aligned}
    F(t)-F(0)=F(t)  
    &=\int_0^\infty dx\,f(t,x) \\ 
&   =\int_0^\infty dx\,x^{q-p}\int_0^{t/x^q} du\, \psi(u) \\ 
&   =\int_0^\infty  du\, \psi(u)\,\int_0^{(t/u)^{1/q}} dx\,x^{q-p} \\ 
&   =c_1 t^{1-(p-1)/q}\int_0^\infty  du\,\psi(u) u^{(p-1)/q-1} \\ 
&   =c_2 t^{1-(p-1)/q}   
\end{aligned}
\end{equation*}
for some real $c_1>0$ and $c_2>0$. So, the right derivative of $F$ at $0$ is
\begin{equation*}
    F'_+(0)=\lim_{t\downarrow0}\frac{F(t)-F(0)}t=\infty,
\end{equation*}
whereas
\begin{equation*}
    \int_{\mathbb R}dx\, f_t(0,x)=\int_{\mathbb R}dx\, g(0,x)=0. 
\end{equation*}
So, identity \eqref{1} fails to hold for $t=0$. $\quad\Box$
A: A simple example is given by
$$
f(t,x)=\cases{\exp(-(x-t^{-2})^2),&$t\neq 0$,\\0,&$t=0.$}
$$
For each fixed $t\neq 0$, $\int f(t,x)\,dx$ is a Gaussian integral equal to $\sqrt{\pi}$, while for $t=0$, the integral equals to zero. Therefore, $F(t)$ is not even continuous at $0$, let alone differentiable.
On the other hand, at $t\neq 0$, any partial derivative of $f$ has a form $P(t^{-1},x)\exp(-(x-t^{-2})^2)$ for some polynomial $P$. This tends to zero as $t\to 0$, uniformly in $x$ in compacts. Therefore, $f$ is smooth with all partial derivatives vanishing on  at $\mathbb{R}$. Also, any expression of this form, and in particular $\partial_t f(t,x)$, is clearly integrable over $x$ for all $t$.
Update: The above example may feel like cheating, since in essence the discontinuity of $f$ has just been moved to infinity. Here's a better one in that respect:
$$
f(t,x)=\cases{\mathrm{sign}(t)|t|^\frac{1}{2}\exp\left(-\frac{(x-\sqrt[5]{t})^2}{|t|}\right),&$t\neq 0$,\\0,&$t=0.$}
$$
This has $F(t)=\sqrt{\pi}t$ while still $\partial_t f(t,x)|_{t=0}\equiv 0$. It has an additional feature that
$$
\int_I\partial_t f(t,x)\,dx\neq\partial_t \int_I f(t,x)\,dx
$$
for any non-empty interval $I$ containing the origin. It has smooth restrictions onto vertical and horisontal lines, but it is not overall smooth or even continuously differentiable: indeed, if it were, it would have its derivatives bounded on compacts, thus $\int_I$ and $\partial_t$ would commute for any compact interval $I$.
