[Date Index]
[Thread Index]
[Author Index]
Re: Numerical integration
*To*: mathgroup at smc.vnet.net
*Subject*: [mg73832] Re: Numerical integration
*From*: dh <dh at metrohm.ch>
*Date*: Thu, 1 Mar 2007 06:22:41 -0500 (EST)
*References*: <es3iul$obt$1@smc.vnet.net>
Hi Dimitris,
why do you want to calculate numerically an integral that can be done
analytically? For a,b >1 we get:
-(Pi (a - b + Abs[a - b]))
--------------------------
4 a (a - b)
Daniel
dimitris wrote:
> In another post I talk about the integral
>
> Integrate[Cos[a x] CosIntegral[b x], {x, 0, Infinity}]
>
> I have problems to numerical integrate this function for say
> {a,b}={3,2}.
>
> In[20]:=
> Integrate[Cos[3*x]*CosIntegral[2*x], {x, 0, Infinity}]
> N@%
>
> Out[20]=
> -(Pi/6)
> Out[21]=
> -0.5235987755982988
>
> No matter how I set Options I couldn't get satisfactory results by
> NIntegrate.
>
> Any ideas will be greatly appreciate!
>
> Here is its plot
>
> In[59]:=
> Plot[Cos[3*x]*CosIntegral[2*x], {x, 0, 10}, Ticks -> {Range[0, 10*Pi,
> Pi/6], Automatic}]
>
> As we see the zeros if the function are situated at Pi/6 + n*(Pi/3),
> n=0,1,2,3...
>
> In[61]:=
> (Cos[3*#1]*CosIntegral[2*#1] & ) /@ Table[Pi/6 + n*(Pi/3), {n, 0,
> 100}]
>
> Out[61]=
> {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
>
> I tried to take use of this fact doing something like
>
> In[67]:=
> lst = Table[Pi/6 + n*(Pi/3), {n, 0, 1000}] /. {a_, b__, c_} -> {x, 0,
> a, b, c};
>
> In[70]:=
> NIntegrate[Cos[3*x]*CosIntegral[2*x], Evaluate[Sequence[lst]],
> WorkingPrecision -> 40]
> NIntegrate::ncvb :....
> -0.52359885758572151495786704
>
> Very good result but I look for any other methods/settings!
>
> Dimitris
>
>
Prev by Date:
**Re: Overlaying a grid on graphics to guide placement**
Next by Date:
**Re: Re: Re: Hold and Equal**
Previous by thread:
**Re: Overlaying a grid on graphics to guide placement**
Next by thread:
**Re: Numerical integration**
| |