Derivative of an Integral where the limits of integration are not linear $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. 
 A: Let $F$ be the antiderivative of $f$. Then
$$\int_a^{\sqrt x}f(t)\,dt=F(\sqrt x)-F(a)$$ and by the chain rule
$$\frac d{dx}\int_a^{\sqrt x}f(t)\,dt=\frac d{dx}F(\sqrt x)=\frac1{2\sqrt x}f(\sqrt x).$$
A: 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.
A: There is not enough information to determine what $f(x)$ is.
As far as determining the derivative of an integral, the Second Fundamental Theorem of Calculus tells us that ---
$\displaystyle \frac{d}{dx} \int_{a(x)}^{b(x)}f(t)\,dt=f(b(x))b'(x)-f(a(x))a'(x)$
This can be derived from $\displaystyle \frac{d}{dx} \int_{a(x)}^{b(x)}f(t)\,dt = \frac{d}{dx}\left(F(a(x)-F(b(x)\right)$, and applying Chain Rule, to get $f(b(x))b'(x)-f(a(x))a'(x)$. 
Therefore, $\displaystyle y' = \frac{d}{dx}\int_a^{\sqrt{x}}f(t)\,dt=\frac{f(\sqrt{x})}{2\sqrt{x}}.$
