Help on Explicit integral could not be found

1 view (last 30 days)
Hi all,
I am getting a well-known error of "Explicit integral could not be found" if I try to evaluate following integral
>> syms z;
>> funz=1./(1+exp((z*z-0.5)/0.1));
>> Integ2=int(funz,z,0,inf)
Warning: Explicit integral could not be found.
Integ2 =
int(1/(exp(10*z^2 - 5) + 1), z == 0..Inf)
Mathematica evaluates this integral to 0.693.
I have tried replacing lower integration limit to some small finite number (0.001) but that doesn't help. Please help in identifying the fix for this problem. Any help is appreciated. Thanks a lot !

Accepted Answer

Walter Roberson
Walter Roberson on 19 Nov 2013
MuPAD is going to convert those floating point numbers into rationals and then attempt to find a closed form solution. There is no apparent closed form solution, so the unevaluated integral is returned. You can double(Integ2) to get the numeric value.
Alternately you can do numeric integration either in MATLAB directly or in MuPAD
integral(@(z) 1./(1+exp((z*z-0.5)/0.1)), 0, Inf)
or
feval(symengine, 'numeric::int', funz, 0, Inf)

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!