Simple step function integration

76 Views Asked by At

I have a function defined by $f(x)=n$ for $n-1\le x \lt n$ for $n\in {1,...100}$. With $f(x)=0$ elsewhere. I am now trying to find $\int f$. My first though would be that $\int f=\sum_{i=1}^{100} i=5050.$ However not quite sure if this is right? Seems too simple?

2

There are 2 best solutions below

0
On BEST ANSWER

You are correct, as $\int_{n-1}^n ndx=n$, therefore $$\int_{-\infty}^\infty f=\sum_{i=1}^{100} (\int_{i-1}^i i dx)=\sum_{i=1}^{100} i=\frac{100*(100+1)}{2}=5050$$

0
On

Your notation doesn't make sense. Are you trying to write $\int_0^{100}{f(x)dx}$? In that case you are correct because Riemann integration in some interval for a continuous function gives area under the curve for that interval. Since you are dividing the integral into intervals where the function is continuous you get the correct result.