Derivative calculator
Type a function of x: get its derivative, the rules used in order and the value at a point.
Use ^ for powers and write products as 2x, x*sin(x) or (x+1)(x−1). Functions: sin, cos, tan, sec, csc, cot, arcsin, arctan, sinh, cosh, ln, log, sqrt, exp, abs; constants pi and e. Angles are in radians; log is base 10, log_2(x) is base 2.
How do I find a derivative?
The derivative f′(x) is the slope of the graph of f at x, defined as the limit of (f(x + h) − f(x)) ÷ h as h approaches 0. In practice you apply rules instead of the limit: constants have derivative 0, (xⁿ)′ = n·xⁿ⁻¹, sums and constant multiples go term by term, (uv)′ = u′v + uv′, (u/v)′ = (u′v − uv′) ÷ v², and the chain rule handles a function inside a function. For k(x) = 5x² ÷ (4x + 3) the quotient rule gives (10x(4x + 3) − 4·5x²) ÷ (4x + 3)² = (20x² + 30x) ÷ (4x + 3)² (OpenStax Calculus Volume 1, Example 3.25). Type 5x^2/(4x+3) above to see the same result with every rule listed.
Which rules does the calculator use, and in what order?
The table lists the rules from the outside in, as you would apply them by hand: sum and difference, constant multiple, product, quotient, power, the chain rule, eᵘ, aᵘ, ln and logarithms to other bases, the six trigonometric functions, the inverse trigonometric functions and the hyperbolic functions. Each row shows the general formula, the piece of your function it was applied to and what it gave. Example: for cos(5x²) the chain rule gives −sin(5x²) · 10x = −10x·sin(5x²) (OpenStax, Example 3.52). A power with a variable exponent such as x^x is handled by logarithmic differentiation: (uᵛ)′ = uᵛ(v′ ln u + v u′ ÷ u).
How do I type a function?
Use x as the variable, ^ for powers, and write products as 2x, x*sin(x) or x sin(x). Functions: sin, cos, tan, sec, csc, cot, arcsin, arccos, arctan (also asin, acos, atan), sinh, cosh, tanh, ln, log, sqrt, cbrt, exp, abs; constants pi and e. sin^2(x) means the square of sin(x), but sin x^2 is refused because it is ambiguous: write sin(x^2) or sin(x)^2. Division and implicit multiplication share one rank, read left to right, so 1/2x is (1/2)·x; write 1/(2x) for the other reading. The calculator shows how it read your input so you can catch such cases. Angles are in radians, ln is the natural logarithm, log is base 10 as on a calculator, and log_2(x) is base 2.
How is the answer checked?
If you give a value of x, the calculator compares the symbolic derivative at that point with a numerical estimate built from the function values on both sides of the point (a central difference refined by Richardson extrapolation) and prints “checked numerically” when they agree. The symbolic rules were also compared with the same numerical estimate on more than a hundred different functions at many points, and the worked examples of OpenStax chapter 3 are part of the automated tests. A numerical check is strong evidence, not a proof, and for functions that change extremely fast the estimate itself can be unreliable; the page then says so instead of claiming a match.
What are the second, third and fourth derivatives for?
The second derivative f″ is the rate of change of the slope: it tells whether the graph bends up or down. For a position s(t), the first derivative is the velocity and the second is the acceleration. For s(t) = 2 − sin t the velocity is −cos t and the acceleration is sin t, so at t = π/4 they are −1/√2 and 1/√2, which means the particle is slowing down (OpenStax, Example 3.47). The derivatives of sin x repeat with period 4: sin x, cos x, −sin x, −cos x, sin x (Example 3.45).
Why does it say a derivative is not defined at a point?
A function can be perfectly defined at a point and still have no derivative there. |x| has a corner at 0, the cube root has a vertical tangent at 0, and √x is not defined to the left of 0, so its slope at 0 does not exist as a two-sided limit. The calculator reports this instead of printing a misleading number. Division by zero, ln of a non-positive number or √ of a negative number in the function itself are reported as errors.
What is the difference between ln, log and log base b?
ln is the natural logarithm, with base e; its derivative is 1/x. log(x) is the base-10 logarithm (the log key of a calculator), and log_b(x) is the logarithm to any positive base b other than 1. The derivative of log_b(x) is 1 ÷ (x ln b), and of bˣ it is bˣ ln b (OpenStax §3.9). For example the slope of y = log_2(3x + 1) at x = 1 is 3 ÷ (4 ln 2) ≈ 1.0820, which equals 3 ÷ ln 16 (Example 3.80).
What are the most common mistakes when differentiating?
Three come up again and again. First, the derivative of a product is not the product of the derivatives, and the derivative of a quotient is not the quotient of the derivatives; use the product and quotient rules (OpenStax §3.3 shows (x³)′ ÷ (x)′ = 3x² would be the wrong answer for the derivative of x²). Second, forgetting the derivative of the inside function in the chain rule: (sin 3x)′ is 3 cos 3x, not cos 3x. Third, using the power rule on a constant raised to a variable power: the power rule does not apply to 3ˣ, whose derivative is 3ˣ ln 3 (OpenStax §3.3 and §3.9). Typing the function and reading the table of rules is a quick way to find which step you skipped.
Sources: OpenStax, Calculus Volume 1, chapter 3 “Derivatives”: section 3.3 “Differentiation Rules”, 3.5 “Derivatives of Trigonometric Functions”, 3.6 “The Chain Rule”, 3.7 “Derivatives of Inverse Functions” and 3.9 “Derivatives of Exponential and Logarithmic Functions” (worked examples used as automated tests). Related: integral calculator, equation solver, polynomial calculator, log calculator, exponent calculator, scientific calculator and line equation calculator (tangent lines).