DDerivative Rules

Derivative Rules: The Formulas and When to Use Each

Derivative Rulesphrase

Derivative rules are shortcut formulas that give the derivative f′(x)f'(x) of a function directly, so you never have to compute a limit from scratch. They tell you how fast a function changes at every point.
ddx[xn]=nxn−1,(fg)′=f′g+fg′,(fg)′=f′g−fg′g2,ddxf(g(x))=f′(g(x)) g′(x)\frac{d}{dx}\left[x^n\right]=nx^{n-1},\quad (fg)'=f'g+fg',\quad \left(\frac{f}{g}\right)'=\frac{f'g-fg'}{g^2},\quad \frac{d}{dx}f(g(x))=f'(g(x))\,g'(x)

Derivative rules are shortcut formulas that give you the derivative of a function directly, so you do not have to work through a limit every time you need a slope. The four that do most of the work are the power rule, the product rule, the quotient rule and the chain rule.

Each rule matches a shape of function: a plain power, two things multiplied, one thing divided by another, or one function nested inside another. Once you can recognise the shape, the formula is mechanical. The skill is in choosing the right rule and not skipping a step.

What are derivative rules?

The derivative of a function ff measures how fast its output changes as the input changes. It is defined with a difference quotient and a limit:

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

Geometrically, f′(x)f'(x) is the slope of the tangent line to the graph at that point. Computing that limit for every new function is slow, so mathematicians did it once in general and stored the results as rules.

The word comes from the Latin derivare, “to draw off a stream”, built on rivus, “stream”. A derivative is something drawn off from an original function. Joseph-Louis Lagrange helped fix the French term fonction dérivée in the late 1700s, which is why the prime mark (f′f') is still called Lagrange notation.

What are the basic derivative rules?

Seven rules cover almost everything in a first calculus course. Here they are with cc as a constant and ff, gg as differentiable functions:

  • Constant rule: ddx[c]=0\dfrac{d}{dx}[c]=0
  • Constant multiple rule: (cf)′=c f′(cf)'=c\,f'
  • Sum and difference rule: (f±g)′=f′±g′(f\pm g)'=f'\pm g'
  • Power rule: ddx[xn]=n xn−1\dfrac{d}{dx}[x^n]=n\,x^{n-1}
  • Product rule: (fg)′=f′g+fg′(fg)'=f'g+fg'
  • Quotient rule: (fg)′=f′g−fg′g2\left(\dfrac{f}{g}\right)'=\dfrac{f'g-fg'}{g^2}
  • Chain rule: ddxf(g(x))=f′(g(x))⋅g′(x)\dfrac{d}{dx}f(g(x))=f'(g(x))\cdot g'(x)

The first three are linear bookkeeping: they let you split an expression into terms and pull out any constant multiplier. The last four are the ones that cause mistakes, so most of this page is about them.

Rules are the limit, done once

Every rule above can be proved from the limit definition. Memorising them is not a leap of faith, just a way of reusing work that has already been checked.

How do you use the power rule and sum rule?

The power rule says to bring the exponent down as a multiplier and lower the exponent by one. The sum rule lets you do this term by term. For f(x)=4x3−5x2+7x−9f(x)=4x^3-5x^2+7x-9:

f′(x)=12x2−10x+7f'(x)=12x^2-10x+7

The −9-9 vanishes because a constant has slope 00. The 7x7x becomes 77 because x=x1x=x^1, and 1⋅x0=11\cdot x^0=1.

The rule works for any exponent in the real numbers, not only positive whole numbers. Since x=x1/2\sqrt{x}=x^{1/2}, you get ddxx=12x−1/2=12x\frac{d}{dx}\sqrt{x}=\frac12 x^{-1/2}=\frac{1}{2\sqrt{x}}. A fraction like 1x2\frac{1}{x^2} becomes easy once you rewrite it with a negative exponent: x−2x^{-2} has derivative −2x−3-2x^{-3}, which is −2x3-\frac{2}{x^3}.

A classic non-example: π2\pi^2 is a constant, so its derivative is 00, not 2π2\pi. The power rule needs a variable in the base.

Quick check

What is the derivative of 3x5−4x+103x^5-4x+10?

Product rule vs quotient rule: what is the difference?

Square of side x growing by two strips showing the product rule gives 2x, not 1 times 1
When x·x grows, the square gains two strips of area x·dx each, so the derivative is 2x and not f′g′ = 1.

Both rules handle two expressions that contain xx, but the signs and structure differ. The product rule adds two terms. The quotient rule subtracts, then divides by the square of the denominator.

Product rule Quotient rule
Use when two expressions with xx are multiplied one expression with xx is divided by another
Formula f′g+fg′f'g+fg' f′g−fg′g2\dfrac{f'g-fg'}{g^2}
Does order matter? No, the two terms can swap Yes, because of the minus sign
Common slip writing f′g′f'g' swapping the numerator terms, or forgetting g2g^2

The most common misconception is that the derivative of a product is the product of the derivatives. Test it with f=xf=x and g=xg=x. The true derivative of x2x^2 is 2x2x, but f′g′=1⋅1=1f'g'=1\cdot 1=1. The product rule gets it right: 1⋅x+x⋅1=2x1\cdot x+x\cdot 1=2x.

For a worked product, take x2sin⁡xx^2\sin x:

ddx[x2sin⁡x]=2xsin⁡x+x2cos⁡x\frac{d}{dx}\left[x^2\sin x\right]=2x\sin x+x^2\cos x

For a quotient, take x2+1x−3\dfrac{x^2+1}{x-3}. The numerator is 2x(x−3)−(x2+1)(1)=x2−6x−12x(x-3)-(x^2+1)(1)=x^2-6x-1, so

ddx[x2+1x−3]=x2−6x−1(x−3)2\frac{d}{dx}\left[\frac{x^2+1}{x-3}\right]=\frac{x^2-6x-1}{(x-3)^2}

A rhyme many students use is “low d-high minus high d-low, over the square of what’s below.”

Quick check

Let f(x)=xf(x)=x and g(x)=xg(x)=x. Why is (fg)′(fg)' not equal to f′g′f'g'?

How does the chain rule work?

The chain rule handles a composite function, where an inside function feeds an outside one. The recipe: differentiate the outside function, leave the inside alone, then multiply by the derivative of the inside.

For y=(3x2+5)4y=(3x^2+5)^4, the outside is “raise to the 4th power” and the inside is 3x2+53x^2+5:

y′=4(3x2+5)3⋅6x=24x(3x2+5)3y'=4(3x^2+5)^3\cdot 6x=24x(3x^2+5)^3

In Leibniz notation, with u=3x2+5u=3x^2+5, the rule reads dydx=dydu⋅dudx\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}. The dudu terms look as if they cancel like fractions. That is a helpful memory aid, not a proof.

