Derivatives of Trigonometric Functions

First, let’s present the standard approach. This is from the calculus textbook I teach out of.

der of sinx

This was, as far as I was concerned, the only possible proof. The pedagogical flexibility lay entirely in how to frame the question, how to get students to discover the fact on their own (via graphical techniques), and how to add extra meaning to the result.

The most important question, so I thought for years, was really how one introduces and understands the fact that \lim_{x \to 0} \frac{\sin x}{x}=1. Some textbooks introduce it more or less out of the blue as “an important limit to know” and prove it via the Squeeze Theorem. Others prefer to wait until halfway through the above proof, realizing only then that this limit is important and solving it with a purpose in mind. There is also a difference of opinion as to how much rigor is required to establish the key inequality, that \sin \theta < \theta < \tan \theta. My textbook uses an area argument, but others prove the inequality with a nested sequence of segment inequalities.

My personal preference is for students to encounter \lim_{x \to 0} \frac{\sin x}{x}=1 “naturally” by attempting to graph y=\frac{\sin x}{x} in precalculus, along with other interesting functions like y=x \cdot \sin x, y=x \cdot \cos x, y = x + \sin x, y = e^{-x} \cdot \sin x, and y = \sin(1/x). These are more or less exercises in recognizing the so-called “envelope” of the product or sum of a periodic function and another function and have various scientific applications. The very informal geometric argument for why \lim_{x \to 0} \frac{\sin x}{x}=1 that one encounters in precalc prepares one for the more formal proof in calculus via the Squeeze Theorem.

All of this hard work to prove that \lim_{x \to 0} \frac{\sin x}{x}=1 almost seems to make it the real theorem and leaves \frac{d}{dx} [\sin x] = \cos x as a corollary.

By contrast, consider this:

Proof of derivative of sinx

I’m tempted to make no further comment, since this beautiful and striking diagram so thoroughly and clearly explains why the derivative of sine is cosine. Tiny changes in the sine of an angle are proportional to the cosine of that angle since the red arc length above is effectively a tangent to the circle. I would go so far as to say that until you see a diagram like this, you don’t even really understand the theorem at all. Why don’t we teach the derivative of sine this way? Why is this figure not in all the textbooks? I think I know the answers to these questions. The answers involve a long story about the history of calculus, the banishment of infinitesimals during the quest for rigor, and the abandonment of geometry as a satisfactory basis for analysis. But these diagrams are just too beautiful to give up and it’s cruel of us to keep them hidden from our students.

Here’s another calculus proof:

Proof of derivative of arcsinx

Compare this to the standard treatment you find in textbooks:

crapderarcsine

Which one of these proofs excites you? Which one makes you really feel like you understand the theorem and why it’s true?

I have created an entire series and I post them here without further comment.

Proof of derivative of tanx


Proof of derivative of arctanx


Proof of derivative of secx


Proof of derivative of arcsecx

 

The Product Rule

At some point in every calculus class, we must discover and prove the product rule for derivatives. How a calculus teacher chooses to do this probably says a lot about their pedagogy and educational priorities.

Some teachers might simply write the rule on the board, expect students to accept it, and immediately launch into examples. Should we try to let the students discover the formula on their own? Should we perhaps lead them into a trap by suggesting that the derivative of a product of two functions is the product of the derivatives and let them find counterexamples? Should we state the theorem, but let the students try to prove it on their own? Should we perhaps have an entire mini-lesson on what it even means to have a product of two functions?

Should we try to motivate the entire discussion with a particularly intuitive pair of functions whose product has some real-world significance? Should we interpret the product of two functions geometrically, as the area of the corresponding rectangle? If properly motivated and explained, do we actually gain anything by doing the rigorous proof via limits?

The Status Quo

As a foil, here is the introduction to and proof of the product rule from the textbook that I teach out of.

product rule

I understand that textbooks have limited space and are no substitute for a full curriculum, but I think we can all agree that this is awful. There is no motivating example and no geometric intuition is called upon. The author merely proves the theorem, dryly and without understanding or purpose. The author even admits that the proof is unsatisfying and unedifying and apologizes in advance for its opaque maneuvers! Some proofs involve “clever steps that may appear unmotivated to a reader”.

