Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrate returns 0

  • To: mathgroup at
  • Subject: [mg23915] Re: [mg23888] Integrate returns 0
  • From: BobHanlon at
  • Date: Fri, 16 Jun 2000 00:56:55 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

In a message dated 6/15/2000 1:13:26 AM, felix.klee at writes:

>when I define the function
>    f[x_,n_]:=D[Exp[-x^2],{x,n}]^2
>and execute
>    Integrate[f[x,n],{x,-Infinity,Infinity}]
>the result is
>    0
>However this is not correct for all parameters n since
>    Integrate[f[x,1],{x,-Infinity,Infinity}]
>    Sqrt[Pi/2]
>Is this a bug in Mathematica or am I doing something wrong?

You need to delay integration until a specific value of n is defined.

f[x_, n_] := D[Exp[-x^2], {x, n}]^2

g[x_, n_Integer] := Integrate[f[x, n] , {x, -Infinity, Infinity}]

Table[g[x, n], {n, 0, 5}]

{Sqrt[Pi/2], Sqrt[Pi/2], 3*Sqrt[Pi/2], 15*Sqrt[Pi/2], 
  105*Sqrt[Pi/2], 945*Sqrt[Pi/2]}

(Integrate[#, {x, -Infinity, Infinity}] & /@ Table[f[x, n], {n, 0, 5}]) == 
  Table[Integrate[f[x, n], {x, -Infinity, Infinity}], {n, 0, 5}] == 
  Table[g[x, n], {n, 0, 5}]


Bob Hanlon

  • Prev by Date: RE: Appending an element to a list
  • Next by Date: Re: To color surfaces using z values with ContourPlot3D
  • Previous by thread: Re: Integrate returns 0
  • Next by thread: Re: Integrate returns 0