Rational functions are an important and useful class of functions, but there are others. We actually get most useful functions by starting with two additional functions beyond the identity function, and allowing two more operations in addition to addition subtraction multiplication and division.
What additional starting functions?
The two are the exponential function, which we will write for the moment as exp(x), and the sine function, which is generally written as sin(x).
And what are these?
We will devote some time and effort to introducing and describing these two functions and their many wonderful properties very soon. For now, all we care about is that they exist, you can find them on spreadsheets and scientific calculators, and we can perform arithmetic operations (addition, subtraction, multiplication and division) on them. If you want just a hint, the sine function is the basic function of the study of angles, which is called trigonometry. The exponent function is defined in terms of derivatives. It is the function whose value at argument 0 is 1, that has derivative everywhere that is the same as itself. We have
This definition may make the function a bit mysterious to you at first, but you have to admit that it makes it easy to differentiate this function.
And what additional operations are there?
The two new operations that we want to use are substitution, and inversion.
And what are these?
If we have two functions, f and g, with values f(x) and g(x) at argument x, we can construct a new function, which we write as f(g), that is gotten by using the value of g at argument x as the argument of f. The value of f(g) at x, which we write as f(g(x)), is the value of f at argument given by the value of g at x; it is the value of f at argument g(x). We call this new function the substitution of g into f. We'll get to inversion next.
If you substitute a polynomial into a polynomial, you just get a polynomial, and if you substitute a rational function into a rational function, you still have a rational function. But if you substitute these things into exponentials and sines you get entirely new things (like exp(-cx2) ) which is the basic function of probability theory.
Just as utilizing copies of the exponential or sine functions presents no problem to a spreadsheet or scientific calculator, substitution presents no real problem. You can create g(A10) in B10, and then f(B10) in C(10) and you have created the substituted value f(g(A10)) in C10. You can, by repeating this procedure, construct the most horrible looking combination of substitutions and arithmetical operations imaginable, and even worse than you could imagine, with very little difficulty, and you can find their numerical derivatives as well.
Before we go on to the last operation, we note that there is a great property associated with the operation of substitution. Just as we have found formulae above for finding the derivative of a sum or product or ratio of functions whose derivatives we know, we have a neat formula for the derivative of a substitution function in terms of the the derivatives of its constituents. Actually it is about as simple a formula for this as could be.
The result is often called the chain rule:
The derivative f(g(x)) with respect to x at some argument z, like any other derivative, is the slope of the straight line tangent to this function, at argument z. This slope, like all slopes, is the ratio of the change in the given function to a change in its argument, in any interval very near argument z.
Suppose then, we make a very small change in the variable x, very near to x = z, a change that is sufficiently small that the linear approximation to g and to f(g) are extremely accurate within the interval of change. Let us call that change dx. This will cause a change in g(x) of g'(z)dx, (because the definition of g'(z) is the ratio of the change of g to the change of x for x very near to z.)
If g'(z) is 0, then g will not change and neither will f(g(x)), which depends on x only in that its argument g depends on x.
If g'(z) is not 0, we can define dg to be g'(z)dx, and use the fact that the change in f for arguments near g(z) is given by is evaluated for arguments of g near g(z).
If we put these two statements together, which we can do by substituting for g'(z)dx for dg in the expression here for df, we find that the change in f is given by the change in z multiplied by the product of the two derivatives and the change in x:
If we now divide both sides by dx, we obtain the famous "chain rule", which tells us how to compute the derivative of a function defined by substituting one function in another.
It follows from this remark that the chain rules reads
In words, this means that the derivative of the substituted function with values f(g(z)), with respect to the variable z is the product of the derivatives of the constituent functions f and g, taken at the relevant arguments: which are z itself for g and g(z) for f.
How about some examples?
We will give two examples, but you should work out at least a dozen for yourself.
1: Suppose we substitute the function g described by values g(x) = x2 +1
into the function f described by values f(x) = x3 -
substituted function f(g) has values f(g(x)) = (x2 + 1)3 -
Let us compute the derivative of this function. The derivative of f(s) with respect to s is 3s2, while the derivative of g(x) with respect to x is 2x.
If we set s = g(x) and take the product of these two we get:
You could multiply the cube here out and then differentiate to get the same answer, but that is much messier, and most people would make at least one mistake in doing it. You have a chance of getting such things right even the first time, if you do them by the chain rule. (Unfortunately, if you do, you will not get any practice debugging from it.)
Example 2: Find the derivative of the function whose values are .
This is the function obtained by substituting the function with values into the exponential function.
Now the derivative of the function with values is the function with values -x; (remember that the exponential function is its own derivative.)
On applying the chain rule we find:
7.1 Write an expression for the result of substituting g into
f to form f(g) for the following pairs of functions, and find expressions for
using the chain rule.
a. f defined by , g defined by .
b. f defined by f(x) = -x, g by g(x) = exp(x).
c. f defined by f(x) = exp(x), g by g(x) = -x.
7. 2 Check each of your results using the derivative applet.
7.3 a. Consider the function defined by the formula x4 - 2x + 3. Use the applet to plot it and see its derivative. Where is its minimum value, and what is it? What is its derivative at the minimum point? Estimate these things from the applet.
b. Find the maximum point for f and the value of f at
approximately for f defined by f(x) = x2exp(-x).
OK, where am I now?
At this point you have rules that enable you to differentiate all functions
that you can make up using arithmetic operations and substitutions starting
with the identity function (f(x) = x) or with the mysterious exponential function,
f(x) = exp(x).
In the next section we will extend things so you can start with the sine function, f = sin x as well and differentiate anything you can create. Finally we will extend the rules to differentiating inverse functions as well.