Calculating Derivatives by Definition

This page on calculating derivatives by definition is a follow-up to the page An Intuitive Introduction to the Derivative. On that page, we arrived at the limit definition of the derivative through two routes: one using geometric intuition and the other using physical intuition.

Let's restate that definition. Given a function f, the derivative of that function at a point x equals:

The definition of the derivative

On that introductory page, I used Δx instead of h. Now I will be using h because it is easier to manipulate it algebraically, and we'll be doing a lot of manipulations. Let's examples of how to apply this definition to actually calculate the derivative of a function.

Example 1: Derivative of a Constant

Let's calculate the derivative by definition of the simplest of functions, a constant. That is, we consider

where c is a constant. There is only one thing to do, apply the definition. As the function is constant, we have that

This implies that the difference in the numerator of the definition equals zero

This make the calculation really easy

The derivative of a constant is zero. This is a very important fact that you will use all the time. And it makes intuitive sense also, both geometrically and physically.

The derivative gives the rate of change of the function. As the constant doesn't change, its rate of change equals zero. Geometrically, the graph of a constant function equals a straight horizontal line. Hence, its slope equals zero.

Example 2: Derivative of f(x)=x

Now, let's calculate, using the definition, the derivative of

After the constant function, this is the simplest function I can think of. In this case the calculation of the limit is also easy, because

Then, the derivative is

The derivative of x equals 1. 

Example 3: Derivative of f(x)=x²

This example will make us work just a little bit more than the others. We consider the function:

In this case we have that

Replacing this expression into the limit, we get

This limit can be solved by factoring h

The derivative of x² is 2x.

Example 4: Derivative of a Sum

Let's now use the definition to deduce a simple rule for derivatives. Let's say we have a function F that is the sum of two other functions, f and g:

We'll try to calculate the derivative of F in terms of the derivatives of f and g. As one might expect, the derivative of F equals the sum of the derivatives of f and g. To prove that, we do the only thing that we can do, use the definition

We have that:

Let's replace these two expressions in the definition of the derivative

Now let's reorder the terms in the numerator to make evident where the derivatives of f and g will appear

And in fact we can break down this expression into two limits

What we proved is the following

That is, the derivative of a sum is the sum of the derivatives of each term. For example, let's consider the function:

We know the derivative of each term, so the derivative of the sum is:

The same rule applies for differences, because we can think of a difference as a sum in disguise.

Example 5: Derivative of a Constant Times a Function

Let's consider a function of the type

where c is a constant. Let's calculate the derivative of F in terms of the derivative of f. We have that

We can factor the constant c and take it out of the limit sign

That is, we can take constants out, as with limits, when calculating derivatives. For example,

Example 6: Derivative of f(x)=xn (the power rule)

This example is what is called the power rule. We'll calculate the derivative of x raised to the n-th power

This rule is very important because it allows us to calculate the derivative of any polynomial function. Let's get down to it. As always, we apply the definition

Now we have a problem, how do we expand the following

There is a theorem in algebra that solves our problem. It is the binomial theorem. To learn about it, or just to recall if you already know it, I recommend you KhanAcademy's video on the binomial theorem. The binomial theorem says the following:

The binomial theorem

Replacing a=x and b=h in the preceding formula, we get that

Applying the binomial theorem to calculate the derivative

If we subtract x to the n-th power to both sides we get

We obtain an expression for the difference in the numerator of the definition of the derivative

Now, if we divide both sides by h, we get

We obtain an expression for the quotient, dividing both sides by h. A bunch of things cancel out

If we take the limit as h approaches infinity of both sides, in the left side we get the derivative of f, and in the right side a bunch of things approach zero. Notice that the first term in the right does not have an h, so we can take it out of the limit sign:

We take the limit to obtain the derivative. The first factor comes out of the limit sign, because it doesn't have an h

Pay attention to the factors highlighted in pink. These are powers of h, that will approach zero as h approaches zero. The etc represents a bunch of terms that have higher powers of h in the numerator.

So, all the terms, starting from the second, will approach zero when h approaches zero

When h approaches 0, all terms except the first approach zero

Using Leibniz notation

The power rule in Leibniz notation

This is the hardest proof we have done so far, but it is very important. This rule includes the special case of f(x) = x² that we calculated earlier. Let's try to understand how to apply this rule.

This rule is somewhat similar to the rule for logarithms of powers: you take the power "down", and then lower the power of x by 1. 

power rule explanationThe Power Rule: Take down the exponent and then subtract one to it

As I said earlier, this important rule allows us to calculate the derivative of any polynomial. For example:

Example 7: The Derivative of f(x) = 1/(1+x)

Let's do one more. This one can't be calculated using the power rule. 

Notice that all the derivatives we calculated thus far were of polynomial functions. This means that we could have calculated all of them using the power rule. This one isn't a polynomial. So, we must use the definition. We have that

Now, we can add the fractions in the numerator

This fraction can be simplified a bit more

And now, we only need to make h equal to zero to obtain the value of the limit

Exercises

Now, here are some problems for you to solve. First there are some problems where you'll need to apply the power rule. Then there are some problems where you'll need to use the definition to find the derivative of some functions.

If you have doubts or want to discuss a problem, leave a comment below.

Power Rule Exercises

Find the derivative of the following polynomial functions using the power rule.

Derivatives by Definition Exercises

Find the derivative of the following functions using the definition.

Share this page:

New! Comments

Do you have a doubt, or want some help with a problem? Leave a comment in the box below.