Re: Re: New Analytical Functions - Mathematica Verified
- To: mathgroup at smc.vnet.net
- Subject: [mg66871] Re: [mg66853] Re: New Analytical Functions - Mathematica Verified
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Fri, 2 Jun 2006 04:08:47 -0400 (EDT)
- References: <200605280104.VAA23436@smc.vnet.net><e5jss1$e73$1@smc.vnet.net> <200606011055.GAA20733@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Mohamed Al-Dabbagh wrote: > Daniel Lichtblau wrote: > >> [...] >> I'll point out some things with regard to your reformulation of a >> sawtooth in terms of elementary functions. It is not hard to define the >> derivative of FractionalPart as 1, and this is a.e. correct, that is, >> correct except at jumps, where the derivative, strictly speaking, is not >> defined. So a question to ask is what do you want the derivative to do >> at such points? Your gPaper, shown below, will give an Indeterminate at >> x = 12 (which one might regard as a good thing). So if that is the >> behavior you want, well and good. >> >> f[x_] := x^5 >> >> Fr[x_] := 1/2 - ArcTan[Cot[Pi*x]]/Pi >> >> gPaper[x_] := Fr[f[x]] >> >> If we simply do >> >> Derivative[1][FractionalPart][x_] := 1 + DiracDelta[x-IntegerPart[x]] >> Derivative[n_Integer /; n>1][FractionalPart][x_] := 0 >> > > > Will the above two definitions change the behaviour of FractionalPart > function? They will change the behavior of its derivatives. Actually I think I did not want to use the DiracDelta component in that particular definition (or else to use further derivatives thereof in the definition for higher derivatives of FractionalPart). >> gMath[x_] := FractionalPart[f[x]] >> >> we'll get an exact result for gMath''[61/5] that agrees with yours >> numerically but is in vastly simpler form. We'll also get a rational >> result for gMath''[12] that might or might not be what you'd want. > > > > Is that really simpler??!! Did you try it? In[11]:= InputForm[gPaper''[61/5]] Out[11]//InputForm= (907924*Csc[(574*Pi)/3125]^2)/(25*(1 + Cot[(574*Pi)/3125]^2)) + (383414625994562*Pi*Cot[(574*Pi)/3125]*Csc[(574*Pi)/3125]^2)/ (15625*(1 + Cot[(574*Pi)/3125]^2)) - (383414625994562*Pi*Cot[(574*Pi)/3125]*Csc[(574*Pi)/3125]^4)/ (15625*(1 + Cot[(574*Pi)/3125]^2)^2) In[12]:= InputForm[gMath''[61/5]] Out[12]//InputForm= 907924/25 > Moreover, you rather used an exact rational > form and you didn't use the approximate 12.2`400 (12.2 correct to 400 > digits) to see what my experiment will be? It occurs to me that by taking the code I wrote anyone interested can quite easily check the approximate case. Anyway, here they are. You will notice gMath'' gets around 14-15 more digits than gPaper''. In[9]:= InputForm[gMath''[N[61/5,400]]] Out[9]//InputForm= 36316.95999999999999999999999999999999999999999999999999999999999999999999999\ 99999999999999999999999999999999999999999999999999999999999999999999999999999\ 99999999999999999999999999999999999999999999999999999999999999999999999999999\ 99999999999999999999999999999999999999999999999999999999999999999999999999999\ 99999999999999999999999999999999999999999999999999999999999999999999999999999\ 99999999999999999999999999999998868`399.52287874528037 In[10]:= InputForm[gPaper''[N[61/5,400]]] Out[10]//InputForm= 36316.96000000000000000000000000000000000000000000000000000000000000000000000\ 00000000000000000000000000000000000000000000000000000000000000000000000000000\ 00000000000000000000000000000000000000000000000000000000000000000000000000000\ 00000000000000000000000000000000000000000000000000000000000000000000000000000\ 00000000000000000000000000000000000000000000000000000000000000000000000000000\ 00000000000002`385.50064348271536 > Again, you should use my > definition for FractionalPart function to get precise results. > > Now why you used [x-IntegerPart[x]]? Why didn't you simply use > FractionalPart? FractionalPart could have been used in the delta function, now that you mention it. > I will do experiments again, and will post results.. I > hope moderator wont take long to publish them. Messages posted to the group usually appear on the next day. > Mohamed Al-Dabbagh Daniel Lichtblau Wolfram Research
- References:
- Re: New Analytical Functions - Mathematica Verified
- From: "Mohamed Al-Dabbagh" <mohamed_al_dabbagh@hotmail.com>
- Re: New Analytical Functions - Mathematica Verified