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 xworkingCase = int( exp(sin(x)) , 0 , 1 );double(workingCase) Warning: Explicit integral could not be found. ans = 1.6319syms xfaultyCase = 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