Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 Problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22381] Re: [mg22350] Integrate Problems
  • From: Bojan Bistrovic <bojanb at physics.odu.edu>
  • Date: Sat, 26 Feb 2000 22:05:10 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

> Can someone provide some help with the following results I get from
> version 3 ?
> 
> a=40000
> b=4000
> f[x_]:=(1/(b*(2*Pi)^.5))*Exp[(-1/2)*((x-a)/b)^2]
> 
> Integrate[f[x],{x,-Infinity,+Infinity}]
> Returns the correct value of 1.
> 
> NIntegrate[f[x],{x,-Infinity,+Infinity}]
> Returns a somewhat correct value of 1.00121
> 
> Integrate[f[x],{x,-Infinity,0}]
> Returns a "System`$$Failure" term
> 
> NIntegrate[f[x],{x,-Infinity,0}]
> Returns a 7.6E-24 which is incorrect
> 
> Integrate[f[x],{x,0,+Infinity}]
> Returns a "System`$$Failure" term
> 
> NIntegrate[f[x],{x,0,+Infinity}]
> Returns an incorrect value of 1.00121
> 
> I need to obtain numerical values from these and similar calculations
> and suspect that some options need to be changed. Symbolic solutions
> would be preferred if possible. Are there guidelines that can help
> define what options for Integrate/NIntegrate work best ?
> 
> Please forgive any minor typos as my newsreader forces me to manually
> clean-up copied and pasted Mathematica commands.
> 
> Also any help in interpreting the associated Underflow and
> PolynomialGCD messages would be appreciated.
> 
> Thanks
> 
> Steve
> 
> 
> 
> For any e-mail responses, please remove *NOSPAM* from my address.
> 

Underflow errors mean that you're dealing with are too small for your computer
to handle; This is common when you're delaing with exponential functions with
at least one of the integration boundaries in infinity. The solution is to
replace the Infinity with some large number (just how large you have to find
by either experiment or some adaptive algorithm).

However, in your case there is a built-in function called Erf[x] defined as

Erf[x] = 2/Sqrt[Pi] Integrate[ Exp[-z^2] ,{z,0,x}]

so your integrals are related to  Erf[(x-a)/b]. PolynomialGCD tries to
calculate the Greatest Common Divisor of a polynomial and it looks like
Mathematica is trying internaly to use it to analytically evaluate the integral.

Bye, Bojan

--
---------------------------------------------------------------------
Bojan Bistrovic,                               bojanb at physics.odu.edu
Old Dominion University, Norfolk VA & Jefferson Lab, Newport News, VA
---------------------------------------------------------------------


  • Prev by Date: Re: how to spin a ScatterPlot3D
  • Next by Date: RealTime3D
  • Previous by thread: Re: Integrate Problems
  • Next by thread: RealTime3D