本文整理汇总了Python中sage.symbolic.ring.SR.symbol方法的典型用法代码示例。如果您正苦于以下问题:Python SR.symbol方法的具体用法?Python SR.symbol怎么用?Python SR.symbol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.symbolic.ring.SR
的用法示例。
在下文中一共展示了SR.symbol方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: airy_bi
# 需要导入模块: from sage.symbolic.ring import SR [as 别名]
# 或者: from sage.symbolic.ring.SR import symbol [as 别名]
def airy_bi(alpha, x=None, hold_derivative=True, **kwds):
r"""
The Airy Bi function
The Airy Bi function `\operatorname{Bi}(x)` is (along with
`\operatorname{Ai}(x)`) one of the two linearly independent standard
solutions to the Airy differential equation `f''(x) - x f(x) = 0`. It is
defined by the initial conditions:
.. MATH::
\operatorname{Bi}(0)=\frac{1}{3^{1/6} \Gamma\left(\frac{2}{3}\right)},
\operatorname{Bi}'(0)=\frac{3^{1/6}}{ \Gamma\left(\frac{1}{3}\right)}.
Another way to define the Airy Bi function is:
.. MATH::
\operatorname{Bi}(x)=\frac{1}{\pi}\int_0^\infty
\left[ \exp\left( xt -\frac{t^3}{3} \right)
+\sin\left(xt + \frac{1}{3}t^3\right) \right ] dt.
INPUT:
- ``alpha`` -- Return the `\alpha`-th order fractional derivative with
respect to `z`.
For `\alpha = n = 1,2,3,\ldots` this gives the derivative
`\operatorname{Bi}^{(n)}(z)`, and for `\alpha = -n = -1,-2,-3,\ldots`
this gives the `n`-fold iterated integral.
.. MATH::
f_0(z) = \operatorname{Bi}(z)
f_n(z) = \int_0^z f_{n-1}(t) dt
- ``x`` -- The argument of the function
- ``hold_derivative`` -- Whether or not to stop from returning higher
derivatives in terms of `\operatorname{Bi}(x)` and
`\operatorname{Bi}'(x)`
.. SEEALSO:: :func:`airy_ai`
EXAMPLES::
sage: n, x = var('n x')
sage: airy_bi(x)
airy_bi(x)
It can return derivatives or integrals::
sage: airy_bi(2, x)
airy_bi(2, x)
sage: airy_bi(1, x, hold_derivative=False)
airy_bi_prime(x)
sage: airy_bi(2, x, hold_derivative=False)
x*airy_bi(x)
sage: airy_bi(-2, x, hold_derivative=False)
airy_bi(-2, x)
sage: airy_bi(n, x)
airy_bi(n, x)
It can be evaluated symbolically or numerically for real or complex
values::
sage: airy_bi(0)
1/3*3^(5/6)/gamma(2/3)
sage: airy_bi(0.0)
0.614926627446001
sage: airy_bi(I)
airy_bi(I)
sage: airy_bi(1.0*I)
0.648858208330395 + 0.344958634768048*I
The functions can be evaluated numerically using mpmath,
which can compute the values to arbitrary precision, and scipy::
sage: airy_bi(2).n(prec=100)
3.2980949999782147102806044252
sage: airy_bi(2).n(algorithm='mpmath', prec=100)
3.2980949999782147102806044252
sage: airy_bi(2).n(algorithm='scipy') # rel tol 1e-10
3.2980949999782134
And the derivatives can be evaluated::
sage: airy_bi(1, 0)
3^(1/6)/gamma(1/3)
sage: airy_bi(1, 0.0)
0.448288357353826
Plots::
sage: plot(airy_bi(x), (x, -10, 5)) + plot(airy_bi_prime(x),
....: (x, -10, 5), color='red')
Graphics object consisting of 2 graphics primitives
**References**
#.........这里部分代码省略.........