In other words, reader, I am clever and you are not. This proof crucially involves cleverness, but since you’re not clever, you never would have thought of it yourself. I will perform some algebraic manipulations here in blue — they may appear unmotivated to you, but that’s your fault. In fact, I haven’t motivated them at all, but I don’t need to explain my clever methods to you. This is a calculus textbook after all, not a motivational textbook on explaining one’s cleverness. I have proved the rule, what else do you want me to do? If you want meaning and understanding, please consult your local religious figures for guidance.

Can we do better? Yes, I think we can. My friend James Key and I have used the phrase “tyranny of the blue text” to refer to totally opaque and unmotivated algebraic moves in textbook math proofs, since the offending expressions are often rendered in blue. Proving an important theorem to students via seemingly arbitrary, unmotivated algebraic tricks is an intellectual crime, and we should endeavor to banish the tyranny of the blue text from our classrooms and from our consciousness.

Idea #1: A Word Problem

Suppose a particular factory produces toys 24 hours a day.

Let W(t) be a continuous model of the number of workers at the factory at time t. The value of this function fluctuates throughout the day as workers leave and arrive according to their various particular schedules.

Let E(t) be a continuous model of the number of toys produced per worker per hour at time t. This function measures the overall efficiency of the factory at a particular time of day. This could reasonably be expected to fluctuate due to external factors like the electricity supply, the weather (solar panels!), or the tiredness of the workers.

Then (WE)(t) = W(t) \cdot E(t) is the total rate at which the factory produces toys, measured in toys per hour, at a particular time t.

W'(t) is the rate of change of W with respect to t, in other words the rate at which the workforce at the factory is rising or falling, as workers leave and arrive.

E'(t) is the rate of change of E with respect to t, in other words the rate at which the efficiency of the factory (on a per worker basis) is changing at a particular time t.

(WE)'(t) is the rate at which the factory’s output is changing, at a given time t. In other words, if (WE)'(t) is positive and big, the factory’s output is increasing a lot at that moment, but if (WE)'(t) is positive and small, the factory’s output is increasing only a little at that time t.

Using our own common sense, what should (WE)'(t) depend on? Surely W'(t) is relevant, since even if efficiency holds steady, if workers are pouring into the factory at time t, the factory’s output will go up. But surely E'(t) is also relevant, since even if the workforce holds steady, if the workers are becoming more efficient, then the factory’s overall output will go up. But the current size of the workforce, W(t), is also relevant, since if, for example, efficiency is going up but the current workforce is very small, those gains in efficiency will not translate into large increases in output. And the current efficiency, E(t), is also relevant, since if, for example, workers are pouring into the factory, but the current toy production per worker per hour is very small, then those extra workers will also not translate into large increases in output.

Just by having these conversations, we prime our students to have a deep appreciation of what the product rule is about, what differentiation is about, why we would ever want to multiply two functions, and why we would ever want to learn calculus.

This year, when giving this exact introduction to the product rule, I had a student guess the product rule right there on the spot, just from talking out the logic of the toy factory.

Idea #2: A Geometric Interpretation

Some calculus textbooks motivate the product rule geometrically, by interpreting the product of two functions as the area of the rectangle whose side lengths are the values of the two functions at a given time.

prod rule #1

This sloppy picture is taken from a presentation I gave at an NCTM conference a few years ago about calculus proofs. The area of the rectangle with side lengths f and g represents the value of the fg function at a particular time. A moment later, both f and g change, and the derivative wants to measure the size of the change. Here again, we can read the product rule directly off the diagram. A “proof” like this was probably totally sufficient to a mathematician of the 18th century, but in a post-Cauchy/Weierstrass world, we need to verify these intuitions via the definition of the derivative as a limit.

But we can hold onto our geometric intuition and have our rigor as well!

prod rule #2

The same diagram can be used to interpret that mysterious numerator in the definition of the derivative and avoid the tyranny of the blue text. The diagram motivates, but the rigor is preserved, since the limit just under the rectangle can be expanded and verified to be equivalent to the limit just above the diagram. But this time we are doing the proof with meaning and understanding.

