On Tue, 7 Feb 2012 06:56:30 -0800 (PST)
Oscar Lazo <[email protected]> wrote:
 
> On 7 feb, 04:48, Burcin Erocal <[email protected]> wrote:

> > I don't think we want to have separate functions for the
> > derivatives in Sage. These might help you get around the printing
> > problem for now, but they are not useful in general.
 
> I disagree here, Mathematica has got the AiryAiPrime function. And
> mpmath supports calculating derivatives and integrals of arbitrary
> order! I think it would be best if we could do something like:
> 
> sage: airy_ai(x)
> airy_ai(x)
> sage: airy_ai(x,1)
> airy_ai_prime(x)
> sage: airy_ai(x,-2)
> airy_ai(x,-2)
> 
> that is, make a single object that returns arbitrary derivatives or
> integrals.

You're right, I didn't know mpmath supported this. We can have a main
function that takes a single argument and another one with two
arguments to represent the derivatives. This is similar to how maple
implements the airy function:

http://www.maplesoft.com/support/help/Maple/view.aspx?path=Airy

The implementation would be similar to that of the psi function:

http://hg.sagemath.org/sage-main/file/tip/sage/functions/other.py#l810

Note that there are two symbolic functions Function_psi1 and
Function_psi2, with a regular python function names psi() that
wraps these.

You can also put the new functions in a new file sage/functions/airy.py.


Cheers,
Burcin

-- 
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
URL: http://www.sagemath.org

Reply via email to