The usual error is forgetting the final factor 6x6x. If your answer to a nested problem has no derivative of the inside in it, check again.

Try this: Differentiate (x2+1)3(x^2+1)^3 twice. First use the chain rule, which gives 6x(x2+1)26x(x^2+1)^2. Then expand it to x6+3x4+3x2+1x^6+3x^4+3x^2+1 and use the power rule. Both routes should give 6x5+12x3+6x6x^5+12x^3+6x.

Derivative rules for trig, exponential and log functions

Beyond powers, you need a short list of base derivatives. The rules above then combine them.

Function Derivative
sin⁡x\sin x cos⁡x\cos x
cos⁡x\cos x −sin⁡x-\sin x
tan⁡x\tan x sec⁡2x\sec^2 x
exe^x exe^x
axa^x (with a>0a>0) axln⁡aa^x\ln a
ln⁡x\ln x (for x>0x>0) 1x\dfrac{1}{x}

Pages on the derivative of trigonometric functions, the derivative of tan x and the derivative of ln x show where each one comes from.

The big trap here is applying the power rule to an exponential. In x2x^2 the variable is the base. In 2x2^x it is the exponent, and the correct derivative is 2xln⁡22^x\ln 2. The number ee is special because ln⁡e=1\ln e=1, which is why exe^x is its own derivative.

When the inside is more than plain xx, the chain rule joins in. For example, ddxsin⁡(3x)=3cos⁡(3x)\frac{d}{dx}\sin(3x)=3\cos(3x) and ddxe3x=3e3x\frac{d}{dx}e^{3x}=3e^{3x}.