Teaching the product rule this way might even be considered “standard”. The only drawback is that you do kind of have to be clever to think to do all this! Would a student come up with the idea to make a rectangle on their own? I’m not sure. I don’t claim to be the first or the only one to use a rectangle to discover, motivate, and even prove the product rule, but the following is something I have never seen anywhere before and that I just came up with a month ago. It is the excuse to write this blog post.

Idea #3: Start with a particular example

prodx2

I’m getting a bit tired, so I pasted this picture in. The idea is simple. Combine a function with a known derivative and a generic second function f. And then just try to find the derivative of the product. No understanding or geometric intuition is required, but no teacher help or input is probably required either.

A reasonable calculus student who is confident, good at algebra, and experienced with limits and computing derivatives from the definition should be able to get to the end by just doing what comes natural.

I have not tried this before in class, so I can’t say how well it will work. But if it works, then the students have proved themselves to be every bit as clever as is required, and they’ve done it on their own. The teacher can then add extra layers of understanding to the general phenomenon of the product rule and lead the class through the general proof, possibly using geometry as a guide. But the students who figured out this particular example will feel that they could have done the general case on their own. And they will be right.

Extraneous Solutions – Part 2 of 3

Solving an Equation as a Sequence of Equation Replacement Operations

Part 1 was so long because I wanted to be extremely thorough and to present things to an audience that perhaps hadn’t thought much about the logic of equation solving at all. Since we’re now all experts, perhaps it’s worth it to summarize everything very succinctly.

Given an equation in one free variable, we want to find the solution set. To do this, we replace that equation with an equivalent equation whose solution set is more obvious.

(1) 8x - 5 = 5x + 1

(2) 8x = 5x + 6

(3) 3x = 6

(4) x = 2

If in the transition from (1)-(2), from (2)-(3), and from (3)-(4) we are careful to replace each equation with an equivalent equation, then by the transitivity of equivalence, the original equation and terminal equation are guaranteed to be equivalent. Since the solution set of the terminal equation is obvious, we know the solution set of the original equation, as well. Thus solving an equation requires establishing that certain equation replacement operations are indeed equivalence preserving and having the creativity and experience to know which ones to apply and in what order.

What are the Equivalence-Preserving Operations on Equations?

If a = b, then f(a) = f(b) for any well-defined function f. If a and b are expressions containing a free-variable, then any value of that variable which satisfies a = b will also satisfyf(a) = f(b). In other words, if you find it useful, feel free to replace any equation with a new equation which is the result of applying any function to both sides of the original equation. Any solution to the original equation will also be a solution to the new equation.

If the function f is also one-to-one, then by definition, f(a) = f(b) \Rightarrow a = b so any solution of f(a) = f(b) will also be a solution to a = b. Thus applying f to both sides of an equation is equivalence-preserving. If f is not one-to-one, then in general, the operation is not equivalence-preserving.

In solving equation (1), we applied f(n) = n + 5, g(n) = n - 5x and h(n) = n/2 in that order. Since all three of the functions are one-to-one, we are assured that (1) and (4) are equivalent. If we had cause to apply a non-one-to-one function, then we should be vigilant for extraneous solution.

A More Interesting Example

Consider

(5) \sqrt{6x-2} - \sqrt{x+1} = 2

As I mentioned in the other post, these square roots are begging to be squared, but since there are two of them, one squaring will not be enough. Even though it’s not necessary to do so, it’s helpful to move one radical expression to the other side.

(6) \sqrt{6x-2} = 2 + \sqrt{x+1}

(7) 6x - 2 = 4 + 4\sqrt{x + 1} + x + 1 We squared!

(8) 5x - 7 = 4\sqrt{x+1}

(9) 25x^2 - 70x + 49 = 16x + 16 We squared again!

(10) 25x^2 - 86x + 33 = 0

(11) (25x - 11)(x - 3) = 0

So x \in \{\frac{11}{25}, 3\}

