Open In App

sympy.integrals.trigonometry.trigintegrate() in python

Last Updated : 10 Jul, 2020
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report

With the help of trigintegrate() method, we can compute the integral of a trigonometric functions using pattern matching and return the integrated function by using this method.

Syntax : trigintegrate(f, x, conds='piecewise')

Return : Return the integrated function

Example #1 :

In this example we can see that by using trigintegrate() method, we are able to get the integrated value of trigonometric function using pattern matching.

Python3
# import trigintegrate
from sympy import Symbol, sin, cos, tan, sec, csc, cot
from sympy.integrals.trigonometry import trigintegrate
from sympy.abc import x

# Using trigintegrate() method
gfg = trigintegrate(tan(x)/cos(x), x)

print(gfg)

Output :

1/cos(x)

Example #2 :

Python3
# import trigintegrate
from sympy import Symbol, sin, cos, tan, sec, csc, cot
from sympy.integrals.trigonometry import trigintegrate
from sympy.abc import x

# Using trigintegrate() method
gfg = trigintegrate(tan(x)*cot(x), x)

print(gfg)

Output :

x


Next Article
Practice Tags :

Similar Reads