       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:= f[x_] := 2 Exp[-x^2] x

is a function such as you describe

In:= f = .7525
In:= root = FindRoot[Integrate[f[x],{x,0,a} - f == 0, {a,1}]
Out:= {a -> 1.18167}
In:= Integrate[f[x],{x,0,a/.root}]
Out:= 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?