Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Derivative Calculator

How to use
  1. Type the function in the f(x)f(x) box, for example x3−3xx^3 - 3x, x2sin⁡(x)x^2\sin(x) or ln⁡(x2+1)\ln(x^2 + 1). Learn more about finding the derivative
  2. Read f′(x)f'(x) under Derivative. How it was found says which rules were used.
  3. The graph shows ff in blue and f′f' in amber. Drawn by the tool lists the derivative as a row of its own. Learn more about reading the two graphs
  4. Drag or zoom the graph to compare the two curves anywhere. Open in Calculator takes both to the graphing calculator.

Derivative
Derivative
f′(x)=3x2−3\displaystyle f'(x) = 3 {x}^{2}-3
How it was found

Differentiate f(x)=x3−3xf(x) = {x}^{3}-3 x term by term with the usual rules.

f′(x)=3x2−3f'(x) = 3 {x}^{2}-3

Drawn by the tool
f′(x)=3x2−3f'(x) = 3 {x}^{2}-3read-only
f(x)=x3−3xf\left(x\right)={x}^{3}-3 x
f′(x)=3x2−3f'(x) = 3 {x}^{2}-3


Finding the derivative

DemoFind a derivative
Step 0 of 4
Type a function of xx in the f(x)f(x) box. The calculator writes its derivative f′(x)f'(x) as a formula, draws it on the graph beside ff, and says in How it was found how it got there. Everything updates as you type.

Any function the site's graphing tools understand can be differentiated: powers and roots, polynomials, fractions, sin⁡\sin, cos⁡\cos, tan⁡\tan and their inverses, exe^x, ln⁡\ln and log⁡\log, absolute value, and any combination of them. The formula is given as the rules produce it; sometimes it is correct but not in its shortest form, and a little algebra tidies it.

Reading the two graphs

Demof and f′ together
Step 0 of 4
    The blue curve is ff and the amber curve is f′f'. Read them together, at the same xx:

  • Where ff rises, f′f' is above the xx-axis; where ff falls, f′f' is below it.
  • Where ff has a top or a bottom, f′f' is zero: it crosses the axis right below that point.
  • Where ff is steepest, f′f' is at its highest or lowest.

  • The height of the amber curve at xx is the slope of the blue curve at xx.

What the derivative is

The derivative of ff at a point is the slope of the curve there: how fast f(x)f(x) changes as xx grows. It is defined as a limit of slopes of secant lines,

f′(x)=lim⁡h→0f(x+h)−f(x)h,f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h},


and its value is the slope of the tangent line at that point. For f(x)=x22f(x) = \frac{x^2}{2} the tangent at x=2x = 2 has slope 22 and the tangent at x=−1x = -1 has slope −1-1: in general f′(x)=xf'(x) = x. Collecting the slope at every xx gives a new function, f′f', the derivative function.
Tangent lines to y=x22y = \frac{x^2}{2}: slope 22 at x=2x = 2, slope −1-1 at x=−1x = -1.

The rules used

    Derivatives are found with a handful of rules, applied again and again:

  • Constant: the derivative of a number is 00.
  • Power rule: ddxxn=nxn−1\dfrac{d}{dx}x^n = n x^{n - 1}, for any real nn; so ddxx=12x\dfrac{d}{dx}\sqrt{x} = \dfrac{1}{2\sqrt{x}}.
  • Sum and constant multiple: differentiate term by term; numbers in front stay in front.
  • Product rule: (uv)′=u′v+uv′(uv)' = u'v + uv'.
  • Quotient rule: (uv)′=u′v−uv′v2\left(\dfrac{u}{v}\right)' = \dfrac{u'v - uv'}{v^2}.
  • Chain rule: (f(g(x)))′=f′(g(x)) g′(x)\big(f(g(x))\big)' = f'(g(x))\,g'(x); so ddxsin⁡(3x)=3cos⁡(3x)\dfrac{d}{dx}\sin(3x) = 3\cos(3x).

  • With the derivatives of the basic functions below, these rules cover every function you can type.

Turning points and the sign of the derivative

Because f′f' is the slope of ff, its sign tells where ff goes up or down, and its zeros mark the candidates for the highest and lowest points.

