MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Statistics`ContinousDistributions` (integrating over a UniformDistribution)

Hello helpful Mathematica people.

For fun (and to help introduce me to new features in Mathematica) I've
decided to work all the problems in a Q.M. text using only Mathematica
3.0.1.  (I say this so you will understand I am not seeking the result,
but the *most elegant/general* method.



p[x_] := PDF[UniformDistribution[0,Pi],x]

MeanDist[f_] := Integrate[ f p[x], {x, -Infinity, Infinity}]

(* which gives *)

Integrate::idiv: Integral of (x(Sign[x] - Sign[-Pi+x]))/(2 Pi) does not
converge on {-Infinity, Infinity}.
Integrate::idiv: Integral of x (Sign[x] - Sign[-Pi+x]) does not converge
on {-Infinity, Infinity}.

Integrate[ x (Sign[x] - Sign[-Pi + x])/(2 Pi), {x, -Infinity,


** again I'm not looking for the answer, I realize for this problem I
could just put in the limits {x, 0, Pi} and everything is fine.... but
would like to keep the function MeanDist[] general.

I know that the UniformDistribution is not a well behaved function (it's
derivative has infinities), but I'm hoping that I can have mathematica
solve this symbolically without requiring me to put in the limits {x,
0, Pi}.

Any help would be great.

Mark A. Decker
ormad at
D-Lab (AFM)
Lucent Technologies

  • Prev by Date: Integration bugs in Mathematica 3.0
  • Next by Date: NonlinearFit of complex function
  • Previous by thread: Re: Integration bugs in Mathematica 3.0
  • Next by thread: NonlinearFit of complex function