Difference Quotients I

Difference Quotients & Definition of the Derivative

In the second posting on Local Linearity II, we saw that what we were doing, finding the slope to a nearby point, looked like this symbolically:

\displaystyle \frac{f\left( x+h \right)-f\left( x \right)}{h}

This expression is called the Forward Difference Quotient (FDQ). It kind of assumes that h > 0.

There is also the Backwards Difference Quotient (BDQ):

\displaystyle \frac{f\left( x \right)-f\left( x-h \right)}{h}=\frac{f\left( x-h \right)-f\left( x \right)}{-h}

The BDQ also kind of assumes that h > 0. If h < 0 then the FDQ becomes the BDQ and vice versa. So these are really the same thing. The limit (if it exists) as h approaches zero is the slope of the tangent line at whatever x is and this is important enough to have its own name. It is called the derivative of f at x with the notation (among others) {f}'\left( x \right) :

\displaystyle {f}'\left( x \right)=\underset{h\to 0}{\mathop{\lim }}\,\frac{f\left( x+h \right)-f\left( x \right)}{h}

Since h must approach 0 from both sides, this expression incorporates the FDQ and the BDQ in one expression.

To emphasize that h is a “change in x” this limit is often written

\displaystyle {f}'\left( x \right)=\underset{\Delta x\to 0}{\mathop{\lim }}\,\frac{f\left( x+\Delta x \right)-f\left( x \right)}{\Delta x}

The Derivative II

(In this activity I am paraphrasing and expanding the suggestions of Alan Lipp in a posting “Derivatives of Trig Functions” August 29, 2012 to the Calculus Electronic Discussion Group.)

This activity parallels the one in my last post here using technology.

    1. Enter the function you are investigating as Y1 in your calculator. Later you will change this to other functions but will not have to change the following entries.  Start with Y1 = x2.
    2. Enter

      \displaystyle Y2=\frac{Y1(x+0.0001)-Y1(x)}{0.0001}.

      This will approximate the derivative. This expression is called the forward difference quotient.

    1. Graph in a square window.
    1. Guess the equation of the graph you see for Y2, enter you guess in Y3 and graph it. If your guess is correct what should you see?
    1. Deselect Y1 and produce a table for the Y2 and Y3 graph. Do the values of Y2 look like what you guessed for Y3? If not, adjust your guess for Y3. (Hint: because Y2 is an approximation, they will be close but not exact.)
  1. Another way to check your guess is to graph Y4 = Y2/Y3. If your guess is close, Y4 should be the line y = 1. If their guess is wrong, the graph of Y4 may give a clue as to the correct answer. If the guess the derivative of x2 is x, then Y4 = 2 hinting that the correct guess is 2x.

A comment: Calculators have a built in numerical derivative function usually called nDeriv or d/dx. You may use this in step 2 above. However, entering and using the expression for the approximate derivative as above, reinforces the concept and is more transparent for the student than using some strange new built-in function.

Now repeat the exercise above with other functions. Chose functions whose derivatives are easy to guess for example, y = x3, y = x4, y = x5, etc., and  y = sin(x), and y = cos(x).

Keep a list of the results, so you can check it later.

The Derivative I

In “Local Linearity II”, my post for August 31, 2012, we developed a way of approximating the slope of a function at any point. The slope at x = a is approximated by

\displaystyle \frac{f\left( a+h \right)-f\left( a \right)}{h}

For small values of h.

The smaller the better, which suggests limits.

The limit of this expression as h approaches zero is called the derivative of f at x = a denoted by {f}'\left( a \right):

\displaystyle \ {f}'\left( a \right)=\underset{h\to 0}{\mathop{\lim }}\,\frac{f\left( a+h \right)-f\left( a \right)}{h}

Now give your students a simple function like y = x2 and give each student a different point in the interval [–4, 4] (include some fractions). Have them calculate the approximate slope and/or the derivative for their point. For each student’s value, plot on a graph the point (their a, slope at their a). Discuss the results. Guess the equation of the graph.

Of course, the result should look like the line y = 2x.  That is, the derivatives at various points, taken together, appear to be a function in their own right.

