[Date Index]
[Thread Index]
[Author Index]
Re: New Analytical Functions - Mathematica Verified
*To*: mathgroup at smc.vnet.net
*Subject*: [mg66948] Re: New Analytical Functions - Mathematica Verified
*From*: dhky at shaw.ca
*Date*: Sun, 4 Jun 2006 02:01:38 -0400 (EDT)
*References*: <200605280104.VAA23436@smc.vnet.net> <200606011055.GAA20733@smc.vnet.net> <e5osg1$hvp$1@smc.vnet.net> <e5rf0d$h4r$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
How does Mathematica handle the derivative of a function such as x^5?
IF
it finds the derivative symbolically then evaluates it.
[eg. second derivative of x^5 = 20x^3 then at x=12.2 the result is
36316.96]
THEN
all that happens using the Fr[x] function is that the derivative of
Fr[f[x] is the derivative of f[x]. This is as claimed. The fractional
part is expressed as a continuous function on an inverval. Hence for
the first derivative of Fr[x^5] =(1/2) -(1/pi)arctan[cot [pi x^5]] ,
Mathematica's symbolic differentiation reduces this, after two chain
rule applications and simplification of an identity to the first
derivative of x^5- which is then solved. higher order derivatives
follow. (as done by Web Mathematica)
However Mathematica also finds the first derivative directly without
all the intermediate steps. This is true for other functions such as
sin[ln[x]].
It appears that this approach simply adds more steps to what can be
done directly with less effort and gains nothing in terms of accuracy
in the final evaluation of ,say, 20x^3 at x=12.2 and there is no
restriction to non-integer values.
If this is the case, then what's the point?
Try it both ways for several functions. That is, use Fr to find a
derivative, including the final numerical evaluation and also find the
derivative directly, including the numerical evalution and compare
times and accuracy. This may be a fairer comparison than what you have
done.
Now it appears that the comparison used with the Mathematica definition
of fractional part is forcing Mathematica to use numerical
differentiation and, not only that but it is only valid for step sizes
such that the integer part of f(x) is constant. Hence a typical numeric
differentiation routine is given a penalty as shown by the time of 70
seconds which was given. This is slower than what can be done on a 20
year old hand calculator, with hand entered values (to evaluate f"(x)
=[f(x-h)+f(x+h)-2f(x)]/h ) to the desired accuracy (certainly not 400
sig figs) in less time (and on a computer, using an old DOS based APL
in less time than the Fr function).
If Mathematica's numeric differentiation is that slow, there is a
problem- I don't believe that it exists.
D. H. Kelly
Mohamed Al-Dabbagh wrote:
> Daniel Lichtblau wrote:
>
> > 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).
> > ...........................
> > ...........................
> > Did you try it?
> >
>
> Dan,
>
> Your usage of DiracDelta has made some remarkable correction for the
> result, but on a very high cost of runtime! I have made some
> experiments and wanted to publish them. You should remember that my
> paper:
>
> http://dabbagh2.fortunecity.com/disc
>
> has proved that the derivative of the fractional part of any function
> is the SAME as derivative of that function WITHOUT involving in the
> calculation of fractional part!
>
> When I used your improvement using Dirac Delta, a very substantial
> improvement occurred on the numerical results. HOWEVER, this lead to
> some very long delays. To the extent that calculating 5th derivative of
> the FractionalPart(x^5) to 1000 places of decimal would take about ONE
> HOUR!!!! Here are some results I arranged it in a page prepared for
> you:
>
> http://dabbagh2.fortunecity.com/lichtblau/
>
> You will see how my formulas are A LOT faster.
>
>
> Mohamed Al-Dabbagh
Prev by Date:
**Re: Re: Re: Homotopic algorithm to solve a system of equations**
Next by Date:
**Re: Re: Re: Homotopic algorithm to solve a system of equations**
Previous by thread:
**Re: New Analytical Functions - Mathematica Verified**
Next by thread:
**Re: New Analytical Functions - Mathematica Verified**
| |