0
$\begingroup$

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}}]
Integrate[myExpression,s]

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

$\endgroup$
2
$\begingroup$

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$.

$\endgroup$
  • $\begingroup$ Thanks! I did not know the dummy variables were assumed to be complex by default. $\endgroup$ – LBogaardt Apr 21 '14 at 21:58
  • $\begingroup$ For the record (i.stack.imgur.com/H1YHW.png) :) $\endgroup$ – Dr. belisarius Apr 21 '14 at 22:01
  • $\begingroup$ 666 you mean? ;) $\endgroup$ – LBogaardt Apr 22 '14 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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