How to calculate the derivate of this function? I have to calculate the derivate of this function:
$$f(x)=\int_0^x g(s,x)ds $$
They don't specify what is $g$ but it's just another function. I think I could use the Fundamental Theorem of Calculus and the chain rule because I've seen some integrals like this one and that's what I have used, but I don't know how to do this with this integral.
Any hint or idea will be very appreciated. Thank you.
 A: Let $G(s, x)$ be an antiderivative for $g(s, x)$ with respect to $s$. That is $\dfrac{\partial G}{\partial s} = g$. Then $f(x) = [G(s, x)]_0^x = G(x, x) - G(0, x)$. Using the chain rule for a function of more than one variable, we have, provided $G$ is $C^2$,
\begin{align*}
f'(x) &= \frac{\partial G}{\partial s}(x, x)\frac{d}{dx}(x) + \frac{\partial G}{\partial x}(x, x)\frac{d}{dx}(x) - \frac{\partial G}{\partial x}(0, x)\\ 
&= g(x, x) + \left[\frac{\partial G}{\partial x}(s, x)\right]_0^x\\
&=g(x, x) + \int_0^x\frac{\partial}{\partial s}\left(\frac{\partial G}{\partial x}\right)(s, x)ds\\
&= g(x, x) +\int_0^x\frac{\partial}{\partial x}\left(\frac{\partial G}{\partial s}\right)(s, x)ds\\
&= g(x, x) + \int_0^x\frac{\partial g}{\partial x}(s, x)ds
\end{align*}
which is precisely what you obtain from using the rule in Alex's link.
A: A simple deduction:
$\text{Let} f(x)=\int _0^xg(s,x)ds=F(x,g)$
$\text{Then} \frac{df}{dx}=\frac{\partial F}{\partial x}+\frac{\partial F}{\partial g}\cdot \frac{\partial g}{\partial x}$
$\frac{\partial F}{\partial x}=g(s,x), \text{with}\text{  }s=x$
$\frac{\partial F}{\partial g}\cdot \frac{\partial g}{\partial x}=\int _0^x \frac{\partial g}{\partial x}ds$
$\text{Thus} \frac{df}{dx}=g(x,x)+\int _0^x \frac{\partial g}{\partial x}ds$

For more reference:
$\frac{d}{dx}\int _{\beta (x)}^{\alpha (x)}g(t)dt=\frac{d\alpha }{dx}g(\alpha (x))-\frac{d\beta }{dx}g(\beta (x))$
