Problem 58259. Easy Sequences 115: Integral involving square root, floor, and round functions
Given a postive real number n, we are asked to evaluate the following integral:
where: the symbol "" is the floor function,
and "" is the round (to the nearest integer) function.
We may rewrite the above function in Matlab as:
Therefore, for , we have:
Be careful though, in using the Matlab integral function, as it is only an approximation. For example if :
The correct answer is . The integral function is off by only 2 units here, but the discrepancy could be even greater for other values of n. integral function can also be quite slow. The challenge is to find an efficient and more accurate algorithm to evaluate the integral.
Solution CommentsShow comments
Problem Recent Solvers1