Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to evaluate the following:

myExpression=Piecewise[{{-c E^(c s)-(E^(-((-s+\[Alpha]+q \[Beta])^2/(2 (\[Beta]^2 \[Sigma]q^2+\[Sigma]s^2)))) v \[Beta])/(Sqrt[2 \[Pi]] Sqrt[\[Beta]^2 \[Sigma]q^2+\[Sigma]s^2]),\[Beta]!=0},{-c E^(c s),\[Beta]==0}}]

However, when I try to make this Integral definite, by using {s,0,z}, I get the following error:

Integrate::pwrl: "Unable to prove that integration limits {0,z} are real. Adding assumptions may help"

I do not wish to change the expression of this integral, nor do I care for some cheap trick which removes the error message (like Quiet). I simply want to know where this error comes from, and what additional information about my variabales Mathematica would like to know.

Thanks! Laurens

share|improve this question
up vote 2 down vote accepted

Simply add as an option

Integrate[myExpression, {s, 0, z}, Assumptions -> z > 0]

The reason why you got this error is because by default, Mathematica does not assume that the variable $z$ is a real number. It is trying to find an analytic solution to the integral for general complex $z$.

share|improve this answer
Thanks! I did not know the dummy variables were assumed to be complex by default. – LBogaardt Apr 21 '14 at 21:58
For the record ( :) – Dr. belisarius Apr 21 '14 at 22:01
666 you mean? ;) – LBogaardt Apr 22 '14 at 11:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.