Derivatives Part 2

### First Principles

First remember the definition of the derivative function and that it comes from the idea of a slope of a tangent line:

(1)
\begin{align} f'(x)=\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h} \end{align}

If you are clever the derivative of most any function can be found from this formula. Thankfully the SL folk don't have to be that clever. All that must be done at the SL level is derivatives of polynomials. A few examples follow below.

### Example 1

Lets start easy. Take the function $f(x)=2$. The slope of the function is constant and equal to zero at all points. So we'd expect the derivative function to equal zero at all points, i.e. $f'(x)=0$. Using the definition of the derivative.

(2)
\begin{align} f'(x)=\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h}=\lim_{h\rightarrow 0}\frac{3-3}{h} \end{align}
(3)
\begin{align} f'(x)=\lim_{h\rightarrow 0}\frac{0}{h}=0 \end{align}

In this case there is no need to really even evaluate the limit as zero divided by anything non-zero will always be zero. Check! This one makes sense.

### Example 2

New function $g(x)=2x+1$. Once again the slope of this function is constant (as its a straight line). The slope of the function is always equal to 2. So we'd expect $g'(x)=2$. Lets give first principles a go…

(4)
\begin{align} g'(x)=\lim_{h\rightarrow 0}\frac{2(x+h)+1-(2x+1)}{h} \end{align}

Simplifying the numerator…

(5)
\begin{align} g'(x)=\lim_{h\rightarrow 0}\frac{2h}{h} \end{align}

Everything in the numerator other than the 2h cancels. Once again the limit is not really necessary as the h in the numerator will cancel with the h in the denominator. Leaving:

(6)
$$g'(x)=2$$

### Example 3

Last easy one… Try $k(x)=x^2$. For negative values of x the slope of the function is negative. For positive values of x the slope of the function is positive.

(7)
\begin{align} k'(x)=\lim_{h\rightarrow 0}\frac{(x+h)^2-x^2}{h} \end{align}

Expanding (you can almost see the need for the binomial theorem) the numerator and pulling the 3 out front we get:

(8)
\begin{align} k'(x)=\lim_{h\rightarrow 0}\frac{x^2+2hx+h^2-x^2}{h} \end{align}

Simplifying.

(9)
\begin{align} k'(x)=\lim_{h\rightarrow 0}\frac{2hx+h^2}{h} = \lim_{h\rightarrow 0}3(2x+h) \end{align}

Now as h gets really small the first term 2x will not change, however as h gets small the term h will get very small and the limit goes to zero. We have now evaluated the limit leaving:

(10)
$$k'(x)=2x$$

### Example 4

One last one before I get bored… You too?

Take the function $m(x)=x^3$. Apply first principles:

(11)
\begin{align} k'(x)=\lim_{h\rightarrow 0}\frac{(x+h)^3-x^3}{h} \end{align}

First we need to expand the term $(x+h)^3$. Using the Binomial Theorem and Pascal's Triangle to expand the binomial we get:

(12)
$$x^3+3x^2h+3xh^2+h^3$$

Since the exponent is 3 that means we are looking at the 4th row in Pascals Triangle which is 1 3 3 1, which gives us the coefficients above. Pulling the 4 out front the limit now looks like:

(13)
\begin{align} k'(x)=\lim_{h\rightarrow 0}\frac{x^3+3x^2h+3xh^2+h^3-x^3}{h} \end{align}

Simplifying the numerator and dividing by h we get:

(14)
\begin{align} k'(x)=\lim_{h\rightarrow 0} 3x^2+3xh+h^2 \end{align}

As h gets very small the term $3x^2$ will not change as it is independent of h. However, the other two terms will both tend towards zero as h gets small. Thus we can say:

(15)
$$k'(x)=3x^2=3x^2$$

Notice that in the last two examples that the order or value of the exponent decreased by one when taking the derivative $x^2 \rightarrow 2x$ and $x^3 \rightarrow 3x^2$. If you continue working on ever increasing orders of polynomials you'd find that $x^4 \rightarrow 4x^3$ and $x^5 \rightarrow 5x^4$. A clear pattern can be seen that

if $f(x)=ax^n$ then $f'(x)=anx^{n-1}$.

or in the other form of notation:

$\frac{d}{dx}ax^n=anx^{n-1}$

For even more derivatives see Derivatives of More Complex Functions