Integrating floor functions without known limits

138 Views Asked by At

Suppose we have$$\frac{\displaystyle\int_0^n{\lfloor x \rfloor}\,dx}{\displaystyle\int_0^n{\lbrace x \rbrace }\,dx}$$ $n \in I$

where $\lfloor \cdot\rfloor$ and $\lbrace \cdot\rbrace $ represent the floor function and fractional part function.

The usual method of splitting the function in intervals fails because the upper limit is not fixed. Is there any other way to approach this?

Edit:

I would also like to know a method to integrate $\displaystyle\int_0^n{\lbrace x \rbrace }\,dx$ without depending on floor function

2

There are 2 best solutions below

10
On BEST ANSWER

Note that $$\int_{0}^{n}\lfloor x\rfloor\,dx=\sum_{k=0}^{n-1}k\bigg[\int_{k}^{k+1}\,dx\bigg]=\frac{n(n-1)}{2}$$

Also note that $\{x\}=x-\lfloor x\rfloor$ if $x\geq 0$. The case for $x<0$ is $\{x\}=x-\lceil x\rceil$ and is easily modified from this. So, $$\int_{0}^{n} \{x\}\,dx=\int_{0}^{n}x-\lfloor x\rfloor\,dx=\frac{n^2}{2}-\frac{n(n-1)}{2}=\frac{n}{2}$$

So I suppose to finish it off, $$\frac{\displaystyle\int_0^n{\lfloor x \rfloor}\,dx}{\displaystyle\int_0^n{\lbrace x \rbrace }\,dx}=\frac{\frac{n(n-1)}{2}}{\frac{n}{2}}=n-1$$

Furthermore, $n$ cannot be equal to $0$ in order for this formula to work.

Addressing the edit question, here is a picture of what is happening when the integrand is $\{x\}$:enter image description here

This is clearly the function $y=x$ on intervals of length $1$. So, $$\int_{0}^{n}\{x\}\,dx = n\int_{0}^{1}x\,dx=\frac{n}{2} $$

6
On

You can still use the usual method:

$$\int_0^n \lfloor x\rfloor dx=\sum_{i=0}^{n-1}\int_i^{i+1}\lfloor x\rfloor dx=\sum_{i=0}^{n-1}i=\cdots$$ Can you finish from here?