Quick check

A student says the derivative of 2x2^x is x⋅2x−1x\cdot 2^{x-1}. What went wrong?

Which derivative rule should you use first?

Ask what the last operation would be if you evaluated the function for a specific xx. That operation decides the outermost rule.

  1. A sum or difference of pieces: split it and differentiate each piece.
  2. A multiplication of two expressions with xx: product rule.
  3. A division of two expressions with xx: quotient rule.
  4. A function applied to something other than plain xx: chain rule.

Many problems need two rules. Take f(x)=x2e3xf(x)=x^2e^{3x}. The last step is multiplying, so the product rule comes first. Its second factor needs the chain rule:

f′(x)=2x e3x+x2⋅3e3x=x e3x(3x+2)f'(x)=2x\,e^{3x}+x^2\cdot 3e^{3x}=x\,e^{3x}(3x+2)

Simplify before you differentiate whenever you can. The function x3+x5\frac{x^3+x}{5} is just 15x3+15x\frac15x^3+\frac15x, which the power rule handles in one line, with no quotient rule needed.

How is a derivative written in different books?

The same derivative has several names, and which one you see depends on the book and the subject.

  • Lagrange notation: f′(x)f'(x) or y′y', short and common in algebra-based texts and many European courses.
  • Leibniz notation: dydx\dfrac{dy}{dx}, the favourite in most US and UK calculus courses because it makes the chain rule readable.
  • Euler notation: DxfD_x f or DfDf, where the subscript names the variable you differentiate by.
  • Newton notation: y˙\dot{y}, a dot over the variable, used in physics for rates with respect to time.

These all mean the same thing. A good habit is to translate the notation at the start of a problem, so a line like ddx[x3]\frac{d}{dx}[x^3] and (x3)′(x^3)' are read identically.

Where do derivative rules show up in real life?

Whenever something changes, a derivative describes the rate. Velocity is the derivative of position, and acceleration is the derivative of velocity. In economics, marginal cost is the derivative of total cost. In biology and finance, growth rates come from differentiating exponentials.

Optimisation uses derivative rules to find extrema: set f′(x)=0f'(x)=0 and solve to locate the highest or lowest points. The derivative also reverses with integral rules, which is the link between rates and totals, and it powers Taylor series, differential equations and machine learning, where the chain rule is repeated through many layers during backpropagation.

A function with no derivative anywhere

The Weierstrass function, published in 1872, is continuous at every point yet has no derivative at any point. Derivative rules only work where a derivative actually exists.

A smaller surprise: the product rule and chain rule are not separate inventions. The quotient rule follows from them, because fg=f⋅g−1\frac{f}{g}=f\cdot g^{-1}, which is why strong students often keep only three rules in their heads.

Common questions

What are the basic derivative rules?

There are seven that cover most of first-year calculus: the constant, constant multiple, sum and difference, power, product, quotient and chain rules. Add a short table of derivatives for sin⁡x\sin x, cos⁡x\cos x, exe^x and ln⁡x\ln x and you can differentiate almost any function you will meet.

How do you know whether to use the product rule or the chain rule?

Look at the last operation you would perform when evaluating the function. If it is a multiplication, use the product rule. If it is applying a function such as a power, sine or e…e^{\ldots} to an inner expression, use the chain rule.

Why is the derivative of a constant zero?

A constant never changes, so its graph is a flat horizontal line with slope 00. In the limit definition, f(x+h)−f(x)f(x+h)-f(x) is always 00 for a constant, so the limit is 00.

Can you avoid using the quotient rule?

Often, yes. Rewrite fg\frac{f}{g} as f⋅g−1f\cdot g^{-1} and use the product and chain rules, or simplify first. If the denominator is just a number, such as x3+x5\frac{x^3+x}{5}, multiply by its reciprocal and use the power rule.

Does every function have a derivative rule?

Every combination of standard functions (powers, trig, exponentials, logarithms) can be handled by these rules. Some functions have points where no derivative exists at all, such as ∣x∣|x| at x=0x=0, and the rules cannot create a derivative that is not there.

See also