Want more features on Pastebin? Sign Up, it's FREE!
Guest

Mathematica bug?

By: a guest on Nov 17th, 2011  |  syntax: None  |  size: 0.51 KB  |  views: 49  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. f[x_, r_] := x*(r - x)*Exp[-Pi*I/(2 r)*x^2];
  2. g[x_, r_] := Exp[-Pi*I/(2 r)*x^2]*(r - Pi*I*x^2 - 2*x + Pi*I/r*x^3);
  3.  
  4. Clear[r];
  5. FullSimplify[
  6.   Integrate[f[x, r], {x, 0, r}] +
  7.    Integrate[-Sum[Sin[2*Pi*n*x]/(n*Pi), {n, 1, Infinity}]*g[x, r], {x,
  8.       0, r}], r > 0 && Element[r, Integers]]  // N
  9.  
  10. r = 12;
  11. FullSimplify[
  12.   Integrate[f[x, r], {x, 0, r}] +
  13.    Integrate[-Sum[Sin[2*Pi*n*x]/(n*Pi), {n, 1, Infinity}]*g[x, r], {x,
  14.       0, r}], r > 0 && Element[r, Integers]]  // N
  15.  
  16.  
  17. Output:
  18. 0.
  19. 2.64102 - 39.4256 I
  20.  
clone this paste RAW Paste Data