I'm having some trouble and looking for some help with a problem i'm trying to solve. Without the floor function it would be easy but the floor has made it a bit trickier:
Find the upper and lower sum:
$$
\int_1^2 \lfloor x+1 \rfloor dx
$$
As a start i can say $$\Delta x=1/n$$ and $$x_i=1+i/n$$
$$\\$$ $$\\$$
EDIT: Thanks for the comments, although I think I might have explained it poorly! I am trying to find the upper and lower bound equation, over a regular partition of the intervals: $$U_N\quad and\quad L_N$$
So for example the upper bound equation for: $$\int_1^2 f(x) \quad where \ f(x)=x$$ $$\Delta x =(b-a)/n=1/n \quad and \quad x_i=1+i/n$$ $$Hence \quad U_L =\Delta x \sum_{i=1}^n f(x_i)$$ $$=1/n[\sum_{i=1}^n 1 + i/n]=\frac1n[n+\frac1n(\frac{n^2}{2}+\frac{n}{2})]$$ $$=\frac1n[n+\frac{n}{2}+\frac12]=\frac32+\frac{1}{2n}$$
$$Thus:\quad U_L= \frac32+\frac{1}{2n}$$
And that would be the upper limit, the lower is just when X_i = 1+(i-1)/n.
My trouble is doing all this for a floor function.
Thanks for your help!
Best Answer
We know the floor function $\lfloor x\rfloor$ fulfills $$\lfloor x\rfloor \leq x < \lfloor x\rfloor+1$$ with points of discontinuity at the integers. Therefore
\begin{align*} f(x)=\lfloor x+1\rfloor= \begin{cases} 2&\qquad 1\leq x <2\\ 3&\qquad x=2 \end{cases} \end{align*}
It's often convenient to represent the floor function by Iverson brackets \begin{align*} \lfloor x\rfloor=\sum_{j\geq 0}[1\leq j \leq x] \end{align*} This way we get rid of the floor symbols $\lfloor$ and $\rfloor$ and can manipulate sums instead.
Comment:
In (1) we observe, that $j$ takes always the values $1$ and $2$, since $1\leq x_{k-1}<2$ for $k=1,\ldots,n$ and so the inner sum is $2$.
In (2) we do a little telescoping, leaving only elements $x_0$ and $x_n$.
In (3) we only have to cope with the endpoints of the interval $[1,2]$.
Comment:
Note: Since the mesh of the partition $\displaystyle{\max_{1\leq k \leq n}}|x_{k}-x_{k-1}|$ tends to zero with growing $n$, we see that $$\lim_{n\rightarrow \infty}x_{n-1}=x_n=2$$ and therefore the upper sums tend to $$\lim_{n\rightarrow\infty}(4-x_{n-1})=2$$ the same value as the lower sums.
Note: Since the value of an integral don't change, when we change the function value of $f$ at finite many points, we obtain \begin{align*} \int_1^2 f(x) dx=\int_1^2 \lfloor x+1\rfloor dx=2\int_1^2 dx=\left. 2x \right|_1^2=2 \end{align*}