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'm trying to do the following integral, but Mathematica won't evaluate it - it just spits out the actual symbolic integral.

$$\frac{e^{-\frac{(k-d)^2}{2 a^2}} \left | \frac{-d+\frac{c i}{2}+k-\frac{i b}{2}}{-d+\frac{b i}{2}+\frac{c i}{2}+k}+1 \right | ^2}{4 \sqrt{2 \pi } \sqrt{a^2}}, a = 1, b = 1, c = 0, d = 0.0001$$

a = 1;
b = 1;
c = 0;
d = 0.0001;

Integrate[((2*Pi*a^2)^(-1/4)*
     Exp[-(k - d)^2/(4*a^2)])^2 * (Abs[
      1 + ((k - d + (I*c/2) - (I*b/2))/ (k - d + (I*c/2) + (I*b/2)))]/
     2)^2, {k, 0, Infinity} ]

$$\int_0^{\infty } \frac{e^{-\frac{1}{2} (k-0.0001)^2} \left | \frac{(-0.0001-0.5 i)+k}{(-0.0001+0.5 i)+k}+1\right | ^2}{4 \sqrt{2 \pi }} \, dk$$

Can anyone tell me what I'm doing wrong?

share|improve this question
    
First,use NIntegrate.second,it is bad idea that put Abs in Integrate. –  Apple Mar 14 '14 at 4:17
    
Thanks. What's the problem with Abs and Integrate? –  E-one Mar 14 '14 at 4:27

1 Answer 1

Use NIntegrate, it can do it

a = 1;
b = 1;
c = 0;
d = 1/10000;

int = ((2*Pi*a^2)^(-1/4)*Exp[-(k - d)^2/(4*a^2)])^2*
  (Abs[1 + ((k - d + (I*c/2) - (I*b/2))/(k - d + (I*c/2) + (I*b/2)))]/2)^2;
NIntegrate[int, {k, 0, Infinity}]
(* 0.280909 + 0. I *)

Integrate could not find closed form solution

share|improve this answer
    
OK, thanks, it works now :) –  E-one Mar 14 '14 at 4:27

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.