# Definite Integral, Piecewise, Error

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

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