About the Derivative Calculator
The derivative measures the instantaneous rate of change of : the slope of the tangent line at each point. It is built from a small set of rules applied to the structure of the expression.
This calculator parses your function into a tree, applies the matching rule at every node and records it as a step. The result is simplified and then cross-checked against an independent differentiator at several sample points before it is shown.
Choose an order up to the fifth derivative, and optionally a value of x at which to evaluate the result.
What is a derivative, really?
The derivative of a function measures how fast its output changes as its input changes. Geometrically it is the slope of the tangent line, the straight line that just touches the graph at a point and points in the same direction as the curve there. For a straight line the slope is the same everywhere, but for a curve such as it changes from point to point, so the derivative is itself a function: says the slope is 2 at , 6 at and at .
Formally the derivative is a limit of difference quotients, . The quotient is the slope of a secant line through two nearby points on the graph, and letting shrink to zero turns the secant into the tangent. Computing that limit directly every time would be slow, so in practice derivatives are found with a small set of rules that were each proved once from the limit definition. The calculator applies exactly those rules and shows which one is used at each step.
Derivatives appear wherever rates matter: velocity is the derivative of position, acceleration is the derivative of velocity, marginal cost is the derivative of total cost, and the rate of a chemical reaction is the derivative of a concentration.
This calculator handles derivatives with respect to . For functions of several variables use the partial derivative calculator, and for equations that mix and use implicit differentiation.
How to use the Derivative Calculator
- Enter the function of x, for example x^2 sin(x) or e^(3x)/x. You can also type d/dx in front.
- Choose the order: first, second, up to fifth derivative.
- Optionally enter a value of x to evaluate the derivative there, then press Differentiate.
Formulas
Power rule
Product rule
Quotient rule
Chain rule
Common derivatives
Worked example: x² sin(x)
The worked example differentiates . The function is a product of and , so the calculator applies the product rule . It finds with the power rule and from the standard trigonometric derivatives, then combines them into . The answer is then compared numerically with a difference quotient at several points to confirm it.
The solution below is generated by the same engine that powers the calculator above.
Final answer
How we read your problem
Find the derivative of x² sin(x) with respect to x.
Step-by-step solution
Product rule: (uv)′ = u′v + uv′
d/dx[sin x] = cos x
Power rule: d/dx[xⁿ] = n·xⁿ⁻¹
Combine and simplify
Formulas used
Power rule
Product rule
The derivative is built from the outside in: sums split into terms, constants factor out, products and quotients use their rules, and every composite function multiplies by the derivative of its inside (chain rule).
Verification
- Cross-checked numerically against an independent symbolic differentiator at 8 sample points ✓
Detailed explanation
The core rules
Almost every derivative you meet in a first course comes from a handful of rules. The power rule gives for any real , which covers roots too, since has derivative . The constant multiple and sum rules let you differentiate a polynomial term by term. The exponential rule says is its own derivative, and the logarithm rule gives . The six trigonometric functions each have a standard derivative, beginning with and .
Those basic derivatives are combined with three structural rules. The product rule handles , the quotient rule handles , and the chain rule handles a function inside another function. Recognising which structure you are looking at is most of the work, and it is why the calculator names the rule in each step title.
The chain rule in practice
The chain rule says that if then : differentiate the outer function, leave the inside alone, then multiply by the derivative of the inside. For the outer function is sine and the inside is , so the derivative is . The calculator writes this as , which is the same expression with the factors in a different order.
The chain rule also hides inside other rules. In the inside is , so the derivative is , and the calculator labels this step the exponential rule with . Missing the factor from the inside function is the single most common derivative error, and comparing your result with the calculator's step for the inner function is the fastest way to find it.
Quotients and simplification
For a quotient the rule is . The order in the numerator matters because subtraction is not commutative. Differentiating gives , which the calculator simplifies to . Both forms are correct, and so is . When your answer looks different from the one shown, plug a value such as into both; equal values at several points are strong evidence that the expressions are equivalent.
Higher derivatives and evaluating at a point
Differentiating again gives the second derivative, which measures how the slope itself is changing. A positive second derivative means the graph is concave up, bending like a cup, and a negative one means concave down. For the first derivative is and the second is ; evaluating at gives . In physics, if were a position, 12 would be the acceleration at time 2.
Evaluating the first derivative at a point gives the slope of the tangent line there, and with the point itself you can write the tangent line in point-slope form. This is the basis of linear approximation and of Newton's method for solving equations.
Using derivatives to find maxima and minima
A smooth function can only reach a local maximum or minimum where its derivative is zero or undefined, because at the top of a hill or the bottom of a valley the tangent line is horizontal. To optimise a function, differentiate it, set , solve for , and test each candidate. For the derivative is , which is zero at and . The second derivative is negative at and positive at , so the graph has a local maximum at and a local minimum at .
On a closed interval the largest and smallest values can also occur at the endpoints, so compare the function there as well. Many applied problems, such as minimising material for a box of fixed volume, follow exactly this pattern once the quantity to optimise has been written as a function of one variable.
How the calculator checks its answer
Symbolic differentiation can go wrong in subtle ways, especially during simplification, so the result is not simply trusted. The calculator evaluates its derivative at a set of sample points and compares it with a central difference quotient, for a small , computed directly from your original function. If the two agree to within a tight tolerance at every point where the function is defined, the check passes and is listed under the answer. You can use the same idea by hand with a calculator: pick a value of , nudge it slightly up and down, and see whether the change in divided by the change in matches your derivative.
Common mistakes
- Forgetting the inner derivative in the chain rule: , not .
- Writing ; the product rule has two terms.
- Reversing the order of the numerator in the quotient rule.
- Applying the power rule to ; exponentials need .
- Writing ; the derivative of a product is not the product of the derivatives.
- Treating a constant such as or as a variable and differentiating it.
Tips
- Rewrite roots and reciprocals as powers: , .
- Identify the last operation in the expression; that tells you which rule to use first.
- Use logarithmic differentiation for functions like .
- Rewrite roots and reciprocals as powers before differentiating: .
- Use the quotient rule only when the denominator contains ; is just .
- Simplify the function before differentiating when you can; is simply for .
Frequently asked questions
What is a derivative?
It is the rate at which a function changes with respect to its variable, equal to the slope of the tangent line: .
Which functions can I differentiate?
Polynomials, powers and roots, exponentials, logarithms, trigonometric and inverse trigonometric functions, hyperbolic functions, and any combination of them using +, −, ×, ÷ and composition.
How do I find a second derivative?
Choose Second derivative in the Order menu. The calculator differentiates the simplified first derivative again and shows both stages.
Can I evaluate the derivative at a point?
Yes. Enter a value such as 2 or pi/4 in the Evaluate at box to get , the slope of the tangent at .
How do I know the answer is correct?
Each result is compared numerically against an independently computed derivative at 8 sample points. If they disagree, no answer is shown.
Why does my answer look different from my textbook?
Equivalent expressions can be written in many ways, for example and . Substitute a value into both to confirm they match.
How do I use the chain rule?
Differentiate the outer function while keeping the inner expression unchanged, then multiply by the derivative of the inner expression. For that gives .
What does the second derivative tell me about a graph?
Its sign gives the concavity. Where the graph bends upward, where it bends downward, and where it changes sign there is an inflection point.
Where is a function not differentiable?
At corners, cusps, vertical tangents and breaks in the graph. For example has a corner at 0, where the slopes from the left and right are and , so no single tangent exists.
Differentiate your function
Type a function above to see the rule used at every step, choose higher orders, and evaluate the derivative at any point.