Message Boards Message Boards


Integral Limits issue (amateur Problem)

Posted 8 years ago
1 Reply
0 Total Likes

hey, i attached a short file with a code that produces the problem i have.

In[44]:= \[Epsilon]L = -\[Epsilon]H
\[Epsilon] = UniformDistribution[{\[Epsilon]L, \[Epsilon]H}]
g[\[Epsilon]_] := PDF[\[Epsilon], x]
\[Rho]L = 1 + \[Epsilon]L
1 + \[Epsilon]L > 0
1 + \[Epsilon]L < 1
\*SubsuperscriptBox[\(\[Integral]\), \(\[Epsilon]L\), \
\(\[Epsilon]H\)]\ \(g[\[Epsilon]] \[DifferentialD]x\)\)

Out[44]= -\[Epsilon]H

Out[45]= UniformDistribution[{-\[Epsilon]H, \[Epsilon]H}]

Out[47]= 1 - \[Epsilon]H

Out[48]= 1 - \[Epsilon]H > 0

Out[49]= 1 - \[Epsilon]H < 1

During evaluation of In[44]:= Integrate::pwrl: Unable to prove that integration limits {-\[Epsilon]H,\[Epsilon]H} are real. Adding assumptions may help. >>

Why does Mathematica not know that 0 < epsilonH < 1 ? (as 1+epsilonL <1 && 1+epsilonL > 0 )

How can I define the domain of a variable if it is an open Interval?

Ty in advance for all replies

POSTED BY: Claude Dax
Posted 8 years ago


1 + \[Epsilon]L > 0

by itself is not declaring that this is True. Instead it is asking Mathematica to determine whether this is True, False or cannot be determined. When Mathematica echoes back approximately that expression, instead of True or False, this indicates that it cannot be determined from the available information.


Assuming[1 + \[Epsilon]L > 0, SomeFurtherCalculations]

informs a few Mathematica functions that they are to assume that the boolean condition is true. But only Mathematica functions which are documented to make use of such assumptions and which are within those SomeFurtherCalculations will use this information. Simplify, Integrate and a few others use this while almost all other functions do not. Outside that Assuming those assumptions will be discarded.


\[Epsilon] = UniformDistribution[{\[Epsilon]L, \[Epsilon]H}];
g[\[Epsilon]_] := PDF[\[Epsilon], x];
Assuming[-1 < \[Epsilon]L < 0 && 0 < \[Epsilon]H < 1,
   Integrate[g[\[Epsilon]], {x, \[Epsilon]L, \[Epsilon]H}]

is sufficient to determine the result is 1.

But for this special case even this

\[Epsilon] = UniformDistribution[{\[Epsilon]L, \[Epsilon]H}];
g[\[Epsilon]_] := PDF[\[Epsilon], x];
Assuming[\[Epsilon]L < \[Epsilon]H,
   Integrate[g[\[Epsilon]], {x, \[Epsilon]L, \[Epsilon]H}]

is sufficient, because UniformDistribution only requires that the first argument be known to be less than the second argument.

So, to try to answer your question about how to define the domain of a variable if it is an open interval, you perhaps want to try using Assuming or $Assumptions or the optional arguments to Simplify or Integrate which accomplish the same thing or possibly to use optional boolean constraint arguments that a few functions support.

POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract