I've updated today to Mathematica 9.0.1.0 from version 8 and found something that absolutely confuses me.
Let us define a piecewise function:
gr[x_, v1_, v2_, v3_, v4_, v5_] =
Piecewise[{{g, v1 < x < v1+v2}, {g, v1+v3 < x < v1+v2+v3},
{gs, v1+v2+v3+v4 < x < v1+v3+v2+v4+v5}}, 0]
and try integrating it with obvious assumptions:
Integrate[gr[x, a, b, c, d, e], {x, 0, END},
Assumptions -> {0 < a < a+b < a+c < a+b+c < a+b+c+d < a+b+c+d+e < END}]
This takes around 60 seconds and obviously results in 2 b g + e gs
(although it seems it was a lot faster in Mathematica 8, though it's not the point here). Now, if we do the very same integration, but with different symbols:
Integrate[gr[x, τ, δ, Δ, τs, δs], {x, 0, TR},
Assumptions -> {0 < τ < τ+δ < τ+Δ < τ+δ+Δ < τ+δ+Δ+τs < τ+δ+Δ+τs+δs < TR}]
All of a sudden this doesn't evaluate in 60 seconds, running till it pages all the memory available and crashing afterwads. Can anyone explain this?
Reals
: MMA generates same result, but with wildy convoluted conditions when using greeks vs non, along with taking longer. $\endgroup$a
forτ
is sufficient to stop the expression from evaluating. $\endgroup$Solve
$\endgroup$Solve
one) are similar issues. At heart, as noted by @Rojo, it has to do with internal ordering having an impact on simplification, cylindrical decomposition, and other under-the-hood functionality that is called upon by the likes ofIntegrate
andSolve
. We'll look into these examples but I am doubtful as to whether they are readily remediated. $\endgroup$