f



Can Mathematica NIntegrate a Log-type singularity?

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.

0
aaronfude (214)
10/9/2008 10:36:43 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

4 Replies
516 Views

Similar Articles

[PageSpeed] 6

$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 <aaronfude@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


0
hanlonr (2279)
10/10/2008 8:35:08 AM
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



0
10/10/2008 8:35:18 AM
This must be another version of Mathematica than
"6.0 for Linux x86 (64-bit) (March 13, 2008)"

I get:
In[1]:= NIntegrate[alpha^2*Log[2*Cos[alpha/2]]^2, {alpha, -Pi, Pi}]
Out[1]= 37.40240591819764
In[2]:= NIntegrate[alpha^2*Log[2*Cos[alpha/2]]^2, {alpha, -Pi, Pi},
   WorkingPrecision -> 30] == Pi^5*(11/90)
Out[2]= True

Aaron Fude schrieb:
> 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.
> 

0
petsie (836)
10/10/2008 8:36:54 AM
Aaron Fude <aaronfude@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.

When I try it straight, Mathematica 6 does not complain and gives an answer
which I suspect is correct.

> 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.

It seems to be 11/90 * Pi^5.

David

0
DWCantrell1 (161)
10/10/2008 8:38:08 AM
Reply:

Similar Artilces:

Can mathematica do a log-log contour plot?
Hi All, I have a data array whose indice stand for x,y axes. Is it posiible to make a log-log contour plot? Or is there any other way to do the similiar task by mathematica? Thanks a lot. Feng-Yin Chang, Institute of Physics,NCTU,Taiwan Hi Feng, there is no built in function for that, you must do it yourself. A quick and dirty way would be to generate tripples with: {Log of x, Log of y, function value at x,y}. Here is an example: dat=Flatten[Table[{Log[x],Log[y],x^2- y^2},{x,1,10,.1},{y,1,10,.1}],1]; ListContourPlot[dat] Note that the axes show the Log's of x and y. But you may draw the ticks yourself. hope this helps, Daniel Feng-Yin Chang wrote: > Hi All, > I have a data array whose indice stand for x,y axes. Is it posiible > to make a log-log contour plot? Or is there any other way to do the similiar > task by mathematica? > Thanks a lot. > > Feng-Yin Chang, > Institute of Physics,NCTU,Taiwan > > ...

