Numerical integration
- To: mathgroup at smc.vnet.net
- Subject: [mg73781] Numerical integration
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Wed, 28 Feb 2007 04:34:31 -0500 (EST)
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