Derivative rules make differentiation efficient once the limit definition is understood. The correct rule depends on how an expression is assembled: as a sum, product, quotient, composition or implicit relation.

On this page (11 sections)

Derivative rules match expression structure

Each derivative rule applies to a particular operation used to build a function.

Read the outermost operation first. The expression ( x 2 + 1 ) ( x 3 − 2 ) (x^2+1)(x^3-2) is a product; ( 3 x − 1 ) 5 (3x-1)^5 is a composition; ( x 2 + 1 ) / ( x − 1 ) (x^2+1)/(x-1) is a quotient. Similar-looking symbols can therefore need different rules.

The rules assume the component derivatives exist at the points where they are used; differentiability must be checked separately. Domain restrictions survive simplification. A derivative formula cannot create a value at an input excluded from the original function.

Constant, sum and power rules

Core derivative rules
Core derivative rules
FunctionDerivativeConditions
c c 0 0Constant c c.
x n x^n n x n − 1 nx^{n-1}For real n n, use x > 0 x>0. Integer powers also apply on their differentiability domains.
c f ( x ) cf(x) c f ′ ( x ) cf'(x)Constant c c; f f differentiable.
f ( x ) + g ( x ) f(x)+g(x) f ′ ( x ) + g ′ ( x ) f'(x)+g'(x)Both functions differentiable.

For example, the derivative of x 7 x^7 is 7 x 6 7x^6.

For a positive integer power, the rule applies to every real input. Negative integer powers exclude zero. For an arbitrary real power, a convenient common setting is x > 0 x>0; fractional powers may have additional real-domain extensions whose endpoints need their own checks.

d d x ( 1 x ) = − 1 x 2 ( x ≠ 0 ) , d d x x = 1 2 x ( x > 0 ) \frac{d}{dx}\left(\frac1x\right)=-\frac1{x^2}\quad(x\ne0),\qquad\frac{d}{dx}\sqrt{x}=\frac1{2\sqrt{x}}\quad(x>0)

Constants use the constant rule, including the case of a function equal to 1. There is no need to interpret an undefined intermediate expression such as 0 x − 1 0\,x^{-1} at zero.

Product rule

If f f and g g are differentiable, both factors contribute to the change in their product:

d d x [ f ( x ) g ( x ) ] = f ′ ( x ) g ( x ) + f ( x ) g ′ ( x ) \frac{d}{dx}[f(x)g(x)]=f'(x)g(x)+f(x)g'(x)

For this example, hold one factor unchanged in each term:

d d x [ ( x 2 + 1 ) ( x 3 − 2 ) ] = 2 x ( x 3 − 2 ) + ( x 2 + 1 ) 3 x 2 \frac{d}{dx}[(x^2+1)(x^3-2)]=2x(x^3-2)+(x^2+1)3x^2
= 5 x 4 + 3 x 2 − 4 x =5x^4+3x^2-4x

Expanding the product first gives x 5 + x 3 − 2 x 2 − 2 x^5+x^3-2x^2-2, whose derivative is the same. This is a useful independent check. Multiplying the two derivatives alone would give 6 x 3 6x^3 and miss both required contributions.

Quotient rule

For differentiable f , g f,g with g ( x ) ≠ 0 g(x)\ne0,

d d x [ f ( x ) g ( x ) ] = f ′ ( x ) g ( x ) − f ( x ) g ′ ( x ) [ g ( x ) ] 2 \frac{d}{dx}\left[\frac{f(x)}{g(x)}\right]=\frac{f'(x)g(x)-f(x)g'(x)}{[g(x)]^2}

In the original fraction, the numerator derivative is 2 x 2x and the denominator derivative is 1:

d d x x 2 + 1 x − 1 = 2 x ( x − 1 ) − ( x 2 + 1 ) ( x − 1 ) 2 \frac{d}{dx}\frac{x^2+1}{x-1}=\frac{2x(x-1)-(x^2+1)}{(x-1)^2}
= x 2 − 2 x − 1 ( x − 1 ) 2 ( x ≠ 1 ) =\frac{x^2-2x-1}{(x-1)^2}\quad(x\ne1)

Subtract the entire second product in the numerator; parentheses protect its signs. Dividing the separate derivatives, 2 x / 1 2x/1, is not a quotient rule.

Chain rule

A composition changes in two stages: the input changes the inner function, and that inner output changes the outer function. If g g is differentiable at x x and f f is differentiable at g ( x ) g(x), the chain rule gives

d d x f ( g ( x ) ) = f ′ ( g ( x ) ) g ′ ( x ) \frac{d}{dx}f(g(x))=f'(g(x))\,g'(x)

Keep the inner expression inside the outer derivative

For sin ⁡ ( x 2 ) \sin(x^2), the outer derivative is cosine and the inner derivative is 2 x 2x:

d d x sin ⁡ ( x 2 ) = cos ⁡ ( x 2 ) ⋅ 2 x \frac{d}{dx}\sin(x^2)=\cos(x^2)\cdot2x

