Finding Derivatives Algebraically

By the end of this lecture, you should be able to calculate derivatives of a number of different types of functions algebraically, and be able to relate the algebraic equations for each function and its derivative back to the geometric graph of each function and its properties: polynomials, rational functions, functions with radicals, exponential functions, logarithmic functions, and trigonometric functions.

You should be able to calculate the derivative of a function both by using the limit definition of the derivative, and by using rules for calculating the derivative of a function which are derived from the limit definition. You should be able to understand where these rules come from before you use them.

In particular, in order to apply rules for calculating the derivative, you should be able to identify the underlying structure of functions, by being able to rewrite more complex functions as a composite of simpler functions, and to identify the ways in which each simpler function relate to one another and to the larger function.

You should also be able to calculate higher-order derivatives and to calculate derivatives implicitly.

Definition of the Derivative

Before we get started, let's remind ourselves how we defined the derivative. Remember that all this definition says is that we calculate the slope between two points on the curve, and then take the limit of that slope as the distance between the two points shrinks:

Derivative/instantaneous rate of change, Differentiability (definition)

The derivative, or instantaneous rate of change, of a function f(x) is the limit of the average rate of change between two points on the graph of f(x) as the distance between those two points approaches zero. We often use f '(x) to denote the derivative of f(x). Writing this out more formally, we get:

