With the help of sympy.Derivative() method, we can create an unevaluated derivative of a SymPy expression. It has the same syntax as diff() method. To evaluate an unevaluated derivative, use the doit() method.
Đang xem: Derivative python
Syntax: Derivative(expression, reference variable)Parameters:expression – A SymPy expression whose unevaluated derivative is found.
reference variable – Variable with respect to which derivative is found.
Returns: Returns an unevaluated derivative of the given expression.Example #1:
Output:Expression : x**2 + y**3 + 2*y Derivative of expression with respect to x : Derivative(x**2 + y**3 + 2*y, x)Value of the derivative : 2*x Example #2:
Output:Expression : x**3*y**3 + x**2*y**2 + 2*x*y Derivative of expression with respect to x : Derivative(x**3*y**3 + x**2*y**2 + 2*x*y, x, y)Value of the derivative : 9*x**2*y**2 + 4*x*y + 2 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics. To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course
Read JSON file using PythonReading and Writing to text files in PythonPython DictionaryPython program to convert a list to stringRead a file line by line in Python
Python String | replace()Different ways to create Pandas DataframeCreate a Pandas DataFrame from Lists*args and **kwargs in PythonPython String | split()