Why does this relation $\sum ^{k}_{n=m} f( n) =\int\limits ^{k+1}_{m} f(\lfloor x\rfloor ) dx$ not apply here?

43 Views Asked by At

I have this relation $\sum ^{k}_{n=m} f( n) =\int\limits ^{k+1}_{m} f(\lfloor x\rfloor ) dx$

I have used this relation before and it was correct in every situation I tried except for this

$\int\limits ^{k}_{0}\lfloor sin( x)\rfloor dx=\sum ^{k-1}_{n=0} sin( n) =\frac{1}{2}\left( cot\left(\frac{1}{2}\right) -cot\left(\frac{1}{2}\right) cos( k) -sin( k)\right)$

I found this to be completely incorrect! I have no idea why the relation doesn't work here. Any insight will be greatly appreciated! Thank you!