# Evaluating integral $A(x)=\int_0^x f(t)\mathrm dt$

If $f:\mathbb{R}\to \mathbb{R}$ and $f(x)=0$ if $x\in \mathbb{Z}$ and $f(x)=x-\lfloor x\rfloor-\frac12$ if $x\in \mathbb{R}-\mathbb{Z}$. Let $A(x)=\int_0^x f(t)\mathrm dt$.

Show that $A(x)=\dfrac{x^2-x}{2}$ if $0\leq x\leq 1$.

I am supposed to use the definition of Riemann Integral.

-
Did you notice that $x \in \mathbb Z$ only at $x = 0$ and $x = 1$ in your domain? –  Jonas Teuwen Oct 19 '11 at 14:25
@JonasTeuwen Yeah I have some other things to prove in my homework assignment so it's useful for that part. –  Ramana Venkata Oct 19 '11 at 14:27
Well then, what does $[x]$ mean to you? –  Jonas Teuwen Oct 19 '11 at 14:29
[x] denotes the greatest integer less than x. –  Ramana Venkata Oct 19 '11 at 14:31

Note that on $0 < x < 1$ we have that $f(x) = x - \frac12$ (do you see why?). Can you now find $A(x)$?

-
At $x=1$ $[x]=1$ not $0$ That's the problem. You didn't consider the fact that f(x)=0 at $x\in \mathbb{Z}$ –  Ramana Venkata Oct 19 '11 at 14:34
@RamanaVenkata, that's not a problem, since it's a single point. You can consider the open domain and the integral doesn't change. –  davin Oct 19 '11 at 14:36
You're right, I have changed the domain. If you change a single point in your function the integral will not change. So you could just define $f(1) = \frac12$. –  Jonas Teuwen Oct 19 '11 at 14:37
I am supposed to use only to use Reimann Integral definition and prove it. –  Ramana Venkata Oct 19 '11 at 14:39
That would be a silly question. –  Jonas Teuwen Oct 19 '11 at 14:44
What does your integrand $f(t) = t - \lfloor t \rfloor - 1/2$ look like when $0 \leq t \leq x \leq 1$? In particular, the expression $\lfloor t \rfloor$ can be simplified greatly in this situation.
Once you understand how to solve your problem, you should next think about how you would compute $A(x)$ when $1 \leq x \leq 2$.
You didn't consider the fact that f(x)=0 at $x\in \mathbb{Z}$ –  Ramana Venkata Oct 19 '11 at 14:38
If you solve the problem by computing Riemann sums and taking an appropriate limit, then you'll have to modify two terms in your Riemann sums (corresponding to the endpoints), but you'll see that the integral comes out to be the same as if $f(0)$ and $f(1)$ had any other values. –  Michael Joyce Oct 19 '11 at 15:02