Symbolic derivative of any polynomial, trig, exponential, or logarithmic expression. Optional numerical evaluation at a point.
MATH
Take the symbolic derivative of any polynomial, trigonometric, exponential, or logarithmic expression, then optionally evaluate the result at a specific point. Supports x^n, sin/cos/tan, exp, ln, sqrt, and the standard arithmetic operators.
The calculator parses your expression into an abstract syntax tree, then applies derivative rules recursively: power rule (d/dx[x^n] = n·x^(n-1)), product rule (uv) = u'v + uv', quotient rule (u/v) = (u'v - uv')/v², chain rule (f(g(x))) = f'(g(x))·g'(x), and standard derivatives for sin/cos/tan/exp/ln. After differentiation, a simplification pass collapses arithmetic constants and removes identity operations (×1, +0, ^1).
Disclaimer: Single-variable derivatives only. Higher-order derivatives require applying the calculator multiple times. Trigonometric arguments are in radians. Implicit differentiation and partial derivatives are not supported.
Calculator information
📋 How to use this calculator
Enter the function f(x) in standard notation, for example: x^2 + 3*x - 5 or sin(x)*exp(x).
Enter the point x at which the derivative should be evaluated, e.g. x = 2.
Select the derivative order: 1 (f'), 2 (f''), or 3 (f''').
Adjust the step h if needed (default 1e-5, optimal precision for central difference).
Press Calculate to obtain the numerical f'(x) and visualize the tangent line.
Review the table of basic derivative rules (polynomial, sin, cos, exp, ln) and the chain/product rules. Tip: a step size that is too small (<1e-10) can cause floating-point errors; central difference with h=1e-5 is generally optimal.
🧮 Numerical Central Difference & Basic Derivative Rules
Result: f'(2) = 10. The tangent line at (2, 5) has a slope of 10, with equation: y = 10x - 15.
❓ Frequently asked questions
What is the difference between central, forward, and backward difference?
Forward: (f(x+h)-f(x))/h, error O(h). Backward: (f(x)-f(x-h))/h, error O(h). Central: (f(x+h)-f(x-h))/(2h), error O(h^2), the most accurate. Forward/backward are used at the domain edge when x-h or x+h is undefined. Central cannot be used at left/right endpoints.
When are numerical derivatives less accurate?
Numerical derivatives are problematic when: 1) The function is not smooth or has discontinuities near x, 2) The function oscillates rapidly (sin(1/x) near 0), 3) h is too large (high truncation error) or too small (round-off floating-point dominates). For symbolic functions, use a CAS like SymPy or Wolfram Alpha for exact derivatives.
What are real-life applications of derivatives?
Derivatives measure rates of change: velocity = derivative of position with respect to time; acceleration = derivative of velocity. In economics: marginal cost = derivative of total cost; marginal revenue = derivative of revenue. In engineering/optimization: critical points (f'=0) for minima/maxima of cost, profit, or efficiency. In medicine: tumor growth rate, drug elimination rate (pharmacokinetics).
What are partial derivatives for multivariable functions?
Partial derivative df/dx measures the change in f with respect to x while holding other variables constant. For example, f(x,y) = x^2 + 3xy; df/dx = 2x + 3y, df/dy = 3x. This calculator focuses on single-variable functions; for multivariable, use Wolfram Alpha, SymPy, or Mathematica. Gradient and divergence are multivariable generalizations.
What is the chain rule and when is it used?
The chain rule is for derivatives of composite functions: if y = f(g(x)), then dy/dx = f'(g(x)) * g'(x). For example, y = sin(x^2); dy/dx = cos(x^2) * 2x = 2x*cos(x^2). The chain rule is critical in neural-network backpropagation: the gradient of the loss with respect to parameters is computed using layered chain rule from output back to input.