python中Euler函数怎么用
在python中使用Euler函数的方法
Euler:Euler()函数的作用是用于返回欧拉多项式的表达式或值。
Euler()函数语法:
euler(n, k)
参数:
n :表示欧拉多项式的阶数。
k :表示欧拉多项式中的变量。
Euler()函数使用方法:
from sympy import * n = 5
k = symbols('x')
print("Value of n = {} and k = {}".format(n, k))
nth_euler_poly = euler(n, k)
print("The nth euler polynomial : {}".format(nth_euler_poly))
输出结果为:
Value of n = 5 and k = x
The nth euler polynomial : x**5 - 5*x**4/2 + 5*x**2/2 - 1/2
版权声明
本文仅代表作者观点,不代表米安网络立场。
上一篇:docker怎么批量映射端口 下一篇:逻辑运算符的使用方法有哪些
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。