gt;0,%e^(2*x-1)/2-2*%e^(-1),%if(-(x-1)&gt;0,%e^(-1)*x-(3*%e^(-1))/2,-%e^(1-2*x)/2))
</pre></td></tr></table>
<p>For definite integration, these conditional expressions can cause trouble:
</p><table><tr><td>&nbsp;</td><td><pre class="example"> (%i4) integrate(exp(-abs(x-1) - abs(x)),x, minf,inf);
 (%o4) limit(%if(-x&gt;0,(%e^(-1)*(%e^(2*x)-4))/2,%if(-(x-1)&gt;0,(%e^(-1)*(2*x-3))/2,-%e^(1-2*x)/2)),x,inf,minus)-limit(%if(-x&gt;0,(%e^(-1)*(%e^(2*x)-4))/2,%if(-(x-1)&gt;0,(%e^(-1)*(2*x-3))/2,-%e^(1-2*x)/2)),x,-in