Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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 at 21:58
    
For the record (i.stack.imgur.com/H1YHW.png) :) –  belisarius Apr 21 at 22:01
    
666 you mean? ;) –  LBogaardt Apr 22 at 11:06

Your Answer

 
discard

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.