home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,436 of 10,432   
   antispam@math.uni.wroc.pl to Ros@invalid.invalid   
   Re: [Axiom] define a derivate of one fun   
   25 May 17 19:55:25   
   
   Rosario19  wrote:   
   > In Axiom is it possible define one derivative function inside one   
   > function?   
   >   
   > as example   
   >   
   > g(f)==( h(y:Float):Float==numeric(eval(D(f(x),x),x,y));h(20))   
   >   
   > g(x+->x^2) or g(x^2) not give right return...   
      
   You can not compute defivative of a function (that is code producing   
   values), only derivatives of expressions.  Now, expression   
   already contains its variables, so 'D(f(x),x)' is wrong when   
   'f' is an expression, you need 'D(f, x)'.  Then there is question   
   of evaluation order, IIUC you first want to get derivative and   
   then use it in to compute values.  Then there is question of   
   building new functions inside functions: for that Axiom uses   
   '+->', see. Chapter 6.17 in Axiom book.  Or you can uses   
   utilities like 'compiledFunction'.  But '==' inside a function   
   is not going to work.   
      
   --   
                                 Waldek Hebisch   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca