0
|
3493 Views
|
|
2 Total Likes
View groups...
Share
GROUPS:

# how to handle ConditionalExpression

Posted 9 years ago
 I'm aware that nowadays Mathematica have inbuilt Maxwell distribution. But if I type the expression for a maxwell distribution. In:= maxwellianPDF[v, a] = (v^2 Exp[-a v^2])/ Integrate[v^2 Exp[-a v^2], {v, 0, Infinity}] I get: Out= ConditionalExpression[(4 a^(3/2) E^(-a v^2) v^2)/Sqrt[[Pi]],Re[a] > 0] And if I type the cumulative distribution using In: In:= maxwellCDF[w_] = Integrate[ maxwellianPDF[v, a], {v, 0, w/Sqrt[a]}] I get: Out= ConditionalExpression[-((2 E^-w^2 w)/Sqrt[[Pi]]) + Erf[w], Re[a] > 0] Out does not contain the parameter a but maxwellCDF still needs to know that Re[a]>0 So e.g. trying to plot the CDF does not work unless I set a to some arbitrary value. is there some smother way to handle this? Peter
 You can Integrate with the assumption that a is positive. Assuming[a > 0, (v^2 Exp[-a v^2])/Integrate[v^2 Exp[-a v^2], {v, 0, Infinity}]] Mathematica has a framework for declaring assumptions like these. There's also a global variable for tracking assumptions called \$Assumptions.