Statistics`ContinousDistributions` (integrating over a UniformDistribution)

*To*: mathgroup at smc.vnet.net*Subject*: [mg9250] Statistics`ContinousDistributions` (integrating over a UniformDistribution)*From*: "decker, mark a" <ormad at orntsrv103.micro.lucent.com>*Date*: Fri, 24 Oct 1997 01:01:03 -0400*Sender*: owner-wri-mathgroup at wolfram.com

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. =============================================================== <<Statistics`ContinuousDistributions` 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, 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 micro.lucent.com D-Lab (AFM) Lucent Technologies