Derivative Calculator

Calculate the numerical derivative of a function at a specific point.

f'(x) at this point
—
Enter function and point
f(x)
—
Derivative Formula
—

Quick Examples

Derivative Rules

The derivative measures the rate of change of a function. It represents the slope of the tangent line at any point.

Basic Differentiation Rules

Power Rule: d/dx(x^n) = nx^(n-1)
Constant: d/dx(c) = 0
Sum: d/dx(f+g) = f' + g'

Derivatives of Common Functions

FunctionDerivative
sin(x)cos(x)
cos(x)-sin(x)
tan(x)sec²(x)
e^xe^x
ln(x)1/x
a^xa^x · ln(a)

Advanced Rules

  • Product Rule: (fg)' = f'g + fg'
  • Quotient Rule: (f/g)' = (f'g - fg')/g²
  • Chain Rule: d/dx[f(g(x))] = f'(g(x))·g'(x)

The Definition: Derivative as a Limit

Formally, the derivative is the limit of the difference quotient:

f'(x) = lim(h→0) [f(x+h) − f(x)] / h

Geometrically, this is the slope of the tangent line touching the graph at x. For f(x) = x³, expanding (x+h)³ and simplifying gives f'(x) = 3x² — the same answer the power rule produces instantly.

Worked Example: Chain Rule

Differentiate sin(x³) with respect to x:

  1. Identify outer and inner: outer = sin(u), inner = u = x³.
  2. Differentiate the outer, leaving the inner untouched: cos(x³).
  3. Differentiate the inner (power rule): 3x².
  4. Multiply: 3x² · cos(x³).

Worked Example: Product Rule

Differentiate x² · eˣ:

  1. Identify u and v: u = x², v = eˣ.
  2. Find u' and v': u' = 2x, v' = eˣ (eˣ is its own derivative).
  3. Apply u'v + uv': 2x·eˣ + x²·eˣ.
  4. Simplify: eˣ(2x + x²).

Worked Example: Quotient Rule

Differentiate (x² + 1)/(x − 1) with respect to x:

  1. Identify u and v: u = x² + 1, v = x − 1.
  2. Find u' and v': u' = 2x, v' = 1.
  3. Apply (u'v − uv')/v²: [2x(x−1) − (x²+1)] / (x−1)².
  4. Simplify: (x² − 2x − 1) / (x − 1)².

Higher-Order Derivatives

Differentiating twice gives the second derivative f''(x), which describes concavity: positive means the graph curves upward (cup-shaped), negative means it curves downward. Points where concavity changes are inflection points. In physics, if position is f(x), then f'(x) is velocity and f''(x) is acceleration. For f(x) = x³: f'(x) = 3x², f''(x) = 6x — concave down for x < 0, concave up for x > 0, with an inflection point at x = 0.

Implicit Differentiation

When x and y are mixed in an equation like x² + y² = 25, you cannot isolate y easily. Differentiate both sides with respect to x, attaching dy/dx to every y term via the chain rule, then solve: 2x + 2y·dy/dx = 0, so dy/dx = −x/y.

What Derivatives Are Used For

  • Optimization: setting the first derivative to zero locates maxima and minima — maximizing profit or minimizing cost.
  • Motion: velocity is the derivative of position; acceleration is the derivative of velocity.
  • Economics: marginal cost and marginal revenue are derivatives of cost and revenue functions.
  • Related rates: how fast a balloon's volume changes as its radius grows, for example.

Derivatives of More Functions

FunctionDerivative
1/x−1/x²
√x1/(2√x)
sec(x)sec(x)·tan(x)
csc(x)−csc(x)·cot(x)
cot(x)−csc²(x)
arcsin(x)1/√(1−x²)
arctan(x)1/(1+x²)

Common Mistakes

  • Forgetting the inner derivative in the chain rule: d/dx[sin(x³)] is 3x²·cos(x³), not cos(x³).
  • Using the power rule on eˣ: its derivative is eˣ, not x·e^(x−1).
  • Splitting products term by term: (fg)' is f'g + fg', not f'·g'.
  • Quotient rule order: it is (f'g − fg')/g² — the minus sign and the order matter.
  • Leaving constants undifferentiated: d/dx[5] = 0, always.

Worked Example: Second Derivative Test

