Re: Numerical Integration
- To: mathgroup at smc.vnet.net
- Subject: [mg71503] Re: Numerical Integration
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Mon, 20 Nov 2006 18:12:06 -0500 (EST)
- References: <ejrn8h$9a4$1@smc.vnet.net><ejs36f$906$1@smc.vnet.net>
Dear David,
Thanks a lot for your nice solution.
Here is another along the same lines.
h[x_] := Tan[BesselJ[0, x]]
Needs["NumericalMath`BesselZeros`"]
lst = BesselJZeros[0, 10];
lst[[0]] = 0;
f[i_] := NIntegrate[h[x], {x, lst[[i]], lst[[i + 1]]}]
SequenceLimit[FoldList[Plus, 0, Table[f[i], {i, 0, 9}]]]
1.45451
Best Regards
Dimitris
Peter Pein wrote:
> dimitris schrieb:
> > Dear All,
> >
> > I have one question about the numerical integration of one function.
> >
> > $VersionNumber
> > 5.2
> >
> ...
> > h[x_] := Tan[BesselJ[0, x]]
> >
> > Plot[h[x], {x, 0, 40}, PlotPoints -> 100, Axes -> None, Frame -> {True,
> > True, False, False}, PlotStyle -> AbsoluteThickness[2]]
> >
> > Limit[h[x], x -> Infinity]
> > 0
> >
> > I try hard to find any proper settings for getting a numerical
> > estimation of its integral
> > over {0,Infinity} but I can't succeed.
> >
> > Any help will be greatly appreciate.
> >
> > Dimitris
> >
>
> Hi Dimitris,
>
> I tried it this way:
>
> In[1]:=
> Needs["NumericalMath`BesselZeros`"];
> h[x_] := Tan[BesselJ[0, x]];
> t0 = SessionTime[];
> bzlist = NestList[BesselJZerosInterval[0, {1, 2}*Last[#1] + {-1/10, 1/10}] & ,
> Flatten[{0, BesselJZeros[0, 2]}], 9];
> v0 = (NIntegrate[h[x], Evaluate[Flatten[{x, #1}]]] & ) /@ bzlist;
> SequenceLimit[Rest[FoldList[Plus, 0, v0]]]
> (SessionTime[] - t0)*seconds
> Out[6]=
> 1.4545133229307878
> Out[7]=
> 1.75*seconds
>
> The displayed result (1.45451) does not change any more when increasing the
> number of intervals from 9 to 10 or more.
>
> Peter