Since in the transition from (6)-(7) and again in the transition from (8)-(9) we had reason to apply the non-one-to-one function f(n) = n^2, we should be vigilant for extraneous solutions. [Note: since both sides of (6) are necessarily positive, applying f(n) = n^2 is equivalence-preserving, so no extraneous roots will be created there.] By checking back in the original equation, we see that 3 is a solution, but \frac{11}{25} is not. I am more or less content to leave it at that. But some may ask for more clarity as to exactly what happened and when, so let’s indulge them.

I will now list each equation in reverse order along with its solution set:

(11) (25x - 11)(x - 3) = 0                            \{\frac{11}{25}, 3\}

(10) 25x^2 - 86x + 33 = 0                             \{\frac{11}{25}, 3\}

(9) 25x^2 - 70x + 49 = 16x + 16                 \{\frac{11}{25}, 3\}

(8) 5x - 7 = 4\sqrt{x+1}                                     \{3\}

Since 5\cdot\frac{11}{25} - 7 = \frac{11}{5} - \frac{35}{5} = -\frac{24}{5} \neq 4\sqrt{\frac{11}{25} + 1} = 4\sqrt{\frac{11}{25} + \frac{25}{25}} = 4\sqrt{\frac{36}{25}} = 4\cdot\frac{6}{5} = \frac{24}{5}

So we have isolated the precise moment when the extraneous solution x = \frac{11}{25} is created and it appears exactly where we would expect it, in the transition from (8) to (9) as we replaced (8) with the result of applying the non-one-to-one function f(n) = n^2 to both sides.

More specifically, if x = \frac{11}{25}, (8) reads - \frac{24}{5} = \frac{24}{5}, which is false, but (9) reads (- \frac{24}{5})^2 = ( \frac{24}{5})^2, which is true. For this particular value of x, we squared both sides and replaced a false statement with a true statement. In retrospect, we can say that x =\frac{11}{25} is not a solution to (8) or to any previous equation in the solving sequence, but is a solution to (9) and thus to all subsequent equations in the solving sequence.

(7) 6x - 2 = 4 + 4\sqrt{x + 1} + x + 1                          \{3\}

Since both sides of (7) are positive when x = 3, it does not surprise us that,

(6) \sqrt{6x-2} = 2 + \sqrt{x+1}                               \{3\}

(5) \sqrt{6x-2} - \sqrt{x+1} = 2                                \{3\}

By fully analyzing the logic behind each step of our equation replacement sequence, we not only:

  • confirm that x = 3 is a solution and that x = \frac{11}{25} is not and
  • understand that squaring both sides may produce an extraneous solution

but also

  • isolate the precise step in the solving sequence in which this extraneous solution was created answering the why, how, and when for this problem
  • confirm that the non-solution status of x = \frac{11}{25} is not merely due to an error of algebra or arithmetic, but is a direct result of that fact that this value produces an equation (8) of the form a = -a

That last point is crucial in distinguishing the phenomenon of extraneous roots from the phenomenon of user error in algebra or arithmetic. If our equation solving sequence consists solely of equivalence-preserving operations, we do not even need to check to see if solutions to our terminal equation are also solutions to our original equation. If we do decide to check, perhaps out of an abundance of caution, and find a discrepancy, then user error must be to blame.

On the other hand, if a solver does employ solution-set-enlarging operations in the solving sequence and finds that a solution to the terminal equation is not a solution to the original equation, is this because the solution is extraneous or due to user error? One could perform an analysis like I did above and confirm that the non-solution is not due to user error, but instead to the logic of the process.

Extraneous Solutions – Part 1 of 3?

Disclaimer

Within my small inner circle of math teachers, the mystery of extraneous solutions seems to be the issue of the year. I have so much to say on this topic (algebraic, logical, pedagogical, historical, linguistic) that I don’t really know where to begin. My only disclaimer is that I’m not really sure if this topic is all that important.

Solving an Equation with a Radical Expression

Consider the following equation:

(1) 2\sqrt{x+8} +5 = 11

One hardly needs algebra skills or prior knowledge to solve this, but prior experience suggests trying to isolate x.

