#6756: [with patch, needs review] Implement ``diff`` format symbolic derivative 
in
new symbolics
----------------------------+-----------------------------------------------
 Reporter:  gmhossain       |       Owner:                       
     Type:  enhancement     |      Status:  new                  
 Priority:  major           |   Milestone:                       
Component:  symbolics       |    Keywords:                       
 Reviewer:  Nick Alexander  |      Author:  Golam Mortuza Hossain
   Merged:                  |  
----------------------------+-----------------------------------------------

Comment(by burcin):

 Replying to [comment:15 gmhossain]:
 > Replying to [comment:14 burcin]:
 > >
 > > So you agree that setting this level to 2 gives wrong results.
 >
 > Yes, but ONLY for mathematically dubious inputs. Please don't
 generalize, it doesn't help anyone.

 What do you think is "mathematically dubious"?

 Using the notation and definitions for derivatives and partial derivatives
 from here respectively:

 http://books.google.at/books?id=e54cqeAmf4QC&pg=PA267#v=onepage

 http://books.google.at/books?id=e54cqeAmf4QC&pg=PA495#v=onepage

 Let U be an open subset of the complex numbers, f: UxU -> C, y in U. Then
 by Proposition 3.5 here

 http://books.google.at/books?id=LzhkCF9ZsUgC&&pg=PA10#v=onepage

 we have

 \frac{df}{dy} (y,y) = D_1 f(y, y) + D_2 f(y, y).

 Note that on the left hand side there is a ''total'' derivative.

 In the current Sage syntax, "diff" denotes a total derivative, and "D"
 denotes a partial derivative. The statement above translates to the Sage
 notation as:

 diff(f(y,y), y) = D[0](f)(y,y) + D[1](f)(y,y)

 Which you can also calculate by:

 {{{
 sage: diff(f(y,y),y)
 D[0](f)(y, y) + D[1](f)(y, y)
 }}}

 ----

 With your patch we get:

 {{{
 sage: set_diff_derivative_level(2)
 sage: diff(f(y,y),y)
 2*diff(f(y, y), y, 1)
 sage: latex(diff(f(y,y),y))
 2 \, {\frac{\partial}{\partial y}f\left(y, y\right)}
 }}}

 Can you explain what `diff(f(y,y), y, 1)` or in typeset form
 `\frac{\partial}{\partial y}f(y,y)` means?

 ----

 > I have been working on a patch that will check the arguments of the
 function while applying chain
 > rule and can warn/raise appropriate errors. However, I am planning to do
 this in next
 > revision and after having some feedbacks from its users.

 Are you saying that we should merge this problematic version, and you'll
 fix things later? This is not how the development process works. We can
 review and merge the known good parts from your patch, and you can submit
 the rest in a different ticket later.


 > > We can then merge this ''inert'' derivative with the global `diff`
 command by
 > > adding a keyword option `hold`. E.g.,
 >
 > Sure. However, it would be premature to merge this with global "diff"
 now, given its a
 > new implementation and there could be issue which are not yet known. So
 I would prefer
 > to wait couple of release cycles before considering such a move.

 Should it really be merged into Sage if it's so premature? The point of
 the review to make sure that it doesn't have these problems.

 I don't have any more time to waste on this. I suggest you either
  * read the references I linked to in comment:10, and explain clearly what
 you do to remedy the problems discussed there or,
  * remove the problematic parts from your patch.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6756#comment:16>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to