Introductory examples on derivatives

In this article, we will first show some useful formulas for working with derivatives and then try to solve the derivatives of some functions - both simple and complex. If you're not looking for solved examples but need the definition of a derivative explained, go to the article Derivatives of a Function.

Derivation of polynomials

First, we'll mention a few formulas we'll need when solving for the derivative of a function that is in polynomial form. On the left is the elementary function we want to derivative and on the right is the resulting function after derivation. For the record, c is a constant (so the very first line is a constant function) and we derive from x.

$$\begin{eqnarray} c^\prime&=&0\\ x^\prime&=&1\\ (x^c)^\prime&=&c\cdot x^{c-1} \end{eqnarray}$$

Some concrete examples:

$$f(x)=5$$

This is a constant function, so we apply the first formula and get:

$$f^\prime(x)=0.$$

Thelinear function f(x) = x has a derivative according to the second formula.

$$f^\prime(x)=1,$$

There is nothing further to investigate on this. So let's try to derive the function

$$f(x)=x^5.$$

We apply the last formula, where after c we put the exponent, that is c = 5.

$$f^\prime(x)=c\cdot x^{c-1}=5x^{5-1}=5x^4$$

The formula would also work for a negative exponent, so if we want to zderivate the function

$$f(x)=x^{-7},$$

we get:

$$f^\prime(x)=c\cdot x^{c-1}=-7x^{-7-1}=-7x^{-8}.$$

For further games we will need formulas for adding and multiplying functions. And if we wanted to get the original function back from the zderivative function, we would use integrals.

We'll use the integrals to get the derivative of the addition.

If we want to calculate the derivatives of a function that contains some terms in the sum, we simply calculate the derivatives of the inner terms and add the intermediate results. We write it like this:

$$(f_1(x)+f_2(x))^\prime=f_1^\prime(x)+f_2^\prime(x)$$

For a simple example, consider the function f(x) = x + 5. The derivative of this function would be:

$$f^\prime(x)=x^\prime+5^\prime=1+0=1.$$

We decomposed the function into two functions, as follows:

$$\begin{eqnarray} f_1(x)&=&x\\ f_2(x)&=&5 \end{eqnarray}$$

and we just substituted into the formula. That is, we calculated the derivatives of the function f1 and f2 and added the results. This works identically for subtraction. A more complicated example:

$$f(x)=x^3+x-8$$

Again, we just derive the three terms and leave them in the sum:

$$f^\prime(x)=(x^3)^\prime+x^\prime-8^\prime=3x^2+1+0$$

Derivation of the product

Unfortunately, the product is no longer as easy to solve as ordinary addition, we have to use a slightly complicated formula for the product of two functions:

$$(f(x)\cdot g(x))^\prime=f^\prime(x)\cdot g(x)+f(x)\cdot g^\prime (x)$$

A trivial function that involves multiplication is, for example, the function

$$s(x)=5\cdot x^2$$

In the formula for multiplication we have two functions, we get these from this one function s(x) as follows: f(x) = 5 and g(x) = x2. Now we just add them up slightly:

$$s^\prime(x)=5^\prime\cdot x^2+5\cdot (x^2)^\prime=0\cdot x^2+5\cdot2x=10x$$

We can see that if we have a function of the form

$$f(x)=a\cdot x^c,$$

then we get after collapsing

$$(a\cdot x^c)^\prime=a\cdot (x^c)^\prime=a\cdot c\cdot x^{c-1}.$$

We can generalize this rule further and substitute any function instead of the polynomial. So for any function f(x)

$$(a\cdot f(x))^\prime=a\cdot f^\prime(x).$$

So for an example, let's try deriving this function:

$$f(x)=5x^3-7x^2+10$$

At the beginning of the derivation, we first apply the sum rule:

$$f^\prime(x)=(5x^3)^\prime-(7x^2)^\prime+10^\prime=$$

We decompose the terms in the product according to the last mentioned formula:

$$=5(x^3)^\prime-7(x^2)^\prime+10^\prime=$$

We derive the expressions in parentheses according to the derivation rule xc.

$$=5\cdot3x^2-7\cdot2x+0=$$

Finally, we just multiply the coefficients:

$$=15x^2-14x.$$

Derivation of the quotient

Derivation of the quotient is again a bit more complicated than derivation of the product. Formula:

$$\left(\frac{f(x)}{g(x)}\right)^\prime=\frac{f^\prime(x)\cdot g(x) - f(x)\cdot g^\prime(x)}{g^2(x)}$$

But otherwise the procedure is analogous to that for the product. So now an example:

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

The numerator of the fraction represents the function f(x), the denominator the function g(x). And now we just plug it into the formula:

$$=\frac{(x^2+3x+1)^\prime(2x-1)-(x^2+3x+1)(2x-1)^\prime}{(2x-1)^2}=$$

