Jump to content

Introduction to Calculus/Differentiation

From Wikiversity


Resources

[edit | edit source]

Wikibooks entry for Differentiation

Prelude

[edit | edit source]

Arithmetic is about what you can do with numbers. Algebra is about what you can do with variables. Calculus is about what you can do with functions. Just as in arithmetic there are things you can do to a number to give another number, such as square it or add it to another number, in calculus there are two basic operations that given a function yield new and intimately related functions. The first of these operations is called differentiation, and the new function is called the derivative of the original function.

This set of notes deals with the fundamentals of differentiation. For information about the second functional operator of calculus, visit Integration by Substitution after completing this unit.

Before we dive in, we will warm up with an excursion into the mathematical workings of interest in banking.

Compound Interest

[edit | edit source]

Let us suppose that we deposit an amount in the bank on New Year's Day, and furthermore that every year on the year the amount is augmented by a rate times the present amount. Then the amount in the bank on any given New Year's Day, years after the first is given by the expression

.

Unfortunately, if we withdraw the money three days before the New Year, we don't get any of the interest payment for that year. A fairer system would involve calculating interest times a year at the rate . In fact this gives us a slightly different value even if we take our money out on a New Year's Day, because every time we calculate interest, we receive interest on our previous interest. The amount we receive with this improved system is given by the expression

With this flexible system, we could set to to compound every month, or to to compound every day or to about to compound every second. But why stop there? Why not compound the interest every moment? What is really meant by that is this: as we increase does the value for get ever greater with or does it approach some reasonable quantity? If the latter is the case, then it is meaningful to ask, "What does approach?" As we can see from the following table with sample values, this is in fact the case.

1 1.02500
12 1.02529
365 1.02531
31536000 1.02532
100000000 1.02532
, ,

As we can see, as goes off toward infinity, approaches a finite value. Taking this to heart, we may come to our final system in which we define as follows:

Thus we set now not to evaluated for some large , but rather to the limit of that value as approaches infinity. This is the formula for continually compounded interest. To clean up this formula, note that neither nor "interfere" in any way with the evaluation of the limit, and may consequently be moved outside of the limit without affecting the value of the expression:

,

where

We can see from the form of the expression that increases exponentially with much as it did in our very first equation. The difference is that the original base has been replaced with the base which we have yet to simplify.

Take a moment to step back and do the following exercises:

  1. Without looking back, see if you can write down the expressions that represent
    • yearly interest
    • semiannual interest
    • monthly interest
    • interest times a year
    • continually compounded interest
  2. Think about how much money you have. Figure out how long you would have to leave your money in a bank that compounds interest monthly before you became a millionaire, with a yearly interest rate of
    • .02 (common for a savings account)
    • .07 (average gain in the US stock market over a reasonably long period).

Finding the Base

[edit | edit source]

In order to shed some light on the expression whose value we call , we shall make use of the following expansion, known as the Binomial Theorem:

By applying it to our limit, we get

.

This last step may seem mystifying at first. What happened to the limit? And where did all of the 's go? In fact it was the evaluation of the limit that allowed us to remove the 's. More exactly, as , so too , , etc., so that the top left and bottom right of each term cancel to produce the last expression.

Take a moment to look over the following exercises. Take the time to follow the trains of thought that are newest to you.

  1. The Pascal triangle, one of the world's most famous number patterns, popularized by the Seventeenth-Century mathematician Blaise Pascal, is shown on the right. What does this have to do with the Binomial Theorem?
  2. The factorial (!) may seem like a silly operation to have its own name, but as it turns out it is one of the most common operations in both statistics and pure math.
    • What is ?
    • Which is bigger or ?
  3. The Binomial Theorem is sometimes stated . Is this the same as the formula we used?
  4. In the proof, we made use of the fact that . Does this make sense based on what you know about limits?
    • What is ?
  5. Without looking back, can you remember how it is that we used binomial expansion to show that ?
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1

The Birth of e

[edit | edit source]

Now comes a real surprise. As it turns out, the infinite polynomial above is in fact exponential in . That is, , for some . In order to show this far-from-obvious fact, I offer the following.

To this last infinite series of numbers, define the quantity to be :

.

, an irrational (and in fact transcendental) number, has the approximate value 2.71828, which you may easily verify on a standard pocket or graphing calculator.

