# Funny behavior when integrating

Having the defined the following:

    gamma = x;
lw=8;

Proietto[a_, b_] := Integrate[a b, {x, 0, lw}, Assumptions -> u > 0];
jtor = (9*(6/5 - x/20)^3)/
1150 + ((3519*(6/5 - x/20)*(-HeavisideTheta[-38/5 + x] +
HeavisideTheta[-32/5 + x]))/
20000 + (207*(6/5 - x/20)*(HeavisideTheta[-38/5 + x] -
HeavisideTheta[-32/5 + x] + HeavisideTheta[x]))/
1000)*((6421*(6/5 - x/20)*(-HeavisideTheta[-38/5 + x] +
HeavisideTheta[-32/5 + x]))/
434000 + (11*(6/5 - x/20)*(HeavisideTheta[-38/5 + x] -
HeavisideTheta[-32/5 + x] + HeavisideTheta[x]))/50)^2;
gtaglio = 2.59203007518797*^10;


I wish to integrate the following:

-Proietto[gtaglio D[jtor, {x, 1}] D[phi gamma, {x, 1}], gamma]


Yet it doesn't work (stays non-evaluated). Instead, and this is the funny behavior mentioned, this works:

-gtaglio Proietto[D[jtor, {x, 1}] D[phi gamma, {x, 1}], gamma]


Why??? It is only a question of multiplying the argument of the integral by a numerically defined constant. Could this be a wicked bug?

• I cannot reproduce this, the integral is not evaluated in either case for me. – Marius Ladegård Meyer Nov 21 '16 at 11:22
• @MariusLadegårdMeyer I forgot to define lw. Pardon me. Now the second case should work fine (not the first case!) – Mirko Aveta Nov 21 '16 at 13:21
• Indeed, it looks like a bug. – Marius Ladegård Meyer Nov 21 '16 at 13:58
• would recommend not mixing approximate numbers with a symbolic integral, especially one that handles "jump" distributions such as DiracDelta and HeavisideTheta. If intermediate processing uses e.g. Together then the approximate numbers can appear in various places that might make the singular points impossible to find. – Daniel Lichtblau Nov 21 '16 at 15:53
• @DanielLichtblau Update. I've tried by rationalizing the constant gtaglio firstly, but still this doesn't work. – Mirko Aveta Nov 21 '16 at 16:02