This equation means that if we want to find the instantaneous rate of change at x=c for f(x), we can calculate the slope between two points:(x,f(x)) and (c,f(c)), and then take the limit as x approaches c. The expression is just the slope of the line passing through these two points. We can see a visual representation of this relationship in the graph below. As the green point (x,f(x)) gets closer and closer to the blue point (c,f(c)), the slope will approach the slope of the red line (which represents the derivative of f(x) at x=c.

There is another way that we can write the same thing, but this time stressing a slightly different aspect of the relationship between the two points. If we label the point where we want to calculate the derivative (x,f(x)), we can then choose another point on the graph of f(x) just by picking some point that is a small distance away in the x-direction: We call that distance from (x,f(x)) in the x-direction Δx ("delta x"), and so the point on the graph which is Δx away from (x,f(x)) will be the point (x+Δx,f(x+Δx)). Be careful! Δx is one variable, even though it has two symbols that are used together to represent it: the symbol delta has no meaning on its own in this context, so be sure to treat Δx like one single variable.

This equation means that if we want to find the instantaneous rate of change at the point (x, f(x)), we can calculate the slope between two points:(x,f(x)) and anther point which is distance Δx away in the x-direction, (x+Δx,f(x+Δx)), and then take the limit as the distance between the two points Δx goes to zero. The expression is just the slope of the line passing through these two points. We can see a visual representation of this relationship in the graph below. As Δx shrinks, the green point (x+Δx,f(x+Δx)) gets closer and closer to the blue point (x,f(x)), and the slope will approach the slope of the red line (which represents the derivative of f(x) at x.

Be careful! We need to note that the variable x is playing a different role in the first definition of the derivative than in the second. In the first definition of the derivative, the value c is staying fixed, and the variable x is varying. But in the second definition of the derivative, the value x is staying fixed, and the variable Δx is varying.

If it helps, you may want to replace the variable Δx with a different letter, such as h, so that you don't confuse x and Δx.

Calculating Derivatives Algebraically

In this lecture, we are going to work on calculating derivatives algebraically. This means that we will take the equation for f(x), and we will plug that equation into one of the definitions for the derivative. This will give us a limit problem to solve, which will initially always have the indeterminate form 0/0 (because we can't calculate the slope of a point with itself - the x-distance and y-distance will both be zero, giving us 0/0). So all we will need to do is to use algebra, just like we did with all the previous limits problems, to first simplify the expression, and then take the limit as Δx goes to zero by plugging in zero for Δx after we have finished simplifying. This will then give us an equation for f '(x). As we can see, once we have plugged f(x) into one of the limit definitions of the derivative, all the resulting work is really just a review of what we've already done.

Examples - Calculating the equation for f '(x) from f(x) using one of the limit definitions of the derivative:

Let's begin by calculating the derivative of a relatively simple function, using one of the limit definitions of the derivative:

We notice here that if we immediately substitute in 0 for Δx, we get the indeterminate form 0/0, because this is the equivalent of saying that we are calculating the slope between a point and itself. Since a point will be a distance zero from itself on both the x- and y-axes, this means that the slope will be 0/0. So we will have to first simplify this expression before we can calculate the limit:

So we not have an equation for the derivative of our function f(x), and this equation will allow us to find the slope of f(x) at any point: if we want to find the slope of f(x) at x=2, for example, we would simply plug in 2 for x into f '(x), or in other words, we would calculate f'(2).

If we want to find the equation for the derivative for any equation, we can calculate it by plugging the original equation of the function into one of the limit definitions of the derivative. We can see a number of other examples where this is done by looking at the following two websites:

http://www.math.ucdavis.edu/~kouba/CalcOneDIRECTORY/defderdirectory/DefDer.html

http://tutorial.math.lamar.edu/Classes/CalcI/DefnOfDerivative.aspx (here the letter h is used instead of Δx in the limit definition of the derivative)

Looking for Structure When Calculating the Derivative

One thing you may have noticed when calculating the equation for the derivative from the limit definition is that, as f(x) gets more complex, calculating the f '(x) can get pretty long and complicated pretty quickly. So, rather than trying to calculate every single derivative from scratch, you may begin to wonder if there are any patterns that we can look for that would allow us to write out some general rules that we could follow which would allow us to calculate the derivative of more complicated functions by putting together the derivatives of simpler functions in some particular way. We'd like to be able to break more complicated functions down into smaller common pieces, and use this to calculate the derivative.

In order to try to write out a set of rules for calculating derivatives, we need to first outline how many different types of functions we might encounter, and outline how larger, more complicated functions could be thought of as a combination of smaller simpler functions.

Let's begin by trying to outline the various types of functions that we have most commonly encountered in previous classes:

Let's take a look at each of these types of functions one at a time:

Polynomial Functions

A polynomial function is made of up separate terms which can be added (or subtracted, which is really just like adding a negative) together. Each term is made up of a product (i.e. multiplication) of a number and a certain number of variables (in this case we will call all our variables x). So, the terms of a polynomial could look like this:

So, all polynomials can be written as a sum (or difference) of different terms, where each term can be written as the product of some number and the variable raised to a non-negative whole number exponent.

This observation allows us to break all polynomials into smaller parts. In order then, to find the derivative of a polynomial, we need only to have the answer to the following questions:

If we can answer these three questions, then we can find the derivative of any polynomial just by putting together the derivatives of its terms.

For example, suppose that we wanted to find the derivative of f(x) = 3x2 - 2x + 7. We can actually break this down into three smaller functions:

Suppose someone told us that multiplying a function by a constant just means that you have to multiply the derivative of that function by that same constant (in other words, that if g(x) = c·f(x), then g'(x) = c·f '(x)). And suppose that we were also told that if a function is the sum of several smaller functions, to get the derivative of the compound function we just have to add the derivatives of the terms in that function (in other words that if h(x) = f(x) + g(x), then h'(x) = f '(x) + g'(x)). If these two things were true, then we could calculate the derivative of f(x) = 3x2 - 2x + 7 as follows:

We were able to do this, because we were able to see how the structure of the larger function f(x) = 3x2 - 2x + 7 could actually be broken down into smaller pieces. And we had to be aware of two things:

But were we actually correct to assume the following two rules?

Let's use the limit definition of the derivative to find out if these rules are true:

Rule 1:

Rule 2:

So we can see that both of these rules are true!

Remember, though, that there was one other rule that we need, if we are to be able to find the derivatives of polynomial equations by finding the derivatives of each term. We need to be able to calculate:

So let's use the limit definition of the derivative one last time to see if we can come up with a rule for calculating the derivative of this function for any value of n that is a non-negative whole number. We already did this for the case when n = 2, because we have already calculated the derivative of the function f(x) = x2 in Example 1 in this lecture. This calculation will be similar, but we'll have to do the work more generally this time:

We begin by writing out the definition and by plugging f(x) into that definition:

Before we can proceed, we need a way to write out what (x + Δx)n should be when we multiply the whole thing out. But this is tough to do, because we have to do this in a general way that works for ALL possible values of n: we know how to multiply out (x + Δx)2 or (x + Δx)3 or even (x + Δx)4, but what is the OVERALL PATTERN? To try to figure this out, let's do this multiplication for several different specific examples of values of n, and see if we can find a pattern and a good argument for why that pattern will ALWAYS work:

So it looks like the overall pattern is:

But will this pattern really work for ALL values of n? Let's try to see if we can construct an argument which would explain why:

It is clear that the first term will indeed always be xn, because that term always results from the x's in each instance of (x + Δx) being multiplied together. It's a little more complicated to see that the second term will always be (n -1)xn-1, but if we look carefully what happens as we multiply each product by one more instance of (x + Δx), we can start to see why this pattern will hold:

So we have now confirmed the rule:

We have only proved so far that this is true when n is a non-negative whole number (like 0,1,2,3,4,....), but it actually works for ANY real value of n. The proofs for this derivative when n is negative, or not a whole number, are a bit more complicated than this proof, so we don't go into them here, but if you are a math major, or plan to take more math beyond calculus at some point, I recommend that you take a look at those proofs as well, so that you can see how they are done. You can see the proofs of other cases here (the proof that we did above is the same as what is done in Step 1 on this page).

So we have everything we need in order to be able to calculate the derivative of polynomial functions! You can see more examples of how to calculate the derivative of polynomial functions (just by using the three rules we have proved so far, instead of having to go back to the limit definition every time), by going here:

http://www.intmath.com/differentiation/5-derivative-polynomials.php

Rational Functions

A rational function is made up of two polynomials, one divided by the other (think of the word "rational" as coming from the word "ratio", and remember that a ratio is just another way of writing division). So a rational function is typically written as a fraction, with one polynomial at the top of the fraction and one at the bottom. So some simpler examples of rational functions could look like this:

But if we recall our algebra, we remember that anything written in the denominator of a fraction can be rewritten with a negative exponent, for example:

So we actually already know how to take the derivative of these types of rational functions, because we already have the rule for finding the derivatives of functions of the form f(x) = xn:

If f(x) = xn, then f '(x) = nxn-1

So we could find the derivatives of each of these as follows:

But we can also have more complicated examples of rational functions. For example, what about the following examples?

How can we break these two examples down?

We know how to find the derivative of the top and the bottom separately, but is there a way to put the derivatives of the top and the bottom together to get the derivative of the whole thing? BE CAREFUL: Although it is tempting, it will turn out that we CANNOT just divide the derivative of the top by the derivative of the bottom to get the derivative of the whole thing - we will have to go back to the limit definition of the derivative and see if we can use that to create a formula for this:

We can plug in f(x)/g(x) into the limit definition of the derivative to find out what h'(x) will equal (in terms of f '(x) and g'(x)). For the sake of keeping things shorter in this lecture, I have not included that work here, but you can see how it is done here. The main idea is that you should be able to use this rule to solve problems, you should understand that it comes by plugging f(x)/g(x) into the limit definition of the derivative, and if you are a math major or someone planning to take higher-level math, you should at least look through the steps and make sure that you can understand them.

So, what is the rule that we get when we plug f(x)/g(x) into the limit definition of the derivative?

So we can use this rule to find the derivative of any rational function. Let's practice on the two rational functions we gave above:

In this case, because the top can't be factored any further, there really isn't any way to simplify this further (we could factor the bottom, but this won't allow us to cancel anything out, so we don't really need to do this).

For more examples on how to use this rule to calculate the derivative of rational functions, take a look at the first three examples worked out on this page (by the end of the lecture, we will also be able to do the other examples on this page):

http://www.math.ucdavis.edu/~kouba/CalcOneDIRECTORY/quotientruledirectory/

Radical functions

We can also have functions that include radical signs, for example:

But if we recall our algebra, we remember that any root (or radical) can be rewritten with a fractional exponent, for example:

For the first two of these problems, we already know how to calculate the derivative

 

But for the second two problems, we need more information. Let's look at them one at a time:

We can see here that h(x) is the product of two other functions: 3x4 and x2/3. We know how to find the derivative of both of these "smaller" functions that make up the whole. But how do we put these derivatives together to get the derivative of the whole thing h(x)? BE CAREFUL: Although it is tempting, it will turn out that we CANNOT just multiply the two derivatives to get the derivative of the whole thing - we will have to go back to the limit definition of the derivative and see if we can use that to create a formula for this:

We can plug in f(x)·g(x) into the limit definition of the derivative to find out what h'(x) will equal (in terms of f '(x) and g'(x)). For the sake of keeping things shorter in this lecture, I have not included that work here, but you can see how it is done here. The main idea is that you should be able to use this rule to solve problems, you should understand that it comes by plugging f(x)·g(x) into the limit definition of the derivative, and if you are a math major or someone planning to take higher-level math, you should at least look through the steps and make sure that you can understand them.

So, what is the rule that we get when we plug f(x)·g(x) into the limit definition of the derivative?

Let's use this rule now to calculate the derivative of our third example of a radical function, :

(One thing you may have noticed while working this out, is that we could have saved ourselves this rule in the beginning if we had combined the two powers of x at the very beginning. Although this often won't work with other problems, in this case we can see that we can find the derivative without using the multiplication rule above, and we will get the same answer. For example:

Notice that we get the same derivative either way we calculate it, which is what we would expect.

For more examples of how to calculate derivatives when the function can be written as a product of two other functions, take a look at the first two examples here (by the end of this lecture, we will be able to do all the examples on this page):

http://www.math.ucdavis.edu/~kouba/CalcOneDIRECTORY/productruledirectory/

Now let's look at that one last example of a radical function, and think about what kinds of structure we need in order to calculate the derivative of this function:

We can see here that j(x) is made up of two other functions, where one function is nested inside the other. We could describe it this way:

Where here the letter f is standing in for the whole function f(x) which is equal to x3 - 8. We could calculate the derivative of f with respect to x, or f '(x). And we could also calculate the derivative of g with respect to f, or g'(f). But how can we put these two derivatives together to get the derivative of j with respect to x, or j '(x)?

We can plug in g(f(x)) into the limit definition of the derivative to find out what j '(x) will equal (in terms of f '(x) and g'(f)). For the sake of keeping things shorter in this lecture, I have not included that work here, but you can see how it is done here (In the proof on this page, the symbol Δ is used to represent a change in the variable, so Δy is the change in y - this is just a shorthand for writing about the distance between the two points in the y-direction. In this terminology, our limit definition of the derivative is just the limit of the fraction Δyx as Δy goes to zero (where Δy/Δx is just the slope between the two points on the curve)). The main idea is that you should be able to use this rule to solve problems, you should understand that it comes by plugging g(f(x)) into the limit definition of the derivative, and if you are a math major or someone planning to take higher-level math, you should at least look through the steps and make sure that you can understand them.

So, what is the rule that we get when we plug f(x)·g(x) into the limit definition of the derivative?

Let's use this rule now to calculate the derivative of our final example of a radical function, :

For more examples of how to calculate derivatives when the function can be written as a composition of two functions, take a look at the first five examples here (by the end of this lecture, we will be able to do all the examples on this page):

http://www.math.ucdavis.edu/~kouba/CalcOneDIRECTORY/chainruledirectory/ChainRule.html

Summarizing Rules that help us find the Derivatives of Complex Functions by Breaking them down into Simpler Functions

So far we have developed all the rules for "putting functions together" that we can think of that will allow us to build complex functions from simpler functions. Let's summarize them here:

Derivative Rules

We now have all the rules we need in order to calculate the derivatives of complex functions by breaking them down into simpler pieces. However, in order to be able to use these rules for ALL types of functions, we need to know what the derivative is of all the different kinds of smaller pieces that we might encounter. For example, we need to know the derivative of all the following functions:

Exponential, Logarithm, Trigonometric, and Inverse Trigonometric Functions

For each of the functions given above, we could calculate the derivative using the limit definition, but in some of these cases, calculating the limit can get rather complicated. By looking at the graphs of many of the functions (as you will do in one of the labs) will help you to see graphically what the derivatives of some of these functions must be. But for the sake of calculating more complex derivatives, we provide a table of the derivative of each of these functions here:

How do we know that each of these derivatives is correct? Why are these the correct derivatives? You should understand that the only way to show that these actually are the derivatives is to go back to the limit definition of the derivative and plug the original function in, but in cases where actually solving that limit equation is difficult, I will not ask you to derive the derivative yourselves. If you are interested in seeing how each of these derivatives is obtained from the limit definition, you can see those details here:

http://math2.org/math/derivatives/tableof.htm

Calculating all kinds of derivatives algebraically!

Now that we have rules that allow us to break all kinds of more complex functions into simpler functions when calculating the derivative, we can calculate the derivative of a number of different complicated functions. We can now find the derivatives of all of the functions given in the following links (click on the links to see lots of examples worked out):

http://www.math.ucdavis.edu/~kouba/CalcOneDIRECTORY/productruledirectory/

http://www.math.ucdavis.edu/~kouba/CalcOneDIRECTORY/quotientruledirectory/

http://www.math.ucdavis.edu/~kouba/CalcOneDIRECTORY/chainruledirectory/ChainRule.html

Implicit Differentiation

So far we have calculated the derivative of functions only when they were solved for f. But there are equations that are useful in the real world where solving for the dependent variable y or f (or whatever we choose to name it) isn't practical. For example, a circle may be a very good model of some kinds of real-world behavior, but the equation for a circle isn't a function, and it can't easily be solved for y, without having to use plus/minus signs or break the equation into two different equations:

Equation for a circle that is centered at the origin with radius 4: x2 + y2 = 16

Is there a way for us to find the derivative of y with respect to x, or y'(x) or dy/dx, here without having to first solve for y?

The answer is yes, as long as we always remember that:

In this example, we can see that the derivative of y with respect to x, or dy/dx, can be written in terms of both x and y. This is ok. We could solve the original equation for y and plug it into this equation, but for the moment it is not necessary. As long as we have solved for the derivative dy/dx, we don't need to worry about the presence of both x's and y's in the resulting equation for the derivative.

To see a number of other examples of derivatives which can be found implicitly, click on the link below:

http://tutorial.math.lamar.edu/Classes/CalcI/ImplicitDIff.aspx

Higher Order Derivatives

So far we have calculated the derivative of a bunch of different functions, but because the derivative is itself a function, we can also take the derivative of the derivative function. And then the derivative of the derivative of the derivative function. And so forth. So in this way we can define what we call higher order derivatives:

Higher Order Derivatives

first derivative: f '(x) is defined by the limit definition

second derivative: f ''(x) or f (2)(x) = [f '(x)]' (the second derivative is the derivative of the derivative)

third derivative: f '''(x) or f (3)(x) = [f ''(x)]' (the third derivative is the derivative of the second derivative)

...

nth derivative: f (n)(x) = [f (n-1)(x)]' (the nth derivative is the derivative of the (n -1)th derivative)

For some examples about how to calculate higher order derivatives, take a look here!

Velocity and Acceleration

One common application of derivatives is to use them to represent velocity and acceleration. For example, if the equation f(x) is an equation for the distance that something has traveled by time x (an object thrown or dropped, a person, a car/train/airplane, etc), then:

f '(x) represents the velocity at time x (because velocity is just the rate of change of the distance over time)

f ''(x) represents the acceleration at time x (because acceleration is just the rate of change of the velocity over time)

So we can also solve all kinds of word problems involving velocity and acceleration by simply finding the first and/or second derivative.

You can see some examples of these kinds of word problems worked out by looking here:

http://17calculus.com/calc04-linear-motion.php