Re: Re: circumference of an ellipse
- To: mathgroup at smc.vnet.net
- Subject: [mg19447] Re: [mg19390] Re: circumference of an ellipse
- From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
- Date: Wed, 25 Aug 1999 01:25:16 -0400
- Sender: owner-wri-mathgroup at wolfram.com
In fact the sitation seems somewhat strange. Mathematica does seem to use deduction in Assumptions in Integrate, but does not seem to take advantege of the mechanism used by Simplify, which should not be too difficult to implement. Consider the following additional examples: In[1]:= quartercircumference1[a_, b_] := Integrate[Sqrt[D[a Cos[t], t]^2 + D[b Sin[t], t]^2], {t, 0, Pi/2}, Assumptions -> {a/b > 0 && b > 0}] In[2]:= quartercircumference1[a, b] Out[2]= 2 1 3 a b MeijerG[{{-, -}, {}}, {{0, 1}, {}}, --] 2 2 2 b -(-----------------------------------------) 2 Pi In[3]:= quartercircumference2[a_, b_] := Integrate[Sqrt[D[a Cos[t], t]^2 + D[b Sin[t], t]^2], {t, 0, Pi/2}, Assumptions -> {a*b > 0}] In[4]:= quartercircumference2[a, b] Out[4]= 2 2 1 3 a Sqrt[b ] MeijerG[{{-, -}, {}}, {{0, 1}, {}}, --] 2 2 2 b -(------------------------------------------------) 2 Pi In[5]:= quartercircumference3[a_, b_] := Integrate[Sqrt[D[a Cos[t], t]^2 + D[b Sin[t], t]^2], {t, 0, Pi/2}, Assumptions -> {a*b > 0, b > 0}] In[6]:= quartercircumference3[a, b] Out[6]= 2 1 3 a b MeijerG[{{-, -}, {}}, {{0, 1}, {}}, --] 2 2 2 b -(-----------------------------------------) 2 Pi In[7]:= quartercircumference4[a_, b_] := Integrate[Sqrt[D[a Cos[t], t]^2 + D[b Sin[t], t]^2], {t, 0, Pi/2}, Assumptions -> {a*b > 0, a > 0}] In[8]:= quartercircumference4[a, b] Out[8]= 2 2 1 3 a Sqrt[b ] MeijerG[{{-, -}, {}}, {{0, 1}, {}}, --] 2 2 2 b -(------------------------------------------------) 2 Pi On the other hand Simplify has no problems with these cases: In[11]:= Simplify[a/b > 0, a > 0 && b > 0] Out[11]= True In[12]:= Simplify[Sqrt[b^2], a*b > 0 && a > 0] Out[12]= b -- Andrzej Kozlowski Toyama International University JAPAN http://sigma.tuins.ac.jp http://eri2.tuins.ac.jp ---------- >From: "Allan Hayes" <hay at haystack.demon.co.uk> To: mathgroup at smc.vnet.net >To: mathgroup at smc.vnet.net >Subject: [mg19447] [mg19390] Re: circumference of an ellipse >Date: Mon, Aug 23, 1999, 6:57 PM > > Stephen, > Yes, and I should have used > > quartercircumference[a_, b_] := > Integrate[Sqrt[D[a Cos[t], t]^2 + D[b Sin[t], t]^2], {t, 0, Pi/2}, > Assumptions -> {a > 0, b > 0}] > > quartercircumference[a, b] > > If[Arg[b^2/a^2] != Pi, > -((b*MeijerG[{{1/2, 3/2}, {}}, {{0, 1}, {}}, a^2/b^2])/(2*Pi)), > Integrate[Sqrt[b^2*Cos[t]^2 + a^2*Sin[t]^2], {t, 0, Pi/2}]] > > But now we see that Mathematica does not deduce that if a and be are positive then > b^2/a^2 cannot be negative. > We clearly need > > %[[2]] > > -((b*MeijerG[{{1/2, 3/2}, {}}, {{0, 1}, {}}, a^2/b^2])/(2*Pi)) > > Allan > --------------------- > Allan Hayes > Mathematica Training and Consulting > Leicester UK > www.haystack.demon.co.uk > hay at haystack.demon.co.uk > Voice: +44 (0)116 271 4198 > Fax: +44 (0)870 164 0565 > > > Stephen P Luttrell <luttrell at signal.dra.hmg.gb> wrote in message > news:7pl5l0$cch at smc.vnet.net... >> Allan Hayes <hay at haystack.demon.co.uk> wrote in message >> news:7p301g$anl at smc.vnet.net... >> > Marcel, >> > >> > circumference[a_, b_] := >> > Integrate[Sqrt[D[a Cos[t], t]^2 + D[b Sin[t], t]^2], {t, 0, 2Pi}] >> > >> >... >> >> (Preamble: I have $Version = "4.0 for Microsoft Windows (April 21, 1999)") >> >> I agree with this parametric solution, but it exposes a bug in Mathematica >> when you evaluate the following symbolic expression: >> >> circumference[a, b] >> >> This gives zero! >> >> Furthermore, if you define >> >> halfcircumference[a_, b_] := >> Integrate[Sqrt[D[a Cos[t], t]^2 + D[b Sin[t], t]^2], {t, 0, Pi}] >> >> and then evaluate halfcircumference[a, b], you get "Infinite expression > 1/0 >> encountered". >> >> >> Steve Luttrell >> Signal Processing and Imagery Department >> DERA Malvern, St.Andrew's Road >> Malvern, United Kingdom, WR14 3PS >> >> +44 (0)1684 894046 (tel) >> +44 (0)1684 894384 (fax) >> luttrell at signal.dera.gov.uk (email) >> >> >> > > > >
- Follow-Ups:
- Re: Re: Re: circumference of an ellipse
- From: Mecit Yaman <mecit@iname.com>
- Re: Re: Re: circumference of an ellipse