How the derivative calculator works
The calculator parses your expression into a tree, then applies the standard differentiation rules from the top down. Every rule it uses is recorded, so the steps read like a worked solution: the outer rule first, then the derivatives of the pieces, then a final simplification that merges like terms and folds constants exactly (fractions stay fractions, so d/dx of x/3 is 1/3, not 0.3333).
Worked example: d/dx of x^3 + sin(2x)
The top of the tree is a sum, so the sum rule splits the problem into d/dx[x^3] and d/dx[sin(2x)]. The first piece is the power rule: bring the exponent down and lower it by one, giving 3x^2. The second piece is a sine of an inner expression, so the chain rule applies: the derivative of sin is cos, evaluated at the inner expression, times the derivative of the inner expression. d/dx[2x] is 2 by the constant multiple rule, so the piece becomes 2cos(2x). Adding the pieces gives 3x^2 + 2cos(2x), which is exactly what the calculator shows with the default input.
Derivative rules table
| Rule | Statement | Example |
|---|---|---|
| Constant | d/dx [c] = 0 | d/dx [7] = 0 |
| Power | d/dx [x^n] = n x^(n-1) | d/dx [x^3] = 3x^2 |
| Constant multiple | d/dx [c f] = c f' | d/dx [5x^2] = 10x |
| Sum | (f + g)' = f' + g' | d/dx [x^2 + x] = 2x + 1 |
| Product | (f g)' = f' g + f g' | d/dx [x e^x] = e^x + x e^x |
| Quotient | (f / g)' = (f' g - f g') / g^2 | d/dx [x / (x + 1)] = 1 / (x + 1)^2 |
| Chain | f(g(x))' = f'(g(x)) g'(x) | d/dx [sin(2x)] = 2cos(2x) |
| Exponential | d/dx [e^x] = e^x, d/dx [a^x] = a^x ln a | d/dx [2^x] = 2^x ln 2 |
| Logarithm | d/dx [ln x] = 1 / x | d/dx [ln(x^2 + 1)] = 2x / (x^2 + 1) |
Derivatives of common functions
| f(x) | f'(x) | f(x) | f'(x) |
|---|---|---|---|
| sin x | cos x | asin x | 1 / sqrt(1 - x^2) |
| cos x | -sin x | acos x | -1 / sqrt(1 - x^2) |
| tan x | sec^2 x | atan x | 1 / (1 + x^2) |
| sec x | sec x tan x | sinh x | cosh x |
| csc x | -csc x cot x | cosh x | sinh x |
| cot x | -csc^2 x | tanh x | 1 - tanh^2 x |
| sqrt x | 1 / (2 sqrt x) | log x (base 10) | 1 / (x ln 10) |
| |x| | sign(x) | log2 x | 1 / (x ln 2) |
Reading the steps
Each step shows the expression being differentiated on the left, written as d/dx[...], and the rule's output on the right. Pieces that still need differentiating appear as d/dx[...] placeholders, and later steps resolve them. The last step, labelled Simplify, collects everything into the final answer. If you set a higher order, the trace repeats once per derivative, each round starting from the simplified result of the previous one.
Higher derivatives and when they vanish
Differentiating a polynomial lowers its degree by one, so the (n+1)-th derivative of a degree-n polynomial is 0. Exponentials never vanish: every derivative of e^(2x) is a multiple of e^(2x). Sine and cosine cycle with period four: the fourth derivative of sin x is sin x again. The calculator makes these patterns easy to check by setting the order field.
Limitations
The calculator differentiates with respect to one variable and treats every other letter as a constant, which is what you want for partial derivatives of simple expressions. It does not differentiate min, max, or piecewise definitions, and the derivative of |x| is reported as sign(x), which is undefined at 0. Where a derivative is defined almost everywhere (floor, ceiling, round), the calculator returns 0.