Differentiation

This lesson discusses first and higher order derivatives.

Differentiation is the process of finding a function that outputs the rate of change of one variable with respect to another.

SymPy provides the functionality of symbolically calculating the derivatives of a function.

First-order derivatives

Derivatives are computed with the diff function, which recursively uses the various differentiation rules.

y=x4+x3+x2y=x^{4}+x^{3}+x^{2}

dydx=4x3+3x2+2x\frac{dy}{dx} =4x^3 +3x^2+2x

We will be exploring different types of derivatives using SymPy. The SymPy diff() function takes a minimum of two arguments: the function to be differentiated and the variable with respect to which the differentiation is performed.

diff(y, x)

Let’s look at an implementation of this:

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy