# Strategy tips for time consuming FullSimplify, crashing FullSimplify, and strange behavior of TimeConstraint

I am trying to simplify a complicated integration result containing both error functions and MeijerG - I give the full expression below. A simple FullSimplify[expression,{x>0,y>0,z>0}] would run for about one day and then simply crash the kernel without returning any result. I have been trying to play around with the TimeConstraint parameter. I started multiple runs at the same time, with TimeConstraint->{10000n,10000n} for n=1,5,9.

Weirdly, the one for n=9 which should have run the longest already finished after just a few minutes without significant simplification and the warning message (note the negative sign!)

"FullSimplify::time: Time spent on a transformation exceeded -2.95596 10^12 seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification."

The one for n=1 crashed after a few minutes without result. The one for n=5 is still running.

Any guesses what causes this erratic behavior? What is the best way to use TimeConstraint (specifically, what is the best ration between the local and total time parameter)?

And what is the best strategy to find out if a result like this can be further simplified? I did a regular Simplify first, of course. I guess I could split the expression into separate terms, but my suspicion is that some of them only yield a simpler expression when taken together with the other terms.

Would be happy for any ideas.

Here is the function (where I know that x, y, z are positive reals):

((x*Erf[2*x*z - y*z]*((2*Pi*(x - y)*(E^(2*x^2)*(-1 + Sqrt[2*Pi]*x)*(3*x - y)
+ Pi*x*(1 - 6*x^2 + 2*x*y)*Erfi[Sqrt[2]*x]
+ x*(-1 + 6*x^2 - 2*x*y)*ExpIntegralEi[2*x^2]))/E^(2*x^2)
- MeijerG[{{0, 1/2}, {}}, {{1/2, 1, 1}, {}}, 2*x^2]
+ 2*((x - y)^2*MeijerG[{{0, 1/2, 1}, {}}, {{1/2, 1}, {}}, -(1/(Sqrt[2]*x)), 1/2]
+ x*(-2*(x - y)*MeijerG[{{1/2, 1, 1}, {}}, {{1, 3/2}, {}}, -(1/(Sqrt[2]*x)), 1/2]
+ x*MeijerG[{{1, 1, 3/2}, {}}, {{3/2, 2}, {}}, -(1/(Sqrt[2]*x)), 1/2]))))/E^(2*(x - y)^2)
- (x*Erf[(2*x + y)*z]*((2*Pi*(x + y)*(E^(2*x^2)*(-1 + Sqrt[2*Pi]*x)*(3*x + y)
+ Pi*x*(1 - 6*x^2 - 2*x*y)*Erfi[Sqrt[2]*x]
+ x*(-1 + 6*x^2 + 2*x*y)*ExpIntegralEi[2*x^2]))/E^(2*x^2)
- MeijerG[{{0, 1/2}, {}}, {{1/2, 1, 1}, {}}, 2*x^2]
+ 2*((x + y)^2*MeijerG[{{0, 1/2, 1}, {}}, {{1/2, 1}, {}}, -(1/(Sqrt[2]*x)), 1/2]
+ x*(-2*(x + y)*MeijerG[{{1/2, 1, 1}, {}}, {{1, 3/2}, {}}, -(1/(Sqrt[2]*x)), 1/2]
+ x*MeijerG[{{1, 1, 3/2}, {}}, {{3/2, 2}, {}}, -(1/(Sqrt[2]*x)), 1/2]))))/E^(2*(x + y)^2))/(2*Pi*x^2)

• Side point: Crashing is not acceptable behavior for any software, definitely not a Wolfram Language "feature" people should be able to help you with here. If you are experiencing a reproducible crash, that should be reported to Wolfram Support. People here may help to report if the crash is reproduced in different systems though. Sep 8 at 8:50
• Thank you rhermans for the suggestion, I will consider that. In the meantime, it turns out that I have a bigger problem with Mathematica than I thought. The above result of Integrate[] seems to make no sense, so I need to go back through my entire calculation before trying to simplify further. I am, however, still thankful for tips regarding general strategy for FullSimplify, especially with special functions like Erf, MeijerG, ... Sep 8 at 12:12
• I suggest you edit your question and make it simpler and focused to the point where you need help. Emphasize the question if possible for easier reading. Sep 8 at 12:15