Python中的sympy.integrals.singularityfunctions.singularityintegrate()
借助singularityintegrate()方法,我们可以得到奇点函数的定积分,并使用该方法返回积分函数。
Syntax : singularityintegrate(f, x)
Return : Return the definite integral of function.
示例 #1:
在这个例子中我们可以看到,通过使用singularityintegrate()方法,我们可以通过这个方法得到一个奇点函数的定积分并返回积分函数。
Python3
# import singularityintegrate
from sympy.integrals.singularityfunctions import singularityintegrate
from sympy import SingularityFunction, symbols, Function
x, a, n, y = symbols('x a n y')
f = Function('f')
# Using singularityintegrate() method
gfg = singularityintegrate(SingularityFunction(x**2 + 1, a, 2), x)
print(gfg)
Python3
# import singularityintegrate
from sympy.integrals.singularityfunctions import singularityintegrate
from sympy import SingularityFunction, symbols, Function
x, a, n, y = symbols('x a n y')
f = Function('f')
# Using singularityintegrate() method
gfg = singularityintegrate(SingularityFunction(x**3, 4, -2), x)
print(gfg)
输出 :
SingularityFunction(x**2 + 1, a, 3)/3
示例 #2:
Python3
# import singularityintegrate
from sympy.integrals.singularityfunctions import singularityintegrate
from sympy import SingularityFunction, symbols, Function
x, a, n, y = symbols('x a n y')
f = Function('f')
# Using singularityintegrate() method
gfg = singularityintegrate(SingularityFunction(x**3, 4, -2), x)
print(gfg)
输出 :
SingularityFunction(x**3, 4, -1)