In the denominator we have the denominator squared, and in the numerator we have the fraction broken down according to the formula. Now we will combine the first and last brackets. Again we have the sum rule there, I'll skip that and write the result straight away:

$$=\frac{(2x+3)(2x-1)-2(x^2+3x+1)}{(2x-1)^2}=\ldots$$

We can still simplify this expression somehow, but that's not important in this chapter.

Derivation of elementary functions

We will now state, without further derivation, some formulas for calculating the derivative of ordinary functions.

Powers and logarithms:

$$\begin{eqnarray} (c^x)^\prime&=&c^x\ln c;\quad c>0\\ (e^x)^\prime&=&e^x\\ (\log_ax)^\prime&=&\frac{1}{x\cdot \ln a};\quad a>0\wedge a\ne1\\ (\ln x)^\prime&=&\frac{1}{x} \end{eqnarray}$$

Note that the derivative of the function ex is again ex, not a typo but a nice feature that has become the basis of many, many jokes.

Goniometric functions:

$$\begin{eqnarray} (\sin x)^\prime&=&\cos x\\ (\cos x)^\prime&=&-\sin x\\ (\tan x)^\prime&=&\frac{1}{\cos^2x}\\ (\mbox{cotan} x)^\prime&=&-\frac{1}{\sin^2x} \end{eqnarray}$$

Some simple example:

$$(3\sin x + 2\ln x)^\prime=$$

The two expressions are in sum, so we just need to add the derivatives of the two expressions. Each expression contains a constant at the beginning that multiplies the function after it - we know that at this point we just need to derivatize the function and not change the constant. We do this:

$$=3(\sin x)^\prime+2(\ln x)^\prime=$$

These are already table values:

$$=3\cos x+2\frac1x=3\cos x+\frac2x.$$

Derivation of a compound function

We know from the properties of the derivative, and from its application to investigating the progress of a function, that under certain conditions we can have two functions that are derivable, and by composing them again we get a function that is derivable. We will show how to calculate the derivatives of such a composite function.

The derivative of a composite function is probably the most difficult concept of these basic derivatives. We can compose functions as such. You can read more about what a composite function is in the articles What is a Function or The Definitional Domain of a Function. Roughly speaking, this means that we pass another function as an argument to one function. A symbolic notation would look like this h(g(x)). A particular function might be, for example

$$f(x)=\sin(2x).$$

What two functions are there? Sine and then the nested function 2x. We can't just graft the general formula sin(x) onto this function f, because it counts on getting x, not 2x, in the argument. So the computation of the derivative of the composite function goes like this:

$$\begin{eqnarray} f(x)&=&h(g(x))\\ f^\prime(x)&=&h^\prime (g(x))\cdot g^\prime(x) \end{eqnarray}$$

That is, we derivatize the outer function and let it take the same argument, and multiply that by the derivative of the inner function. In the case of the sine example, the following would be true:

$$(\sin(2x))^\prime=\sin^\prime(2x)\cdot(2x)^\prime=$$

The comma only on the sine means that we are deriving only the sine itself, we are not deriving the whole expression as in the expression on the left side of the equation. So the derivative of the sine is the cosine, so instead of the sine we just write the cosine. And the derivative of 2x is 2:

$$=\cos(2x)\cdot2=2\cos(2x).$$

Another example, a little more complicated.

$$(\cos(\ln x^2))^\prime=$$

Here we have one more nested function. The outer function is the cosine, the middle one is the logarithm, and the innermost one is the power x2. But we follow the formula again. Let's break it down:

$$=\cos^\prime(\ln x^2)\cdot(\ln x^2)^\prime=$$

We derive only the cosine, we leave the argument of the cosine as is, i.e. we leave the whole logarithm in. We then multiply this whole expression by the derivative of the argument, i.e. the derivative of the logarithm. Derive the cosine and you have:

$$=-\sin(\ln x^2)\cdot(\ln x^2)^\prime=$$

The expression on the right hasn't changed, we've just derivative the cosine. Now let's do the derivative of the logarithm. Again, this is a composite function, so we recursively apply the formula to the composite function. We'll just copy the left expression:

$$=-\sin(\ln x^2)\cdot\ln^\prime x^2\cdot(x^2)^\prime=$$

We derive the logarithm and leave the argument the same, i.e. x2. But we still multiply the whole expression by the derivative of the argument, i.e. the derivative of just x2. The derivative of the logarithm is the fraction 1/x, where we substitute our argument x2 for x and the derivatives of x2 are 2x.

$$=-\sin(\ln x^2)\cdot\frac{1}{x^2}2x=-\sin(\ln x^2)\cdot\frac{2}{x}=-\frac{2\sin(\ln x^2)}{x}.$$