[Date Index]
[Thread Index]
[Author Index]
Re: NIntegrate with floating point limits
*To*: mathgroup at smc.vnet.net
*Subject*: [mg28883] Re: [mg28864] NIntegrate with floating point limits
*From*: David Withoff <withoff at wolfram.com>
*Date*: Thu, 17 May 2001 04:22:54 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
> Can someone explain why the following integral can only be computed
> numerically with exact limits and not with a floating point limit?
>
> x = 1/4; NIntegrate[ CosIntegral[(x - u)/x + 1] - CosIntegral[1 - (x -
> u)/x], {u, 0, x}]
>
> returns 0.2362;
>
> x = N[1/4]; NIntegrate[ CosIntegral[(x - u)/x + 1] - CosIntegral[1 - (x -
> u)/x], {u, 0, x}]
>
> returns some complaints and no result.
>
> In all cases I met so far, floating points limits in numerical integration
> caused no problems.
>
> Many thanks in advance,
>
> Fred Simons
The inexact numbers in the integrand have the effect of putting the
singularity in an indefinite location, known only to within numerical
uncertainty, which makes it impossible to do reliable analysis of the
singularity. With the inexact numbers, for example, it isn't possible
without making some assumptions to know if the singularity in this
integrand is in the range of integration.
You can use the SingularityDepth option to cause a rather more crude
(many recursive subdivisions of the range of integration) handling of
the singularity, which will avoid the warning messages, at the cost
of some efficiency and mathematical justification.
In[1]:= x=N[1/4]; NIntegrate[CosIntegral[(x-u)/x+1]-
CosIntegral[1-(x-u)/x], {u, 0, x},
SingularityDepth -> 99, MaxRecursion -> 30]
Out[1]= 0.2362
Dave Withoff
Wolfram Research
Prev by Date:
**Re: NIntegrate with floating point limits**
Next by Date:
**Re: NIntegrate with floating point limits**
Previous by thread:
**Re: NIntegrate with floating point limits**
Next by thread:
**Re: NIntegrate with floating point limits**
| |