How can I solve this limit with a definite integral inside? This is the problem:
$$ \lim_{m \to 0}\left(\frac1m \int_{\sqrt\frac\pi 2}^{\sqrt\frac\pi 2+m}\sin(x^2)\,dx\right) $$
I don't have an idea how to solve it. I was thinking maybe it's an indeterminate form $ \infty \cdot 0$ and we can do something with l'hopital's rule. But I don't know what to do with the integral. What is the trick here?
 A: Observe that we have both
$$\lim_{m\to0} m=0\;\;\;\text{ and}\;\;\;\lim_{m\to0}\int_{\sqrt\frac \pi2}^{\sqrt\frac \pi2+m}\sin x^2\,dx=0$$
so by L'Hospital's rule, with $\;F(x)\;$ being a primitive function of $\;\sin x^2\;$ :
$$\lim_{m\to0}\frac{\int_{\sqrt\frac \pi2}^{\sqrt\frac \pi2+m}\sin x^2\,dx}m=\lim_{m\to0}\left[F\left(\sqrt{\frac \pi2}+m\right)-F\left(\sqrt{\frac \pi2}\right)\right]'=$$
$$=\lim_{m\to0}F'\left(\sqrt{\frac \pi2}+m\right)=\lim_{m\to0}\sin\left(\sqrt{\frac \pi2}+m\right)^2=\sin\frac\pi2=1$$
In the above, the derivative is with respect to $\;m\;$ , of course.
A: The result follows from the fundamental theorem of calculus. The limit is equal to
$$
\frac{d}{dx}\int_a^{x}\sin(y^2)\,dy\bigg|_{x=a}=\sin(a^2)\tag{1}
$$

If you use l'Hopital,
then the limit is equal to
$$
\lim_{m\to 0}\frac{\dfrac{d}{dm}\int_a^{a+m}\sin(x^2)dx}{1}
$$
and you end up with the same result in (1).
A: Another way to do it.
Let $x=t+\sqrt{\frac{\pi }{2}}$ to make
$$\int_{\sqrt\frac\pi 2}^{\sqrt\frac\pi 2+m}\sin(x^2)\,dx=\int_0^m \cos \left(\sqrt{2 \pi } t+t^2\right)\,dt$$ Now, By Taylor and binomial expansion
$$\cos \left(\sqrt{2 \pi } t+t^2\right)=1-\pi  t^2-\sqrt{2 \pi } t^3+O\left(t^4\right)$$
$$\int \cos \left(\sqrt{2 \pi } t+t^2\right)\,dt=t-\frac{\pi  t^3}{3}-\frac{1}{2} \sqrt{\frac{\pi }{2}} t^4+O\left(t^5\right)$$
$$\int_0^m \cos \left(\sqrt{2 \pi } t+t^2\right)\,dt\sim m-\frac{\pi  m^3}{3}+O\left(m^4\right)$$
$$\frac 1m\int_0^m \cos \left(\sqrt{2 \pi } t+t^2\right)\,dt\sim 1-\frac{\pi  m^2}{3}+O\left(m^3\right)$$
Just for the fun, computing the exact value of the integral for $m=0.1$ (far away from $0$), the expression would be $0.9889$ while the approximation gives $1-\frac{\pi }{300}=0.9895$.
