MATLAB: Does the RSUMS function from the Symbolic Math Toolbox return an incorrect result when I specify a range over which to integrate

incorrectrangersumsstepsizeSymbolic Math Toolbox

If I call the RSUMS function using the syntax:
syms x
rsums(x, 0, 10)
I receive a value of 5, which is incorrect. The value should be 50.

Best Answer

This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This has been verified as a bug within the RSUMS function in the Symbolic Math Toolbox when called with an integration range. This bug has been fixed in the Symbolic Math Toolbox 3.1 (R14).
As a workaround, replace line 37 of the file :
$MATLAB\toolbox\symbolic\rsums.m
(where $MATLAB is your MATLAB root directory) with the following line:
r = (b-a)*sum(y)/n;
Then, execute the following command at the MATLAB prompt:
rehash toolboxcache