MathGroup Archive 2005

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

Search the Archive

Re: Parametric Numerical Integral

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63131] Re: [mg63095] Parametric Numerical Integral
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 15 Dec 2005 03:06:39 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Off[NIntegrate::slwcon];

Clear[int];
int[p_?NumericQ]:=NIntegrate[If[t==0, 0,
        1/(E^((1/2)*(-2+1/t)^2)*(Sqrt[2*Pi]*t))],
      {t, -p, p}, MaxRecursion->50,
      WorkingPrecision->50];

int[10]

0.6183797223358392902748797062033600519932

Needs["NumericalMath`NLimit`"];

NLimit[int[p], p->Infinity, WorkingPrecision->50]

0.63998805892006372723475974276826659


Bob Hanlon

> 
> From: "Nikola Letic" <nletic at yahoo.com>
To: mathgroup at smc.vnet.net
> Date: 2005/12/14 Wed AM 04:35:57 EST
> Subject: [mg63131] [mg63095] Parametric Numerical Integral
> 
> 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[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.
> 
> Does any of you Mathematica Gurus know an easy workaround for this?
> 
> Thanks in advance
> 
> Nikola Letic
> 
> 
> 


  • Prev by Date: Re: Parametric Numerical Integral
  • Next by Date: Re: Parametric Numerical Integral
  • Previous by thread: Re: Parametric Numerical Integral
  • Next by thread: Re: Parametric Numerical Integral