Repeat this exercise with the function y = sin(x). Guess the equation of the derivative.

We will look at this some more in the next post.

Show me the Math!

Is God a Mathematician? by Mario Livio begins

When you work in cosmology … one of the facts of life becomes the weekly letter, e-mail, or fax from someone who wants to describe to you his own theory of the universe (yes, they are invariably men). The biggest mistake you can make is to politely answer that you would like to learn more. This immediately results in an endless barrage of messages. So how can you prevent the assault? The particular tactic I found to be quite useful (short of the impolite act of not answering at all) is to point out the true fact that as long as his theory is not precisely formulated in the language of mathematics, it is impossible to assess its relevance. This response stops most amateur cosmologists in their tracks. … Mathematics is the solid scaffolding that holds together any theory of the universe.

Is God a Mathematician? discusses the question of whether mathematics was invented or discovered. Dr. Livio’s other popular books include The Accelerating Universe (cosmology), The Golden Ratio: The Story of Phi, the World’s most Astounding Number, and The Equation that Couldn’t be Solved: How Mathematical Genius Discovered the Language of Symmetry. All are excellent reads for teachers and students. 

Local Linearity II

Using Local Linearity to introduce difference quotient and the derivative.

An effective way to introduce difference quotients and derivatives is to write the equation of the “line” you see when you zoom-in on a locally linear function.

First: Ask your class to use their calculator or computer grapher to graph a function, say y = sin(x), or some function they like better.

  1. Ask them to trace over to some point where the graph is “curvy.” (So they will remain on the graph, use the TRACE feature, not the moving cursor.) They do not have to go to, or even be near, the same place.
  2. Then ask them to zoom-in several times until their graph looks like a straight line (locally linear) and save the coordinates of that point as a and b (see the technology hint below).
  3. Then return to the graph and trace one or two clicks left or right to a nearby point on the graph and record the coordinates of that point as c and d.
  4. Write the equation of the line through (a, b) and (c ,d) and enter it in the graphing menu (see technology hint again).
  5. Graph the line. They should see only one “line” because the two graphs are on top of each other.
  6. Re-graph in the standard or Trig window. What do you see now? They should see their original graph with a line that appears tangent to it at the point (a, b).

Next: Discuss what you’ve done, specifically in finding the slope. The value c is a plus a little bit, that is c = a + h. (Or minus a  little bit if h is negative.) So the slope is

\displaystyle \frac{Y1(a+h)-Y1(a)}{(a+h)-a}\text{ or }\frac{f\left( x+h \right)-f\left( x \right)}{h}

and now you are ready to talk about difference quotients and their limit the derivative.

Technology Hints:

When you trace a graph on a calculator the coordinates of the point are written on the bottom of the screen as X and Y, or xc and yc. If you return to the home screen and type X [STO] A and Y [STO] B (or xc [STO] a etc.) the values will be saved to A and B. When you trace to the next point the x and y change, so return to the home screen and save them as C and D.

The line can be written directly in the equation editor in point-slope form by typing Y2 = Y1(A) + (Y1(B)-Y1(A))/(B – A)*(x – A)

Local Linearity I

Certain graphs, specifically those that are differentiable, have a property called local linearity. This means that if you zoom in (using the same zoom factor in both directions) on a point on the graph, the graph eventually appears to be a straight line whose slope if the same as the slope (derivative) of the tangent line at that point.

Now we are a little ahead of ourselves here since we haven’t mentioned tangent lines and derivatives yet. But local linearity is the graphical manifestation of differentiability. Functions that are differentiable at a point are locally linear there and functions that are locally linear are differentiable. In the next post we will see how to use the local linear idea to introduce the derivative. For now, we will look at some graphs that may or may not be locally linear. Are the graphs “smooth” everywhere?

(1)\quad f\left( x \right)=1+\sqrt{{{x}^{2}}+0.001}

\displaystyle (2)\quad g\left( x \right)={{x}^{3}}+\frac{\sqrt[3]{{{\left( x-1 \right)}^{2}}}}{7}