There are a few things to think about.

  1. The first line in the preceding derivation was motivated by my knowledge of the outcome.
    1. Convince yourself that the two expressions are in fact equal to one another.
      • Evaluate the term for and . How does that compare to ? How about with ?
    2. Now that you have convinced yourself that I may do it, ask yourself why I would do it.
      • Using the reverse Binomial Theorem, do you understand how it leads to the next expression?
  2. Is the equation something that one would predict merely from the rules of exponents or distribution?
  3. What makes certain seemingly uninteresting numbers so profoundly central to mathematics, such as , , , and ?

Back to the Start

[edit | edit source]

From here, everything cascades back to our original goal, namely to find a usable formula for continually compounded interest. . And there she is.

Take a moment to do the following exercises.

  1. Think about how much money you have. How long will it take to become millionaire if you leave the money in a bank with yearly interest of .025
    • that compounds interest yearly?
    • that compounds interest continually?
  2. Seeing as the values with and without continually compounded interest are very close to one another, what does that tell you about the two equations used?
    • Both formulas are of the form _____. Compare the various values that we have put in this blank, especially the in the equations for yearly and continually compounded interest.
    • How close in value is to ? Does that surprise you?
    • Now look at the infinite series version of the function . Does it still surprise you that and are so close in value?

Commentary

[edit | edit source]

The formula itself, however, is quite forgettable. In fact, as you may have guessed, the importance of compounded interest pales in comparison to the importance of the ideas we stumbled upon on the way, namely limits and . It is these two things that beg for us to go further into the heart of the life and being of functions. That wish is called calculus. And it all starts rather innocently with the derivative…

Notion of secant & slope

[edit | edit source]

Imagine a straight line plotted on square graph paper. For the sake of our discussion, suppose this line goes off your sheet of paper on both sides, and keeps going forever. What can you say about this line? Take your page and look at it. A line might be flat, parallel to the bottom of the page. It might be vertical, parallel to the sides of the page. Or it might lie somewhere between these two extremes, not as flat as the first, and not as steep as the second.

The first thing to understand about 'slope' is that it is a measure of steepness. We often measure slope as a ratio. If you drive 30 kilometers in the timespan of one hour, we say your speed is the ratio of distance over time: 30 kilometers per hour. Similarly, the slope is the change in vertical distance over the change in horizontal distance.

How steep is a horizontal line? Draw a horizontal line, and then place one finger on one end of the line. Take another finger and slowly move it along the line. As you change the horizontal distance (as you move your finger from side to side), you will notice that the vertical distance does not change at all- you don't have to move your finger up or down. The change in vertical distance is always 0, regardless of the change in horizontal distance. So the slope is 0/x where x is the change in horizontal distance (you can choose whatever number you want for this), meaning the slope is 0.

Our flat, horizontal line has a slope of zero - nothing happens to the y's whatever you do to the x's, think of cycling in parts of the Netherlands for example.

A line at 45 degrees to the horizontal (half way between vertical (90 degrees) and horizontal (0 degrees)) has a slope of 1 (this would be a brutal hill for cycling, and very tough on foot). As you increase the horizontal distance by one unit, you also increase the vertical distance by one unit. This makes the slope 1/1=1.

Our vertical line is incredibly steep (and much harder to cycle on). The slope is undefined, and as our line gets closer and closer to vertical, the slope gets bigger and bigger without limit.

The second part of slope captures the idea of direction. Look at your line again. As it goes from left to right, does it go up the page, or down the page? If it was a road going up a hill, would it be hard to follow on a bicycle (going up), or very easy (going down)? This is expressed by saying that a line has a positive slope if, as it goes across, it also goes up, (or as the y's increase, the x's also increase). A line has a negative slope if it goes down as it goes across (or as the y's increase, the x's decrease). As a cyclist, you want a negative slope, unless you're in training.

The Derivative

[edit | edit source]

Definition

[edit | edit source]

Given a function , we define the derivative to be

.

This definition is motivated by the proportion , which for any h defines the slope of a line, when f is linear. Because of the nature of the calculation, the derivative can be figuratively thought of as the ratio between an infinitesimal dy and an infinitesimal dx and is often written . Both functional notation and infinitesimal or Leibniz notation have their virtues. In operator theory, the derivative of a function is sometimes written as .

  1. Using the definition above, what is ?
    • Note that this is a short way of asking, if , what is ? One may also ask, what is ?
  2. If you have trouble remembering the definition of the derivative, it's much more important to know what it means, that is, why it's defined how it is. Remember it like this:
    • .
    • From this we get the definition as stated above, .
  3. What kinds of functions have derivatives? What would a function need to have, for it not to have a derivative at some point?

