Evaluate $\int_{-n}^{n} (-1)^{\lfloor x \rfloor}dx$

153 Views Asked by At

I am not sure how to solve this.

I tried checking it for odd/even function but we don't have $\lfloor -x \rfloor=-\lfloor x \rfloor$

2

There are 2 best solutions below

0
On BEST ANSWER

Let us set the function $$f(x) = (-1)^{\lfloor x \rfloor}$$ A common equivalence regarding the floor function is $$\lfloor x \rfloor + \lfloor -x \rfloor = \begin{cases} 0 & \text{if $x \in \mathbb{Z}$} \\ -1 & \text{if $x \notin \mathbb{Z}$} \end{cases}$$ Considering when $x \notin \mathbb{Z}$, $$\lfloor x \rfloor + \lfloor -x \rfloor = -1$$ $$\lfloor -x \rfloor = -\lfloor x \rfloor - 1$$ If we now consider $f(-x)$, $$f(-x) = (-1)^{\lfloor -x \rfloor} = (-1)^{-\lfloor x \rfloor - 1} = \frac{1}{-1 \cdot (-1)^{\lfloor x \rfloor}} = -(-1)^{\lfloor x \rfloor} = -f(x)$$ Since this is true for $x \in \mathbb{R} \setminus \mathbb{Z}$ and discontinuities of measure zero do not affect Riemann integration, we can treat this as an odd function. This means that $$\int_{-n}^n (-1)^{\lfloor x \rfloor} {\rm d}x = 0$$ for $n \in \mathbb{R}$.

0
On

The graph of $(-1)^{\lfloor x \rfloor}$ consists of alternating segments of length $1$ with values $+1$ and $-1$. The integral over a period, which is length $2$, is zero. Therefore the integral over any interval of length an even integer is zero. Your interval has length $2n$