Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 ?

share|improve this question
    
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 at 15:54

1 Answer 1

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]

enter image description here

share|improve this answer
    
Try Integrate[(1 - Cos[x])/x^2 Exp[I 2 x], {x, -∞, ∞}] –  belisarius Jan 4 at 19:12
1  
@belisarius It returns 0 as expected. See red line in the plot. –  ybeltukov Jan 4 at 19:21
    
Sorry, I misread your answer –  belisarius Jan 4 at 20:25
    
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 at 9:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.