Properties

[edit | edit source]

The derivative satisfies a number of fundamental properties

Linearity

[edit | edit source]

An operator is called linear if and for any constant . To show that differentiation is a linear operator, we must show that and for any constant .

.

In other words, the differential operator (e.g., ) distributes over addition.

.

In other words, addition before and after doing differentiation are equivalent.

Fundamental Rules of Differentiation

[edit | edit source]

Along with linearity, which is so simple that one hardly thinks of it as a rule, the following are essential to finding the derivative of arbitrary functions.

The Product Rule

[edit | edit source]

It may be shown that for functions f and g, . Like the other two rules, this one is not a new axiom: it is directly provable from the definition of the derivative.

.

Chain Rule

[edit | edit source]

If a function f(x) can be written as a compound function f(g(x)), one can obtain its derivative using the chain rule. The chain rule states that the derivative of f(x) will equal the derivative of f(g) with respect to g, multiplied by the derivative of g(x) with respect to x. In mathematical terms: This is commonly written as , or more explicitly

The proof makes use of an alternate but patently equivalent definition of the derivative: . The first step is to write the derivative of the compound function in this form; one then manipulates it and obtains the chain rule.

In the third step, the first limit changes from px to g(p)→g(x). This is valid because if g is continuous at x, which it must be to have a derivative at x, then of course as p approaches x the value of g(p) approaches that of g(x).

Differentiating a nested function occurs very frequently, which makes this rule very useful.

The Power Rule

[edit | edit source]

We may now readily show the relation as follows:

While this derivation assumes that is an positive integer, it turns out that the same rule holds for all real . For example, .

Take a moment to do the following exercises.

  1. Using the rule and linearity, find the derivatives of the following:
  2. What functions have the following derivatives?

Exponentials and logarithms

[edit | edit source]

Exponentials and logarithms involve a special number denoted e.

Differentiating ex

[edit | edit source]

Now, recall that

Using the three basic rules established above we can differentiate any polynomial, even one of infinite degree:

is the remarkable function that is its own derivative. In other words, is an eigenfunction of the differential operator. Which means that the application of the differential operator on has the same effect as multiplication by a real number. For example, these concepts are useful in quantum mechanics.

Differentiating ln(x)

[edit | edit source]

The natural logarithm is the function such that if then ; in other words, it is the inverse function of . We will make use of the chain rule (marked by the brace) in order to find its derivative:

This conclusion, that the derivative of is , is remarkable: it ties together two seemingly unrelated functions. Be careful, this derivative has definite values only when x > 0! (Examine the to understand why.)

[edit | edit source]

Exponentials

[edit | edit source]

Supppose we have the function

To differentiate this, we rewrite this as

Since is a constant,

In other words, for a constant a, we have

whenever

This re-enforces the special place that has in calculus - it is the unique number for which the constant is precisely equal to one.

Logarithms

[edit | edit source]

Let us differentiate the function

We already know how to differentiate , so let's change it into another form with the base e.

Because is a constant,

In conclusion, for any constant a, the derivative of is

Implicit Differentiation

[edit | edit source]

Let's suppose that

One could find with the quotient rule, but for more complicated functions, it may be better to use what is called "implicit differentiation".

In this case, we take the logarithm of both sides, to obtain

or, in other words, just simply

Differentiating the left and right hand side, we get

Now, multiply both sides by y, which we know is just to obtain the answer:

which of course can be simplified further. You should verify that this result agrees with the quotient rule. Differentials of logarithms of functions occur frequently in places like statistical mechanics.

General exponentials and logarithms

[edit | edit source]

Consider the function

It can be immediately seen that

Compare this result to the chain rule and power rule results. The first term results in treating v constant. The second term results in treating u constant.

Trigonometric functions

[edit | edit source]

Consider the function . To find the derivative of , we use the definition of the derivative, as well as some trigonometric identities and the linearity of the limit operator.

and since and , the above expression simplifies to .

Thus, the derivative of is .

We perform the same process to find the derivatives of the other trigonometric functions (try to derive them on your own as an exercise). Since these derivatives come up quite often, it would behoove (advantageous to) you to memorize them.

Hyperbolic functions

[edit | edit source]

The rules for differentiation involving hyperbolic functions behave very much like their trigonometric counterparts, with the notable difference being in the sign of the derivative. Here,

so it can be seen that

and