Estimate $ \int_\sqrt{n}^{\sqrt{n+1}} \sin (2\pi x^2) \; dx$ using the Trapezoid rule As a follow-up to my previous question.  What is the integral of $\sin (2\pi x^2)$ as $x \in [\sqrt{n}, \sqrt{n+1}]$ we get this:
$$ \int_\sqrt{n}^{\sqrt{n+1}} \sin (2\pi x^2) \; dx \tag{$\ast$}$$
Since $\sin 2\pi n = 0$ for all $n \in \mathbb{Z}$ this integral should be close to zero.  I could approximate by adding over the four corners:
$$
\int_\sqrt{n}^{\sqrt{n+1}} \sin (2\pi x^2) \; dx \approx \frac{1}{4} \left[  \sin (2\pi n) +  \sin 2\pi (\sqrt{n}+ \frac{1}{4})^2
+   \sin 2\pi (\sqrt{n}+ \frac{1}{2})^2 +   \sin 2\pi (\sqrt{n}+ \frac{3}{4})^2\right]
 $$
This might be hard to estimate since we get unpredictible terms like.  And I may have misaplied the trapezoid rule
$$ \sin 2\pi (n + \frac{1}{2} \sqrt{n} + \frac{1}{4})$$
if we place the mesh and $\sqrt{n} < \sqrt{n + \frac{1}{4}} < \sqrt{n + \frac{1}{2}}< \sqrt{n + \frac{3}{4}}< \sqrt{n + 1}$ the trapeoid rule is:
$$\tiny \sin(2\pi n ) \frac{ \sqrt{n+\tfrac{1}{4}} - \sqrt{n}}{2}
+ \sin (2\pi \sqrt{n + \frac{1}{4}})\left[ \sqrt{n+ \frac{1}{2} }- \sqrt{n}\right]
+ \sin (2\pi \sqrt{n + \frac{1}{2}})\left[ \sqrt{n+ \frac{3}{4} }- \sqrt{n+ \frac{1}{4}} \right]
+ \sin (2\pi \sqrt{n + \frac{3}{4}})\left[ \sqrt{n+ \frac{1}{2} }- \sqrt{n+ 1}\right]
+ \sin (2\pi \sqrt{n + 1})\left[ \frac{\sqrt{n+ \frac{3}{4} }- \sqrt{n+ 1}}{2} \right] $$
I think there is a mistake what should the trapezoid rule be?  Maybe if I said:
$$ \sqrt{n+ \frac{1}{4}} - \sqrt{n} = \sqrt{n} \left( \sqrt{1 + \frac{1}{4} } - 1 \right)= \frac{\sqrt{n}}{8} $$
Then after fixing all my mistakes I get something of order $\frac{1}{\sqrt{n}}$.  How does this look?
\begin{eqnarray}\small \int \dots dx &\approx& \frac{1}{8} \left[ \sqrt{n }\cdot 0
+ 2\sqrt{n + \tfrac{1}{4}}\cdot 1
+ 2\sqrt{n + \tfrac{1}{2}}\cdot 0
+ 2\sqrt{n + \tfrac{3}{4}}\cdot (-1)
+ \sqrt{n+1}\cdot 0\right] \\ \\
&=& \frac{1}{4} \left[ \sqrt{n+ \frac{1}{2}} - \sqrt{n + \frac{3}{4}}\right] = O(\frac{1}{\sqrt{n}})\end{eqnarray}

One approach, following @Leg's answer:
$$I = \int_0^{1} \sin(2\pi t) \dfrac{dt}{2\sqrt{n+t}}=\int_0^{1/2} \sin(2\pi t) \dfrac{dt}{2\sqrt{n+t}}+\int_{1/2}^{1} \sin(2\pi t) \dfrac{dt}{2\sqrt{n+t}}$$
$$=\int_0^{1/2} \sin(2\pi t) \dfrac{dt}{2\sqrt{n+t}}-\int_{0}^{1/2} \sin(2\pi t) \dfrac{dt}{2\sqrt{n+t+1/2}}$$
$$=\int_0^{1/2}\sin{(2\pi t)}\frac{1}{2}\left(\dfrac{1}{\sqrt{n+t}}-\dfrac{1}{\sqrt{n+t+1/2}}\right)\,dt$$
Now, because:
$$\frac{1}{\sqrt{x}}-\frac{1}{\sqrt{x+h}}=\frac{\sqrt{x+h}-\sqrt{x}}{\sqrt{x}\sqrt{x+h}}=\frac{h}{\sqrt{x}\sqrt{x+h}(\sqrt{x+h}+\sqrt{x})}$$
Thus
$$I=\int_0^{1/2}\sin{(2\pi t)}\frac{1}{2}\frac{1}{2\sqrt{n+t}\sqrt{n+t+1/2}(\sqrt{n+t}+\sqrt{n+t+1/2})}$$
and taking simple bounds on the non-$\sin$ part of the integrand, we have:
$$\int_0^{1/2}\frac{\sin{(2\pi t)}}{8(n+1)^{3/2}}<I<\int_0^{1/2}\frac{\sin{(2\pi t)}}{8n^{3/2}}$$
Observing that $\int_0^{1/2}\sin(2\pi t)\,dt=\frac{1}{\pi}$, we see that:
$$\frac{1}{8\pi (n+1)^{3/2}}<I<\frac{1}{8\pi n^{3/2}}$$