(2) 2\sqrt{x+8} = 6 (we subtract 5 from both sides)

(3) \sqrt{x+8} = 3 (we divide both sides by 2)

Now, if the square root of something is 3, then that something must be 9, so it immediately follows that

(4) x+8 = 9

(5) x = 1 (we subtract 8 from both sides)

Squaring Both Sides

In my transition from (3) to (4), I used a bit of reasoning. Some conversational common sense told me that “if the square root of something is 3, then that something must be 9”. But that logic is usually just reduced to an algebraic procedure: “squaring both sides”. If we square both sides of equation (3), we get equation (4).

On the one hand, this seems like a natural move. Since the meaning of \sqrt{a} is “the (positive) quantity which when squared is a“, the expression \sqrt{a} is practically begging us to square it. Only then can we recover what lies inside. A quantity “which when squared is a” is like a genie “which when summoned will grant three wishes”. In both cases you know exactly what to do next.

Unfortunately, squaring both sides of an equation is problematic. If a = b is true, then a^2 = b^2 is also true. But the converse does not hold. If a^2 = b^2, we cannot conclude that a = b, because opposites have the same square.

This leads to problems when solving an equation if one squares both sides indiscriminately.

A Silly Equation Leads to Extraneous Solutions

Consider the equation,

(6) x = 4

This is an equation with one free variable. It’s a statement, but it’s a statement whose truth is impossible to determine. So it’s not quite a proposition. Logicians would call it a predicate. Linguistically, it’s comparable to a sentence with an unresolved anaphor. If someone begins a conversation with the sentence “He is 4 years old”, then without context we can’t process it. Depending on who “he” refers to, the sentence may be true or false. The goal of solving an equation is to find the solution set, the set of all values for the free variable(s) which make the sentence true.

Equation (6) is only true if x has value 4. So the solution set is \left\{4 \right\} . But if we square both sides for some reason…

(7) x^2 = 16 has solution set \left\{4, -4\right\}

We began with x = 4, “did some algebra”, and ended up with x^2 = 16. By inspection, -4 is a solution to x^2 = 16, but not to the original equation which we were solving, so we call -4 an “extraneous solution”. [Extraneous – irrelevant or unrelated to the subject being dealt with]

Note that the appearance of the extraneous solution in the algebra of (6)-(7) did not involve the square root operation at all. But this example was also a bit silly because no one would square both sides when presented with equation (6), so let’s look at a slightly less silly example.

Another Radical Equation

(8) 2\sqrt{x+8} + 5 = -1

(9) 2\sqrt{x+8} = -6

(10) \sqrt{x+8} = -3

People paying attention might stop here and conclude (correctly) that (10) has no solutions, since the square root of a number can not be negative. Closer inspection of the logic of the algebraic operations in (8)-(10) enables us to conclude that the original equation (8) has no solutions either. Since a = b \iff a - 5 = b -5, any solution to (8) will also be a solution to (9) and vice versa. Since a = b \iff a/2 = b/2, any solution to (9) will also be a solution to (10) and vice versa. So equations (8), (9), and (10) are all “equivalent” in the sense that they have the same solution set.

But what if the equation solver does not notice this fact about (10) and decides to square both sides to get at that information hidden inside the square root?

(11) x+8 = 9

(12) x = 1

Again we have an extraneous solution. x = 1 is a solution to (12), but not to the original equation (8). Where did everything go wrong? By the previous logic, (8), (9), and (10) are all equivalent. (11) and (12) are also equivalent. So the extraneous solution somehow arose in the transition from (10) to (11), by squaring both sides.

So unlike subtracting 5 from both sides or dividing both sides by 2, squaring both sides is not an equivalence-preserving operation. But we tolerate this operation because the implication goes in the direction that matters. If a = b, then a^2 = b^2, so if a and b are expressions containing a free variable x, any value of x that makes a = b true will also make a^2 = b^2 true.

In other words, squaring both sides can only enlarge the solution set. So if one is vigilant when squaring both sides to the possible creation of extraneous solutions, and is willing to test solutions to the terminal equation back into the original equation, the process of squaring both sides is innocent and unproblematic.

