MathGroup Archive 2000

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

Search the Archive

Re: Integrate query

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23391] Re: [mg23361] Integrate query
  • From: "Richard Finley" <rfinley at medicine.umsmed.edu>
  • Date: Fri, 5 May 2000 02:07:29 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I don't think there is a guaranteed way to work in all cases...however if your function is not too pathological (which it shouldn't be if it is analytic and positive) the most direct way is perhaps the easiest:

In[1]:= f[x_] := 2 Exp[-x^2] x

is a function such as you describe

In[2]:= f = .7525
In[3]:= root = FindRoot[Integrate[f[x],{x,0,a} - f == 0, {a,1}]
Out[3]:= {a -> 1.18167}
In[4]:= Integrate[f[x],{x,0,a/.root}]
Out[5]:= 0.7525

regards,  RF

>>> "A. E. Siegman" <siegman at stanford.edu> 05/04/00 12:59AM >>>
I have a non-negative analytic function f[x] whose area (integral of 
f[x] from 0 to Infinity) is unity.  

I want to find the upper limit such that the integral up to that limit 
will contain a fixed fraction of the total area, i.e. find  a  such that

   Integrate[f[x], {x,0,a}] == f         (f<=1)

The question is, what's the most efficient way to program this, if I 
want to find  a  with fair accuracy, and with a variety of different 
functions f[x]?

Thanks . . .




  • Prev by Date: Re: NURBS ?
  • Next by Date: Re: Integrate query
  • Previous by thread: Re: Integrate query
  • Next by thread: Gif file?