Introductory derivative examples
In this article we first look at a few useful formulae for working with derivatives, and then try differentiating some functions – simple and complicated ones. If you are not looking for worked examples but need the definition of the derivative explained, go to the article on the derivative of a function.
Derivatives of polynomials
First we mention a few formulae that we will need when finding the derivatives of functions in the form of a polynomial. On the left is the elementary function that we want to differentiate, and on the right is the resulting function after differentiating. For the record: c is a constant (so the first line is the constant function) and we differentiate with respect to x.
A few specific examples:
This is a constant function, so we apply the first formula and get:
The linear function f(x) = x has, by the second formula, the derivative
and there is nothing more to explore there. So let’s try differentiating the function
We apply the last formula, substituting the power for c, that is c = 5.
The formula also works for a negative power, so if we want to differentiate the function
we get:
To play around further we will need formulae for adding and multiplying functions. And if we wanted to get the original function back from the differentiated one, we would use integrals.
Derivative of a sum
If we want to differentiate a function that contains some terms added together, we simply differentiate the individual terms and add the partial results. We write it like this:
A simple example: take the function f(x) = x + 5. Its derivative is:
We split the function into two functions, like this:
and simply substituted into the formula. That is, we worked out the derivatives of f1 and f2 and added the results. It works in exactly the same way for subtraction. A more complicated example:
Again we just differentiate the three terms separately and keep them added:
Derivative of a product
Unfortunately, a product is not as easy to deal with as ordinary addition. For the product of two functions we have to use a slightly complicated formula:
A trivial function that contains multiplication is, for example,
The product formula has two functions in it; we get them from this single function s(x) like this: f(x) = 5 and g(x) = x2. Now we just substitute:
We can see that if we have a function in the form
then after differentiating we get
We can generalise this rule and substitute any function in place of the polynomial. So for any function f(x) we have
For example, let’s try differentiating this function:
At the start we first apply the rule for a sum:
We rewrite the terms that are products using the rule we have just stated:
We differentiate the expressions in brackets using the rule for xc.
And finally we just multiply the coefficients:
Derivative of a quotient
The derivative of a quotient is a little more complicated again than the derivative of a product. The formula:
Otherwise the method is similar to the one for a product. So let’s go straight to an example:
The numerator of the fraction is the function f(x) and the denominator is the function g(x). Now we just substitute into the formula:
In the denominator we have the denominator squared, and in the numerator we have the fraction written out according to the formula. Now we differentiate the first and the last bracket. Again there is the rule for a sum, which I will skip and write down the result straight away:
We could simplify this expression further, but that is not important in this chapter.
Derivatives of elementary functions
Now we will state, without further derivation, some formulae for the derivatives of common functions.
Powers and logarithms:
Notice that the derivative of the function ex is again ex. That is not a typo but a handy property, and it has become the basis of many, many jokes.
Trigonometric functions:
A simple example:
Both terms are added, so it is enough to add the derivatives of the two terms. Each term starts with a constant that multiplies the function after it – we know that in this case we only need to differentiate the function and leave the constant alone. Let’s do that:
These are now standard derivatives:
Derivative of a composite function
From the properties of the derivative and from its use in investigating the behaviour of a function we know that, under certain conditions, we can take two differentiable functions, and composing them again gives a differentiable function. We will show how to differentiate such a composite function.
The derivative of a composite function is probably the hardest idea among these basic derivatives. Functions can be composed. You can read more about what a composite function is in the articles What is a function and Domain of a function. Roughly speaking, it means that we pass one function as the input of another function. In symbols it looks like this: h(g(x)). A specific example is
Which two functions are in there? The sine and then the inner function 2x. We cannot just throw the general formula for sin x at this function f, because that formula expects to receive x as its input, not 2x. So the derivative of a composite function is worked out like this:
That is, we differentiate the outer function, leave its input as it is, and multiply by the derivative of the inner function. For our sine example this gives:
The prime only on the sine means that we are differentiating just the sine itself, not the whole expression as on the left-hand side of the equation. The derivative of sine is cosine, so in place of the sine we simply write cosine. And the derivative of 2x is 2:
Another example, a little more complicated.
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. We proceed according to the formula again. Let’s write it out:
We differentiate only the cosine and leave the input of the cosine as it is, that is, we leave the whole logarithm there. We then multiply this whole expression by the derivative of the input, that is, the derivative of the logarithm. Differentiating the cosine gives:
The expression on the right has not changed; we have only differentiated the cosine. Now we get to the derivative of the logarithm. Again it is a composite function, so we apply the composite function formula recursively. We simply copy the left-hand expression:
We differentiate the logarithm and leave its input the same, that is, x2. But we also multiply the whole expression by the derivative of the input, that is, the derivative of x2. The derivative of the logarithm is the fraction 1/x, where we substitute our input x2 for x, and the derivative of x2 is 2x.