First Derivative Formulas

The derivative of a function ${y=f(x)}$ is written $y'$ or $f'(x).$ It tells how fast the function changes: $f'(x)$ is the slope of the tangent line to the graph at the point $x.$ By definition

$$f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$

Working out this limit every time would be slow. In practice we use a few rules of differentiation and a table of derivatives of the basic functions. Together they give the derivative of every function that is built from the basic ones. The definition is explained in more detail on the page Derivatives, Differentials.

On this page: Rules of differentiation · Table of derivatives · Solved problems · Common mistakes · Practice problems

Rules of differentiation

In the rules below, $f$ and $g$ are functions of $x$ that have derivatives, and $C$ is a constant, a number that does not depend on $x.$

Derivative of a constant

$$(C)'=0$$

A constant does not change, so its rate of change is zero. For example, if ${y=5},$ then ${y'=0}.$ Also ${(\pi)'=0}$ and ${(\ln 3)'=0},$ because $\pi$ and $\ln 3$ are numbers.

Power rule

$$(x^n)'=n\,x^{n-1}$$

The exponent comes down as a factor, and the new exponent is one less. The rule holds for every real exponent $n,$ not only for whole numbers (for a fractional $n,$ take ${x\gt 0}$).

${(x^3)'}={3x^{3-1}}={3x^2},$   ${(x^{-3})'}={-3x^{-3-1}}={-3x^{-4}}$

For ${n=1}$ the rule gives ${(x)'=1}.$ A root, or a fraction with a power of $x$ in the denominator, is first written as a power:

${(\sqrt{x})'}={\left(x^{\frac12}\right)'}={\frac12x^{-\frac12}}={\frac{1}{2\sqrt{x}}}$

${\left(\frac1x\right)'}={(x^{-1})'}={-x^{-2}}={-\frac{1}{x^2}}$

Constant multiple rule

$$(C\cdot f)'=C\cdot f'$$

A constant factor stays in front of the derivative. Example: ${(7x^3)'}={7\cdot 3x^2}={{21x^2}.}$

Sum and difference rule

$$(f+g)'=f'+g',\qquad (f-g)'=f'-g'$$

The derivative of a sum is the sum of the derivatives. This holds for any number of terms, so a polynomial is differentiated term by term.

Example. Let ${f(x)=x^2+x+1},$ ${g(x)=x^5+7}$ and ${y=f(x)+g(x)}.$ Then

${y'}={(x^2+x+1)'}+{(x^5+7)'}={2x+1+0+5x^4+0}={5x^4+2x+1}$

Product rule

$$(f\cdot g)'=f'\cdot g+f\cdot g'$$

Example.

${(x^2\sin x)'}={(x^2)'\sin x+x^2(\sin x)'}={2x\sin x+x^2\cos x}$

The constant multiple rule is a special case of the product rule. If ${f=C},$ then

${(C\cdot g)'}={C'\cdot g+C\cdot g'}={0\cdot g+C\cdot g'}={C\cdot g'}$

Quotient rule

$$\left(\frac{f}{g}\right)'=\frac{f'\cdot g-f\cdot g'}{g^2},\qquad g\ne 0$$

Mind the order in the numerator: first ${f'\cdot g},$ then minus ${f\cdot g'}.$ For ${f=1}$ the rule gives ${\left(\frac1g\right)'=-\frac{g'}{g^2}}.$

Example.

${\left(\frac{x}{x+1}\right)'}={\frac{1\cdot(x+1)-x\cdot 1}{(x+1)^2}}={\frac{1}{(x+1)^2}}$

Chain rule (derivative of a composite function)

Let ${y=f(u)},$ where ${u=u(x)}$ is itself a function of $x$ (a function of a function). Then

$$\bigl(f(u)\bigr)'=f'(u)\cdot u'$$

First differentiate the outer function as if $u$ were the variable, then multiply by the derivative of the inner function $u.$

Example 1. ${y=\sin(x^2)}.$ Here ${u=x^2}$ and ${f(u)=\sin u},$ so ${f'(u)=\cos u}$ and ${u'=2x}$:

${y'}={\cos(x^2)\cdot 2x}={2x\cos(x^2)}$

Example 2. ${y=(3x+1)^5}.$ The outer function is the fifth power, and the inner one is ${u=3x+1}$ with ${u'=3}$:

${y'}={5(3x+1)^4\cdot 3}={15(3x+1)^4}$

Example 3. When three functions are nested, the rule is applied twice:

${\left(e^{\sin 2x}\right)'}={e^{\sin 2x}\cdot(\sin 2x)'}={e^{\sin 2x}\cdot\cos 2x\cdot 2}={2\cos 2x\cdot e^{\sin 2x}}$

Table of derivatives

The derivatives of the basic (elementary) functions. The last column is the same formula combined with the chain rule, for a function ${u=u(x)}$ in place of $x.$

DerivativeWith the chain rule, ${u=u(x)}$
$(x^n)'=n\,x^{n-1}$$(u^n)'=n\,u^{n-1}\cdot u'$
$(\sqrt{x})'=\frac{1}{2\sqrt{x}}$$(\sqrt{u})'=\frac{u'}{2\sqrt{u}}$
$\left(\frac1x\right)'=-\frac{1}{x^2}$$\left(\frac1u\right)'=-\frac{u'}{u^2}$
$(e^x)'=e^x$$(e^u)'=e^u\cdot u'$
$(a^x)'=a^x\ln a$$(a^u)'=a^u\ln a\cdot u'$
$(\ln x)'=\frac1x$$(\ln u)'=\frac{u'}{u}$
$(\log_a x)'=\frac{1}{x\ln a}$$(\log_a u)'=\frac{u'}{u\ln a}$
$(\sin x)'=\cos x$$(\sin u)'=\cos u\cdot u'$
$(\cos x)'=-\sin x$$(\cos u)'=-\sin u\cdot u'$
$(\tan x)'=\frac{1}{\cos^2x}$$(\tan u)'=\frac{u'}{\cos^2u}$
$(\cot x)'=-\frac{1}{\sin^2x}$$(\cot u)'=-\frac{u'}{\sin^2u}$
$(\arcsin x)'=\frac{1}{\sqrt{1-x^2}}$$(\arcsin u)'=\frac{u'}{\sqrt{1-u^2}}$
$(\arccos x)'=-\frac{1}{\sqrt{1-x^2}}$$(\arccos u)'=-\frac{u'}{\sqrt{1-u^2}}$
$(\arctan x)'=\frac{1}{1+x^2}$$(\arctan u)'=\frac{u'}{1+u^2}$
${(\operatorname{arccot} x)'}={-\frac{1}{1+x^2}}$${(\operatorname{arccot} u)'}={-\frac{u'}{1+u^2}}$

The formulas hold where the functions are defined: ${x\gt 0}$ for $\ln x$ and $\log_a x,$ and for the derivative of $\sqrt{x};$ ${a\gt 0}$ and ${a\ne 1}$ for $a^x$ and $\log_a x;$ ${\cos x\ne 0}$ for $\tan x;$ ${\sin x\ne 0}$ for $\cot x;$ ${-1\lt x\lt 1}$ for the derivatives of $\arcsin x$ and $\arccos x.$ Also ${(\ln|x|)'=\frac1x}$ for every ${x\ne 0}.$ Since ${\frac{1}{\cos^2x}=1+\tan^2x},$ the derivative of $\tan x$ can also be written as ${1+\tan^2x}.$

Solved problems

Problem 1. Find the derivative of ${{f(x)=3x^4-5x^2+7x-2}.}$

Solution: We differentiate term by term, using the power rule and the constant multiple rule:

${f'(x)}={3\cdot 4x^3-5\cdot 2x+7-0}={12x^3-10x+7}$

Problem 2. ${f(x)=10x+4y},$ where $y$ does not depend on $x.$ Find $f'(x).$

Solution: We differentiate with respect to $x.$ The number $y$ does not change when $x$ changes, so $4y$ is a constant and ${(4y)'=0}.$ By the sum rule

${f'(x)}={(10x)'+(4y)'}={10+0}={10}$

Problem 3. Find the derivative of ${y=\sqrt[3]{x^2}+\frac{2}{x^3}}.$

Solution: First we write both terms as powers of $x$: ${y=x^{\frac23}+2x^{-3}}.$ By the power rule

${y'}={\frac23x^{-\frac13}+2\cdot(-3)x^{-4}}={\frac{2}{3\sqrt[3]{x}}-\frac{6}{x^4}}$

Problem 4. Find the derivative of ${y=x^3e^x}.$

Solution: We use the product rule with ${f=x^3}$ and ${g=e^x}$:

${y'}={3x^2\cdot e^x+x^3\cdot e^x}={x^2e^x(x+3)}$

Problem 5. Find the derivative of ${f(x)=\frac{x^{10}}{4.15+\cos x}}.$

Solution: $f$ is the quotient of ${h(x)=x^{10}}$ and ${g(x)=4.15+\cos x}.$ Their derivatives are ${h'(x)=10x^9}$ and ${g'(x)=0-\sin x=-\sin x}.$ The denominator is never 0, because ${\cos x\ge -1}.$ By the quotient rule

${f'(x)}={\frac{h'(x)\cdot g(x)-h(x)\cdot g'(x)}{g^2(x)}}={\frac{10x^9(4.15+\cos x)-x^{10}(-\sin x)}{(4.15+\cos x)^2}}={\frac{10x^9(4.15+\cos x)+x^{10}\sin x}{(4.15+\cos x)^2}}$

Problem 6. Derive the formula ${(\tan x)'=\frac{1}{\cos^2x}}$ with the quotient rule.

Solution: ${\tan x=\frac{\sin x}{\cos x}},$ so

${(\tan x)'}={\frac{(\sin x)'\cos x-\sin x(\cos x)'}{\cos^2x}}={\frac{\cos x\cdot\cos x-\sin x\cdot(-\sin x)}{\cos^2x}}={\frac{\cos^2x+\sin^2x}{\cos^2x}}={\frac{1}{\cos^2x}}$

In the last step we used ${\sin^2x+\cos^2x=1}.$

Problem 7. Find the derivative of ${f(x)=\ln(\sin x)}.$

Solution: This is a composite function: the outer function is the logarithm and the inner one is ${u=\sin x},$ with ${u'=\cos x}.$ By the formula ${(\ln u)'=\frac{u'}{u}}$ from the table:

${f'(x)}={\frac{1}{\sin x}\cdot\cos x}={\frac{\cos x}{\sin x}}={\cot x}$

The function is defined only where ${\sin x\gt 0}.$

Problem 8. Find the derivative of ${y=\sqrt{x^2+1}}.$

Solution: We use the chain rule with ${u=x^2+1}$ and ${(\sqrt{u})'=\frac{u'}{2\sqrt{u}}}$:

${y'}={\frac{(x^2+1)'}{2\sqrt{x^2+1}}}={\frac{2x}{2\sqrt{x^2+1}}}={\frac{x}{\sqrt{x^2+1}}}$

Problem 9. Find the derivative of ${y=\sin^2 3x}.$

Solution: ${\sin^2 3x=(\sin 3x)^2},$ so three functions are nested: the square, the sine and $3x.$ We apply the chain rule twice:

${y'}={2\sin 3x\cdot(\sin 3x)'}={2\sin 3x\cdot\cos 3x\cdot 3}={6\sin 3x\cos 3x}={3\sin 6x}$

In the last step we used ${2\sin\alpha\cos\alpha=\sin 2\alpha}.$

Problem 10. ${f(x)=x^3-2x}.$ Find $f'(2)$ and the equation of the tangent line to the graph of $f$ at the point with ${x=2}.$

Solution: ${f'(x)=3x^2-2},$ so ${f'(2)}={3\cdot 4-2}={10}.$ This is the slope of the tangent line. Since ${f(2)}={8-4}={4},$ the line touches the graph at the point ${(2,\ 4)}.$ Its equation is

${y}={f(2)+f'(2)(x-2)}={4+10(x-2)}={10x-16}$

Common mistakes

MistakeWrongRight
The derivative of a product taken as the product of the derivatives$(x^2\sin x)'=2x\cos x$${(x^2\sin x)'}={2x\sin x+x^2\cos x}$
The same mistake with a quotient$\left(\frac{x}{x+1}\right)'=\frac11=1$$\left(\frac{x}{x+1}\right)'=\frac{1}{(x+1)^2}$
The derivative of the inner function is forgotten$(\sin 3x)'=\cos 3x$$(\sin 3x)'=3\cos 3x$
The power rule used for an exponential function$(2^x)'=x\cdot 2^{x-1}$$(2^x)'=2^x\ln 2$
A number differentiated as a function$(\ln 5)'=\frac15$$(\ln 5)'=0$
Wrong sign$(\cos x)'=\sin x$$(\cos x)'=-\sin x$

Practice problems

Find the derivatives. Try first, then open the answer.

1. ${y=4x^3-6x+1}$

${y'=12x^2-6}$

2. ${y=\frac{1}{x^2}}$

${y'}={(x^{-2})'}={-2x^{-3}}={-\frac{2}{x^3}}$

3. ${y=x\ln x}$

${y'}={1\cdot\ln x+x\cdot\frac1x}={\ln x+1}$

4. ${y=\frac{x^2}{x-1}}$

${y'}={\frac{2x(x-1)-x^2\cdot 1}{(x-1)^2}}={\frac{x^2-2x}{(x-1)^2}}$

5. ${y=e^{-x^2}}$

${y'}={e^{-x^2}\cdot(-2x)}={-2x\,e^{-x^2}}$

6. ${y=\cos(5x+1)}$

${y'}={-\sin(5x+1)\cdot 5}={-5\sin(5x+1)}$

7. ${y=\ln(x^2+4)}$

${y'}={\frac{(x^2+4)'}{x^2+4}}={\frac{2x}{x^2+4}}$

8. ${y=\arctan 2x}$

${y'}={\frac{1}{1+(2x)^2}\cdot 2}={\frac{2}{1+4x^2}}$

9. ${y=x^2\cos x}$

${y'}={2x\cos x+x^2\cdot(-\sin x)}={2x\cos x-x^2\sin x}$

10. ${f(x)=x^4-3x^2}.$ Find $f'(1).$

${f'(x)=4x^3-6x},$ so ${f'(1)}={4-6}={-2}$

You can check your answers with the derivative calculator, which shows every step. See also: Derivative Problems

Feedback   Contact email:
Follow us on   Twitter   Facebook
  Math10 Banners   Math History  
Copyright © 2005 - 2026