Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Numerical integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73890] Re: Numerical integration
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Fri, 2 Mar 2007 06:47:13 -0500 (EST)
  • References: <es3iul$obt$1@smc.vnet.net><es6dku$s5p$1@smc.vnet.net>

What version do you use?

Hello Daniel and thanks for your response!

I didn't notice that for a>1 and b>1 Integrate returns a symbolic
result.

See my relevant post here:

http://groups.google.gr/group/comp.soft-sys.math.mathematica/browse_thread/=
thread/00897ab3139d7d82/dbc16a40e8ca0a1a?hl=el#dbc16a40e8ca0a1a

Anyway doesn't it look strange that?

Integrate[Cos[a*x]*CosIntegral[b*x], {x, 0, Infinity}]
Integrate::idiv : Integral of Cos[a\x]\CosIntegral[b\x] does not
converge on \
{0, =E2=88=9E}.
Integrate[Cos[a*x]*CosIntegral[b*x], {x, 0, Infinity}]

Integrate[Cos[a*x]*CosIntegral[b*x], {x, 0, Infinity},
GenerateConditions -> False]
Integrate[Cos[a*x]*CosIntegral[b*x], {x, 0, Infinity},
GenerateConditions -> False]

BUT

Integrate[Cos[a*x]*CosIntegral[b*x], {x, 0, Infinity}, Assumptions ->
a > 1 && b > 1]
-((Pi*(a - b + Abs[a - b]))/(4*a*(a - b)))


Dimitris

=CE=9F/=CE=97 dh =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
> 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: monomials in Graded Lexicographic Order and associated factorials
  • Next by Date: Re: Sort with -Infinity fails
  • Previous by thread: Re: Numerical integration
  • Next by thread: Re: monomials in Graded Lexicographic Order and associated