MATLAB: Symbolic Integration: Explicit integral could not be found

explicit integral could not be foundsymbolic integration

Hi all,
I got a problem when trying to run a symbolic integration. Since lognormal distribution is not defined in the symbolic tools, I just write it out in an explicit way. The code is as follows:
syms w mu sigma positive
t = (w-6.5)*(w*sigma)^(-1)*(1/sqrt(2*pi)*exp(-(log(w)-mu)^2/sigma^2/2));
c = int(t,w,6.5,inf);
And the error msg is:
Warning: Explicit integral could not be found.
Can anybody please give some hint how to get the integration?
Thanks very much!!
Sonia

Best Answer

try numeric solution
eg
sigma = .2;
mu = 2;
t = @(w)(w-6.5).*(w*sigma).^(-1).*(1/sqrt(2*pi)*exp(-(log(w)-mu).^2/sigma^2/2));
c = quadgk(t,6.5,inf)
ADD on Geeks comment
use function c
t = @(w,mu,sigma)(w-6.5).*(w*sigma).^(-1).*(1/sqrt(2*pi)*exp(-(log(w)-mu).^2/sigma^2/2));
c = @(mu,sigma)quadgk(@(w)t(w,mu,sigma),6.5,inf)
Related Question