Leibniz rule - differentiation of an integral. Let $I\subset\mathbb{R}$ be an interval, $A\subset\mathbb{R}$ and $g:I\times A\rightarrow\mathbb{R}$ a function such that:
1) For all $x\in A$ a function $g(\cdot,x):I\rightarrow\mathbb{R}$ is continuous and integrable on $I$
2) For all $t\in I$ a function $g(t,\cdot):A\rightarrow\mathbb{R}$ is differentiable at $x_0\in A$. (which means there exists a partial derivative $\frac{\partial g}{\partial x}(t,x_0)$)
Define $f(x)=\int_I g(t,x) dt$ for $x\in A$.
Is it true that:
1) Function $f$ is differentiable at $x_0$.
2) Function $t\mapsto\frac{\partial g}{\partial x}(t,x_0)$ is continuous and integrable on $I$.
3) $f'(x_0)=\int_I \frac{\partial g}{\partial x}(t,x_0) dt$
If not, what additional assumptions should be made to make this true?
EDIT. I have found out that assuming that
1) Partial derivative $\frac{\partial g}{\partial x}$ exists for all $(t,x)\in I\times [x_1,x_2]$, where $[x_1,x_2]\subset A, x_1<x_0<x_2$.
2) $g$ and $\frac{\partial g}{\partial x}$ are continuous over $ I\times [x_1,x_2]$.
3) For all $x\in [x_1,x_2]$ functions $g(\cdot,x),\frac{\partial g}{\partial x}(\cdot ,x)$ are integrable over $I$.
then $f$ is differentiable at $x_0$ and $f'(x_0)=\int_I \frac{\partial g}{\partial x}(t,x_0) dt$.
EDIT. It turns out additional assumption is needed. $\int_I \frac{\partial g}{\partial x}(t,x) dt$ must be uniformly convergent.
 A: A derivative is a limit:
$$f'(x)=\lim_{h\rightarrow 0}\int_{I}\frac{g(t,x+h)-g(t,x)}{h}dt.$$
Fixing $x$, it's now apparent that you need a limit theorem to pass the limit through the integral. One such condition is uniform convergence (in $t$) to $\partial g(t,x)/\partial x$. This is usually too strong, so settle on dominated convergence: it suffices that  $|\partial g(t,z)/\partial x|\leq h(t)$ for all $z$ in a neighborhood of $N_x$ of $x$, where $h(t)$ is integrable on $I$. To see this, use the mean value theorem:
$$\left|\frac{g(t,x+h)-g(t,x)}{h}\right|\leq \sup_{z\in N_x}\left|\frac{\partial g(t,z)}{\partial z}\right|\leq h(t),$$
which shows that the guts of the integral are bounded by an integrable function.
A: Here's an example where 1),2), and 3) all fail, at least if we stick to finite values: Let $I=(0,1), A = (-1,1).$ For $(t,x) \in I\times A,$ set
$$g(t,x) = \sin(x/t).$$
Then $g(\cdot ,x)$ is bounded and continuous on $(0,1)$ for each $x\in (-1,1).$ Hence each $g(\cdot ,x)$ is integrable there. For $x =0,$ we have $\partial g /\partial x (t,0) = 1/t.$
1) Does $f'(0)$ exist? For $h>0$ we have
$$\frac{f(0+h) - f(0)}{h} = \int_0^1 \frac{\sin(h/t)}{h}\, dt=\int_h^\infty \frac{\sin (s)}{s^2}\, ds.$$
This $\to \infty$ as $h\to 0^+,$ hence $f'(0)$ does not exist (at least as a real number).
Because $\partial g /\partial x (t,0) = 1/t,$ it is not intergrable on $(0,1),$ so 2) fails.
What about 3)? Well, neither side exists as a real number, so perhaps we can say it fails. On the other hand, if we allow the $\infty$ into the game, 3) makes perfect sense here.
