Re: Can Mathematica NIntegrate a Log-type singularity?
- To: mathgroup at smc.vnet.net
- Subject: [mg92667] Re: Can Mathematica NIntegrate a Log-type singularity?
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Fri, 10 Oct 2008 04:33:01 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <gckmrr$ng7$1@smc.vnet.net>
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. Hi Aaron, I might have misunderstood what the problem is, but it seems that Mathematica 6.0.3 has no trouble at all integrating the expression with alpha squared. As you can see below, the solution returned is, indeed, a rational multiple of Pi to the fifth. So, this begs the question: What platform/version are you using and what result did you get? In[1]:= NIntegrate[alpha^2 Log[2 Cos[alpha/2]]^2, {alpha, -Pi, Pi}] %/Pi^5 % // Rationalize $Version Out[1]= 37.4024 Out[2]= 0.122222 Out[3]= 11/90 Out[4]= "6.0 for Mac OS X x86 (64-bit) (May 21, 2008)" Regards, -- Jean-Marc