VOOZH about

URL: https://www.geeksforgeeks.org/python/python-sympy-integrate-method/

⇱ Python | sympy.integrate() method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Python | sympy.integrate() method

Last Updated : 12 Jun, 2019
With the help of sympy.integrate() method, we can find the integration of mathematical expressions in the form of variables by using sympy.integrate() method.
Syntax : sympy.integrate(expression, reference variable) Return : Return integration of mathematical expression.
Example #1 : In this example we can see that by using sympy.integrate() method, we can find the integration of mathematical expression with variables. Here we use symbols() method also to declare a variable as symbol. Output :
Before Integration : exp(x)*sin(x) After Integration : exp(x)*sin(x)/2 - exp(x)*cos(x)/2
Example #2 :
Output :
Before Integration : sin(x)*tan(x) After Integration : -log(sin(x) - 1)/2 + log(sin(x) + 1)/2 - sin(x)
Comment
Article Tags:
Article Tags: