Re: Bug of Integrate
- To: mathgroup at smc.vnet.net
- Subject: [mg83028] Re: Bug of Integrate
- From: danl at wolfram.com
- Date: Thu, 8 Nov 2007 06:06:05 -0500 (EST)
- References: <fg4dfv$6c3$1@smc.vnet.net><fgs908$4m9$1@smc.vnet.net>
On Nov 7, 5:53 am, Miguel <misv... at gmail.com> wrote: > [...] > > By other hand, I think everybody knows the solution of the following > problem: > "Derive the formula for the circunference of a circle of radius "a" by > computing the length of the arc x=a cost; y= a sint for 0<=t<=Pi > " > > L=Integrate[Sqrt[1+(y'[t]/x'[t])^2]*x'[t],{t,0,2Pi}] Not quite. It needs an absolute value for the last factor. > I have tried to resolve with version 5.2 and version 6.0.1. The > results have been differents. > > When the result is unknown, version 6.0.1 is reliable? It seems straightforward to verify via numerical computation. In[1]:= x = a*Cos[t]; y = a*Sin[t]; In[2]:= ll = Integrate[Sqrt[1+(D[y,t]/D[x,t])^2]*Abs[D[x,t]], {t, 0,2*Pi}, Assumptions->a>0] Out[2]= 2 a Pi In[3]:= a = 2; In[5]:= NIntegrate[Sqrt[1+(D[y,t]/D[x,t])^2]*Abs[D[x,t]], {t,0,2*Pi}] Out[5]= 12.5664 Without the Abs[] one (correctly) obtains 0 for both exact and numeric integrals. By the way, when dealing with a parametrized curve, it is often simpler to avoid implicitly treating y as a function of x; instead just work directly with the parametrization. In[7]:= a=. In[8]:= ll = Integrate[Sqrt[D[x,t]^2+D[y,t]^2], {t,0,2*Pi}, Assumptions->a>0] Out[8]= 2 a Pi Daniel Lichtblau Wolfram Research