       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:

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

> 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:=
>
> > Integrate[Cos[3*x]*CosIntegral[2*x], {x, 0, Infinity}]
>
> > N@%
>
> >
>
> > Out=
>
> > -(Pi/6)
>
> > Out=
>
> > -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:=
>
> > 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:=
>
> > (Cos[3*#1]*CosIntegral[2*#1] & ) /@ Table[Pi/6 + n*(Pi/3), {n, 0,
>
> > 100}]
>
> >
>
> > Out=
>
> > {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:=
>
> > lst = Table[Pi/6 + n*(Pi/3), {n, 0, 1000}] /. {a_, b__, c_} -> {x, 0,
>
> > a, b, c};
>
> >
>
> > In:=
>
> > 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