The first function is locally linear at (0, 1) but doesn’t look it. Zoom-in several times and you will see that it is smooth and locally linear there eventually the graph looks like a horizontal line near (0, 1). This only looks like an absolute value graph because 1+\sqrt{{{x}^{2}}+0.001}\approx 1+\sqrt{{{x}^{2}}}=1+\left| x \right|.

The second function appears locally linear at (1, 1), but is not. Zoom in a few times at you will see very strange things going on. (Hint: Use a graphing program or a calculator and enter x^3+((x – 1)^2)^(1/3)/7 as simplifying to a power of 2/3 may confuse the calculator.)

The moral is that you can never be sure just looking at a graph whether it is locally linear or not; you’re never sure if you have zoomed in enough.

Nevertheless, the local linearity concept is helpful in introducing the derivative and, when you can be sure the function is not locally linear, knowing the derivative does not exist.

Looking ahead: Take a look at the AP exam from 2005 AB 5. Here you were given a velocity graph “modeled by the piecewise- linear function defined by the graph” copied below.

Student were asked to find v ‘(4) or explain why it does not exist. It does not exist because the graph is not locally linear there.

Later they were asked if the Mean Value Theorem guaranteed a value of c in the interval [8, 20] such that v ‘(c) is equal to the average rate of change over the interval. The answer is “no”, the value does not exist because the function is not differentiable on the interval because it is not locally linear everywhere in the interval.

Absolutely

Absolute Value

The majority of students learn about absolute value long before high school. That is, they learn a lot of wrong things about absolute value.

  • They learn that “the absolute value of a number is the number without its sign” or some such nonsense. All numbers, except zero have a sign!  This sort of works with numbers, but becomes a problem when variables appear. True or false | x | = x? True or false | –x | = x? Most kids will say they are both true; in fact, as you know, they are both false.
  • They also learn that “the absolute value of a number is its distance from zero on the number line.” True and works for numbers, but what about variables?
  • They learn that “the absolute value of a number is the larger of the number and its opposite.” True again. How do you use it with variables?
  • They learn \left| x \right|=\sqrt{{{x}^{2}}} which is correct, useful for order-of-operation practice, and useful in other ways later, But they still compute \sqrt{{{\left( -3 \right)}^{2}}}=-3 and  \sqrt{{{x}^{2}}}=x since the square and square “cancel each other out.”

So here is a good vertical team topic. Get to those teachers in elementary and middle school and be sure they are not doing any of the above. They should start with the correct definition in words:

  • The absolute value of a negative number is its opposite.
  • The absolute value of a positive number (or zero) number is the same number.

This works all the time and will continue to work all the time. Teaching anything else will eventually require unlearning what they are using, and unlearning is far more difficult than learning.

When they start using variables and reading symbols translated into English, then the definition becomes their first piecewise define function:

  • \text{ If }x\ge 0,\text{ then }\ \left| x \right|=x;  and if x<0,\text{ then }\left| x \right|=-x
  • \left| x \right|=\left\{ \begin{matrix} x & \text{ if }x\ge 0 \\ -x & \text{ if }x<0 \\ \end{matrix} \right.

When reading this definition be sure to say “the opposite of the number” not “negative x” which in this case is probably a positive number.

Give variations of the two True-False questions above on every quiz and test until everyone gets it right!

When you see absolute value bars and want to be rid of them the first question to ask is, “Is the argument positive or negative? “Any time there is an absolute value situation, this is the way to proceed.

And yes, this does show up on the AP Calculus exams. Consider \int_{0}^{1}{\left| x-1 \right|dx} which appeared as a multiple-choice question a few years ago. Give it a try before reading on.

On the interval of integration, [0,1], \left( x-1 \right)\le 0 so \left| x-1 \right|=-\left( x-1 \right)

\displaystyle \int_{0}^{1}{\left| x-1 \right|dx}=\int_{0}^{1}{-\left( x-1 \right)}dx=\left. -\tfrac{1}{2}{{x}^{2}}+x \right|_{0}^{1}=-\tfrac{1}{2}+1-0=\tfrac{1}{2}

Now try \displaystyle \int_{0}^{1}{\sqrt{{{x}^{2}}-2x+1}\,dx}, or did we do this one already?