find $\int^6_0f(x)dx$ by definition , $f(x)=\left\lfloor\frac{x}{3}\right\rfloor$ 
Let $f(x)=\lfloor\frac{x}{3}\rfloor$,
Is $f(x)$ integrable at $[0,6]$?
If so, find $\int^6_0f(x)dx$ by definition.


The function is integratable because it is bounded and it has a finite number of points which are not continuous in $[0,6]$.
So first we need to divide the interval into even parts, I did that by $\frac{6-0}{n}=\frac{6}{n}=\Delta x$.
And then choose the integration points: let $x_k^* \in [0,6]$ and the points are $x_k^*=1+\frac{5n-1}{n}$.
Then calculate the summation:
$$S_n=\sum^n_{k=1}f(x_k^*)\cdot \Delta x = \sum^n_{k=1} \left\lfloor\frac{x_k^* }{3}\right\rfloor \cdot \frac{6}{n} = \sum^n_{k=1} \left\lfloor\frac{6-\frac{1}{n}}{3}\right\rfloor \cdot \frac{6}{n} = \sum^n_{k=1} \left\lfloor\frac{6n-1 }{3n}\right\rfloor \cdot \frac{6}{n}  $$
Now if I calculate the limit of $S_N$ as $n$ approaches infinity I get that the answer is $0$ which is wrong according to the book it is supposed to be $3$ but it only provides the final answer.
Can anyone give me any tips and hints on that? I find this topic complicated.
Hopefully my translations are understandable. Thank you.
EDIT - my answer is also wrong even if I use $\Delta x=\frac{b-a}{n}$ and $x^*=a+ \Delta x \cdot k$
 A: by your definition $\Delta x = \frac{b-a}{n} = \frac{6}{n}$, so $x_k = \frac{k \Delta x}{n}$. $k$ starts from $0$ to $n$. so the sum would be:
$$
S_n = \sum_{k=0}^n f(x_k)\Delta x = \sum_{k=0}^n \left\lfloor \frac{6k}{3n} \right\rfloor \frac{6}{n} = \sum_{k=0}^n \left\lfloor \frac{2k}{n} \right\rfloor \frac{6}{n}
$$
$2k/n$ is less than $1$ if $k<\lceil n/2 \rceil$, so $\lfloor \frac{2k}{n} \rfloor$ is zero. only nonzero elements are for $  \lceil n/2 \rceil \leq k \leq n$ and $\left\lfloor \frac{2k}{n} \right\rfloor$ is just 1. so the summation becomes :
$$ 
S_n = \sum_{k=\lceil n/2 \rceil}^n  \frac{6}{n} = \frac{6}{n} \sum_{k=\lceil n/2 \rceil}^n1 = \frac{6}{n} ( n - \left\lceil \frac{n}{2} \right\rceil).
$$
if you take limit for $n \rightarrow \infty$ , you get:
$$
\lim_{n \rightarrow \infty}S_n = \frac{6}{n} \left(\frac{n}{2}\right) = 3.
$$
you can find this value easily by linearity of integral:
$$
\int_0^6 \left\lfloor \frac{x}{3} \right\rfloor dx = \int_0^3 0 dx + \int_3^6 1 dx =\int_3^6 dx = 6-3 = 3.    
$$
you didn't use correct formula for $x_k$ because there is no $k$ in your formula and hence in your sum!
