<s>[INST] Derivative of oscillatory integral with absolute value For the function $F(x) = \int_0^x |\cos(1/u)| du$, I want to determine if the derivative exists at $x=0$ and find $F'(0)$.
I figured this out when the absolute value is removed using integration by parts:
$$\frac{F(h) - F(0)}{h} = \frac{1}{h}\int_0^h\cos(1/u)du = \frac{1}{h}\int_{1/h}^\infty\frac{\cos(x)}{x^2}dx \\= - h \sin(1/h) + \frac{1}{h}\int_{1/h}^\infty\frac{2\sin(x)}{x^3}dx = -h \sin(h) + \frac{1}{h}O(h^2)$$
So $F'(0) = 0$ here.
This breaks down for $F(x) = \int_0^x \cos(1/u)du$.
Thank you for any help.
 [/INST] As you already observed, $F(h) = \int_{1/h}^\infty \frac{|\cos x|}{x^2}\,dx$.  Now consider one of the pieces of the transformed integral between sign switches, on $[(n-1/2)\pi, (n+1/2)\pi]$.  On this interval, $\frac{1}{(n+1/2)^2\pi^2} |\cos x| \le \frac{|\cos x|}{x^2} \le \frac{1}{(n-1/2)^2\pi^2} |\cos x|$.  Therefore,
$$\frac{2}{(n+1/2)^2\pi^2} \le \int_{(n-1/2)\pi}^{(n+1/2)\pi} \frac{|\cos x|}{x^2}\,dx \le \frac{2}{(n-1/2)^2\pi^2}.$$
From this, we conclude:
$$\sum_{n=N}^\infty \frac{2}{(n+1/2)^2\pi^2} \le \int_{(N-1/2)\pi}^{\infty} \frac{|\cos x|}{x^2}\,dx \le \sum_{n=N}^\infty \frac{2}{(n-1/2)^2\pi^2}.$$
Now, since $\sum_{n=N}^\infty \frac{1}{(n+a)^2} \sim \frac{1}{N}$ as $N \to \infty$ for any constant $a$, we can conclude:
$$\int_{(N-1/2)\pi}^\infty \frac{|\cos x|}{x^2}\,dx \sim \frac{2}{N \pi^2}~\mathrm{as}~N\to \infty.$$
Now, for $(N-3/2)\pi \le X \le (N-1/2)\pi$, $\int_X^{(N-1/2)\pi} \frac{|\cos x|}{x^2}\,dx \le \frac{2}{(N-3/2)^2 \pi^2} = O(1/N^2)$.  Therefore, in general,
$$\int_X^\infty \frac{|\cos x|}{x^2} \, dx \sim \frac{2}{X \pi}~\mathrm{as}~X \to \infty.$$
From this, we can conclude $\frac{F(h)}{h} \to \frac{2}{\pi}$ as $h \to 0^+$.  Now, since $F$ is an odd function, $\frac{F(h)}{h}$ is even as a function of $h$, so in fact $\frac{F(h)}{h} \to \frac{2}{\pi}$ as $h \to 0$.
</s>