# Basic Differentiation Rules

Differentiation is the process of finding a derivative or gradient function.
Given a function $f(x)$, we obtain $f'(x)$ by differentiating with respect to the variable $x$.
There are a number of rules associated with differentiation. These rules can be used to differentiate more complicated functions without having to resort to the sometimes lengthy method of first principles.
Note that the notations, $\dfrac{d}{dx}f(x)$ and $f^{\prime}(x)$ are the same expressions for the derivatives.

## Differentiating a constant

$f(x) = c$ then $f^{\prime}(x) = 0$

### Example 1

If $f(x)=5$, find $f'(x)$.

\begin{align} \displaystyle f^{\prime}(x) &= 5^{\prime} \\ &= 0 \\ \end{align}

## Differentiating $x^n$

$f(x) = x^n$ then $f'(x) = nx^{n-1}$

### Example 2

If $f(x)=x^7$, find $f^{\prime}(x)$.

\begin{align} \displaystyle f^{\prime}(x) &= (x^7)^{\prime} \\ &= 7x^{7-1} \\ &= 7x^6 \\ \end{align}

## Constant times a function

$f(x) = cu(x)$ then $f'(x) = cu^{\prime}(x)$
Proof,
\begin{align} \displaystyle f^{\prime}(x) &= \lim_{h \rightarrow 0} \dfrac{f(x+h)-f(x)}{h} \\ &= \lim_{h \rightarrow 0} \dfrac{cu(x+h)-cu(x)}{h} \\ &= \lim_{h \rightarrow 0} c \times \dfrac{u(x+h)-u(x)}{h} \\ &= c \lim_{h \rightarrow 0} \dfrac{u(x+h)-u(x)}{h} \\ &= cu'(x) \end{align}

### Example 3

If $f(x)=3x^5$, find $f'(x)$.

\begin{align} \displaystyle f^{\prime}(x) &= (3x^5)^{\prime} \\ &= 3(x^5)^{\prime} \\ &= 3 \times 5x^4 \\ &= 15x^4 \\ \end{align}

$f(x) = u(x) + v(x)$ then $f'(x) = u'(x) + v'(x)$
Proof,
\begin{align} \displaystyle f^{\prime}(x) &= \lim_{h \rightarrow 0} \dfrac{f(x+h)-f(x)}{h} \\ &= \lim_{h \rightarrow 0} \dfrac{u(x+h)+v(x+h) – (u(x)+v(x))}{h} \\ &= \lim_{h \rightarrow 0} \Bigg[\dfrac{u(x+h)-u(x)}{h} + \dfrac{v(x+h)-v(x)}{h}\Bigg] \\ &= \lim_{h \rightarrow 0} \dfrac{u(x+h)-u(x)}{h} + \lim_{h \rightarrow 0}\dfrac{v(x+h)-v(x)}{h} \\ &= u^{\prime}(x) + v^{\prime}(x) \end{align}

### Example 4

If $f(x)=x^4+x^6$, find $f'(x)$.

\begin{align} \displaystyle f^{\prime}(x) &= (x^4+x^6)^{\prime} \\ &= (x^4)’+(x^6)’ \\ &= 4x^{4-1}+6x^{6-1} \\ &= 4x^3+6x^5 \\ \end{align}

### Example 5

If $f(x)=\sqrt{x}$, find $f'(x)$.

\begin{align} \displaystyle f(x) &= x^{\frac{1}{2}} \\ f^{\prime}(x) &= \dfrac{1}{2}x^{\frac{1}{2}-1} \\ &= \dfrac{1}{2}x^{-\frac{1}{2}} \\ &= \dfrac{1}{2\sqrt{x}} \end{align}

### Example 6

If $f(x)=\dfrac{1}{x^2}$, find $f'(x)$.

\begin{align} \displaystyle f(x) &= x^{-2} \\ f^{\prime}(x) &= -2x^{-2-1} \\ &= -2x^{-3} \\ &= -\dfrac{2}{x^3} \end{align}

### Example 7

If $f(x)=\dfrac{1}{\sqrt{x}}$, find $f'(x)$.

\begin{align} \displaystyle f(x) &= x^{-\frac{1}{2}} \\ f^{\prime}(x) &= -\dfrac{1}{2}x^{-\frac{1}{2}-1} \\ &= -\dfrac{1}{2}x^{-\frac{3}{2}} \\ &= -\dfrac{1}{2\sqrt{x^3}} \end{align}

### Example 8

If $f(x)=x\sqrt{x}$, find $f'(x)$.

\begin{align} \displaystyle f(x) &= x^{\frac{3}{2}} \\ f^{\prime}(x) &= \dfrac{3}{2}x^{\frac{3}{2}-1} \\ &= \dfrac{3}{2}x^{\frac{1}{2}} \\ &= \dfrac{3}{2}\sqrt{x} \end{align}

### Example 9

If $f(x)=\dfrac{2x-1}{x}$, find $f'(x)$.

\begin{align} \displaystyle f(x) &= 2-\dfrac{1}{x} \\ &= 2-x^{-1} \\ f^{\prime}(x) &= x^{-1-1} \\ &= x^{-2} \\ &= \dfrac{1}{x^2} \end{align}