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 symbollic integral (sorry I'm not sure how to copy the output into this post so it appears as it does in the notebook!).

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} ]

Can anyone tell me what I'm doing wrong?

Thanks

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