sympy.integrals.deltafunctions.deltaintegrate() in python

With the help of deltaintegrate() method, we can compute the integral of delta function and returns the integrated function by using this method. This method uses delta expressions to perform integration.

Syntax : deltaintegrate(f, x)

Return : Return the integrated function.

Example #1 :

In this example we can see that by using deltaintegrate() method, we are able to get the integral of a delta function by using this method and it will return the integrated delta expressions.

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)


Output :

sin(1)*cos(1)*tan(1)*Heaviside(x – 1)/2 + sin(1)*cos(1)*tan(1)*Heaviside(x + 1)/2

Example #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)


Output :

sin(z)*DiracDelta(x – z)*Heaviside(y – z)

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button