Golam Mortuza Hossain wrote:
> 
> 
> On Sep 3, 10:52 am, Nicolas <[email protected]> wrote:
>> I am trying to do the following thing but I am not sure whether this
>> is possible in sage (though I think it is in Mathematica)
>>
>> Let's say I define a symbolic function
>>
>> sage: f=function('f',x)
>>
>> I would like to issue some command to "tell" sage what the derivative
>> of f is (for instance : g) so that the command
>>
>> sage: diff(f)
>>
>> would yield g
> 
> Yes, its possible also in Sage. I am giving you an example that you
> can adapt for your need. (if you have have a function of multiple
> arguments then you should read diff_param keywords. For example,
> try heaviside?? in sage prompt to see how to read diff_param)
> 
> --------
> sage: g = function('g')
> sage: def f_deriv(*args, **kwds):
> ....:     return g(*args)
> ....:
> sage: f = function('f', derivative_func=f_deriv)


Where is this documented?  I see some examples (of this and lots of 
other keywords) under:

sage.symbolic.function.SFunction??

But I don't think most users would use sage_search or grep to find it 
like I had to resort to after guessing a bunch of places the 
documentation might be...

It looks like there are quite a lot of very interesting and useful 
arguments to function.  I had no idea these existed!

Thanks,

Jason

-- 
Jason Grout


--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to