MATLAB: Do I get an error when converting certain definite integrals to double data types in Symbolic Math Toolbox 5.6 (R2011b)

definitedoubleerrorintegralSymbolic Math Toolbox

I am evaluating an integral in the range [0..1], which cannot be determined analytically by the Symbolic Math Toolbox. Because of this, I am converting the result to a double data type. This only works with one of two expressions, so I have to use the VPA function for the second one.
Why is this the case? Is this a bug or expected behavior?
The steps I took were as follows:
syms x
workingCase = int( exp(sin(x)) , 0 , 1 );
double(workingCase)
Warning: Explicit integral could not be found.
ans = 1.6319
syms x
faultyCase = int( exp(sin(x)^(1/2)) , 0, 1 );
double(faultyCase)
Warning: Explicit integral could not be found.
Error using mupadmex
Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
Error in sym/double (line 936)
Xstr = mupadmex('symobj::double', S.s, 0);
>> vpa(faultyCase)
ans = 1.9442688791385811674662257610601

Best Answer

This issue has to do with the default number of digits of precision (64 digits) that are used to evaluate integrals. With certain definite integrals, this may cause an error.
There are two possible workarounds:
1. The definite integral can be converted to a symbolic type number using the VPA function and then cast into a double data type:
x = double( vpa( int( exp(sin(x)^(1/2)), 0, 1 ) ) );
2. If using MuPAD, the number of digits used can be reduced. For this particular example, reducing from 64 to 32 digits and then converting to a floating point number gives a numerical answer:
DIGITS:= 32:
float(int( exp(sin(x)^(1/2)) , x = 0..1 ))