1
$\begingroup$

Let's say I have a floor function that I want to integrate, $$\int_{-1}^{3} \left[ x + \dfrac{1}{2} \right] \; dx$$

and I graphed it as shown below, enter image description here

Would it be correct to evaluate it saying that for example from $-1$ to $-0.5$ the step function is $-1$ looking at the $y$-axis? and from $2.5$ to $3$ it is equal to $3$? I have tried that and I got a correct answer, but I don't know if this is definitely correct or it was just a coincidence for this particular floor function. I know I can solve this by finding the area under each graph, but I just want to know if this method that I mentioned above is correct or not?

Solving this another method, I got for example that from $-1$ to $0$, the step function is equal to $-\dfrac{1}{2}$, which I also noticed that from the graph from $-1$ to $0$, the open circle lies at $-0.5$, is that a correct way of solving? by looking at each open circle and where it lies?

$\endgroup$

1 Answer 1

2
$\begingroup$

Yes, this is correct. You are using $$\int_{-1}^{3} f(x) \; dx = \int_{-1}^{-\frac{1}{2}} f(x) \; dx + \int_{-\frac{1}{2}}^{\frac{1}{2}}f(x) \; dx + \int_{\frac{1}{2}}^{\frac{3}{2}} f(x) \; dx + \int_{\frac{3}{2}}^{\frac{5}{2}} f(x) \; dx + \int_{\frac{5}{2}}^{3} f(x) \; dx$$ and the fact that your function is constant on these intervals.

$\endgroup$
3
  • $\begingroup$ And is it also correct to say that from $-1$ to $0$ the step function is $-\dfrac{1}{2}$? Does that has to do with the open circle in the graph? $\endgroup$
    – Friedrich
    Feb 1, 2019 at 11:17
  • 1
    $\begingroup$ No, the step function is $-1$ on $[-1,\frac{1}{2})$ and $0$ on $[-\frac{1}{2},0]$. You are thinking of the average, which is a different function, but integrates (by definition) to the same value. The open circle indicates that the point is excluded, e.g. $f(-\frac{1}{2}) = 0$ and not $-1$. $\endgroup$
    – Klaus
    Feb 1, 2019 at 11:22
  • $\begingroup$ I used $m \leq x+0.5 < m+1$, and I got $-1 \leq x < 0$ and $m=-\dfrac{1}{2}$... so that is what is meant by the average? Thank you for clarifying $\endgroup$
    – Friedrich
    Feb 1, 2019 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.