How to integrate floor functions such as: $\int_{0}^{2}\left \lfloor{e^x}\right \rfloor dx$?
How to integrate floor function: $\int_{0}^{2}\left \lfloor{e^x}\right \rfloor dx$
80 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
You have to break up the integral based on the piecewise definition of the floor function.
Notice that $e^0=1$ and $e^2 \approx 7.4$, so there will be intervals where $\lfloor e^x\rfloor$ is equal to $1$, $2$, $3$, $...$, $7$.
For each $n$, we need to find the interval $I_n$ where $\lfloor e^x\rfloor = n$. Since $e^x$ is increasing, the left endpoint of $I_n$ will be the solution to $e^x=n$, and the right endpoint is the solution to $e^x=n+1$. Note that the right endpoint of $I_7$ will instead be $2$ since that is the right endpoint of the integral.
Finally, $$\int_0^2 \lfloor e^x \rfloor \ dx = \int_{I_1} 1\ dx + \int_{I_2} 2 \ dx + \cdots + \int_{I_7} 7 \ dx= \sum_{n=1}^7n|I_n|$$ where $|I_n|$ denotes the length of $I_n$.
You know that $\lfloor e^x \rfloor$ ranges from $0$ to $\simeq 7.4$ for $x \in [0,2]$, so you can split the integral up as $$ \int_0^2 \lfloor e^x \rfloor dx = \int_0^{\ln 2} 1dx+\int_{\ln 2}^{\ln 3} 2dx + \dots + \int_{\ln 6}^{\ln 7}6dx + \int_{\ln 7}^2 7dx $$