2
$\begingroup$

I would like to integrate the following product of Exp and Cos

Integrate[Exp[-a x^2 + b x] Cos[x t], {x, -Infinity, Infinity}]

But the output is the same as the input form. Is it possible for Mathematica to perform this integration?

$\endgroup$
5
  • 5
    $\begingroup$ Integrate[Exp[-a x^2 + b x] Cos[x t], {x, -Infinity, Infinity}, Assumptions -> t > 0 && a > 0 && b > 0] $\endgroup$
    – cvgmt
    May 14 at 15:02
  • 1
    $\begingroup$ Obviously a has to be greater zero, t needs to be real, and there are no restrictions on b. $\endgroup$ May 14 at 16:03
  • 5
    $\begingroup$ Less restrictive assumptions, faster too: res = Integrate[Exp[-a x^2 + b x] Cos[x t] // TrigToExp, {x, -Infinity, Infinity}, Assumptions -> a > 0]. And res // ExpToTrig // TrigExpand // Simplify gives a nice looking result. $\endgroup$
    – Michael E2
    May 14 at 16:58
  • 4
    $\begingroup$ If you wait, this gives a result with a condition for integrability: Integrate[ Exp[-a x^2 + b x] Cos[x t] // TrigToExp, {x, -Infinity, Infinity}] $\endgroup$
    – Michael E2
    May 14 at 17:12
  • $\begingroup$ Thanks a lot for your help! $\endgroup$
    – user14634
    May 16 at 10:56

1 Answer 1

5
$\begingroup$

Besides of the method provide by @Michael E2,we can test the result by N-L formula.

int = Integrate[Exp[-a x^2 + b x] Cos[x t], x, Assumptions -> a > 0]
expr = Limit[int, x -> ∞, Assumptions -> a > 0] - 
  Limit[int, x -> -∞, Assumptions -> a > 0]
Simplify[expr // ComplexExpand, a > 0]

enter image description here

The same as

Assuming[a > 0, 
 Integrate[
    Exp[-a x^2 + b x] Cos[x t] // TrigToExp, {x, -∞,∞}] // ComplexExpand // Simplify]
$\endgroup$
1
  • $\begingroup$ Why this code does not work well? Integrate[Exp[-a x^2 + b x] Cos[x t], {x, -Infinity, Infinity}, Assumptions -> a > 0] // ComplexExpand // Simplify $\endgroup$
    – user14634
    May 16 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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