Integral that Mathematica 5.1 can do and Mathematica 6 cannot do
Consider the following integral: Assuming[0 < r < Infinity && 0 < \[Rho] < Infinity && 0 < s < Infinity, Integrate[(\[Rho]* r)/(Sqrt[s^2 + z^2]*(1 + Sqrt[s^2 + z^2]/r)^2), {z, - Infinity, Infinity}]] Mathematica 5.1 gives the solution as: -((1/(45*s^2))*(2*r*\[Rho]* (-15*s^2 + 6*r^2* Hypergeometric2F1[1, 2, 7/2, 1 - r^2/s^2] - 6*s^2*Hypergeometric2F1[ 1, 2, 7/2, 1 - r^2/s^2] - 3*(r^2 - s^2)* HypergeometricPFQ[ {1, 1, 3/2}, {5/2, 7/2}, 1 - r^2/s^2] - 8*...

after install mathematica in archlinux .i can not run math or
The last step, I choose register later. Then I can not run math or mathematica. it says bad command or filename. How to do with it? thanks On Sep 6, 12:07 am, ww <huxiaopengs...@gmail.com> wrote: > The last step, I choose register later. > Then I can not run math or mathematica. it says bad command or > filename. > > How to do with it? > thanks It sounds like your path does not include the directory in which you installed Mathematica. Did you get any errors when installing? What version of Mathematica is it? You might try to install it again. Call ...

Can you type a command and have Mathematica show the parameters?
Similar to how Excel will show the command and then show what the parameters are? Thanks. Hi, you see always all paramters, but if you mean options, you can look for the default settings with Options[thecommand] Regards Jens "bookreader127" <bookreader127@yahoo.com> schrieb im Newsbeitrag news:d3o0hu$bo3$1@smc.vnet.net... > Similar to how Excel will show the command and > then show what the > parameters are? > > Thanks. > After entering just the first few letters of the command, use the Input menu command: Complet...

math =!= mathematica
Does somebody know why I get different behaviour for the following commands in a commandline session of mathematica 7 or inside a notebook? It also seems to be different in different Mathematica versions for the notebook format. See http://www.risc.jku.at/people/hemmecke/mathematica/ for the notebook files for Mathematica 5.2, 6.0, 7.0. Can someone explain the General::dupsym: The symbol Array with context A` already exists. message? Why does that message appear at all? If A`Array exists, then Mathematica should just use it, shouldn't it? According to http://reference.wol...

Types in Mathematica
I know there are reasons for Mathematica not being a strongly typed language, but I'm wondering if there are places where a type system might be of use, and how it might be implemented, or simulated. One suggestion from The Mathematica Book is that we could create something like Vector3[x_,y_,z_], and test the head of variables to determine if they are Vector3. I'm not sure exactly where in the book that is, and the Linux version does not have a desktop search, AFAIK. Observations? Suggestions? -- The Mathematica Wiki: http://www.mathematica-users.org/ Math for Comp Sci http://www.ifi.unizh.ch/math/bmwcs/master.html Math for the WWW: http://www.w3.org/Math/ f[x_Integer]=x! seems "typed" enough for me ??? -- http://chrischiasson.com/contact/chris_chiasson ...

More Mathematica CAN'T do than CAN???
A few evenings ago I was speaking with a "learned mathematician" at the local university here. In the course of our wide-ranging talk, he stated that Mathematica is only capable of doing less than half the problems in mathematics today. I was floored at his assertion. I have only scratched the surface of all that Mathematica can do. There's tons more that it CAN'T do??? Your comments are welcome. Nicholas Kormanik A couple of comments. First, if I could do "only" half the problems in mathematics, which is probably an infinite number, I woul...

Can Mathematica do this?
Can Mathematica do this? You plug in a complex-valued function, it gives you all the poles of the function on the complex plane automatically... On 25 , 09:39, "Peter Hensen" <peter_hen...@cox.net> wrote: > Can Mathematica do this? > You plug in a complex-valued function, it gives you all the poles of the > function on the complex plane automatically... If Mathematica could do anything what would be the role of the mind? Just press Shift+Enter? Mathematica (or CAS in general) is a tool for helping you doing mathematics (as well other things...

Mathematica and trivial math problems that school children can solve.
Recently I came across an article in a mathematics and physics journal aimed at high school students. The main reason why it attracted my attention was that its theme was computer algebra and, in particular, Mathematica. The moral of the story was quite sensible: these programs can do wonderful things but don't expect them to be smart, in the human sense, anyway. The example that was given was apparently taken from the Internet as a notorious "breaker" of computer CAS programs. This was the illustration in Mathematica: Reduce[(10 x + 2)^2009 == (2 x + 4)^2009, x,...

Mathematica
http://www.wolfram.com/ Mathematica seems to have similar problems or did I miss something? (Sure thing!) *\jk not the q's wrote: > http://www.wolfram.com/ > > Mathematica seems to have similar problems or > did I miss something? (Sure thing!) Similar problems to what? -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com/products/?u "Jon Harrop" <jon@ffconsultancy.com> wrote in message news:UKOdnUZhX4DzJ97VnZ2dnUVZ8tfinZ2d@posted.plusnet... > not the q's wrote: >> http://www.wolfram.com/ >&...

Mathematica
Hi All Any one knows if there are any good summary of important command to be use in mathematica with simple instruction and graphics to go along? I just started using this software and hope to grab some basics. The tutorial in the software not too appealing for me. I do not know why rgds and thanks Jason Jason, The best thing is to give yourself a crash course in Mathematica before attempting to use it in your work or studies. The best course is to work through most of Part I of The Book, actually typing in commands and seeing that they work. The only way to learn the s...

Re: More Mathematica CAN'T do than CAN???
Thanks for the link to the work of theorema group. I'll check out the pdfs at: http://www.risc.jku.at/publications/index.php?group==8 Are you in some dungeon at the Castle of Hagenberg? Does it have WiFi? Sylvia D. Hobbs, MPH, Director of Research & Evaluation Bureau of Health Care Safety and Quality Massachusetts Department of Public Health Office of Emergency Medical Services 99 Chauncy Street, 11th Floor Boston MA 02111 Phone:617-753-7304 Fax: 617-753-7320 cell:781-530-6381 e-mail: sylvia.hobbs@state.ma.us<mailto:sylvia.hobbs@state.ma.us> P Please conside...

[Mathematica 6] Sudden shutdown of Mathematica. No error messages, no traces, no warning. Mathematica just disappears from desktop
I've noticed this now more than one time. I would say this has happened to me about 5-6 times already since I started using Mathematica 6 which is about 2 weeks now. This is what happens: I'll be working on an open notebook, and do something, for example, just now, I went to do SAVE AS to save the notebook. Mathematica would just disappear in split second. No errors, nothing. I look and it is just gone. All windows gone. No traces. I have to restart Mathematica. And I just lost all my work for the last 30 minutes. Strange thing is now when I open the document sin...

Re: More Mathematica CAN'T do than CAN??? #2
Hobbs, Sylvia (DPH) wrote: > Thanks for the link to the work of theorema group. I'll check out the pdfs at: > > http://www.risc.jku.at/publications/index.php?group==8 > > Are you in some dungeon at the Castle of Hagenberg? Does it have WiFi? > > Sylvia D. Hobbs, MPH, Director of Research & Evaluation > [...] Not exactly a dungeon. More a Champaign cellar... Daniel Lichtblau Wolfram Research >> -----Original Message----- > >> From: Daniel Lichtblau [mailto:danl@wolfram.com] >> Sent: Wednesday, October 27, 2010 10:2...

Debugging Mathematica Code (Mathematica 7)
Hello Experts, I made my fist steps with the Mathematica (so called) debugger and stumbled immediately. Is there anywhrere a documentation of this tool that is worth it's name (a criterion which the Mathematica 7 documentatin on debug surely fails). I've tried a lot, but I'm still at the stage "trial an error". Greetings Mike "m.g." <mg@michaelgamer.de> wrote in message news:gl1okn$dpb$1@smc.vnet.net... > Hello Experts, > > I made my fist steps with the Mathematica (so called) debugger and > stumbled > immediate...

Mathematica Programmer vs. Programming in Mathematica
Has anybody read both of Roman Maeder's books _The Mathematica Programmer_ and _Programming in Mathematica_? I specifically mean the out of print first volume of the former. Dose _The Mathematica Programmer_ give a significantly different perspective than what is presented in _Programming in Mathematica_? It is, I believe, the best source for information about the design of his Classes` package. The only other source I am aware of is an unavailable (other than buying the hardcopy) back issue of The Mathematica Journal. And, if my understanding is correct, that is not as com...

Wolfram reinvents Mathematica with Mathematica 6
Mathematica 6 is now available, introducing over 1,000 groundbreaking technologies developed over more than a decade at Wolfram Research. Mathematica 6 takes technical computing to a new level: more tightly bound, more natural, and more automated, applicable to a far wider range of areas than ever before. Central to this achievement is "instant interactivity"--taking models, computations, or just about any concept and turning them into fully interactive applications, sometimes within seconds. In addition to the new capabilities for instant development, Mathematica 6 is also optimiz...

Wolfram reinvents Mathematica with Mathematica 6
Mathematica 6 is now available, introducing over 1,000 groundbreaking technologies developed over more than a decade at Wolfram Research. Mathematica 6 takes technical computing to a new level: more tightly bound, more natural, and more automated, applicable to a far wider range of areas than ever before. Central to this achievement is "instant interactivity"--taking models, computations, or just about any concept and turning them into fully interactive applications, sometimes within seconds. In addition to the new capabilities for instant development, Mathematica 6 is also optimiz...

Re: math =!= mathematica
On 3/23/10 at 4:23 AM, hemmecke@gmail.com (hemmecke) wrote: >Does somebody know why I get different behaviour for the following >General::dupsym: The symbol Array with context A` already exists. >message? Why does that message appear at all? If A`Array exists, >then Mathematica should just use it, shouldn't it? >According to >http://reference.wolfram.com/mathematica/tutorial/Contexts.html we >have: >`name a symbol in the current context >So why is Mathematica complaining? The message is not telling you the symbol exists in the current cont...

Can you communicate about Mathematica?
* Can you communicate about Mathematica? Wolfram Research continues to expand ... and we're looking for people to explore and explain applications of Mathematica in diverse areas. If you are enthusiastic about Mathematica and its applications, good at written communication, and savvy about understanding market needs, we'd love to have you join our team. There are a lot of exciting directions for Mathematica ahead. This is an opportunity to be involved in making a real difference to the way computing is done. Please apply at http://careers.wolfram.com. Laura Berg...

can Mathematica be useful for this?
Hi there! I need to check the answer of many probability problems. Most of them are quite simple but calculating them by hand is tedious. They are like this: "It's necessary to choose a person for a mission overseas. If you choose him randomly the probability that he speaks a foreign languague is: S=Spanish; F=French; G=German P(S)=0.33; P(F)=0,26; P(G)=0.2; P(S and F)=0.15; P(F and G)=0.05; P(S and G)=0.1 P(S and F and G)=0.02 -What is the probability that he just speaks one foreign language? -What is the probability that he doesn't speak an...

opening notebooks in mathematica player instead of mathematica
When I double click on a notebook I want just want to view it. Is there a way to default the assigned application to open the mathematica notebooks with the mathematica viewer instead of having mathematica boot up? If I want mathematica to boot up I'll click on the icon. That's on my doc. I'm running Mac OS X 10.5.6 (9G55) on a PowerBook G4 if that helps any. On Mar 12, 2:21 am, Steven Matthew Anderson <AdAstr...@mac.com> wrote: > When I double click on a notebook I want just want to view it. Is ther= e a way to default the assigned application to open the mat...

Wolfram reinvents Mathematica with Mathematica 6 #2
Mathematica 6 is now available, introducing over 1,000 groundbreaking technologies developed over more than a decade at Wolfram Research. Mathematica 6 takes technical computing to a new level: more tightly bound, more natural, and more automated, applicable to a far wider range of areas than ever before. Central to this achievement is "instant interactivity"--taking models, computations, or just about any concept and turning them into fully interactive applications, sometimes within seconds. In addition to the new capabilities for instant development, Mathematica 6 is also optimized for the opposite end of the spectrum--infrastructure development--and everything in between. Key new features include: * Dynamic interactivity, allowing sophisticated interactive interfaces to be created from single lines of input * High-impact adaptive visualization for automated creation of high-fidelity function and data graphics * Language for data integration, including automatic integration of hundreds of standard data formats * Load-on-demand curated data for math, physics, chemistry, finance, geography, linguistics, and more * Symbolic interface construction for immediate creation of arbitrary interfaces from simple programs * Automated computational aesthetics, with algorithmic optimization for visual presentation Mathematica 6 is available for Windows NT/2000/XP/Vista, Mac OS X, Linux x86/Itanium, Solaris UltraSPARC/x86, HP-UX, IBM AIX, and compatible systems. For more i...

Can mathematica sovle this?
\!\(2 q\^2\/p\^2 + p\/q - p\^2\/q\^2, p\) But, p+q=1. Can it reduce above? Of course, I can do it handwriting, however, I am curious the mathematica can do it. Regards, From Novice of mathematica. YOUNGWHAN schrieb: > \!\(2 q\^2\/p\^2 + p\/q - p\^2\/q\^2, p\) > > But, p+q=1. > > Can it reduce above? > > Of course, I can do it handwriting, however, I am curious the mathematica > can do it. > > Regards, > From Novice of mathematica. > > > From - Sun Did you have this In[1]:= Simplify[Reduce[{2*q^2/p^2 + p/...

Web resources about - Can Mathematica NIntegrate a Log-type singularity? - comp.soft-sys.math.mathematica

Singularity - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Singularity - Wikipedia, the free encyclopedia
Temporal singularity, otherwise knows as a point of divergence , a concept in speculative fiction , usually an item or event triggered by an ...

architectural homage to the singularity
jurvetson posted a photo: Frank Gehry rooftop at MIT

Welcome to Life: the singularity, ruined by lawyers - YouTube
http://tomscott.com - Or: what you see when you die. If you liked this, you may also enjoy two novels that provided inspiration for it: Jim Munroe's ...

Artificial intelligence and singularity could mean demise of human control
Will artificial intelligence exceed human intellectual capacity before this century is out? The experts are affirmative.

Are we approaching the Android singularity?
Are we approaching the Android singularity?

Only love can believe: The singularity of the resurrection
The resurrection is an event addressed to hope and love, and only in that way can it be a challenge to agnosticism or the denial of God.

Ashes of the Singularity Revisited: A Beta Look at DirectX 12 & Asynchronous Shading
... major DirectX 12 game, but at this point I think it’s safe to say that the first high profile game to be released will be Ashes of the Singularity. ...

Singularity challenges puzzle lovers with a simple goal
The updated Singularity Modern Lights Out game offers a classic puzzle challenge. All you have to do is turn all the tiles to the same color. ...

Ars Technicast, Episode 1: "The Singularity"
We have launched the Ars Technicast, the official Ars Technica podcast.

Resources last updated: 3/2/2016 11:09:44 PM