## 5.1 Derivatives of Rational Functions

Here are some wonderful facts about derivatives in general.

1. Derivatives have two great properties which allow us to find formulae for them if we have formulae for the function we want to differentiate.

2. We can compute and graph the derivative of f as well as f itself for all sorts of functions, with not much work on a spreadsheet (In fact, what work is needed to find derivatives only has to be done once, and you can switch functions almost exactly as you would if you were only graphing the function, and get a plot of both together. We will see this explicitly soon.)

What "great properties"?

We already know the derivative of a linear function. It is its slope. A linear function is its own linear approximation. Thus the derivative of ax + b is a; the derivative of x is 1. Derivatives kill constant terms, and replace x by 1 in any linear term.

The first great property is this: if an argument, x, occurs more than once in a formula for its value, f(x), at argument x, then you can find the derivative of f by looking at the derivative caused by each occurrence separately, treating the other occurrences as if they were mere numbers as you do so; and then adding all these up.

For example, consider the quadratic, a * x * x + b * x + c. The argument x occurs three times in it. Taking the derivative of one single occurrence, that is, of any single x alone, changes that x to 1. If we do that to each occurrence separately, ignoring the others as we do so, we get three terms: a * 1 * x + a * x * 1 + b * 1, or 2ax + b, and their sum is the derivative of our quadratic.

Notice that the constant term, c, has no effect on the derivative.

This property allows us to calculate a formula for the derivative of any polynomial directly from the formula for the polynomial itself, as we shall soon see.

A special case of this basic rule is the statement that taking the derivative is a linear operation. This means that if f consists of two terms, you can find f 's derivative by adding the derivatives of each of its terms separately, computed in both cases as if the other term did not exist.

This statement can be written as:

(f + g)' = f ' + g'

Another special case is the formula for the derivative of the product of two factors. If we have f = g h, then there will be contributions to the change in f from changes in g and from changes in h, and these can be computed separately. The result is the statement:

(g * h)' = g' * h + g * h'

which is called the product rule for differentiation.

We can deduce, as a special case of this product rule, what the derivative of the reciprocal of a function f is. The reciprocal of a function is 1 divided by that function, which is usually written as .

By the definition of the reciprocal we have , throughout the domain of f. The derivative of 1, which is a number and is the right hand side here, is 0; we can deduce that the derivative of the left hand side is also 0.

By the product rule we then get:

which we can divide by f and rearrange to tell us:

Our first great property actually tells us all we need to find the derivative of any polynomial or any rational function, by which we mean the ratio of two polynomials. And these are all the functions we can get by applying the operations of addition, subtraction, multiplication, and division to the identity function.

The derivative of any positive power, say xn, is obtained by noticing that the contribution to the derivative from each of the n occurrences of x by itself is gotten by replacing that occurrence by 1, or in other words by dividing here by x: the total result from all n of the factors x, which is the derivative of , is then , or if you prefer, . (This statement applies to negative powers as well as positive ones, and to fractional and in fact to any power at all, as we shall soon see.)

This, and the rule for differentiating a sum given the derivatives of the summands, tells you how to differentiate any polynomial. The reciprocal rule of the last equation above then tells us how we can differentiate any rational function, say where p and q are polynomials. We apply the product rule and reciprocal rule, to get

Exercises:

5.1 Find the derivatives of the following polynomials:

a. 3x - 7

b. x2 - 7x + 4

c. 3x3 - 2x2 + x + 1

d. x4 - 7x2 + 4

e. x4 - x3 + x2 - x + 1

5.2 Find the derivatives of the following rational functions:

a.

b.

c.

You should practice finding the derivatives of polynomials and of rational functions using these rules until you feel comfortable with them. In fact you should practice until you can differentiate any rational function with 100% accuracy.

But no human being can do anything to 100% accuracy and I certainly can't.

In the age of computers, any little mistake at all can screw up everything. It is very important that you learn to do what you do with 100% accuracy. This sounds hopeless, but it isn't. Its not that you have to do everything perfectly; far from it. You only have to learn to find your mistakes and fix them. You can make them by the dozen if you take the trouble to fix them all.

Most mistakes that you will make with a computer are so gross in their effects that you can see immediately that you have done something wrong, and find and fix whatever it is. A few mistakes are subtle enough that you might miss them. The key to getting perfect answers is to check whatever you do to see if it is right until it is right.

By the way, the most common subtle mistake by far consists of using incorrect input, which means, trying to solve the wrong problem. It is absolutely essential that you check to see that you have copied the input information correctly into your computation.

Suppose you find a formula for a derivative. Instead of stopping with the formula, you should check it to see if it looks right. The computer gives you an easy way to do this: you can compute the derivative numerically, and see if you get the same answer. If you do, you KNOW your answer is right.

If you don't get the same answer numerically that you got from the formula, you must find what went wrong. You do not have to be perfect the first time, or even the seventh time. But in the end, if you are dealing with machines, you MUST be perfect.

How can I check my differentiations easily?

One way is to compare the function you compute as derivative to the derivative as found by the derivative applet.

You can also check your derivative by using a spreadsheet to set up your own applet. The setup described in Section 3A for plotting a function, can be enhanced to allow you to plot not only your function, but also its numerical derivative and the answer you get to differentiating it, without your expending much effort.

Once you have this set up, all you need do is enter your function in one place and your answer for the derivative in another place, copy each appropriately, and you can look at your answer and the numerical one on your chart. If they are the same, your answer is correct. If not you have to de-bug your differentiation and/or your spreadsheet calculation. Becoming an expert means becoming proficient at de-bugging, through lots of experience.

OK, how do I set this up?

For explicit directions, see Chapter 9.