Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Derivative (diff)

Derivative of an expression with respect to one or more variables.

With this function, the solver shows the steps whenever it finds them.

How to write it

diff(f, x)

The first derivative.

f
The expression or function to work on. Takes an expression.
x
The variable to differentiate by. Takes a variable.

diff(f, x, n)

The derivative of order n.

f
The expression or function to work on. Takes an expression.
x
The variable to differentiate by. Takes a variable.
n
The order: how many times to differentiate. Takes a whole number.

diff(f, x, y)

A mixed partial derivative.

f
The expression or function to work on. Takes an expression.
x
The first variable. Takes a variable.
y
The second variable. Takes a variable.

Examples

  • ddxsin⁡(x2)=2xcos⁡(x2)\displaystyle \frac{d}{dx} \sin(x^{2}) = 2 x \cos(x^{2})
    diff(sin(x^2), x)

    In the solver, diff(sin(x^2), x) gives 2x*cos(x^2).

    Open in the solver
  • d2dx2(x5)=20x3\displaystyle \frac{d^{2}}{dx^{2}}(x^{5}) = 20 x^{3}
    diff(x^5, x, 2)

    In the solver, diff(x^5, x, 2) gives 20x^3.

    Open in the solver
  • ∂2∂x ∂y(x2y)=2x\displaystyle \frac{\partial^{2}}{\partial x \, \partial y}(x^{2} y) = 2 x
    diff(x^2 y, x, y)

    In the solver, diff(x^2 y, x, y) gives 2x.

    Open in the solver

Functions its examples use

  • sin

    Sine of an angle in radians.

  • total_diff

    Total derivative of an expression with respect to a variable.

  • div

    Divergence of a vector field.

  • derivative

    The derivative operator: derivative(n) is of order n, derivative(0, 1) is the partial in the second argument.

  • grad

    Gradient of an expression: the list of its partial derivatives.

  • curl

    Curl of a vector field in three variables.

  • hessian

    Hessian matrix of an expression: its second partial derivatives.