# Different integral when used with assumptions

I want to calculate an integral, but Mathematica gives me different results if I am more specific with the Assumptions option of Integrate.

I have :

Integrate[(1 - Cos[x])/x^2 Exp[I t x], {x, -∞, ∞}]


that returns :

ConditionalExpression[π - π Abs[t], -1 < Re[t] < 1 && Im[t] == 0]


and :

Integrate[(1 - Cos[x])/x^2 Exp[I t x], {x, -∞, ∞}, Assumptions :> t ∈ Reals]


that returns :

1/2 π (Abs[-1 + t] - 2 Abs[t] + Abs[1 + t])


How to explain the difference between the two results ?

-
I would say it's a bug that there is not every conditional in the first result. But the results are the same if you assume this condition. –  swish Jan 4 '14 at 15:54

The second one is more general:

Simplify[1/2 π (Abs[-1 + t] - 2 Abs[t] + Abs[1 + t]), -1 < t < 1]

π - π Abs[t]

Plot[{π - π Abs[t], 1/2 π (Abs[-1 + t] - 2 Abs[t] + Abs[1 + t])}, {t, -3, 3},
BaseStyle -> Thick]


-
Try Integrate[(1 - Cos[x])/x^2 Exp[I 2 x], {x, -∞, ∞}] –  belisarius Jan 4 '14 at 19:12
@belisarius It returns 0 as expected. See red line in the plot. –  ybeltukov Jan 4 '14 at 19:21
Thank you for your answer, but I still don't understand why the first one (which should be more general, as there is no Assumptions) does not give a complete result. Is it a bug ? –  deltux Jan 5 '14 at 9:17