Those Who are Still Not Satisfied

Still there are some who are not satisfied with this explanation: “Why does this happen? What is really going on? Where do the extraneous solutions come from? What do they mean?”

One source of the problem is the square root operation itself. \sqrt{a} is, by the conventional definition, the positive quantity which when squared is a. The reason that we have to stress the positive quantity is that there are always two real numbers that when squared equal any given positive real number. There are a few slightly different ways of making this same point. The operation of squaring a number erases the evidence of whether that number was positive or negative, so information is lost and we are not able to reverse the squaring process.

We can also phrase the phenomenon in the language of functions. Since squaring is a common and useful mathematical practice, information will often come to us squared and we’ll need an un-squaring process to unpack that information. f(x) = x^2, for all the reasons just mentioned, is not a one-to-one function, so strictly speaking, it is not invertible. But un-squaring is too important, so we persevere. As with all non-one-to-one functions, we first restrict the domain of f(x) = x^2 to [0, \infty) to make it one-to-one. This inverse, f^{-1}(x) = \sqrt{x} thus has a positive range and so the convention that \sqrt{a} \geq 0 is born. So every use of the square root symbol comes with the proviso that we mean the positive root, not the negative root. We inevitably lose track of this information when squaring both sides.

[Note: Students can easily lose track of these conventions. After a lot of practice solving quadratic equations, moving from x^2 = 9 effortlessly to x = \pm 3, students will often start to report that \sqrt{9} = \pm 3.]

The convention that we choose the positive root is totally arbitrary. In a world in which we restricted the domain of  f(x) = x^2 to (-\infty, 0] before inverting, \sqrt{9} would be -3. In that world, x = 1 is a perfectly good solution to 2\sqrt{x+8} + 5 = -1, not extraneous at all.

A Trigonometric Equation which Yields an Extraneous Solution

For parallelism, consider the (somewhat artificial) equation:

(13) \arccos(2x-1) = \frac{4\pi}{3}

Like in (10), careful and observant solvers might notice that the range of the \arccos(x) function is [0, \pi] and correctly conclude that the equation has no solutions. But there seems to be a lot going on inside that \arccos expression, so many will rush ahead and try to unpack it by “cosineing”. Indeed, since a=b \Rightarrow \cos(a) = \cos(b), this seems innocent.

(14) 2x - 1 = -\frac{1}{2}

(15) 2x = \frac{1}{2}

(16) x = \frac{1}{4}

But x = \frac{1}{4} is an extraneous solution since \arccos(-\frac{1}{2}) = \frac{2\pi}{3} not \frac{4\pi}{3}.

The explanation for this extraneous solution will be similar to the logic we used above. If a = b, then \cos(a) = \cos(b), so if a and b are expressions containing a free variable x, any value of x that makes a = b true will also make \cos(a) = \cos(b) true. So we will not lose any solutions by “taking the cosine of both sides”. But as the cosine function is not one-to-one, \cos(a) = \cos(b) does not imply that a = b. So taking the cosine of both sides, just like squaring both sides, can enlarge the solution set.

The above paragraph explains why extraneous solutions could appear in the solution of (13), but maybe not why they do appear. For that, we again must look to the presence of the \arccos function. Since \cos is not one-to-one, we had to arbitrarily restrict its domain to [0, \pi] prior to inverting. So every use of the \arccos symbol comes with its own proviso that we are referring to a number in a particular interval of values. In a world in which we had restricted the domain of \cos to [\pi, 2\pi] prior to inverting, x = \frac{1}{4} would be a perfectly good solution to \arccos(2x-1) = \frac{4\pi}{3}, not extraneous at all.

The above examples seem to suggest that one can avoid dealing with extraneous solutions by carefully examining one’s equations at each step. But in practice, this really isn’t possible. I saved the fun examples for the end, but as this post is already way way too long, they will have to wait for a bit later.

-Will Rose

Thanks

Thanks to John Chase for letting me guest post on his blog. Thanks to James Key for encouraging me again and again to think about extraneous solutions.