Page 1 of 1

floor function integral

Posted: Wed Jul 13, 2016 7:40 am
by jacks
(1) Evaluation of \(\displaystyle \int_{0}^{\pi}\lfloor \cot x \rfloor dx\;,\) where \(\lfloor x \rfloor \) is floor function of \(x\).

(2) Evaluation of \(\displaystyle \int_{0}^{\pi}\lfloor \cos x \rfloor dx\;,\) where \(\lfloor x \rfloor \) is floor function of \(x\).

Re: floor function integral

Posted: Wed Jul 13, 2016 7:46 am
by jacks
My Try for (1):: Let \(\displaystyle I = \int_{0}^{\pi}\lfloor \cot x \rfloor dx\;,\) Now using \(\displaystyle \int_{0}^{a}f(x)dx = \int_{0}^{a}f(a-x)dx\)

So we get \(\displaystyle I = \int_{0}^{\pi}\lfloor -\cot x \rfloor dx\;,\) So we get

\(\displaystyle I = \int_{0}^{\pi}\left(\lfloor \cot x \rfloor + \lfloor -\cot x \rfloor \right)dx = -\int_{0}^{\pi}dx = -\pi\)

So We get \(\displaystyle I = \int_{0}^{\pi}\lfloor \cot x \rfloor dx = -\frac{\pi}{2}\)

Here above we have used the property \(\lfloor x \rfloor +\lfloor -x \rfloor = -1\;,\) When \(x\notin \mathbb{Z}\).

actually i have a confusion can we write same for \(\lfloor \cot x \rfloor + \lfloor -\cot x \rfloor = -1\;,\) when \(\cot x\notin \mathbb{Z}\)

For (2) I have solve it using drawing of graph of \(y = \lfloor \cos x \rfloor \) in \(x\in \left(0,\pi\right)\)

which is \(\displaystyle y=\lfloor \cos x \rfloor = 0\;,\) when \(x\in \left(0,\frac{\pi}{2}\right]\) and \(\displaystyle y=\lfloor \cos x \rfloor = -1\;,\) when \(x\in \left(\frac{\pi}{2},\pi\right)\)

Re: floor function integral

Posted: Wed Jul 13, 2016 7:46 am
by Tolaso J Kos
Jacks, the first integral diverges. Mathematica also agrees with this. Besides, I had drawn a graph of that function on Geogebra which confirms that. So, how were you able to evaluate it?

Re: floor function integral

Posted: Wed Jul 13, 2016 7:47 am
by Demetres
Indeed as Apostolos says, the integral diverges. What jacks's proof shows is that for every \(0 < \varepsilon < \pi/2\) we have that \(\int_{\varepsilon}^{\pi-\varepsilon} \lfloor \cot{x} \rfloor \; dx = -\pi + 2\varepsilon.\) However this does not mean that the value of the integral converges to\(−\pi\). The integral tends to \(+\infty\) near \(0\) and to \(-\infty\) near \(\pi\) and we are not allowed to cancel them out.

Sometimes we might say that the Cauchy principal value of this integral is \(-\pi\).

Re: floor function integral

Posted: Wed Jul 13, 2016 7:49 am
by Tolaso J Kos
After Demetres remark, here is my solution:

$$\begin{aligned}
\int_{0}^{\pi}\left \lfloor \cot x \right \rfloor\,dx &\overset{u=\cot x}{=\! =\! =\! =\!}-\int_{-\infty}^{\infty}\frac{\left \lfloor u \right \rfloor}{1+u^2}\,du \\
&= -\left ( \int_{-\infty}^{0}\frac{\left \lfloor u \right \rfloor}{1+u^2}\,du +\int_{0}^{\infty}\frac{\left \lfloor u \right \rfloor}{1+u^2}\,du\right )\\
&= -\left ( I+J \right )
\end{aligned}$$

Then:
$$\begin{aligned}
J &=\int_{0}^{\infty}\frac{\left \lfloor u \right \rfloor}{1+u^2}\,du \\
&=\int_{0}^{1}\frac{\left \lfloor u \right \rfloor}{1+u^2}\,du + \int_{1}^{2}\frac{\left \lfloor u \right \rfloor}{1+u^2}\,du+\cdots \\
&= \sum_{n=1}^{\infty}n\int_{n}^{n+1}\frac{du}{1+u^2}=\sum_{n=1}^{\infty}n\left [ \tan^{-1}(n+1)-\tan^{-1}(n) \right ]\geq \sum_{n=1}^{\infty}n=+\infty
\end{aligned}$$

Thus \(J\) diverges and so does the initial integral.


Jacks, I would like to add an additional question that arose from the exercise and my first wrong solution and it is not that hard.
Evaluate the series: \( \displaystyle \sum_{n=1}^{\infty}\left ( \tan^{-1}\left ( n+1 \right )-\tan^{-1} (n) \right ) \).

Re: floor function integral

Posted: Wed Jul 13, 2016 7:59 am
by Papapetros Vaggelis
Tolaso J Kos wrote:Jacks, I would like to add an additional question that arose from the exercise and my first wrong solution and it is not that hard.
Evaluate the series: \( \displaystyle \sum_{n=1}^{\infty}\left ( \tan^{-1}\left ( n+1 \right )-\tan^{-1} (n) \right ) \).
We define the sequence \(\displaystyle{\left(a_{n}\right)_{n\in\mathbb{N}}}\) by

\(\displaystyle{a_n=\sum_{k=1}^{n}\left(\arctan\,(k+1)-\arctan\,k\right)\,, n\in\mathbb{N}}\).

Now we see that \(\displaystyle{a_1=\arctan\,2-\arctan\,1=\arctan\,2-\frac{\pi}{4}}\).

Let \(\displaystyle{a_n=\arctan\,(n+1)-\frac{\pi}{4}\,\,(\ast)}\) , for some \(\displaystyle{n\in\mathbb{N}}\) .

\(\displaystyle{n\to n+1}\) :

\(\displaystyle{\begin{aligned} a_{n+1}&=a_n+\arctan\,(n+2)-\arctan\,(n+1)\\&\stackrel{(\ast)}{=}\arctan\,(n+1)-\frac{\pi}{4}+\arctan\,(n+2)-\arctan\,(n+1)\\&=\arctan (n+2)-\frac{\pi}{4}\end{aligned}}\)

So, \(\displaystyle{a_{n}=\arctan\,(n+1)-\dfrac{\pi}{4}\,,n\in\mathbb{N}}\) .

Since, \(\displaystyle{\lim_{n\to \infty}\arctan\,(n+1)=\dfrac{\pi}{2}}\), we have that :

\(\displaystyle{\begin{aligned}\sum_{k=1}^{\infty}\left(\arctan\,(k+1)-\arctan\,k\right)&=\lim_{n\to \infty}a_{n}\\&=\lim_{n\to \infty}\left(\arctan\,(n+1)-\frac{\pi}{4}\right)\\&=\frac{\pi}{2}-\frac{\pi}{4}\\&=\frac{\pi}{4}\end{aligned}}\) .