sympy.integrals.trigonometry.trigintegrate() in python
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
from sympy import Symbol, sin, cos, tan, sec, csc, cot
from sympy.integrals.trigonometry import trigintegrate
from sympy.abc import x
gfg = trigintegrate(tan(x) / cos(x), x)
print (gfg)
|
Output :
1/cos(x)
Example #2 :
Python3
from sympy import Symbol, sin, cos, tan, sec, csc, cot
from sympy.integrals.trigonometry import trigintegrate
from sympy.abc import x
gfg = trigintegrate(tan(x) * cot(x), x)
print (gfg)
|
Output :
x
Last Updated :
10 Jul, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...