Changes between Initial Version and Version 1 of Ticket #6756


Ignore:
Timestamp:
08/17/09 16:17:48 (12 years ago)
Author:
gmhossain
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6756

    • Property Authors changed from to Golam Mortuza Hossain
    • Property Summary changed from Implement ``diff`` format symbolic derivative in new symbolics to [with patch, needs review] Implement ``diff`` format symbolic derivative in new symbolics
  • Ticket #6756 – Description

    initial v1  
    1 Implement diff format symbolic derivative in new symbolics as the second form of abstract derivative to be avialable in Sage. See this long thread
     1Implement a diff format symbolic derivative in new symbolics as the second form of abstract derivative to be avialable in Sage. See this long thread
    22
    33http://groups.google.com/group/sage-devel/browse_thread/thread/ff10f99729a74eea/73308bf626ae06b3
    44
    55for rationale behind it.
     6
     7'''Implementation:'''
     8
     9Instructions for installing these patches (sage-4.1.1)
     10
     11'''(1) Pynac patch'''   
     12 (a) Get the pynac spkg
     13
     14 http://sage.math.washington.edu/home/burcin/pynac/pynac-0.1.8.p2.spkg
     15
     16 (b) Apply the pynac patch implementing diff derivative from
     17
     18 http://www.math.unb.ca/~ghossain/diff-derivative-pynac.patch
     19
     20 (c) install the patched spkg in Sage.
     21
     22 '''OR''' if you are feeling lazy, you can directly install my patched copy of pynac from here
     23
     24 http://www.math.unb.ca/~ghossain/pynac-0.1.8.p2-with-diff.spkg
     25
     26
     27
     28'''(2) Sage patch:'''
     29
     30 Apply the attached patch in Sage and build the changes ("sage -b").
     31 If everything goes smoothly then you are ready for testing.
     32
     33'''Testing:'''
     34
     35Above, patches will provide two new user accessible functions
     36 (a) ``set_diff_derivative_level``
     37
     38 (b) ``symbolic_diff``
     39
     40Please see the docs for usage of these functions:
     41
     42It would be good to thoroughly test the following features:
     43
     44 (1) Substitution of the function
     45
     46 (2) Derivative with or without chain rule
     47
     48 (3) Explicit evaluation of derivative even for some situation where chain rule has been applied and derivative is specified w.r.t. an expression
     49
     50 (4) Symbolic n-th derivative
     51
     52 (5) Typesetting
     53
     54Please test diff implementation against some related bugs
     55
     56#6376, #6523, #6480
     57
     58as new diff implementation should avoid these.
     59
     60
     61'''Speed Test:'''
     62
     63{{{
     64sage: f(x) = function('f',x);
     65sage: f(x).diff(x)
     66D[0](f)(x)
     67sage: timeit('f(x).diff(x)')
     68625 loops, best of 3: 124 µs per loop
     69sage: timeit('f(x).diff(x,100)')
     70125 loops, best of 3: 5.58 ms per loop
     71
     72sage: set_diff_derivative_level(1)
     73sage: f(x).diff(x)
     74diff(f(x), x, 1)
     75sage: timeit('f(x).diff(x)')
     76625 loops, best of 3: 116 µs per loop
     77sage: timeit('f(x).diff(x,100)')
     78625 loops, best of 3: 1.01 ms per loop
     79
     80sage: set_diff_derivative_level(2)
     81sage: f(x).diff(x)
     82diff(f(x), x, 1)
     83sage: timeit('f(x).diff(x)')
     84625 loops, best of 3: 130 µs per loop
     85sage: timeit('f(x).diff(x,100)')
     86125 loops, best of 3: 1.85 ms per loop
     87}}}
     88
     89
     90'''*''' This patch removes old "dummy_diff" from
     91"calculus/calculus" as we now have a _real_ diff.
     92