Derivative Calculator
Differentiate any function step by step, with every rule named, higher derivatives, the slope and tangent at a point, and a graph.
Powers ^, sqrt( ), ln, log, log_2( ), e^x, |x|. Trig in radians.
Type a function and the calculator differentiates it the way it is done by hand, naming each rule as it applies it: the power, product, quotient and chain rules, the derivatives of eˣ, ln and the trig functions, and logarithmic differentiation for xˣ. It works out second and higher derivatives, partial derivatives when the function has more than one letter, and dy/dx of an equation in x and y by implicit differentiation.
Each answer is checked against the slope of the function measured numerically at three points before it is shown, and withheld if it disagrees. Give a point and it also finds the value there, the slope, and the tangent line, drawn on a graph of the function beside its derivative of the order asked for. All of it is worked out in your browser.
How to use it
Function is typed as you would write it, with multiplication by juxtaposition: 2x is 2 × x, and x sin x is x × sin(x). A leading f(x) = or y = only names the function. Trig functions work in radians.
- Powers and roots
- x^3, x³, x^(1/3), sqrt(x), √x, cbrt(x)
- Exponentials
- e^x, exp(x), 2^x
- Logarithms
- ln(x), log(x), log_2(x)
- Trig
- sin x, sin^2 x, sin^-1 x, asin x, sec x
- Hyperbolic
- sinh x, cosh^-1 x, atanh x
- Other
- |x|, floor(x), ceil(x), round(x), sign(x), π, e
- Equation
- x^2 + y^2 = 25
sin^2 x is (sin x)², and sin^-1 x is the inverse, asin x. A bare log is ln unless you set log means to log₁₀; the choice appears once the function has a bare log, and the Read as line under the field shows how the text was read. e is always the constant 2.718…; every other letter is a variable.
With respect to appears when the function has two or more letters: the others are held constant, which is a partial derivative, written ∂/∂x. Order goes from 1 to 10, each order working from the one before, with its steps under its own heading. An equation with = gives dy/dx, first order only.
At x = takes a number, π/6 or √2 as well (1e-3 alone is 0.001), and gives f, f′ and the tangent line there, exactly where the values come out exactly and as decimals otherwise. For an equation it is At (x, y), such as 3, 4.
How it works
The rules are applied from the outside in. A step shows the part a rule applies to and the formula it gives; a part that needs a rule of its own is left as d/dx[…] and worked out in a later step, while a part such as 3x has its derivative written straight in. The last step puts the pieces together and simplifies.
The simplified answer combines like terms and powers of the same base, and keeps every coefficient exact: 0.5x² gives x, not 1.0x. A quotient keeps its fraction: the numerator is multiplied out over the denominator squared, and a factor the two share is cancelled, so the second derivative of (x² + 1)/(x − 1) comes to 4/(x − 1)³. A function that simplifies before it is differentiated, such as x²/x, says where that holds: for x ≠ 0. A point is checked against the function as typed, so at x = 0 it says f(0) is undefined rather than giving the values of x.
Each answer is then checked numerically. The slope of the function is measured at −1.21, 0.37, 2.6 (moving on to other points where the function has no value there) by central differences, refined until two estimates agree, and compared with the answer's value. An answer that disagrees is not shown; one for a function with fewer than three such points is shown with a note that it was not checked. Higher orders are checked one order at a time, and dy/dx against −F_x/F_y at points found on the curve.
Power rule: d/dx xⁿ = n·xⁿ⁻¹
Product rule: (uv)′ = u′v + uv′
Quotient rule: (u/v)′ = (u′v − uv′)/v²
Chain rule: d/dx f(u) = f′(u)·u′
Logarithmic differentiation: (uᵛ)′ = uᵛ·(v′·ln u + v·u′/u)
Implicit: dy/dx = −F_x/F_y for F(x, y) = 0
Examples
A product with the chain rule
- Function
- x^2 sin(3x)
The product rule splits it into x² and sin(3x), and the chain rule differentiates sin(3x): 3x² cos(3x) + 2x sin(3x).
- Product rule: (uv)′ = u′v + uv′, with u = x² and v = sin(3x): d/dx[x² sin(3x)] = d/dx[x²]·sin(3x) + x²·d/dx[sin(3x)]
- Power rule: d/dx[xⁿ] = nxⁿ⁻¹, with n = 2: d/dx[x²] = 2x
- Chain rule: sin(u) with u = 3x gives cos(u) · u′: d/dx[sin(3x)] = cos(3x)·3
- Simplify: d/dx[x² sin(3x)] = 2x sin(3x) + x² cos(3x)·3 = 3x² cos(3x) + 2x sin(3x)
A quotient
- Function
- (x^2 + 1)/(x - 1)
The quotient rule gives (x² − 2x − 1)/(x − 1)², with the numerator multiplied out and the denominator kept as (x − 1)².
- Quotient rule: (u/v)′ = (u′v − uv′)/v², with u = x² + 1 and v = x − 1: d/dx[(x² + 1)/(x − 1)] = (d/dx[x² + 1]·(x − 1) − (x² + 1))/(x − 1)²
- Sum rule: differentiate term by term; a constant term gives 0: d/dx[x² + 1] = d/dx[x²]
- Power rule: d/dx[xⁿ] = nxⁿ⁻¹, with n = 2: d/dx[x²] = 2x
- Simplify: d/dx[(x² + 1)/(x − 1)] = (2x(x − 1) − (x² + 1))/(x − 1)² = (x² − 2x − 1)/(x − 1)²
The circle x² + y² = 25, implicitly
- Function
- x^2 + y^2 = 25
- At (x, y)
- 3, 4
Differentiating both sides with y as a function of x gives 2x + 2y·y′ = 0, so dy/dx = −x/y. At (3, 4) the slope is −3/4 ≈ −0.75, and the tangent line is y = −3x/4 + 25/4.
The tangent to x³ at x = 2
- Function
- x^3
- At x =
- 2
The power rule gives 3x². At x = 2 the curve is at f(2) = 8 with slope f′(2) = 12, so the tangent line is y = 12x − 16.
Derivatives of common functions
| Function | Derivative |
|---|---|
| x^n | nx^(n − 1) |
| e^x | e^x |
| a^x | a^x ln(a) |
| ln(x) | 1/x |
| log_a(x) | 1/(x ln(a)) |
| √x | 1/(2√x) |
| sin(x) | cos(x) |
| cos(x) | −sin(x) |
| tan(x) | sec²(x) |
| sec(x) | tan(x) sec(x) |
| csc(x) | −csc(x) cot(x) |
| cot(x) | −csc²(x) |
| asin(x) | 1/√(−x² + 1) |
| acos(x) | −1/√(−x² + 1) |
| atan(x) | 1/(x² + 1) |
| sinh(x) | cosh(x) |
| cosh(x) | sinh(x) |
| tanh(x) | 1/cosh²(x) |
| |x| | x/|x| |
Frequently asked questions
See also
- Integral Calculator — for antiderivatives, the reverse of derivatives, each checked by differentiating it back.
- Limit Calculator — for limits, the idea a derivative is built on, with the working and a table of values.
- Graphing Calculator — to plot the function over any range, with the derivative found here entered as a second row and sliders for the other letters.
- Algebra & Inequality Calculator — to solve f′(x) = 0 for the turning points.
- Slope Calculator — for the slope and equation of a straight line through two points.
- Quadratic Equation Solver — to find where a derivative that is a quadratic equals 0.