For f(x)=x34−1.5xf(x) = \frac{x^3}{4} - 1.5x, the derivative is f′(x)=3x24−1.5f'(x) = \frac{3x^2}{4} - 1.5, which is zero at x=±2x = \pm\sqrt{2}. Left of −2-\sqrt{2} it is positive (rising), between the two it is negative (falling), and right of 2\sqrt{2} positive again. So ff has a local top at x=−2x = -\sqrt{2} and a local bottom at x=2x = \sqrt{2} — exactly where the picture shows them.
ff (blue) has its top and bottom where f′f' (dashed amber) is zero.

Derivatives of common functions

  • ddxsin⁡x=cos⁡x\dfrac{d}{dx}\sin x = \cos x and ddxcos⁡x=−sin⁡x\dfrac{d}{dx}\cos x = -\sin x
  • ddxtan⁡x=1cos⁡2x\dfrac{d}{dx}\tan x = \dfrac{1}{\cos^2 x}
  • ddxex=ex\dfrac{d}{dx}e^x = e^x and ddxax=axln⁡a\dfrac{d}{dx}a^x = a^x\ln a
  • ddxln⁡x=1x\dfrac{d}{dx}\ln x = \dfrac{1}{x} and ddxlog⁡ax=1xln⁡a\dfrac{d}{dx}\log_a x = \dfrac{1}{x\ln a}
  • ddxarcsin⁡x=11−x2\dfrac{d}{dx}\arcsin x = \dfrac{1}{\sqrt{1 - x^2}} and ddxarctan⁡x=11+x2\dfrac{d}{dx}\arctan x = \dfrac{1}{1 + x^2}
  • ddx∣x∣=x∣x∣\dfrac{d}{dx}|x| = \dfrac{x}{|x|} for x≠0x \ne 0

  • Try each one in the calculator and compare the two curves: exe^x and its derivative are the same curve, and cos⁡\cos is sin⁡\sin moved a quarter period to the left.

Where the derivative does not exist

    A function has no derivative where its graph has no single slope:

  • A corner: ∣x∣|x| at x=0x = 0 has slope −1-1 on the left and 11 on the right, so there is no slope at the corner itself. The derivative jumps from −1-1 to 11.
  • A vertical tangent: x3\sqrt[3]{x} at x=0x = 0 becomes vertical; its slope grows without bound.
  • A break: where ff is not defined or jumps, as 1x\frac{1}{x} at 00, there is no derivative either.

  • The amber curve shows these places as gaps or jumps.
∣x∣|x| has a corner at 00; its derivative jumps from −1-1 to 11.

The second derivative

Differentiating f′f' again gives the second derivative f′′f'', which tells how the slope itself changes: where f′′>0f'' > 0 the curve bends upward (it is concave up), and where f′′<0itbendsdownward.Pointswheref'' < 0 it bends downward. Points where f''$ changes sign are inflection points.

To get f′′f'', type the derivative from this calculator back into the f(x)f(x) box. In the Graphing Calculator you can draw ff, f′f' and f′′f'' at once by writing f(x)=…f(x) = \ldots and then y=f′(x)y = f'(x) and y=f′′(x)y = f''(x).

Common mistakes

  • Differentiating a product factor by factor. (x2sin⁡x)′≠2xcos⁡x(x^2\sin x)' \ne 2x\cos x; the product rule gives 2xsin⁡x+x2cos⁡x2x\sin x + x^2\cos x.
  • Forgetting the chain rule. (sin⁡3x)′=3cos⁡3x(\sin 3x)' = 3\cos 3x, not cos⁡3x\cos 3x; (ex2)′=2xex2(e^{x^2})' = 2x e^{x^2}.
  • Using the power rule on axa^x. (2x)′=2xln⁡2(2^x)' = 2^x\ln 2, not x 2x−1x\,2^{x - 1}; the power rule is for xnx^n with a fixed exponent.
  • Reading f′f' as ff. Where the amber curve crosses the axis, ff is flat — it is not where ff is zero.
  • Expecting a derivative at a corner. ∣x∣|x| has none at 00.