TITLE: Derivative of an Integral where the limits of integration are not linear
QUESTION [5 upvotes]: $y'=\frac{\mathrm{d}}{\mathrm{d}x} \int_{a}^{\sqrt{x}}f(t)dt$
Here, $y$ is the area function given by $y = \int_{a}^{\sqrt{x}}f(t)dt$
Let us say that $y=F(x)$. 
$$y'=F'(x)=\lim_{h\rightarrow 0}\frac{ \int_{a}^{\sqrt{x+h}}f(t)dt-\int_{a}^{\sqrt{x}}f(t)dt}{h}$$
On working it out we get, 
$$y'=\lim_{h\rightarrow 0}\frac{\int_{\sqrt{x} }^{\sqrt{x+h}}f(t)dt}{h}$$
We know that, 
$$\frac{\int_{\sqrt{x}}^{\sqrt{x+h}}f(t)dt}{h}$$ is the average of $f(t)$.
We then have, 
$$y'= \lim_{h\rightarrow 0}f(c)$$ where $f(c)$ is the average of $f(t)$ in the interval. 
On taking the limit, 
$$y'=f(\sqrt{x})$$ which is incorrect. 
Where could I have gone wrong? 
Edit: My statements about "Linearizing" have been withdrawn.

REPLY [6 votes]: The statement "We know that $\frac{1}{h}\int_{\sqrt x}^{\sqrt{x+h}}f(t)dt$ is the average of $f$" is not correct, since the interval of integration does not have length $h$.  It has length $\sqrt{x+h}-\sqrt{x}$, so the average is actually
$$
A_hf(x):=\frac{1}{\sqrt{x+h}-\sqrt{x}}\int_{\sqrt{x}}^{\sqrt{x+h}}f(t)dt.
$$
Like you suggested, this tends towards $f(\sqrt{x})$ as $h\to 0$, so your original expression becomes:
$$
\frac{1}{h}\int_{\sqrt x}^{\sqrt{x+h}}f(t)dt=\frac{\sqrt{x+h}-\sqrt{x}}{h}A_hf(x)\to  \frac{1}{2\sqrt{x}}f(\sqrt{x}),
$$
since $\lim\frac{\sqrt{x+h}-\sqrt{x}}{h}$ is just the derivative.