       Re: Parametric Numerical Integral

• To: mathgroup at smc.vnet.net
• Subject: [mg63113] Re: Parametric Numerical Integral
• From: dh <dh at metrohm.ch>
• Date: Thu, 15 Dec 2005 03:06:24 -0500 (EST)
• References: <dnopgm\$2hb\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hello Nikol,
your problem does have nothing to with NLimit. The reason you get the
error message is, that be default, function arguments are first
evaluated before passed to the function (you can force different
behaviour by Attributes like HoldFirst, HoldAll...).
Therefore when you say:
NLimit[int[p], p -> Infinity]
Before NLimit is called, int[p] is evaluated, reporting that 1 p is not
numerical, what is correct.
You must ensure that int is only evalauted for numeric arguments by e.g.:

int[p_?NumericQ] := ...

have fun, Daniel

Nikola Letic wrote:
> Hello,
> 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, 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.
>
> Does any of you Mathematica Gurus know an easy workaround for this?
>
> Thanks in advance
>
> Nikola Letic
>
>

```

• Prev by Date: Re: Why is y a local variable here?
• Next by Date: Re: Parametric Numerical Integral
• Previous by thread: Re: Parametric Numerical Integral
• Next by thread: Re: Parametric Numerical Integral