With the help of sympy.rewrite() method, we can represent any mathematical function in terms of another function.
expression – It is mathematical expression which is to be represented by another function.
function – It is the mathematical function used to rewrite the given expression.
Returns: Returns a mathematical expression corresponding to the input in terms of specified function.
Expression = tan(x) Expression in terms of sin() : 2*sin(x)**2/sin(2*x)
Expression = factorial(x) Expression in terms of gamma() : gamma(x + 1)
- class method vs static method in Python
- Python | next() method
- Python | set() method
- Python | os.dup() method
- Python PIL | RankFilter() method
- Python | os.access() Method
- Python | isinstance() method
- Python | os.chdir() method
- Python PIL | copy() method
- Python PIL | composite() method
- Python | os.pipe() method
- Python | Tensorflow cos() method
- Python | os.kill() method
- Python | os.WSTOPSIG() method
- Python | sys.getallocatedblocks() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.