Done: http://trac.sagemath.org/sage_trac/ticket/12455
I've added a patch, which should do the job, but it has a few shortcomings: 1.-The resulting symbolic functions seem to remain on hold: sage: airy_ai(1.0) airy_ai(1.00000000000000) You need to force it to evaluate: sage: airy_ai(1.0).n() 0.135292416313 2.- This doesn't work: sage: airy_ai(2.0).n(digits=100) 0.0349241304233 3.- There is no evaluation for airy_ai_prime or airy_bi_prime 4.- I'm not sure about how should the functions be called, some possible schemes are {ai,bi,aip,bip} {ai,bai,aip,baip} {airy_ai,airy_bi,airy_ai_prime,airy_bi_prime} And also whether the latex representation should be capitalized or not. I chose the third scheme, and capitalized typesetting. Cheers! Oscar On 6 feb, 19:37, kcrisman <kcris...@gmail.com> wrote: > On Feb 6, 4:22 pm, Oscar Lazo <algebraicame...@gmail.com> wrote: > > > > > > > > > > > That worked excelent! I made the following code: > > > from sage.symbolic.function import BuiltinFunction > > class AiryAi(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "ai", > > latex_name=r"\operatorname{Ai}") > > def _derivative_(self, x, diff_param=None): return aip(x) > > > class AiryAiPrime(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "aip", > > latex_name=r"\operatorname{Ai}'") > > > class AiryBi(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "bi", > > latex_name=r"\operatorname{Bi}") > > def _derivative_(self, x, diff_param=None): return bip(x) > > > class AiryBiPrime(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "bip", > > latex_name=r"\operatorname{Bi}'") > > > ai=AiryAi() > > bi=AiryBi() > > aip=AiryAiPrime() > > bip=AiryBiPrime() > > ai(x)+bi(x)+aip(x)+bip(x) > > > And now stuff like > > f=A1*ai(k*x)+B1*bi(k*x) > > f > > diff(f,x).subs(x=x0) > > > works exactly the way I wanted. > > > Thank you! > > Great! > > Oscar, you have a Trac account, right? Would you mind opening up a > ticket to make these functions "symbolic", put your code up as a > "protopatch", add the ticket to an appropriate place > onhttp://trac.sagemath.org/sage_trac/wiki/symbolics/functions, and cc: > users kcrisman, burcin, and benjaminfjones on the ticket? Since we > have robust numerical evaluation for this, we might as well add them > in this way. > > Thanks! > > - kcrisman On 6 feb, 19:37, kcrisman <kcris...@gmail.com> wrote: > On Feb 6, 4:22 pm, Oscar Lazo <algebraicame...@gmail.com> wrote: > > > > > > > > > > > That worked excelent! I made the following code: > > > from sage.symbolic.function import BuiltinFunction > > class AiryAi(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "ai", > > latex_name=r"\operatorname{Ai}") > > def _derivative_(self, x, diff_param=None): return aip(x) > > > class AiryAiPrime(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "aip", > > latex_name=r"\operatorname{Ai}'") > > > class AiryBi(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "bi", > > latex_name=r"\operatorname{Bi}") > > def _derivative_(self, x, diff_param=None): return bip(x) > > > class AiryBiPrime(BuiltinFunction): > > def __init__(self): > > BuiltinFunction.__init__(self, "bip", > > latex_name=r"\operatorname{Bi}'") > > > ai=AiryAi() > > bi=AiryBi() > > aip=AiryAiPrime() > > bip=AiryBiPrime() > > ai(x)+bi(x)+aip(x)+bip(x) > > > And now stuff like > > f=A1*ai(k*x)+B1*bi(k*x) > > f > > diff(f,x).subs(x=x0) > > > works exactly the way I wanted. > > > Thank you! > > Great! > > Oscar, you have a Trac account, right? Would you mind opening up a > ticket to make these functions "symbolic", put your code up as a > "protopatch", add the ticket to an appropriate place > onhttp://trac.sagemath.org/sage_trac/wiki/symbolics/functions, and cc: > users kcrisman, burcin, and benjaminfjones on the ticket? Since we > have robust numerical evaluation for this, we might as well add them > in this way. > > Thanks! > > - kcrisman -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org