Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Parametric Numerical Integral

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63115] Re: Parametric Numerical Integral
  • From: albert <awnl at arcor.de>
  • Date: Thu, 15 Dec 2005 03:06:25 -0500 (EST)
  • References: <dnopgm$2hb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

> I have the following problem:
> I define a parametric integral as follows:
> int[p_]:=NIntegrate[If[t == 0, 0,1/(E^((1/2)*(-2 +
> 1/t)^2)*(Sqrt[2*Pi]*t))],{t, -p, p}, MaxRecursion -> 50,WorkingPrecision
> -> 50]
> 
> it works fine for numerical values of p such as int[10], but when I try
> something like this:
> 
> << NumericalMath`NLimit`
> 
> NLimit[int[p], p -> Infinity]
> 
> it ends up with error messages:
> 
> NIntegrate::nlim: t = 1.00000 p is not a valid limit of integration.
> 
> Now I tought that NLimit should also deal only with numerical values, but
> I was wrong. Seems that the way I defined this function above has serious
> limitations in its further usage.
> 

use
int[p_NumericQ]:= ....
then you will only get warnings about slow convergence from NIntegrate. For
an explanation of how and why this is needed look at various other posts
about similar problems with calls of numeric functions and plot functions.

hth

albert


  • Prev by Date: Re: Opener Icons for cell group.
  • Next by Date: Re: Taking either a sequence or a list
  • Previous by thread: Parametric Numerical Integral
  • Next by thread: Re: Parametric Numerical Integral