Re: Error in integrals?
- To: mathgroup at smc.vnet.net
- Subject: [mg9501] Re: [mg9482] Error in integrals?
- From: Hugh Walker <hwalker at hypercon.com>
- Date: Sat, 8 Nov 1997 23:04:32 -0500
- Sender: owner-wri-mathgroup at wolfram.com
"Clifford J. Nelson" <nelsoncj at gte.net> wrote: >Mathematica 3.0 on a PowerMac 7200/90 88MB Mac OS 8 gives different >results for Integrate vs. NIntegrate. > >Here is one example. > >ior[m_] := 1/3*(2*Sqrt[3]*Sqrt[(-1 + m^2)^2/(1 + m^2)^4] + > Sqrt[(Sqrt[3] - 6*m - Sqrt[3]*m^2)^2/(1 + m^2)^4] + Sqrt[(Sqrt[3] + >6*m - Sqrt[3]*m^2)^2/(1 + m^2)^4]) > >In[31]:= >N[Integrate[ior[m],{m,0,1}]] > >Out[31]= >-0.42265 > >In[32]:= >NIntegrate[ior[m],{m,0,1}] > >Out[32]= >1.73206 > >What am I doing wrong ? Which answer is correct ? > >Cliff Nelson Hello Cliff: The function ior[x] is continuous, but its derivitive is not. Its indefinite integral has a jump discontinuity at the point x0 = 2-Sqrt[3]. This means that any definite integral extending across this point must be evaluated with care. The singular behavior here originates with the fact that the function q = Sqrt[3]-6x-Sqrt[3]x^2 changes sign at this singular point, which suggests caution in handling the function Abs[q] appearing in ior[x]. One gets the correct value of the integral, namely Sqrt[3] = 1.73206, if the region of integration is broken in two parts at x0, and limits at this point corectly evaluated. The problem encountered here is most simply visualized by plotting the indefinite integral of ior. This class of indefinite integral is discussed in a paper by Victor Adamchick in The Mathematica Journal Vol. 5, No.3. Cheers! Hugh Walker Gnarly Oaks Phone: (713) 729-3093