Using the commercial macsyma, I changed variables using y=exp(x/s).
The commercial macsyma used residues to evaluate the resulting integral.
When I tried that using maxima 5.9.1, it seemed to convert the integral back
to an exponential one. I think this was one of the integrals discussed
in the
technical report the maxima definite integrator is based on.
Dan Stanger
Daniel Lakeland wrote:
>Hi.
>
>I'm trying to derive the variance (or stddev) of the logistic
>distribution, as follows.
>
>(%i1) cdf:1/(1+exp(-x/s));
>
> 1
>(%o1) -----------
> - x/s
> %e + 1
>(%i2) pdf:diff(cdf,x);
>
> - x/s
> %e
>(%o2) ----------------
> - x/s 2
> s (%e + 1)
>(%i3) var:integrate(pdf*x^2,x,-inf,inf);
>
>Is s positive or negative?
>
>pos;
> 1
>Is - an integer?
> s
>
>no;
> 2
>Is - an integer?
> s
>
>no;
>Integral is divergent
> -- an error. Quitting. To debug this try debugmode(true);
>(%i4)
>
>Now wikipedia claims %pi^2 * s^2 / 3 is the correct variance. Which
>means that this integral should not be divergent unless I'm missing
>something. What is going on?
>
>When I say yes to the 1/s or 2/s queries, I get a result, but it's not
>the one that wikipedia claims.
>
>
>