Find and classify the critical points of f(x) = x³ − 3x:

  1. First derivative: f'(x) = 3x² − 3 = 0 → x = 1 or x = −1.
  2. Second derivative: f''(x) = 6x.
  3. At x = 1: f''(1) = 6 > 0 → concave up → local minimum, f(1) = −2.
  4. At x = −1: f''(−1) = −6 < 0 → concave down → local maximum, f(−1) = 2.

Exponential and Logarithmic Bases

FunctionDerivative
aˣ (constant a > 0)aˣ·ln(a)
logₐ(x)1 / (x·ln(a))
xˣxˣ·(ln(x) + 1)

The last row comes from logarithmic differentiation: rewrite y = xˣ as ln(y) = x·ln(x), then differentiate implicitly.

Checking Antiderivatives by Differentiating

Differentiation is the fastest way to verify an integral. If someone claims ∫2x·cos(x²) dx = sin(x²) + C, differentiate the answer: d/dx[sin(x²)] = 2x·cos(x²) by the chain rule — confirmed. Whenever an antiderivative looks suspicious, differentiate it; the derivative must return the original integrand.

Notation Guide

NotationNameReads as
f'(x)Lagrange"f prime of x"
dy/dxLeibniz"dee y by dee x"
d/dx[f(x)]Leibniz operator"derivative of f of x"
DₓfEuler"D sub x of f"

Leibniz notation shines for the chain rule — dy/dx = dy/du · du/dx looks like fraction cancellation (though dy/dx is one symbol, not a fraction). Lagrange's f'(x) is compact for higher orders: f'', f'''.

Worked Example: Related Rates

A spherical balloon's radius grows at dr/dt = 2 cm/s. How fast is its volume growing when r = 5 cm?

  1. Volume: V = (4/3)πr³.
  2. Differentiate with respect to time (chain rule): dV/dt = 4πr² · dr/dt.
  3. Substitute: dV/dt = 4π × 25 × 2 = 200π ≈ 628.3 cm³/s.

A Glimpse of Partial Derivatives

For functions of two variables, like f(x, y) = x²y + 3y, the partial derivative ∂f/∂x treats y as a constant: ∂f/∂x = 2xy. Partial derivatives are the foundation of multivariable calculus, optimization in machine learning, and thermodynamics.

Fractional and Negative Exponents

The power rule needs no integer: d/dx[x^(3/2)] = (3/2)x^(1/2), and d/dx[∛x] = d/dx[x^(1/3)] = (1/3)x^(−2/3). Rewrite roots and reciprocals as exponents first, then apply the rule mechanically.

Worked Example: Sum and Difference Rule

Differentiate 4x³ − 2x + 7 term by term:

  1. 4x³ → 4 × 3x² = 12x² (constant multiple rule).
  2. −2x → −2.
  3. 7 → 0 (derivative of a constant).
  4. Result: 12x² − 2.

From First Principles: One More Look

For f(x) = 1/x, the difference quotient gives [(1/(x+h) − 1/x)]/h = [−h/(x(x+h))]/h = −1/[x(x+h)]. Letting h → 0 yields −1/x² — confirming the power-rule shortcut d/dx[x⁻¹] = −x⁻².

Worked Example: Equation of a Tangent Line

Find the tangent line to f(x) = x² at x = 3:

  1. Point: f(3) = 9, so the line passes through (3, 9).
  2. Slope: f'(x) = 2x, so f'(3) = 6.
  3. Line: y − 9 = 6(x − 3), or y = 6x − 9.

The derivative's first and most direct geometric job is supplying that slope.

Derivatives Worth Memorizing

Beyond the rules, these appear constantly: d/dx[ln(x²+1)] = 2x/(x²+1) by the chain rule, d/dx[x·ln(x)] = ln(x) + 1 by the product rule, and d/dx[e^(−x²)] = −2x·e^(−x²). Recognizing these patterns on sight saves the most time in exams.

Frequently Asked Questions

What is a derivative?
A derivative measures the instantaneous rate of change of a function. It tells you how fast the output changes when the input changes slightly.
How do I find the derivative of a polynomial?
Use the power rule: multiply each term by its exponent, then reduce the exponent by 1. For 3x² + 2x + 1, the derivative is 6x + 2.