GALAXY OF TOOLS

SCIENCE SECTOR

Derivative Calculator

Differentiate any expression symbolically: nth and partial derivatives, value at a point, tangent line, graph and LaTeX.

Try:

Use ^ for powers, * for products, functions such as sin, cos, tan, exp, ln/log, sqrt, abs, asin, sinh; constants pi and e.

fderivativetangent at the point

How it was differentiated

    Runs entirely in your browser. Nothing you enter or upload is sent to a server.

    A derivative calculator that differentiates symbolically and checks itself

    This derivative calculator differentiates any expression you type — polynomials, trigonometric and inverse trigonometric functions, exponentials and logarithms, square roots, hyperbolic functions and any combination of them — and returns the derivative as a simplified formula, not just a number. Ask for the second, third or nth derivative, take a partial derivative with respect to any variable in a multivariable expression, and evaluate the result at a point you choose.

    For every first derivative the page also computes the tangent line, the slope angle and a numerical central-difference check, so you can be confident the symbolic answer is right. An SVG graph shows f, its derivative and the tangent line around the chosen point, which is the quickest way to understand what a derivative means: where f rises the derivative is positive, where f peaks it crosses zero.

    Differentiation is done in your browser by math.js (Apache-2.0), a symbolic maths library loaded once from a CDN. Nothing you type is sent anywhere.

    How to use the Derivative Calculator

    1. Type the function in the “Function f” box, for example x^3 * sin(x) or ln(x^2 + 1). Use ^ for powers and brackets around function arguments.
    2. Pick the variable to differentiate with respect to. The menu lists every variable found in the expression, so x^2*y^3 offers x and y for partial derivatives.
    3. Choose the order (1st to 5th derivative). Each intermediate derivative is listed in the details table.
    4. Enter the point for evaluation as x = 1 (add , y = 2 for other variables). The value of f and f′ there, the tangent line and the graph update instantly.
    5. Copy the LaTeX form of the derivative or the plain-text result with the buttons under the answer.

    Derivative Calculator features

    Symbolic result, simplified

    Returns formulas such as 3·x²·sin(x) + x³·cos(x), after algebraic simplification, and shows the unsimplified form for comparison.

    Rules named

    The steps say which rules were used — power, product, quotient, chain, exponential, logarithmic and trig derivatives — matching how the problem would be done by hand.

    Higher-order and partial derivatives

    Up to the fifth derivative, and ∂/∂x, ∂/∂y … for expressions in several variables with the other variables held constant.

    Evaluation, tangent and slope angle

    f(a), f′(a), the tangent line y = f(a) + f′(a)(x − a) and its angle to the x-axis in degrees.

    Numerical self-check

    A central-difference estimate (h = 10⁻⁵) is compared with the symbolic value and flagged if they disagree — useful at kinks such as |x| at 0.

    Graph of f and f′

    A resolution-independent SVG plot with the tangent drawn at the chosen point; set the half-width to zoom.

    Differentiation rules the calculator applies

    RuleFormulaExample
    Power rule(xⁿ)′ = n·xⁿ⁻¹(x⁴)′ = 4x³
    Constant multiple and sum(c·u ± w)′ = c·u′ ± w′(3x² − 5x)′ = 6x − 5
    Product rule(u·w)′ = u′w + uw′(x³ sin x)′ = 3x² sin x + x³ cos x
    Quotient rule(u/w)′ = (u′w − uw′)/w²((x²+1)/(x−1))′ = (x² − 2x − 1)/(x−1)²
    Chain rule(f(u))′ = f′(u)·u′(ln(x²+1))′ = 2x/(x²+1)
    Exponential and log(eᵘ)′ = eᵘ·u′, (aᵘ)′ = aᵘ ln a·u′, (ln u)′ = u′/u(e²ˣ)′ = 2e²ˣ
    Trigonometricsin′ = cos, cos′ = −sin, tan′ = sec²(sin 3x)′ = 3 cos 3x

    Worked example: f(x) = x³·sin(x) at x = 1

    The function is a product of u = x³ and w = sin x, so the product rule applies: f′ = u′w + uw′ = 3x²·sin x + x³·cos x. At x = 1, f(1) = sin 1 ≈ 0.841471 and f′(1) = 3 sin 1 + cos 1 ≈ 3.064715. The tangent line is therefore y = 0.841471 + 3.064715(x − 1), or y = 3.064715x − 2.223244, with a slope angle of about 71.9°. The central-difference check (f(1.00001) − f(0.99999))/0.00002 gives the same 3.064715, confirming the symbolic result.

    Differentiating again with the product rule on each term gives f″ = 6x sin x + 6x² cos x − x³ sin x, which the calculator produces when you select “2nd derivative”.

    Partial derivatives and limitations

    When the expression contains more than one variable, the derivative is taken with respect to the selected one and every other symbol is treated as a constant. For f(x, y) = x²y³ + sin(xy), ∂f/∂x = 2xy³ + y·cos(xy) and ∂f/∂y = 3x²y² + x·cos(xy). Mixed partials such as ∂²f/∂x∂y can be obtained by differentiating the first result again with the other variable.

    • Implicit differentiation (finding dy/dx from an equation in x and y) is not supported directly; differentiate each side with respect to x and solve for y′ with the equation solver.
    • Functions such as the gamma function or piecewise definitions cannot be differentiated symbolically here. Where a function is not smooth (|x| at 0, cube roots at 0) the numeric check will disagree with the symbolic one-sided answer.
    • Simplification is algebraic, not canonical: an answer may be written differently from your textbook but evaluates to the same value — compare the numbers at a few points if in doubt.
    • For the reverse operation use the integral calculator, and for roots of f′ (critical points) paste the derivative into the equation solver.

    Derivative Calculator FAQ

    How do I enter a function in the derivative calculator?

    Type it the way you would in a programming language: x^3 * sin(x), e^(2x) * cos(x), ln(x^2 + 1), sqrt(1 - x^2). Multiplication between a number and a variable can be implicit (2x), but write products of variables with * (x*y).

    Can it find the second derivative?

    Yes. Choose “2nd derivative” (up to the 5th). Each intermediate derivative is listed in the details table, and the value of the chosen order at your point is shown.

    Does it do partial derivatives?

    Yes. If the expression contains several variables, pick the one to differentiate with respect to; the rest are held constant. Supply values for all variables in “Evaluate at” to get a number.

    How is the tangent line calculated?

    From the point-slope form y − f(a) = f′(a)(x − a), using the symbolic derivative evaluated at a. The line is drawn dashed on the graph.

    Why does the result look different from my textbook?

    Simplification can leave an equivalent but differently arranged expression — for example 2x·cos(x²) versus cos(x²)·2x. The numeric check and the graph confirm it is the same function.

    Is the derivative exact or numeric?

    The formula is exact, obtained by symbolic differentiation. Only the values at a point, the tangent line and the graph are computed numerically.

    You might also need