📌  相关文章
📜  Python中的sympy.integrals.deltafunctions.deltaintegrate()

📅  最后修改于: 2022-05-13 01:55:31.759000             🧑  作者: Mango

Python中的sympy.integrals.deltafunctions.deltaintegrate()

借助deltaintegrate()方法,我们可以计算 delta函数的积分,并使用该方法返回积分函数。此方法使用 delta 表达式来执行积分。

示例 #1:

在这个例子中我们可以看到,通过使用deltaintegrate()方法,我们可以通过使用这个方法得到一个 delta函数的积分,它会返回积分的 delta 表达式。

Python3
# import deltaintegrate
from sympy.abc import x, y, z
from sympy.integrals.deltafunctions import deltaintegrate
from sympy import sin, cos, tan, DiracDelta, Heaviside
  
# Using deltaintegrate() method
gfg = deltaintegrate(tan(x)*sin(x)*cos(x)*DiracDelta(x**2 - 1), x)
  
print(gfg)


Python3
# import deltaintegrate
from sympy.abc import x, y, z
from sympy.integrals.deltafunctions import deltaintegrate
from sympy import sin, cos, DiracDelta, Heaviside
  
# Using deltaintegrate() method
gfg = deltaintegrate(sin(y)*DiracDelta(x - z)*DiracDelta(y - z), y)
  
print(gfg)


输出 :

示例 #2:

Python3

# import deltaintegrate
from sympy.abc import x, y, z
from sympy.integrals.deltafunctions import deltaintegrate
from sympy import sin, cos, DiracDelta, Heaviside
  
# Using deltaintegrate() method
gfg = deltaintegrate(sin(y)*DiracDelta(x - z)*DiracDelta(y - z), y)
  
print(gfg)

输出 :