For ( 3 x − 1 ) 5 (3x-1)^5, first differentiate the fifth power, retaining its argument, then multiply by the derivative of 3 x − 1 3x-1:

d d x ( 3 x − 1 ) 5 = 5 ( 3 x − 1 ) 4 ⋅ 3 = 15 ( 3 x − 1 ) 4 \frac{d}{dx}(3x-1)^5=5(3x-1)^4\cdot3=15(3x-1)^4

The inner derivative multiplies the result. It does not replace the argument of the outer derivative.

Exponential, logarithmic and trigonometric rules

Selected common derivatives
Selected derivatives with their domains
FunctionDerivativeCondition
e x e^x e x e^xAll real x x.
a x a^x a x ln ⁡ a a^x\ln a a > 0 a>0 constant.
ln ⁡ x \ln x 1 / x 1/x x > 0 x>0.
sin ⁡ x \sin x cos ⁡ x \cos xRadians.
cos ⁡ x \cos x − sin ⁡ x -\sin xRadians.
tan ⁡ x \tan x sec 2 ⁡ x \sec^2xRadians; cos ⁡ x ≠ 0 \cos x\ne0.

With composition, apply the chain rule as well. Thus d d x e 2 x = 2 e 2 x \frac{d}{dx}e^{2x}=2e^{2x} and d d x ln ⁡ ( x 2 + 1 ) = 2 x x 2 + 1 \frac{d}{dx}\ln(x^2+1)=\frac{2x}{x^2+1}.

The trigonometric derivative formulas in the table use radian inputs. A degree-valued expression such as sin ⁡ ( π x / 180 ) \sin(\pi x/180) has derivative ( π / 180 ) cos ⁡ ( π x / 180 ) (\pi/180)\cos(\pi x/180) with respect to the numerical degree variable x x.

The logarithm ln ⁡ x \ln x requires x > 0 x>0. For ln ⁡ ( x 2 + 1 ) \ln(x^2+1) the argument is positive for every real input, so its derivative is defined everywhere. If a > 0 a>0 is constant, d ( a x ) / d x = a x ln ⁡ a d(a^x)/dx=a^x\ln a; the special base e e has ln ⁡ e = 1 \ln e=1.

Implicit differentiation

Some relations do not conveniently solve for y first. Differentiate both sides with respect to x while treating y as a function of x. From x 2 + y 2 = 25 x^2+y^2=25:

2 x + 2 y d y d x = 0 2x+2y\frac{dy}{dx}=0

So d y d x = − x y \frac{dy}{dx}=-\frac{x}{y} where y≠0. At points with y=0 the graph has vertical tangents instead of finite slopes.

The circle is not globally the graph of one function y = f ( x ) y=f(x), but its upper and lower arcs can be treated as local functions where y ≠ 0 y\ne0. At ( 3 , 4 ) (3,4) the slope is − 3 / 4 -3/4, so the tangent is y − 4 = − 3 4 ( x − 3 ) y-4=-\tfrac34(x-3).

The factor d y / d x dy/dx appears because y 2 y^2 is a composition with y ( x ) y(x). Treating y y as a constant while differentiating with respect to x x would discard the dependence that defines the curve.

Higher derivatives

Differentiating again gives the second derivative, written f ″ ( x ) f”(x). It measures how the first derivative changes and supports acceleration and concavity analysis. For f ( x ) = x 4 f(x)=x^4, f ″ ( x ) = 12 x 2 f”(x)=12x^2.

f ( x ) = x 4 , f ′ ( x ) = 4 x 3 , f ″ ( x ) = 12 x 2 f(x)=x^4,\quad f'(x)=4x^3,\quad f”(x)=12x^2

A second derivative is not the square of the first derivative. Here [ f ′ ( x ) ] 2 = 16 x 6 [f'(x)]^2=16x^6, which is a different function. When the input carries a unit, each further differentiation divides by that input unit again. Squaring a derivative is a different operation.

Related topics

Applications of Derivatives uses these formulas to analyse rates of change, extrema and curve shape. Differentiation develops the underlying limit definition.

Practice questions

  1. Differentiate ( 3 x − 1 ) 5 (3x-1)^5.

  2. Differentiate sin ⁡ ( x 2 ) \sin(x^2) with a radian argument.

  3. For x 2 + y 2 = 25 x^2+y^2=25, find d y / d x dy/dx where y ≠ 0 y\ne0.

Check your answers
  1. The outer derivative is 5 ( 3 x − 1 ) 4 5(3x-1)^4 and the inner derivative is 3. Their product is 15 ( 3 x − 1 ) 4 15(3x-1)^4.

  2. The outer derivative contributes cos ⁡ ( x 2 ) \cos(x^2) and the inner derivative contributes 2 x 2x, giving 2 x cos ⁡ ( x 2 ) 2x\cos(x^2).

  3. Treat y y as a function of x x: 2 x + 2 y ( d y / d x ) = 0 2x+2y(dy/dx)=0. Hence d y / d x = − x / y dy/dx=-x/y where y ≠ 0 y\ne0.

Sources and further reading

These references support the definitions, theorem assumptions and standard conventions used in this article.