Why is calculator showing math error while calculating $\int_0^1\frac{1}{\sqrt x}dx$?

While calculating $\int_0^1\frac{1}{\sqrt x}dx$ in a calculator (Casio 991 ES Plus), it shows MATH ERROR. But clearly$$\int_0^1\frac{1}{\sqrt x}dx=\left[\frac{x^{-\frac 12+1}}{-\frac 12+1}\right]_0^1=\left[2\sqrt x\right]_0^1=2$$ Then why does the calculator show error output?


Unless you specify the exact model of calculator and firmware i can only speculate. It is likely that it encounters a division by zero when evaluating the function to integrate at 0. As $\frac{1}{\sqrt{x}}$ at $x=0$ is undefined and it would be quiet surprising if an integrator doesn't evaluate the function at the borders of the interval it is supposed to integrate on. See if the math error vanishes if you start integration from a very small number larger then 0 such as 2.220446049250313e-16.

The manual of calculator you use says it uses the Gauss-Kronrod method. Which evaluates the integrand directly. It looks like this method also evaluates the expression on the interval borders you integrate over. So the calculator tries to evaluate $\frac{1}{\sqrt{0}}$ and fails.