On Feb 6, 4:22 pm, Oscar Lazo <[email protected]> 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 on
http://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 [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