Derivatives step by step: the power, product, quotient and chain rules with worked examples
A derivative measures how fast a function changes. Geometrically it is the slope of the tangent line; physically it is a rate such as velocity (the derivative of position) or marginal cost (the derivative of total cost). You rarely need the limit definition in practice: a handful of rules covers almost every function you will meet in a first calculus course.
The calculator above applies those rules the way you would on paper. It names the rule used at each step, shows the intermediate expression, and then simplifies the result. It can also give second and third derivatives and the slope and tangent line at a point. Everything runs in your browser.
How to use this tool
- Type the function using
^for powers, for examplex^3 - 4x + 1,x^2 sin(x)or(3x+1)/(x^2+1). You may leave out multiplication signs:3x^2 e^x. - Choose the order (first, second or third derivative). Optionally enter a value to get the slope f′ there and the tangent line.
- Read the steps from the top: the outermost rule comes first, followed by the derivatives of the pieces it needs.
Key formulas
d/dx[xⁿ] = n·xⁿ⁻¹(c·f)′ = c·f′, (f ± g)′ = f′ ± g′(f·g)′ = f′·g + f·g′(f/g)′ = (f′·g − f·g′) / g²d/dx[f(u)] = f′(u)·u′(eᵘ)′ = eᵘ·u′, (aᵘ)′ = aᵘ·ln a·u′, (ln u)′ = u′/u(sin u)′ = cos u·u′, (cos u)′ = −sin u·u′, (tan u)′ = sec²u·u′(arcsin u)′ = u′/√(1 − u²), (arctan u)′ = u′/(1 + u²)Worked examples
Differentiate f(x) = x² sin x.
- Let f = x² and g = sin x, so f′ = 2x and g′ = cos x.
- Product rule: f′g + fg′ = 2x·sin x + x²·cos x.
derivative of x^2 sin xDifferentiate f(x) = (3x + 1)/(x² + 1).
- f = 3x + 1 gives f′ = 3; g = x² + 1 gives g′ = 2x.
- Quotient rule: (3(x² + 1) − (3x + 1)·2x)/(x² + 1)².
- Expand the numerator: 3x² + 3 − 6x² − 2x = −3x² − 2x + 3.
derivative of (3x+1)/(x^2+1)Differentiate f(x) = sin(x²).
- Outer function sin u, inner function u = x².
- Derivative of the outer, evaluated at the inner: cos(x²). Derivative of the inner: 2x.
Differentiate f(x) = e^(2x)·cos(3x).
- (e^(2x))′ = 2e^(2x) by the chain rule; (cos 3x)′ = −3 sin 3x.
- Product rule: 2e^(2x)·cos 3x + e^(2x)·(−3 sin 3x).
Differentiate f(x) = ln(x² + 1).
- (ln u)′ = u′/u with u = x² + 1 and u′ = 2x.
How to choose the rule
Look at the last operation you would carry out if you evaluated the function for a number. That operation decides the outermost rule:
- Last step is adding or subtracting → sum rule.
- Last step is multiplying two expressions that both contain x → product rule. If one factor is a constant, use the constant multiple rule instead.
- Last step is dividing by an expression with x → quotient rule. Dividing by a plain number is just a constant multiple.
- Last step is applying a function (sin, ln, a power…) to something more complicated than x → chain rule.
- x appears in both the base and the exponent, as in xˣ → logarithmic differentiation: take ln of both sides first.
Derivative table
| Function | Derivative | Notes |
|---|---|---|
| c (constant) | 0 | Constant rule |
| xⁿ | n·xⁿ⁻¹ | Any real n |
| √x | 1/(2√x) | Power rule with n = 1/2 |
| eˣ | eˣ | |
| aˣ | aˣ·ln a | a > 0 |
| ln x | 1/x | x > 0 |
| log₁₀ x | 1/(x·ln 10) | |
| sin x | cos x | Radians |
| cos x | −sin x | |
| tan x | sec² x | |
| arctan x | 1/(1 + x²) |
Why the answer may look different from your textbook
Equivalent expressions can be written in many ways. 2x·sin x + x²·cos x, x(2 sin x + x cos x) and x² cos x + 2x sin x are the same function. The calculator expands numerators and combines like terms, but it does not apply trigonometric identities such as sin²x + cos²x = 1. If your answer differs, enter a value for x in both versions: equal derivatives give equal numbers.
Common mistakes to avoid
- Differentiating a product factor by factor: (fg)′ is not f′g′. For example (x·x)′ = 2x, but f′g′ = 1.
- Swapping the order in the quotient rule numerator, which flips the sign of the answer.
- Forgetting the inner derivative in the chain rule: (sin 3x)′ = 3 cos 3x, not cos 3x.
- Using the power rule on an exponential: (2ˣ)′ is 2ˣ·ln 2, not x·2ˣ⁻¹.
- Working in degrees. The trig derivative formulas assume radians.
Frequently asked questions
What does a derivative tell you?
How do I find the second derivative?
Can I use other letters as constants?
When should I use logarithmic differentiation?
Does the calculator use the limit definition?
Related tools and guides
References
Educational content. Results are computed in your browser with standard double-precision arithmetic; double-check anything with legal, financial, medical, or safety consequences. Spotted an error? Tell us and we will correct it.