Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*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 1998

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

Search the Archive

Re: NIntegrate of a Decaying Exponential

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15176] Re: [mg15137] NIntegrate of a Decaying Exponential
  • From: Robert Pratt <rpratt at math.unc.edu>
  • Date: Thu, 17 Dec 1998 00:27:53 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

The exact answer can be obtained by hand by using the substitution  u =
-v^2.  The integrand then becomes E^u.  Applying the Fundamental
Theorem of Calculus, we get E^(-4) - E^(-1) as the exact answer.

Integrate[-2v Exp[-v^2],{v,-1,2}] yields the same result.

Note that since -2v Exp[-v^2] is an odd function, the integral from -1
to 1 is 0.  Hence it should be no surprise that 

Integrate[-2v Exp[-v^2],{v,1,2}] 

also gives the exact result obtained above.

Rob Pratt
Department of Mathematics
The University of North Carolina at Chapel Hill CB# 3250, 331 Phillips
Hall
Chapel Hill, NC  27599-3250

rpratt at math.unc.edu

http://www.math.unc.edu/Grads/rpratt/

On Wed, 16 Dec 1998, Wretch wrote:

> Greetings -- I'm trying to get Mathematica to do an integral that
> appears regularly in plasma physics problems.  It appears to give the
> right answer, but it's always accompanied with an annoying error
> message whose roots are a bit vague.  Here is the function to be
> integrated:
> 
> f = -2 v Exp[-v^2]  over the v-interval  (-1,2)
> 
> The answer should be about  -.34956 (according to an IMSL subroutine)
> 
> Here's the mathematica input and output:
> 
> In[1]:=NIntegrate[-2 v Exp[-v^2],{v,-1,2}] Out[1]:=Out[99]=-0.349564
> 
> NIntegrate::"ploss": 
>     "Numerical integration stopping due to loss of precision. Achieved \
> neither the requested PrecisionGoal nor AccuracyGoal; suspect highly \
> oscillatory integrand, or the true value of the integral is 0. If your
> \ integrand is oscillatory try using the option Method->Oscillatory in
> \ NIntegrate."
> 
> So, Mathematica gets it right, but with the mysterious warning. The
> error/warning message isn't surprising since the integrand has such a
> sharp peak at v=0, but none of the options specified in the help menu,
> such as MinRecursion, MaxRecursion, Method->, etc. were of any use in
> suppressing this error message.  I want to suppress messages of this
> sort not only so that I don't have to look at them, but also to have an
> extra measure of confidence that the answer is actually right!  
> 
> Any help is greatly appreciated.
> 
> Thanks,
> 
> AC



  • Prev by Date: combinatorics
  • Next by Date: Re: Re: Reversing the axis of a plot
  • Previous by thread: Re: NIntegrate of a Decaying Exponential
  • Next by thread: Re: NIntegrate of a Decaying Exponential