Re: Fw: Re: Fw: 2
- To: mathgroup at smc.vnet.net
- Subject: [mg73724] Re: Fw: Re: Fw: 2
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Mon, 26 Feb 2007 06:17:37 -0500 (EST)
- References: <errl49$80t$1@smc.vnet.net>
Hi Jerry. Someone could say this conversation is a little pointless since I don't have version 4.2. As I said I could find many occasions that 5.2 shows superior performance than 4=2E0. But as I understood is a matter of what applications someone is interested in. Anyway... I want you just to execute the following in your version 4.2: In[183]:= Integrate[Abs[Cos[u]], {u, 0, x*Pi}] Out[183]= Integrate[Abs[Cos[u]], {u, 0, Pi*x}] (*in version 4.0 you get the incorrect result Sqrt[Cos[Pi x]^2] Tan[Pi x]; the correct symbolic result is Sqrt[Cos[Pi x]^2] Tan[Pi x] + 2 Floor[x + 1/2] see here http://groups.google.gr/group/comp.soft-sys.math.mathematica/browse_thread/thread/e95bb3767782b1e0/981567b0d6c1e7dc?lnk=gst&q=Integrate&rnum=722&hl=el#981567b0d6c1e7dc ) So comparing 4.0 and 5.2 (and 4.2 by your own...) what performance do you prefer? Incorrect evaluation or no evaluation at all? Also try the following in 4.2... In[202]:= Integrate[Abs[Cos[u]], {u, 0, x*Pi}, Assumptions -> 0 <= x <= 10] (% /. x -> #1 & ) /@ Range[10] Out[202]= Boole[1/2 < x < 3/2] + Boole[Inequality[1/2, Less, x, LessEqual, 10]] + Boole[3/2 < x < 5/2] + 2*Boole[3/2 <= x <= 10] + Boole[5/2 < x < 7/2] + Boole[7/2 < x < 9/2] + 2*Boole[7/2 <= x <= 10] + Boole[9/2 < x < 11/2] + Boole[11/2 < x < 13/2] + 2*Boole[11/2 <= x <= 10] + Boole[13/2 < x < 15/2] + Boole[15/2 < x < 17/2] + 2*Boole[15/2 <= x <= 10] + Boole[17/2 < x < 19/2] + Boole[Inequality[19/2, Less, x, LessEqual, 10]] + 2*Boole[19/2 <= x <= 10] + 2*Boole[x == 5/2 || Inequality[5/2, Less, x, LessEqual, 10]] + 2*Boole[x == 9/2 || Inequality[9/2, Less, x, LessEqual, 10]] + 2*Boole[x == 13/2 || Inequality[13/2, Less, x, LessEqual, 10]] + 2*Boole[x == 17/2 || Inequality[17/2, Less, x, LessEqual, 10]] + Boole[Inequality[0, Less, x, LessEqual, 1/2]]*Sin[Pi*x] - Boole[1/2 < x < 3/2]*Sin[Pi*x] + Boole[3/2 < x < 5/2]*Sin[Pi*x] - Boole[5/2 < x < 7/2]*Sin[Pi*x] + Boole[7/2 < x < 9/2]*Sin[Pi*x] - Boole[9/2 < x < 11/2]*Sin[Pi*x] + Boole[11/2 < x < 13/2]*Sin[Pi*x] - Boole[13/2 < x < 15/2]*Sin[Pi*x] + Boole[15/2 < x < 17/2]*Sin[Pi*x] - Boole[17/2 < x < 19/2]*Sin[Pi*x] + Boole[Inequality[19/2, Less, x, LessEqual, 10]]*Sin[Pi*x] Out[203]= {2, 4, 6, 8, 10, 12, 14, 16, 18, 20} (*check*) In[204]:= (Integrate[Abs[Cos[x]], {x, 0, #1*Pi}] & ) /@ Range[10] Out[204]= {2, 4, 6, 8, 10, 12, 14, 16, 18, 20} In[214]:= (NIntegrate[Abs[Cos[x]], {x, 0, #1*Pi}] & ) /@ Range[10] Out[214]= {2.,4.,6.,8.,10.,12.,14.,16.,18.,20.} Try also In[218]:= Integrate[Abs[Cos[u]], {u, 0, x*Pi}, Assumptions -> 0 <= x <= 10]; FullSimplify[%, x =E2=88=88 Integers] Out[219]= Piecewise[{{2, 1/2 < x < 3/2}, {4, 3/2 < x < 5/2}, {6, 5/2 < x < 7/2}, {8, 7/2 < x < 9/2}, {10, 9/2 < x < 11/2}, {12, 11/2 < x < 13/2}, {14, 13/2 < x < 15/2}, {16, 15/2 < x < 17/2}, {18, 17/2 < x < 19/2}, {20, Inequality[19/2, Less, x, LessEqual, 10]}}] Of course nobody is perfect: In[211]:= Integrate[Abs[Cos[u]], {u, 0, x*Pi}, Assumptions -> 0 <= x <= 10 && x =E2=88=88 Integers] (% /. x -> #1 & ) /@ Range[10] Out[211]= 1 - 1/Sign[1 - 2*x] Out[212]= {2, 2, 2, 2, 2, 2, 2, 2, 2, 2} Kind Regards Dimitris =CE=9F/=CE=97 fizzy =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Perhaps I should have added this.....I have upgraded to 5.2 and I realize > that there are many additions that 4.2 doesnt have, etc.etc.etc.....that = was > hardly my point!!!!!.......part of what I was trying to say is that I sti= ll > use 4.2 just in case and have found it, at least for some of the things I= 've > worked on, to be quite helpful to me in a way that the upgrades were > not........naturally, 4.2 doesnt work on every ocassion but I have found > many instances where 4.2 will work although 5.2 wont or the answers are > completely different......also, in terms of using , for example, a > subscripted definition , such as > > E_subscript_x[x, y, z] , I have also found that 5.2 handles this quite > differently then 4.2 especially if you take the derivative of the > function.....(the subscript is gotten from the appropriate Palette).....in > fact, I can't use this definition in 5.2.... > > When I sent these comments, I thought that someone, at least at Wolfram, > would care and would want to investigate this......if something doesnt wo= rk > in a New Version but does in an Old Version, strikes me as a Bug in the n= ew > software assuming that the earlier Version's answer was, in fact, > correct....or, at least, it's food for thought... > > or I hope it is....Jerry > > ----- Original Message ----- > From: "dimitris" <dimmechan at yahoo.com> > To: <mathgroup at smc.vnet.net> > Sent: Saturday, February 24, 2007 1:11 AM > Subject: Re: Fw: 2 > > > > Try also the following links > > > > http://documents.wolfram.com/mathematica/Built-inFunctions/NewInVersion= 5=2E0/ > > http://www.wolfram.com/products/mathematica/newin51/ > > http://www.google.com/search?hl=en&q=mathematica+version+5.2 > > > > May be this material will convince for upgrading! > > > > Regards > > Dimitris > > > > =CF/=C7 fizzy =DD=E3=F1=E1=F8=E5: > >> This is an interesting question for me for another reason.....my > >> 'favorit= > > e' > >> version of Mathematica is still 4.2....I have found many things that > >> work= > > in > >> 4.2 but do not work in 5.2....I have always been meaning to send them = to > >> mathgroup but, must admit, I'm too lazy for it.....however, this examp= le > >> here is perfect for the ocassion.... > >> > >> It works in 4.2......interesting also, that the Output in 5.2 for the > >> Series[ ] question, the answer seems different....I havent investigated > >> it > >> further, just want to point out the interesting differences..... > >> > >> Jerry Blimbaum > >> > >> ----- Original Message ----- > >> From: "Andrzej Kozlowski" <akoz at mimuw.edu.pl> > >> To: <mathgroup at smc.vnet.net> > >> Sent: Thursday, February 22, 2007 3:35 AM > >> Subject: > >> > >> > >> > Try: > >> > > >> > Series[ArcCosh[x], {x, 0, 11}] > >> > > >> > and now try > >> > > >> > ArcCosh[x] + O[x]^12 > >> > > >> > At least with my version of Mathematica: > >> > > >> > $Version > >> > 5.2 for Mac OS X (February 24, 2006) > >> > > >> > > >> > I do not get the same answer (in fact in the latter case the input is > >> > returned unevaluated). With ArcSinh and any other function that I > >> > have tried in place of ArcCosh the outputs are always the same. > >> > > >> > Andrzej Kozlowski > >> > > >> > > >> > > >> > > >> > > >> > > > > > > > > >