Find the derivative of the primitive of a discontinous function I have problems solving the following task:
I have the function $f(x)=\sin\frac{1}{x}$ when x isn't $0$ and $f(0) = 1$
First, I must prove that $f(x)$ is integrable in every interval $[a, b]$.
Second, I have $F(x) = \int_0^x f(t)dt$. I must find the derivative of $F(x)$.
What I've done so far is this:
$f(x)$ is integrable over every $[a,b]$ which doesn't include $0$ and for $0$ I take a Riemman sum with $0$ in the interval. There I just split the interval and take the normal Riemman sums $f(c_i) * \Delta x_i$ and take $c_i$ to be $f(0)$ when $\Delta x_i$ has $0$. Obviously if I take the $lim_{\Delta x_i \rightarrow 0} f(c_i) \Delta x_i$ it exists and therefore there is an integral.
Is this correct?
For the second part I've managed to prove that $F(x)$ is continous at $0$ but can't prove that it's differentiable there. Everywhere else $F'(x) = f(x)$ from the Leibniz-Newton theorem.
Can you please help me?
 A: I'd write a comment, but the next formulae are too long. So, you need to compute
$$
\lim_{h \to 0} \frac{\int_0^h \sin \frac{1}{t}\, dt}{h}.
$$
Put $u=1/t$, $dt = -\frac{du}{u^2}$. Therefore you boil down to
$$
\lim_{h \to 0} \frac{\int_{1/h}^{+\infty} \frac{\sin u}{u^2} du}{h}.
$$
Integrating by parts,
$$
\int_{1/h}^{+\infty} \frac{\sin u}{u^2} du = \left[ -\frac{\cos u}{u^2} \right]_{1/h}^{+\infty} - \int_{1/h}^{+\infty} \frac{\cos u}{u^3}du.
$$
Using the trivial estimate $|\cos u | \leq 1$, the last integral is $O(h^2)$. You should recall that $$h \cos \frac{1}{h} \to 0$$
as $h \to 0$. Your limit is therefore equal to 0.
A: I think a little more care is due where you wrote 
"There I just split the interval and take the normal Riemman sums $\,f(c i )Δx_i\,$    and take $\,c_i\,$   to be $\,f(0)\,$  when $\,Δx_i\,$   has $\,0$ ."
Well, you don't have to take $\,c_i=0\,$ in any subinterval of a partition of an interval containing $\,0\,$ . In fact, you can't so restrict the choice of $\,c_i\,$'s in every such subinterval unless you know beforehand the function's integrable there, which is precisely what you want to prove!
The continuation of your argument though shows how to mend the above, as it's pretty easy to show that the limit of the Riemann's Sums' exists...
As for differentiability: I don't think $\,F(x)\,$ is differentiable at $\,x=0\,$ but I cannot find a straightforward proof of this right now. 
I can only support my suspicion by pointing out that, applying L'Hospital to $\,\displaystyle{\lim_{x\to 0}\frac{F(x)-F(0)}{x}}\,$ , the limit doesn't exist...which, of course, proves nothing. I'll add if I come up with something.
