#12922: Implicit derivative
---------------------------------------+------------------------------------
       Reporter:  mmarco               |         Owner:  burcin    
           Type:  enhancement          |        Status:  needs_work
       Priority:  major                |     Milestone:  sage-5.10 
      Component:  calculus             |    Resolution:            
       Keywords:  implicit derivative  |   Work issues:            
Report Upstream:  N/A                  |     Reviewers:            
        Authors:  Miguel Marco         |     Merged in:            
   Dependencies:                       |      Stopgaps:            
---------------------------------------+------------------------------------

Comment (by mmarco):

 The problem with using temporary variables without giving them a name
 string is this:

 {{{

 sage: from sage.symbolic.function_factory import SymbolicFunction
 sage: var('x,y')
 (x, y)
 sage: def implicit_derivative(Y,X,F,n=1):
 ....:         x=SR.symbol()
 ....:         yy=SR.symbol()
 ....:         y=SymbolicFunction('y',1)(x)
 ....:         f=SymbolicFunction('f',2)(x,yy)
 ....:         Fx=f.diff(x)
 ....:         Fy=f.diff(yy)
 ....:         G=-(Fx/Fy)
 ....:         G=G.subs_expr({yy:y})
 ....:         di={y.diff(x):-F.diff(X)/F.diff(Y)}
 ....:         R=G
 ....:         S=G.diff(x,n-1)
 ....:         for i in range(n+1):
 ....:                 di[y.diff(x,i+1)(x=x)]=R
 ....:                 S=S.subs_expr(di)
 ....:                 R=G.diff(x,i)
 ....:                 for j in range(n+1-i):
 ....:
 di[f.diff(x,i,yy,j)(x=x,yy=y)]=F.diff(X,i,Y,j)
 ....:                         S=S.subs_expr(di)
 ....:                 return S
 ....:
 sage: implicit_derivative(y,x,x^2+y^2-1)
 -D[0](f)(symbol160, y(symbol160))/D[1](f)(symbol160, y(symbol160))
 }}}

 I don't know why, this problem is not present if we put the strings in the
 definitions of the variables.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12922#comment:10>
Sage <http://www.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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to