Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Can Mathematica NIntegrate a Log-type singularity?

1 view
Skip to first unread message

Bob Hanlon

unread,
Oct 10, 2008, 4:35:08 AM10/10/08
to
$Version

6.0 for Mac OS X PowerPC (32-bit) (June 19, 2007)

nint = NIntegrate[alpha^2 * Log[2 Cos[alpha/2]]^2, {alpha, -Pi, Pi}]

37.4024

nint/Pi^5

0.122222

% // Rationalize

11/90

The result is stable for changes in WorkingPrecision. The integral appears to be 11/90 * Pi^5


Bob Hanlon

---- Aaron Fude <aaro...@gmail.com> wrote:

=============
Hi,

I would like to evaluate the following:

NIntegrate[alpha^2 Log[2 Cos[alpha/2]]^2, { alpha, -Pi, Pi}]

How do I help Mathematica deal with the LogSquared type singularity at
either end of the interval. If I try it straight, Mathematica
complains and gives a wrong answer.

Please note, that Mathematica has absolutely no problem Integrating or
NIntegrating the function

Log[Cos[alpha/2]]^2

from -Pi to Pi, each time giving the correct answer, but the multiple
of alpha^2, throws it off.

Many thanks in advance,

Aaron.

PS: By the way, I'm pretty sure that that integral must be some
rational number times Pi^5.


--

Bob Hanlon


Andrzej Kozlowski

unread,
Oct 10, 2008, 4:42:22 AM10/10/08
to

On 9 Oct 2008, at 19:36, Aaron Fude wrote:

> Hi,
>
> I would like to evaluate the following:
>
> NIntegrate[alpha^2 Log[2 Cos[alpha/2]]^2, { alpha, -Pi, Pi}]
>
> How do I help Mathematica deal with the LogSquared type singularity at
> either end of the interval. If I try it straight, Mathematica
> complains and gives a wrong answer.
>
> Please note, that Mathematica has absolutely no problem Integrating or
> NIntegrating the function
>
> Log[Cos[alpha/2]]^2
>
> from -Pi to Pi, each time giving the correct answer, but the multiple
> of alpha^2, throws it off.
>
> Many thanks in advance,
>
> Aaron.
>
> PS: By the way, I'm pretty sure that that integral must be some
> rational number times Pi^5.
>

Which version of Mathematica? Here with version 6.03 I get:

a = Chop[NIntegrate[alpha^2*Log[2*Cos[alpha/2]]^2, {alpha, -Pi, Pi},
WorkingPrecision -> 30]]
37.402405918201066509890604560864352814270789949531176\
7786391`30.

and then:


RootApproximant[a/Pi^5]
11/90


Andrzej Kozlowski


0 new messages