Instructor’s Lecture Notes

for Engineering Calculus I

These are the instructor’s lecture notes for a first course in calculus with a focus on computations covering limits, continuity, techniques of differentiation, implicit differentiation, “related rates” problems, graph-sketching using a function’s derivative, optimization, Newton’s method, Riemann sums, basic techniques of integration (including substitution), the Fundamental Theorem of Calculus, and computing areas and volumes and work using integration.

Introduction

Typographic Conventions

Terminology & Definitions

Differential Calculus Overview

There’s no need to “transcribe” what’s on the display; just read and form questions. Before next class, skim textbook §1.4.

\[\begin{align*} 22\text{ ft/s} &= 15\text{ mph} \approx 6.7056\text{ m/s} \\ \implies\quad 3\text{ ft/s} &\approx \phantom{1}2\text{ mph} \approx 1\text{ m/s} \end{align*}\]

Everything we’ll be doing will be measured in feet and seconds for the sake of having sane numbers, but I find it easier to compare speeds to my impression of reality when they’re expressed in miles-per-hour (mph).

A drag race, commonly called a pass, is typically run on a 1320 ft (¼ mile) long track. Suppose a dragster finishes a pass in ten seconds. How fast was the dragster going?

\[ r = \frac{d}{t} = \frac{\text{change in distance}}{\text{change in time}} = \frac{1320-0}{10-0} = 132\text{ ft/s} = 90\text{ mph} \] This question doesn’t make sense though — how fast was the dragster going when it started the pass? (0 mph) how fast do you think the dragster was going when it finished the pass? (up to \(300\text{ mph}\)) So the question is worded poorly at least, but what’s the natural \(r = d/t\) computation give us?

A drag race, commonly called a pass, is typically run on a 1320 ft (¼ mile) long track. Suppose a dragster finishes a pass in ten seconds. How fast was the dragster going? What was the dragster’s average speed during the pass?

This is the average speed of the dragster during the pass. Just to practice that computation a bit …

A drag race, commonly called a pass, is typically run on a 1320 ft (¼ mile) long track. Suppose a dragster travels 285 ft in the first five seconds of a pass, and finishes the pass in ten seconds. What was the average speed of the dragster for the first half of the pass? What was the average speed of the dragster for the second half of the pass?

\[ \frac{285\text{ft}-0\text{ft}}{5\text{s}-0\text{s}} = 57\text{ ft/s} \approx 38\text{ mph} \qquad \frac{1320\text{ft}-285\text{ft}}{10\text{s}-5\text{s}} = 207\text{ ft/s} \approx 138\text{ mph} \]

Now when doing the calculations for this using \(d=rt,\) or using \(r = d/t,\) you’ve got to calculate something that looks like a change-in-distance over a change-in-time: this looks an awful lot like the formula for the slope of a line between two points. While you finish these calculations, allow me to encourage you to begin thinking geometrically about the situation by drawing a suggestive plot for you.

Sketch a big time×distance coordinate axes, previewing the Desmos demo, and plot points \((0,0)\) and \((5,285)\) and \((10,1320);\) don’t fill in segments between the points.

These three points correspond to the three pieces of data we know about the dragster’s position, and the average speeds we’ve just calculated can be thought of geometrically as slopes in this picture. And we can even guess at what the rest of the curve illustrating the distance should look like. The dragster starts off slow, covering distance slower at the beginning of the pass, but accelerates, gaining speed, covering ground faster and faster during the pass. Now with this illustration before you let me ask you the question:

A drag race, commonly called a pass, is typically run on a 1320 ft (¼ mile) long track. Suppose a dragster travels \(f(t)\) ft in the first \(t\) seconds of a pass, where the distance \(f(t)\) is defined by the formula \[ f(t) = t^3 + 32t \,\,\text{ft}\,. \] How fast was the dragster going exactly five seconds into the pass?

Display Desmos demo suggestively

Since we now know everything about the position of the dragster — at any given time \(t\) we know its distance from the starting line — morally we should be able to reverse-engineer its speed at any moment in time \(t\) too. All the information need to answer this question is there, but how do we do it? We can use that formula to calculate the average speed of the dragster between any two times, but this is quite different than calculate the speed at a single instant.

A drag race, commonly called a pass, is typically run on a 1320 ft (¼ mile) long track. Suppose a dragster travels \(f(t)\) ft in the first \(t\) seconds of a pass, where the distance \(f(t)\) is defined by the formula \[ f(t) = t^3 + 32t \,\,\text{ft}\,. \] How fast was the dragster going exactly five seconds into the pass? What was the dragster’s average speed between the 4- and 6-second marks?
A drag race, commonly called a pass, is typically run on a 1320 ft (¼ mile) long track. Suppose a dragster travels \(f(t)\) ft in the first \(t\) seconds of a pass, where the distance \(f(t)\) is defined by the formula \[ f(t) = t^3 + 32t \,\,\text{ft}\,. \] How fast was the dragster going exactly five seconds into the pass? What was the dragster’s average speed between the 4- and 6-second marks? What was the dragster’s average speed between the 4.9- and 6.1-second marks?
A drag race, commonly called a pass, is typically run on a 1320 ft (¼ mile) long track. Suppose a dragster travels \(f(t)\) ft in the first \(t\) seconds of a pass, where the distance \(f(t)\) is defined by the formula \[ f(t) = t^3 + 32t \,\,\text{ft}\,. \] How fast was the dragster going exactly five seconds into the pass? What was the dragster’s average speed between the 4- and 6-second marks? What was the dragster’s average speed between the 4.9- and 6.1-second marks? What was the dragster’s average speed between the 4.99- and 6.01-second marks?

Secants, Tangents, and Rates

Before next class read the course syllabus and skim textbook chapters §1.5 and §1.6 and §1.8.

Today we formalize and summaries the mathematical points from yesterday. In the \(xy\)-plane, the slope of any line will represent a “change in \(y\)” per a “change in \(x\)”. If \(x\) and \(y\) have units, the slope will adopt those units: if \(x\) is measured in hours and \(y\) in kilometers, then the slope of a line will have units kilometers-per-hour (kph).

A secant line (from the Latin “to cut”) is the line that passes through two points on a curve. If the curve is the graph of a continuous function, then the slope of this line represents the average rate-of-change in the value of the function between those two input values. It’s important that the function is continuous per that dragster and wormhole example from yesterday.

What’s the equation of the line secant to the graph of the function \(f(x) = x^2\) between the points where \(x=-1\) and \(x=3?\)

A tangent line (from the Latin “to touch”) is a line that just barely kisses a curve at a single point. The slope of a tangent line represents an instantaneous rate-of-change of a continuous function at a point; this is the exact rate-of-change at a moment instead of an average rate of change over some time interval. Geometrically, it’s helpful to imagine tangent lines as being born from secant lines, where two points that define a secant line are pushed together into a single point. This is naïvely how we compute the slope of a tangent line, by inferring it from the slopes of secant lines on smaller and smaller intervals around the point we’re interested in.

What’s the equation of the line tangent to the graph of the function \(f(x) = x^2\) at the point where \(x=3?\) It does’t matter if we “pinch in” from the right \[ \frac{(4)^2-(3)^2}{4-3} = 7 \qquad \frac{(3.1)^2-(3)^2}{3.1-3} = 6.1 \qquad \frac{(3.01)^2-(3)^2}{3.01-3} = 6.01 \qquad \dotsb \qquad \frac{(3+h)^2-(3)^2}{(3+h)-3} \] or from the left \[ \frac{((3)^2-(2)^2}{3-2} = 5 \qquad \frac{((3)^2-(2.9)^2}{3} = 5.9 \qquad \frac{((3)^2-(2.99)^2}{3} = 5.99 \qquad \dotsb \qquad \frac{((3)^2-(3-h)^2}{(3-(3-h)} \] The slope approaches \(6,\) so the equation of the line is \(y - 9 = 6(x-3).\)

This is similar to how we solved the dragster problem, approximating its speed at \(t=5\) by calculating the average speed on smaller and smaller intervals around \(t=5\). For \(f(t) = t^3+32t,\) \[ \frac{f(6) - f(4)}{6-4} \qquad \frac{f(5.1) - f(4.9)}{5.1-4.9} \qquad \frac{f(5.01) - f(4.99)}{5.01-4.99} \quad \dots \quad \frac{f(5+h) - f(5-h)}{(5+h)-(5-h)} \] We could have done this from either side too: \[ \frac{f(5+h) - f(5)}{(5+h)-(5)} \qquad\text{or}\qquad \frac{f(5) - f(5-h)}{(5)-(5-h)} \]

A less important fact: the line perpendicular to a tangent line is called a normal line, and is said to be normal to the graph. If the slope of the tangent line is \(\tfrac{a}{b}\) then the slope of the normal line is \(-\tfrac{b}{a}.\)

What’s the equation of the line normal to the graph of the function \(f(x) = x^2\) at the point where \(x=3?\)

Limits

Pre-prepare by defining the function define f(x) { return (x^3*s(x-3))/(17*(x-3)) } in GNU bc as an oracle to consult, hidden from students, to evaluate \(\lim_{x \to 3} f(x).\)

Open example graphs in Desmos to go over at the end of lecture.

Before next class, recall what the arctangent (\(\tan^{-1}\)) and absolute value functions are, simplify \(\tfrac{x^2+2x-15}{x-3}\) by first factoring the polynomial numerator, and simplify \(\tfrac{4-x}{2-\sqrt{x}}\) by rationalizing the denominator.

Last week we solved a couple problems that required us to “pinch in” on a certain value of \(x,\) evaluating a function on a smaller and smaller interval. This was described rather informally. The limit notation provided today is the vocabulary we use to describe that “pinching in” precisely.

Let’s start with a contrived example to explain. Suppose a function \(f\) has been programmed into a computer. We may consult the function as an oracle, asking its output for any input, but we may not look at its source code; we don’t know its formula. Question: what is \(f\) doing at the input \(3\)? Let’s ask:

f(3)
Runtime error (func=f, adr=29): Divide by zero

Well shoot. We can’t evaluate \(f\) at \(3\). There appears to be something goofy happening with \(f\) at the input three \(3\). New question: what is \(f\) doing around the input \(3\)?

query output
f(2.9) 1.4322
f(2.99) 1.5723
f(2.999) 1.5866
f(2.9999) 1.5880
f(2.99999) 1.5882
f(2.999999) 1.5882
query output
f(3.1) 1.7495
f(3.01) 1.6041
f(3.001) 1.5898
f(3.0001) 1.5884
f(3.00001) 1.5882
f(3.000001) 1.5882

So while \(f(3)\) is apparently undefined, we see that the values of \(f(x)\) approach \(1.5882\) as \(x\) approaches \(3\) both from above and below. The concise mathematical notation for this fact is \( \lim_{x \to 3} f(x) \approx 1.5882\,, \) which is useful when we only care what’s happening around an input, but can’t know or don’t care what’s happening at that input. Generally, the notation \(\lim_{x \to c} f(x)\) is read as the limit of \(f\) as \(x\) approaches \(c\). There’s separate notation if we want to talk about the limit from a single direction, one-sided limits: \( \lim\limits_{x \to 3^-} f(x)\) denotes the limit from the negative direction and \(\lim\limits_{x \to 3^+} f(x)\) denote the limit from the positive direction.

And this exactly the notation we need to write down the details of the calculations from last week, getting the slopes of tangent lines from the slopes of secant lines …

What’s the equation of the line tangent to the graph of the function \(f(x) = x^2\) at \(x=3?\) \[ \frac{(3)^2-(2)^2}{3-2} = 7 \quad \frac{(3.1)^2-(3)^2}{3.1-3} = 6.1 \quad \frac{(3.01)^2-(3)^2}{3.01-3} = 6.01 \quad \dotsb \quad \lim\limits_{h \to 3} \frac{(3_h)^2-(3)^2}{(3+h)-(3)} = 6 \]

… and getting instantaneous speeds from average speeds.

Suppose we have a model for how far \(d\) the dragster has travelled from the starting line for any time \(t\) between zero and ten seconds after it started the pass, and that model for the distance is given by a function \(f\) of time as \( d \;=\; f(t) = t^3 + 32t\,. \) How fast was the dragster going exactly five seconds into the pass? \[ \lim\limits_{h \to 0} \frac{f(5+h) - f(5-h)}{(5+h)-(5-h)} \]

Open Desmos and go over examples based on graphs: continuous examples, discontinuous examples, examples with poles, limits at infinity, strange examples.

Evaluating Limits

Yesterday we focused on intuition, and inferring the values of limits from a function’s graph. However there is virtue in being able to calculate a limit from the formula without wasting time graphing it. Today we practice this. The limit laws basically say that, symbolically, a limit distributes across any algebraic operation so long as all involved limits exist.

Given that \(\lim\limits_{x \to 7} f(x) = 3\) and \(\lim\limits_{x \to 7} g(x) = 2\,,\) what must the value of this limit be? \[\lim\limits_{x \to 7} \bigl(f(x)\bigr)^2\bigl(3g(x)-1\bigr)\]
What is the value of \(\lim\limits_{x \to 7} x^2-4x+9\,?\) Solve twice, first by saying “its continuous”, then by exemplifying the limit laws.

There’s nothing novel about the limit laws however, so let’s instead focus on some examples with some more nuance, examples of functions that are not continuous at the point where we are evaluating the limit.

What is the value of \(\lim\limits_{x \to 3} \tfrac{x^2+2x-15}{x-3}\,?\)
What is the value of \(\lim\limits_{x \to 4} \tfrac{4-x}{2-\sqrt{x}}\,?\)
What is the value of \(\lim\limits_{x \to 0} |x|-x \,?\)
What are the values of these limits? \[ \lim\limits_{x \to 5^-} \tfrac{1}{x-5} \quad \lim\limits_{x \to 5^+} \tfrac{1}{x-5} \quad \lim\limits_{x \to 5} \tfrac{1}{x-5} \quad \lim\limits_{x \to 5} \tfrac{1}{(x-5)^2} \]
What is the value of \(\lim\limits_{x \to \infty} \arctan(x)\,?\)
What is the value of \(\lim\limits_{x \to \infty} \frac{2x^3+4x^2-7}{5x^3-7x+11}\,?\)
What is the value of \(\lim\limits_{x \to \infty} \frac{x^7-3}{4x^2+x+3}\,?\)
What is the value of \(\lim\limits_{x \to \infty} \frac{x^2+1}{4x^9-x^6}\,?\)

Pass out practice exercises.

Continuity & Some Theorems

I’ve been saying the word “continuous” a bunch, but using it informally. The word “continuous” is however, a well-defined mathematical term. A function \(f\) is continuous at a point \(c\) if \(\lim_{x \to c} f(x) = f(c);\) the limit from the left and the limit from the right must equal the value at that point. If \(f\) is continuous for all \(c\) in some interval we says it’s continuous on the interval, and if \(f\) is continuous for all \(c\) in its domain we says simple that \(f\) is .

Gesture to slide to define removable discontinuities and jump discontinuities and essential (infinite) discontinuities. Note that in the examples of \(\lim\limits_{x \to 3} \tfrac{x^2+2x-15}{x-3}\) and \(\lim\limits_{x \to 4} \tfrac{4-x}{2-\sqrt{x}}\) from yesterday we’re just “removing” the removable discontinuities.

Draw some examples of functions’ graphs, asking if they’re continuous:

Why do we care? Because most natural phenomena we’re interested in change continuously, morally speaking, or at least we model them with continuous functions. I.e. if we are measuring something in the world over time, if a sufficiently small amount of time (or any independent variable) elapses, we should expect our measurement to also change only a small amount. Examples:

Suppose a dragster starts a 1320 ft pass at a constant speed of 7 ft/s. After five seconds the dragster enters a wormhole and is instantly transported to a position 35 ft from the finish line, from where it continues at a constant speed of 7 ft/s, finishing the pass in ten seconds. What was the average speed of the dragster during this pass?

Another reason we care about continuity is that many of the tools of calculus only apply to continuous functions.

The Intermediate Value Theorem – If \(f\) is continuous on the closed interval \([a,b]\) for which \(f(a) \neq f(b),\) and \(N\) is some number between \(f(a)\) and \(f(b),\) then there must exist some \(c\) between \(a\) and \(b\) such that \(f(c) = N.\)

This theorem is perhaps pretty obvious once you’ve drawn the picture of its graph, but you can extend the logic just a tiny bit to get some surprising corollaries:

Brouwer’s Fixed-Point Theorem – If \(f\) is continuous from the closed interval \([a,b]\) to itself, then \(f\) must have a fixed point, some number \(c\) between \(a\) and \(b\) such that \(f(c) = c.\)

Calculator Crash Course

Bring calculator manual to class.

Survey the sorts of calculators folks have. HP? Casio? Or just a bunch of TI?

Build Good Ergonomic Habits. Try to keep the calculator flat on the desk.

Let the Calculator Store Calculations; Don’t Round. Store variables with Sto→ on any TI. Recall variables with Rcl or MEMVAR. Store functions on a TI83/84+. Evaluate functions from the homescreen.

Learn to Navigate the Calculator Input Line Efficiently. Use the ANS variable and ENTRY command. Arrow keys navigate the input line. Using 2nd with the left- and right-arrows jumps to the beginning and end of the line. The DEL key deletes the token under the cursor. The INS mode is insert mode. The CLEAR command clears to the right of the cursor or to the entire line.

Attune to the Full Capabilities of your Calculator. E.g. equation solver. E.g. programming (TI BASIC).

Don’t let a Tool Become a Crutch. This general advice for all technology. Don’t “cognitively surrender”.

Pop quiz today

The (ε,δ) Definition of a Limit

Formally, we say that \(\lim_{x \to c} f(x) = L\) if for all \(\varepsilon \gt 0\) there exists a \(\delta \gt 0\) such that \(|x-c| \lt \delta\) implies \(|f(x)-L| \lt \varepsilon.\)

Pop open Desmos demo, show shrinking neighborhoods.

This is the level of detail that mathematics majors have to dabble with. Given all the work we’ve done in the last few weeks this probably seems excessive since in all of our examples we can either (1) visualize the limit from the function’s graph or (2) algebraically manipulate the function’s formula. However the notion of limits generalizes to functions that don’t have formulas or whose graphs can’t be easily visualized either because there are too many dimensions, or the domain/range don’t consist of numbers anymore, in which case it become necessary to introduce \(\varepsilon\) and \(\detla\) to parameterize the radii of neighborhoods around your limit points.

Ask for exercises to demonstrate, problems to do, etc.

Differentiation

The Derivative at a Point

Before next class, skim §2.1–§2.2 (today and tomorrow) and compute \(f'(5)\) for each of these possible formulas of the function \(f\): \[ 3x \quad x^2 \quad \tfrac{1}{x} \quad x^2+\tfrac{1}{x} \quad x^3 \quad x^4 \quad \tfrac{1}{x^2} \quad \tfrac{1}{x^3} \quad \sqrt{x} \quad \tfrac{1}{\sqrt{x}} \]

Open the dragster question, and open the exam’s “throwing a thing in space” question, and sketch the graph of the jogger somewhere secret.

Suppose we have a model for how far \(d\) the dragster has travelled from the starting line for any time \(t\) between zero and ten seconds after it started the pass, and that model for the distance is given by a function \(f\) of time as \( d \;=\; f(t) = t^3 + 32t\,. \) How fast was the dragster going exactly five seconds into the pass?

Convince the students that the following limits will be the same, and work through the limit with \(h\) manually, carefully leaving all the work to be revisited tomorrow. We should get \(107.\) \[ \lim\limits_{c \to 5} \frac{f(c)-f(5)}{c-5} \qquad \lim\limits_{h \to 0} \frac{f(5+h)-f(5)}{h} \]

This number we get is the derivative of \(f\) at \(t=5\), Notationally, we write \(f'(5) = 107.\) The derivative represents the rate at which \(f\) is changing at \(t=5,\) and in our particular example since \(f\) represents the distance (feet) between the dragster and the starting line at a time \(t=5\) (seconds), \(f'(5)\) is the rate-change-change in that distance: the speed of the dragster at \(t=5\) seconds.

Note a couple things: (1) in terms of the graph of \(f,\) the number \(f'(5)\) will be the slope of the line tangent to the graph at \(t=5,\) and (2) since \(f'(5)\) is a slope, its units will be the ratio of the units of \(f(t)\) and \(t.\)

Revisit the last exam question about throwing the thing: (1) Does the model really imply that the initial upward speed was …? (2) What was the upward velocity at the thing’s peak? (3) What was the upward velocity the instant before it hits the floor?

The Derivative as a Function

Before next class skim §2.3–§2.5 (so you know what’s coming), and compute \(f'(x)\) for each of these formulas of functions and look for patterns: \[ 3x \quad x^2 \quad \tfrac{1}{x} \quad x^2+\tfrac{1}{x} \quad x^3 \quad x^4 \quad \tfrac{1}{x^2} \quad \tfrac{1}{x^3} \quad \sqrt{x} \quad \tfrac{1}{\sqrt{x}} \] Before next week, watch the 3Blue1Brown videos linked in the course outline for today.

Open and prep Desmos demo on the graphs of derivatives. Don’t overdo this demonstration though.

Suppose I ask you the same question as yesterday about the dragster, but instead of calculating its speed at exactly the five second mark, I ask for the speed at the three second mark instead. Do-able, but annoying to calculate again. We could just look at the computation from yesterday and replace all the 5s by 3s. But here’s a much smarter idea: instead of computing this derivative at a specific point, 5 or 3 or whatever, let’s just compute it at a generic point \(x\) and get a formula for the derivative instead of a number. Then, with this formula pre-computed, we could just plug 5 or 3 or whatever into this formula instead of running through the limit definition every dang time: \[ \cancel{\lim\limits_{h \to 0} \frac{f(5+h)-f(5)}{h}} \quad\implies\quad \lim\limits_{h \to 0} \frac{f(x+h)-f(x)}{h} \] [work through this, replacing all the 5s with \(x\)s and getting a function, and explicitly write the following uses of derivative notation]

\(\displaystyle f(t) = t^3+32t \quad\implies\quad f'(t) = 3t^2+32 \)
\(\displaystyle y = x^3+32x \quad\implies\quad \dot{y} = 3x^2+32 \)
\(\displaystyle \frac{\mathrm{d}}{\mathrm{d}t}\biggl(t^3+32t\biggr) = 3t^2+32 \)

The resulting function is called the derivative of \(f\). This is a formula for the rate-of-change of \(f\) (the speed of the dragster at any moment in time). What’s the speed of the dragster at the two second mark? \(3(2)^2+32 = 44 \text{ m/s}.\) What’s the speed of the dragster at the nine second mark? \(3(9)^2+32 = 275 \text{ m/s}.\) The operation of taking a derivative is called differentiation. This operation is ubiquitous that folks commonly use many different notations for it: \[ f' \qquad \dot{f} \qquad \frac{\mathrm{d}}{\mathrm{d}x}\bigl(f\bigr) \qquad \frac{\mathrm{d}f}{\mathrm{d}x} \qquad \operatorname{D}(f) \qquad f_x % \qquad % f_1 \]

Gesture to slide, explain some notations, leading into talk of the second derivative.

Since the derivative of a function is a new function, you could take a derivative again. It’s just an operation, so why not? These are collectively called higher-order derivatives: \(f'\) is the first derivative of \(f\) and \(f''\) is the second derivative of \(f\) and \(f'''\) is the third derivative of \(f\) and so on and so on. Each of these still represents a rate of change though. The function \(f''\) is the rate-of-change of \(f'.\) If \(f'\) represents a velocity, \(f''\) represents an acceleration. There are plenty of notations for higher-derivatives too: \[ f'' \qquad (f')' \qquad \ddot{f} \qquad \frac{\mathrm{d}}{\mathrm{d}x} \biggl( \frac{\mathrm{d}}{\mathrm{d}x} \bigl( f \bigr) \biggr) \qquad \frac{\mathrm{d^2}}{\mathrm{d}x^2} \bigl( f \bigr) \qquad \frac{\mathrm{d^2}f}{\mathrm{d}x^2} \qquad \operatorname{D}^2(f) \qquad f_{xx} % \qquad % f_{1\,1} \]

Now, while we will initially be focusing on the algebraic (symbolic) side of differentiation, it’s important to know that there is a geometric way to view differentiation that we will more explore more deeply later in the class. A preview now though:

Gesture to Desmos demo and talk about the graph of the derivative.

Tabitha decided to walk from her house to her friend’s house 2000 feet away. It took her 10 minutes to arrive. Here’s the graph detailing her distance \(f(t)\) from her house over time \(t.\) Sketch the graph of \(f'(t).\) [draw this with a square scale]

Basic Differentiation Formulas

Before next class, drill yourself on differentiation exercises (e.g. the online homework). Review the definitions of sine cosine tangent secant cosecant and cotangent. Start a “table of derivatives” on the side board for reference.

Write up the derivatives of these on the display so students might notice the pattern. \[ 3x \quad x^2 \quad \tfrac{1}{x} \quad x^2+\tfrac{1}{x} \quad x^3 \quad x^4 \quad \tfrac{1}{x^2} \quad \tfrac{1}{x^3} \quad \sqrt{x} \quad \tfrac{1}{\sqrt{x}} \]

Pop quiz: what’s the definition of the derivative?

Sometimes it’s necessary to remember this limit definition of the derivative. However, as I hope you’ve noticed calculating these derivatives after yesterday’s class, there are patterns. Today we formally describe these patterns, and learn them as differentiation shortcuts. The goal is to get fast and fluent taking derivatives, just like you are currently fast and fluent at multiplying small numbers, or spelling common words. Now begins a period of practice and drills.

Note the derivatives of \(x^2\) and \(\tfrac{1}{x},\) and note that the derivative of their sum is the sum of their derivatives. This is true in general. Differentiation is a linear operator, meaning that it splits across sums and differences, and constant factors pull out.

Note the derivatives of \(x^2\) and \(x^3\) and \(x^4\) and \(\tfrac{1}{x} = x^{-1}\) too, there’s a pattern here: the exponent comes down as a coefficient, and is replaced by a new exponent that has been decremented by one. This is called the power rule of differentiation. [add to table] This even works if the power isn’t a whole number: \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl(x^\pi\bigr) = \pi x^{\pi-1}.\)

What’s a formula for \(\tfrac{\mathrm{d}}{\mathrm{d}x}\Bigl( 5x^2-2x^4+\tfrac{\sqrt{2}}{x} \Bigr)?\)
What’s a formula for \(\tfrac{\mathrm{d}}{\mathrm{d}x}\Bigl( \tfrac{3}{x^7}-\sqrt[7]{x^3}+5 \Bigr)?\)
What’s a formula for \(\tfrac{\mathrm{d}}{\mathrm{d}x}\Bigl( \sqrt{64x^3} \Bigr)?\)

It may be helpful to “pre-process” the function first.

Now some crunchier facts about differentiation. The derivative of a product is not the product of the individual derivatives; it’s more complicated than that. Similarly the derivative of a quotient is not the quotient of the individual derivatives. Instead we have formulas for such things, referred to as the product rule and quotient rule of differentiation: \[ \Bigl( fg \Bigr)' = f'g + fg' \qquad \Bigl( \tfrac{f}{g} \Bigr)' = \frac{f'g - fg'}{g^2} \]

What’s a formula for \(\tfrac{\mathrm{d}}{\mathrm{d}x}\Bigl( \bigl(x^7-4x^2\bigr)\bigl(3-2x^8\bigr) \Bigr)?\)
What’s a formula for \(\tfrac{\mathrm{d}}{\mathrm{d}x}\Bigl( \frac{x^3}{\sqrt[3]{x}-7} \Bigr)?\)

Derivatives of Trigonometric Functions

Before next class, review what a composite of two functions is. Before next week skim §2.6–§2.8 so you know what’s coming.

Make sure the \(f\) and \(\tfrac{\mathrm{d}f}{\mathrm{d}x}\) table is on a board, and add the trigonometric functions as you go.

First note these special limits; there’s a geometric proof of these limits in the textbook: \[ \lim\limits_{x \to 0} \frac{\sin(x)}{x} = 1 \qquad \lim\limits_{x \to 0} \frac{\cos(x)-1}{x} = 0 \]

Prove that \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl( \sin(x) \bigr) = \cos(x)\) and declare that \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl( \cos(x) \bigr) = -\sin(x)\) can be shown similarly.

Gotta use the sum-of-angles formula \(\sin(x+h) = \sin(x)\cos(h)+\cos(x)\sin(h)\) and the second of those special limits: \[\begin{align*} \lim_{h\to 0} \frac{\sin(x+h)-\sin(x)}{h} &= \lim_{h\to 0} \frac{\sin(x)\cos(h)+\cos(x)\sin(h)-\sin(x)}{h} \\&= \lim_{h\to 0} \frac{\sin(x)\bigl(\cos(h)-1\bigr) + \cos(x)\sin(h)}{h} \\&= \sin(x) \lim_{h\to 0} \frac{\bigl(\cos(h)-1\bigr)}{h} + \cos(x)\lim_{h\to 0} \frac{\sin(h)}{h} \\&= \sin(x) \bigl(0\bigr) + \cos(x) \bigl(1\bigr) \\&= \cos(x) \end{align*}\]

Draw the cycle \(\sin(x) \overset{\mathrm{D}}{\to} \cos(x) \overset{\mathrm{D}}{\to} -\sin(x) \overset{\mathrm{D}}{\to} -\cos(x) \overset{\mathrm{D}}{\to} \sin(x).\)

Prove that \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl( \sec(x) \bigr) = \sec(x)\tan(x)\) and declare that \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl( \csc(x) \bigr) = -\csc(x)\tan(x)\) can be shown similarly.
Prove that \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl( \tan(x) \bigr) = \sec^2(x)\) and declare that \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl( \cot(x) \bigr) = -\csc^2(x)\) can be shown similarly.

Add all these to the table on the board and note that the derivative of the evil “co-” functions pick up a negative.

What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sin\bigl(x\bigr)\tan\bigr(x\bigl) \biggr)?\)
What’s an equation for the line tangent to the graph of the function \(f(x) = \sin(x)\) at the point where \(x = \tfrac{\pi}{6}?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}t}\biggl( \frac{\sqrt{t}}{\cot(t)} \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sin(x)-6\cos(x)-x\csc(x) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( x^3\cos(x) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}^2}{\mathrm{d}x^2}\biggl( x^3\cos(x) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \frac{2\sin(x)-\tan(x)}{x^4} \biggr)?\)

The Chain Rule

Before next class, drill yourself on differentiation exercises, e.g. from the online homework or from the differentiation exercises sheet.

Write \(f\)/\(\tfrac{\mathrm{d}f}{\mathrm{d}x}\) table on board.

The chain rule is the formula for how we differentiate a composite of two functions \(f\) and \(g.\) [gesture to the display formula, but then write this on the board] \[ \Bigl( f\bigl(\text{stuff}\bigr)\Bigr)' = f'\bigl(\text{stuff}\bigr) \text{ stuff}' \]

What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \cos\bigl(x^3\bigr) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}t}\biggl( \tan\bigl((2t^2-t\bigr) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \bigl(\cos(x)\bigr)^3 \biggr)?\) (same as \(\cos^3(x)\))
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}\theta}\biggl( \sqrt{\tan(\theta)} \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \bigl( x^4-17x^2 \bigr)^{92} \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \frac{1}{x^3-\sin(x)} \biggr)?\) (w/o quotient rule)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sin\bigl(\sin(x)\bigr) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sqrt{\cos\Bigl(x^5\Bigr)} \biggr)?\) (gotta do it twice)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sec\Bigl(3x^{21}\Bigr) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}t}\biggl( \csc^5(t) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sqrt{13x^7\cos(x)} \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \tan\bigl(x\sin(x)\bigr) \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sqrt{\frac{x^3}{1-2x}} \biggr)?\)
What’s a formula for \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\biggl( \sin\Bigl(\cos\bigl(\sqrt{x}\bigr)\Bigr) \biggr)?\) (gotta do it twice)

Pass out the differentiation exercises sheet.

Implicit Differentiation

Write \(f\)/\(\tfrac{\mathrm{d}f}{\mathrm{d}x}\) table on board.

So far our discussion of derivatives has been very “function-centric”. But I assure you, we’ve always been applying the differentiation operator to both sides of an equation: \[\begin{align*} f(x) = 3x^2+\sin(x) \qquad\implies\qquad \frac{\mathrm{d}}{\mathrm{d}x} \Bigl(f(x)\Bigr) &= \frac{\mathrm{d}}{\mathrm{d}x}\Bigl(3x^2+\sin(x)\Bigr) \\[1em] \tfrac{\mathrm{d}f}{\mathrm{d}x} &= 6x+\cos(x) \end{align*}\] But you can differentiation any equation, even ones that aren’t an explicit function of \(x.\) As a simple example, recall how we’ve been finding the equations of lines tangent to the graphs of functions. What about curves in space that aren’t the graph of a function?

\(\displaystyle x^2+y^2=1\)
A circle of radius one
\(\displaystyle x^4-x^2+y^2=0\)
lemniscate of Gerono
\(\displaystyle x^2-3xy+y^3=1 \)
silly fella
\(\displaystyle \tan\bigl(xy\bigr)=1\)
tangent-based monstrosity
What’s the slope of the line tangent to the curve \(x^2+y^2=1\) at the point in the upper-right quadrant where \(x = \tfrac{1}{2}?\)

What we just did is called implicit differentiation, standing in contrast to the explicit differentiation we did with \(f\) earlier. And we’re still differentiating with respect to \(x\) — so \(x\) is still our independent variable and we are regarding \(y\) as dependent on \(x,\) as a function of \(x.\) Specifically since we’re differentiating with respect to \(x,\) we have \(\tfrac{\mathrm{d}y}{\mathrm{d}x}=\dot{y}\) but \(\tfrac{\mathrm{d}x}{\mathrm{d}x}=1.\)

Verify that \((3,1)\) lies on the curve \(x^2-3xy+y^3=1,\) and determine an equation of the line tangent to the curve at that point.

While it’s important to keep the geometric perspective in mind, I think it’s important to practice the mechanics of algebraically solving for \(\dot{y}\) and \(\ddot{y},\) geometry aside. Let’s do one together.

Determine formulas for both \(\dot{y}\) and \(\ddot{y}\) in terms of \(x\) and \(y\) given \(\tan(xy)=1.\)

The factor of \(sec^2\) that appears is never zero, and can be divided out. \[ \dot{y}=-\tfrac{y}{x} \qquad \ddot{y}=\tfrac{2y}{x^2} \]

Now here are some to do on your own.

Determine formulas for both \(\dot{y}\) and \(\ddot{y}\) in terms of \(x\) and \(y\) given \(\sqrt{y}+\tfrac{1}{y}=x.\)
Determine formulas for both \(\dot{y}\) and \(\ddot{y}\) in terms of \(x\) and \(y\) given \(x+\tfrac{y}{x}=y^3-x^2.\)
Determine formulas for both \(\dot{y}\) and \(\ddot{y}\) in terms of \(x\) and \(y\) given \(\sin(x+y)=x^2y.\)

Applications of Differentiation

Start class asking if there are any derivatives I should demonstrate.

Geometry Differentiation affords us a different perspective on simple geometry.

The function \(A\) with formula \( {A = \pi r^2}\) returns the area of a circle given its radius. What is a formula for the derivative \(\frac{\mathrm{d}A}{\mathrm{d}r}?\) This formula should look familiar.
The function \(V\) with formula \( {V = \frac{4}{3}\pi r^3}\) returns the volume of a sphere given its radius. What is a formula for the derivative \(\frac{\mathrm{d}V}{\mathrm{d}r}?\) What do you suppose the formula for \(\frac{\mathrm{d}V}{\mathrm{d}r}\) could represent?

Projectile Motion if a projectile is launched from an initial height \(y_0\) at an angle of incline \(\theta\) with initial velocity \(v_0\) under the influence of downward gravitational acceleration \(g,\) then it’s position over time is given by the coordinates \[ x(t) = v_{0}\cos\bigl(\theta\bigr)t \qquad y(t) = y_{0}+v_{0}\sin\bigl(\theta\bigr)t-\tfrac{1}{2}gt^2 \,. \] Its position if defined parametrically by those two equations: after \(t\) units of time it’ll be \(x(t)\) units away horizontally and \(y(t)\) units high off the ground. These equations follow from the initial conditions. Since the initial velocity is \(v_0\) and launch angle is \(\theta,\) it must be the case that \(x'(0) = v_{0}\cos\bigl(\theta\bigr)\) and \(y'(0) = v_{0}\sin\bigl(\theta\bigr).\) Since the projectile is under the influence of a constant downward force of gravity but no horizontal force, it must be the case that \(x''(t) = 0\) and \(y''(t) = -g.\)

Average Density vs Point-Density “What is the density of the earth?” \[ \cancel{\text{density} = \frac{\text{mass}}{\text{volume}}} \qquad \text{average density} = \frac{\text{total mass}}{\text{total volume}} \] We could calculate this number, the density of the earth, but the question itself doesn’t make much sense. The earth is more dense in some places and less dense in others: the earth has variable density. This question doesn’t make sense the same reason it didn’t make sense to ask “what’s the speed of the dragster” given only its final position and time. Just like that calculation gave us the average speed, and we used calculus to determine the speed at an instant in time, the naïve calculation only gives us the average density, but we use calculus to determine the density at a particular location within the earth, the point-density at that location. Let \(p\) be a point in the earth, and consider a small ball of radius \(r\) around that point. Then the density at the point \(p\) will be \[ \text{density at \(p\)} = \lim\limits_{r \to 0}\frac{\text{total mass within ball}}{\text{total volume of ball}} \,.\] In this sense, density is the derivative of mass with respect to volume.

Force & Work

Charge & Current You could say something similar about charge and current. Charge \(Q,\) is measured in coulombs \(\text{C}\), is the physical property of matter that determines how that matter experiences force in an electromagnetic field. Current \(I\) is a rate (in amps, which is 1 coulomb per second.) \[ \text{(amps)}\quad I = \frac{\mathrm{d}Q}{\mathrm{d}t} \quad \text{(coulombs/s)} \] TK (create analogy with r=d/t)

Laminar flow

Pv=nRt

Population Dynamics \[ \dot{y} = ky \]

Economics The phrase marginal revenue refers to a small change in the revenue per an increase in production by 1 unit. The phrase marginal cost refers to a small change in the cost per an increase in production by 1 unit. They’re derivatives. Any time an economist uses they word “marginal” they are referring to a derivative with respect to a change in production quantity.

Numerical Differentiation

Before tomorrow, review Kepler’s Laws of planetary motion.

How do we compute a derivative? E.g. for \(f(x) = x^3\) how do we compute \(f'(2)?\) Well \(f'(x) = 3x^2\) and so \(f'(2) = 12.\) We compute the derivative function symbolically first, using the power rule, then evaluate the resulting function at \(x=2.\) Can we teach a computer to compute derivatives symbolically like this? Can we teach a computer the rules of algebra, and then the power rule, and product and quotient rules, and chain rule? Sure. But the differentiation isn't the hard part; it’s teaching a computer symbolic algebra that’s the hard part. The general term for the field of teaching symbolic algebra to a computer is computer algebra, and a program that performs symbolic algebra is called a computer algebra system (CAS). The CAS most accessible to y’all is WolframAlpha [demo it], and there are many others: Wolfram Mathematica, and Maple, and SageMath, and SymPy, and Axiom.

But unless you need to know the formula for the derivative explicitly, symbolic computation is overkill. [open fresh Desmos and show \(f(x)=x^3\) and \(f'(x)\)] Desmos isn't computing the formula for \(f'.\) As opposed to symbolically computing the derivative, Desmos is numerically computing the derivative. Computers are great at doing many computations quickly, so that’s what’s it’s doing.

Recall that the derivative is defined in terms of a limit: \[ f'(x) = \lim\limits_{h \to 0} \frac{f(x+h)-f(x)}{h} \] Just like a few weeks ago we were computing limits numerically, plugging in smaller and smaller values of \(h,\) its very easy for a computer to do the same thing. While \(f'(x)\) is equal to the limit of that difference quotient, it’s approximately equal to that difference quotient for a tiny value of \(h\) [Demo this is Desmos] \[ f'(x) \!\approx\! \frac{f(x+0.1)-f(x)}{0.1} \quad f'(x) \!\approx\! \frac{f(x+0.01)-f(x)}{0.01} \quad f'(x) \!\approx\! \frac{f(x+0.00001)-f(x)}{0.00001} \]

The thing I want to impress upon you today though is that we can do even better. TK

\( \displaystyle f'(x) \approx \frac{-f\bigl(x-h\bigr)+f\bigl(x+h\bigr)}{2h}\)
\( \displaystyle f'(x) \approx \frac{f\bigl(x-2h\bigr)-8f\bigl(x-h\bigr)+8f\bigl(x+h\bigr)-f\bigl(x+2h\bigr)}{12h}\)
\( \displaystyle f'(x) \approx \frac{-f\bigl(x-3h\bigr)+9f\bigl(x-2h\bigr)-45f\bigl(x-h\bigr)+45f\bigl(x+h\bigr)-9f\bigl(x+2h\bigr)+f\bigl(x+3h\bigr)}{60h}\)
\( \displaystyle f'(x) \approx \frac{3f\bigl(x\!-\!4h\bigr)\!-\!32f\bigl(x\!-\!3h\bigr)\!+\!168f\bigl(x\!-\!2h\bigr)\!-\!672f\bigl(x\!-\!h\bigr)\!+\!672f\bigl(x\!+\!h\bigr)\!-\!168f\bigl(x\!+\!2h\bigr)\!+\!32f\bigl(x\!+\!3h\bigr)\!-\!3f\bigl(x\!+\!4h\bigr)}{840h}\)
\( \displaystyle f'(x) \approx \frac{-2f\bigl(x\!-\!5h\bigr)\!+\!25f\bigl(x\!-\!4h\bigr)\!-\!150f\bigl(x\!-\!3h\bigr)\!+\!600f\bigl(x\!-\!2h\bigr)\!-\!2100f\bigl(x\!-\!h\bigr)\!+\!2100f\bigl(x\!+\!h\bigr)\!-\!600f\bigl(x\!+\!2h\bigr)\!+\!150f\bigl(x\!+\!3h\bigr)\!-\!25f\bigl(x\!+\!4h\bigr)\!+\!2f\bigl(x\!+\!5h\bigr)}{2520h}\)
\( \displaystyle f'(x) \approx \frac{5f\bigl(x\!-\!6h\bigr)\!-\!72f\bigl(x\!-\!5h\bigr)\!+\!495f\bigl(x\!-\!4h\bigr)\!-\!2200f\bigl(x\!-\!3h\bigr)\!+\!7425f\bigl(x\!-\!2h\bigr)\!-\!23760f\bigl(x\!-\!h\bigr)\!+\!23760f\bigl(x\!+\!h\bigr)\!-\!7425f\bigl(x\!+\!2h\bigr)\!+\!2200f\bigl(x\!+\!3h\bigr)\!-\!495f\bigl(x\!+\!4h\bigr)\!+\!72f\bigl(x\!+\!5h\bigr)\!-\!5f\bigl(x\!+\!6h\bigr)}{27720h}\)

Kepler’s Laws of Planetary Motion

Critical Points & Extrema

Before next class, skim §3.1–3.4 but read §3.5.

Most everything we’re talking about this week is an exercise is reinforcing our mental bridge between the worlds of algebra and geometry, strengthening the connection in our minds between a function’s formula and a function’s graph. Many of the tasks we do this week could easily be completed by simply graphing a function using technology and looking at the features of the graph. Beware though: this defeats the purpose of the tasks as exercises. The intent is to build this understanding and intuition now with simple one-dimensional examples so you can apply it later for higher-dimensional examples.

Define local/global minimums and maximums (\(\geq\) or \(\leq\) all values in a neighborhood) by pointing them out on this graph.

The goal, the problem to solve is this: Given a function \(f,\) what’s its minimum and maximum value?

Extreme Value Theorem – If \(f\) is continuous on a closed interval \([a,b],\) there must exist an absolute extremum of \(f\) on that interval.

Why must \(f\) be continuous? Why must \(f\) be defined on closed \([a,b]?\)

Fermat’s Theorem – If \(f\) has an extremum at \(x=c\) and \(f'(c)\) exists, then \(f'(c)=0.\)

Why does it specify \(f'(c)\) must exist? Is the converse true? (No: \(f(x) = x^3\)) For \(f(c)\) to be a local minimum or maximum, it’s necessary but not sufficient to demand \(f'(c)=0.\) So what we do is call all the values \(c\) for which \(f'(c) = 0\) or \(f'(c)\) doesn’t exist (even though \(f(c)\) does) critical numbers; when looking for extrema, along with the points on the boundary of the domain are our suspects.

Sketch the graph of \(f(x) = x^3-6x^2+3x+10\) noting it has roots \(-1\) and \(2\) and \(5\) and label the extrema with their coordinates.

Rolle’s Theorem – If \(f\) is continuous on \([a,b]\) and differentiable on \((a,b),\) and \(f(a) = f(b),\) there must exist \(c\) in \((a,b)\) such that \(f'(c)=0.\)

Mean Value Theorem – If \(f\) is continuous on \([a,b]\) and differentiable on \((a,b),\) there must exist \(c\) in \((a,b)\) such that \( \displaystyle f'(c) = \frac{f(b)-f(a)}{b-a}\,.\)

Sketch a graphic illustrating the Mean Value Theorem.

Why must \(f\) be differentiable on \((a,b)?\) Then Rolle’s Theorem is just a special case of the Mean Value Theorem where the tangent line in question is horizontal.

For \(f(x)=x^2,\) since \(f(0)=0\) and \(f(1)=1,\) there must be some spot between them where \(f'(x)=1.\) Where?
Find every \(c\) at which the line tangent to the graph of \(f(x) = x^3-6x^2+3x+10\) at \(c\) will have a slope of \(-6.\)

Inflection Points & Concavity

Before class tomorrow, review everything you learned prior to this class about sketching the graph of a function.

Draw a fresh example, and do everything in reference to this example graph.

Yesterday we talked about Fermat’s theorem: if a graph has a local extrema at \(x=c\) then \(f'(c).\) This implication is only one-directional though. To fix that we must say: a graph is “flat” (has horizontal tangent) at \(x=c\) if an only if \(f'(c).\)

Today we add to this analysis. A function \(f\) is increasing wherever \(f'(x) \gt 0\) and decreasing wherever \(f'(x) \lt 0.\) This gives us a cute way to locate extrema: if \(f'(c)=0\) while \(f'(x) \gt 0\) for \(x\) to the left of \(c\) and \(f'(x) \lt 0\) for \(x\) to the right of \(c,\) then \(f\) must have a maximum at \(c.\) Similarly for a minimum. This analysis is called the first-derivative test.

Analyze \(f(x) = x^3-6x^2+3x+10\) with the first-derivative test.

The second derivative also tells us about shape of a function’s graph. A function \(f\) is concave up (or convex) wherever \(f''(x) \gt 0\) and is concave down (or just concave) wherever \(f''(x) \lt 0.\) “Concave up” corresponds to acceleration, pulling upwards, whereas “concave down” corresponds deceleration, diving downwards. For a function \(f\) with extrema at \(x=c,\) if \(f''(c) \gt 0\) we know the extrema is a minimum and if \(f''(c) \lt 0\) we know the extrema is a maximum. This analysis is called the second-derivative test. If a function switches concavity at a point, we call that point an inflection point; at an inflection point we must have \(f''(c) = 0.\)

Analyze \(f(x) = x^3-6x^2+3x+10\) with the second-derivative test and identify its inflection point.

Pass out examples/graphs.html example graphs.

Given a graph of a function \(y = f(x),\) sketch \(y = f'(x)\) on the same set of axes. Then sketch \(y = f''(x)\) too.

There are a few things to point out about first- and second-derivative tests with regards to a polynomial function \(f\) in particular. (1) The degree of \(f'\) will be one less than the degree of \(f,\) and (2) if \(r\) is a root of \(f\) of multiplicity greater than one then \(r\) will also be a root of \(f'.\)

Pass out exercise sheet for graphing functions.

Asymptotics and Graph Sketching

Before next week calculate the answer this question: “What are the minimum and maximum values of \(f(x) = x^3-6x^2+6x+6\) restricted to the domain \([0,5]?\)”

Sketch the graph of the function \(f(x) = x^3-3x^2+x+5,\) noting that \(-1\) is a root.

A rational function is a ratio of polynomial functions. For a rational function whose numerator and denominator share no common factors, the zeros of the numerator are the zeros of the function, corresponding to \(x\)-intercepts of the graph, and the zeros of the denominator are the poles of the function, corresponding to vertical asymptotes for the graph.

Two functions \(f\) and \(g\) are asymptotic if \[ \lim\limits_{x \to \infty} \frac{f(x)}{g(x)} = 1\,. \] If \(f\) and \(g\) are asymptotic we denote this \(f \sim g\). For a rational function, the ratio of the dominant terms in the numerator and denominator dictates the asymptotic behavior (end behavior) of the function. E.g. \[ \frac{3x^4-17x^3+x+5}{x^3-4x+1} = \frac{3x^4-\dotsb}{x^3-\dotsb} \sim \frac{3x^4}{x^3} = 3x \quad\text{“slant asymptote”}\] \[ \frac{x-1}{2x^4-7x+8} = \frac{x-\dotsb}{2x^4-\dotsb} \sim \frac{x}{2x^4} = \frac{1}{2x^3} \]

Sketch the graph of the function \(\displaystyle f(x) = \frac{x+2}{x^2-1}.\)
Sketch the graph of the function \(\displaystyle f(x) = \frac{x^2-4x+3}{x-4}.\)
Sketch the graph of the function \(\displaystyle f(x) = \tan(x)-2x.\)
Sketch the graph of the function \(\displaystyle f(x) = \frac{x^2}{\sqrt{x+1}}\) (from Stewart)
Sketch the graph of the function \(\displaystyle f(x) = \frac{2x^2(x-3)}{x^3-1}\) (from Stewart?)

Optimization Problems

Before class Wednesday, skim §2.9, but read §3.8.

Note that the textbook does the following optimization problems:

  • Fenced-in pen along a river, maximize area
  • Cylindrical can holds 1L of oil, minimize material (surface area)
  • Point on parabola \(y=x^2\) closest to the point \((1,4)\) (minimize the square distance).
  • Combination of rowing a boat across a river vs walking along opposite shore to minimize time
  • Compute the area of the largest rectangle that can be inscribed in a radius-1 semicircle
  • Maximize revenue function

[Just carefully work through the problems in /lecture/examples/optimization.html, with printed copies for the students to write on. Note the first one is the simple cubic polynomial one I asked them last week to do before class today.]

Hand out Optimization Problems sheet and announce that I’ll start class tomorrow asking if you want me to work through any of these with y’all.

Newton’s Method

Open and prepare Desmos to demonstrate Newton’s method with \(f(x) = x^2-5.\) Write \[\sqrt{5} \approx 2.2360679774997896964091736687312762354406.\] Write lines are good easy to work with on the board.

How can we write down a decimal approximation of \(\sqrt{5}?\) Or, when we punch \(\sqrt{5}\) into a computer, how is the computer computing that decimal result? Today I’ll show you two methods for approximating this numbers as a decimal. Both methods align to the moral. The first method is simpler, but the second is more robust and can be iterated to get as many decimals of accuracy as we need.

First thought: we don’t know the exact square root of \(5,\) but we do know that \(\sqrt{4}\) is exactly \(2,\) and \(4\) is pretty close to \(5.\) Let’s use that fact, and approximate the \(\sqrt{\phantom{i}}\) function with a line, its tangent line at \(x=4,\) and use that line to approximate \(\sqrt{5}.\) [Draw a quick sketch of this, then do the calculations, then show in Desmos]

Since \(\tfrac{\mathrm{d}}{\mathrm{d}x}\bigl(\sqrt{x}\bigr) = \tfrac{1}{2\sqrt{x}},\) the tangent line to the graph of \(\sqrt{x}\) will have a slope of \(\tfrac{1}{4}\) at \(x=4.\) The full line is then \(y-2 = \tfrac{1}{4}(x-4) \;\implies\; y = \tfrac{1}{4}x+1.\) Then this line’s \(y\)-coordinate at \(x=5\) will be approximately \(\sqrt{5}:\) \(y = \tfrac{1}{4}(5)+1 = 2.25.\) Yeah, it’s pretty close!


Second thought: rephrase the question in terms of roots/zeros. If \(\sqrt{5} = x\) is our objective, then the positive root (zero) of \(x^2-5=0\) is our objective; we want a decimal approximation of the root of the polynomial \(x^2-5.\) Big, usually correct idea: the tangent line to the graph of a function near that function’s root tends to point towards that root. We can iteratively build tangent lines at points nearer and nearer a root to determine better and better approximations for that root. [Show this in Desmos with generic function] This is Newton’s method for approximating roots.

Overall then, the procedure is this: start with some initial seed number \(c_0,\) then

  1. Determine the tangent line to the function’s graph at that number.
  2. Calculate the \(x\)-intercept of that tangent line.
  3. Return to step (1) using this \(x\)-intercept as your new starting number.

Those first two steps can be distilled into a formula. Given some approximation \(c_n,\) the tangent line to graph of \(f\) at \(c_n\) will be \(y - f(c_n) = f'(c_n)(x-c_n).\) The \(x\)-intercept of that line (where the \(y\)-coordinate is zero) which we take as our next approximation \(c_{n+1}\) is then given by the formula \[ c_{n+1} = c_n - \frac{f(c_n)}{f'(c_n)}\,. \]

Let’s return to the problem of approximating \(\sqrt{5}\) by approximating the root of \(x^2-5.\) [Do the calculations for Newton’s method in tandem with Desmos, starting with an initial seed of \(c_0=2.\)]

Hand out Newton’s Method exercises, urging them to complete these before tomorrow. Ask them tomorrow if they’d like me to demonstrate any exercises. when I will given them Problems & Challenges.

Newton Fractals

Before next week, consider the question If \(p'(t) = 6t+5\) what might the formula for \(p(t)\) be?

Pop quiz today

Halley’s Method

The History of Calculus

TK

Let’s start with some context. The long version of the history of calculus dates back millennia with folks in Greece, Egypt, China, India, Iraq, and probably elsewhere trying to calculate the area of a circle using what we now call the method of exhaustion. The idea is that you can calculate first the area of a square, then the area of a pentagon, then a hexagon, then a septagon (seven sides), and so on, because as you keep adding sides to your polygon its shape and its area approaches that of a circle. This idea generalizes broadly too. You can approximate the area of any shape by exhaustively packing it with simpler shapes like rectangles or triangles. This served as the precursor to integral calculus.

The short, dirty version of the history of calculus, however, begins around the 1600s. Early in the century there were whispers of the ideas calculus from Johannes Kepler as he was trying to establish mathematical foundations for his astronomical observations. For instance he noticed that the orbits of planetary bodies were elliptical, with the sun at a focus of each orbit, but was unsure of why this was the case.

The whispering continued from Barrow, Descartes, Fermat, and other mathematicians, until later in the century when Isaac Newton, in the process of developing his laws of motion and universal gravitation with sound mathematical support

Newton’s calculus would be hard for us to recognize though. FLUXIONS A bit after Newton, Leibniz independently invented calculus from a more abstract mathematical perspective. And thank goodness, because his notation was cleaner. There was a squabble between these two over who invented it. Maria Agnesi (1748 Italy) write the first “calculus textbook”, but she’s got a crazy backstory.

It turns out there were less formal “calculus-flavored” mathematics before their time, and it wasn’t really cleaned up for about a century after their squabble by Maria Agnesi. For a more detailed history, The History of Calculus by Arthur Rosenthal is pretty solid.

Integration

Antidifferentiation

If \(p'(t) = 6t+5\) what might the formula for \(p(t)\) be?

Add vertical table of derivatives on the board for reference.

Antidifferentiation, as the name suggests, is the reverse of differentiation. The answer to this question is that \(p(t) = 3t^2+5t,\) So we’d say that \(6t+5\) is the derivative of \(3t^2+5t\) and \(3t^2+5t\) is an antiderivative of \(6t+5\). Note the indefinite article there: while derivatives are unique, antiderivatives are not. These functions are also antiderivatives of \(6t+5.\) \[ 3t^2+5t+7 \qquad 3t^2+5t-42 \qquad 3t^2+5t+\tfrac{4}{\pi} \qquad 3t^2+5t+C \] Any function of the form \(3t^2+5t+C\) for some \(C\) is an antiderivative of \(6t+5.\) We can make sense of this a couple of ways:

Now, mechanically speaking, as a skill, how do we determine antiderivatives? For polynomials, we can apply the power rule in reverse: taking the derivative it was “bring down the power as a factor, and decrement that power.” taking an antiderivative it is “increment that power, and bring down the reciprocal of that power as a factor.”

What are antiderivatives of each of the following functions? \[ x^3 \qquad 3x^5+\tfrac{7}{x^2}+\sqrt{x} \qquad \sin(x) \qquad 3\tan(x)\sec(x) \]

We’ll learn some advanced techniques for determining antiderivatives later, but for now just know that (1) you can always just recognize the function as the derivative of something you know [gesture to table], and (2) its generally quite hard [add \(\tan(x)\) to the derivative side of the table]. You can always check your antiderivative by taking a derivative. We’ll get more practice using this next week.

Pass out exercises/antidifferentiation.html.

Sigma Summation Notation

\[ 1 \!+\!2 \!+\!3 \!+\!4 \!+\!5 \!+\!6 \!+\!7 \!+\!8 \!+\!9 \!+\!10 \!+\!11 \!+\!12 \!+\!13 \!+\!14 \!+\!15 \!+\!16 \!+\!17 \]

Pretty soon we’ll need to start expressing large sums like this. But writing it out long and explicitly is tedious, so we’re introducing a more terse notation for this called sigma summation notation, named so because it involves the capital Greek letter Σ (sigma) for “Σummation”. If you’re familiar with for loops in some programming languages, its kinda like that. \[ \sum_{i=\text{initial index}}^{\text{terminal index}} \text{formula for summand} \]

And so \(\displaystyle \sum_{i=1}^{17} i = 1 \!+\!2 \!+\!3 \!+\!4 \!+\!5 \!+\!6 \!+\!7 \!+\!8 \!+\!9 \!+\!10 \!+\!11 \!+\!12 \!+\!13 \!+\!14 \!+\!15 \!+\!16 \!+\!17\,. \)

As another example \(\displaystyle \sum_{i=3}^{8} i^2 = 9\!+\!16\!+\!25\!+\!36\!+\!49\!+\!64\,.\)

Write \(1\!+\!2\!+\!4\!+\!8\!+\!16\!+\!32\!+\!64\!+\!128\!+\!256\!+\!512\!+\!1024\!+\!2048\) in sigma notation.

There are closed-form formulas, called Faulhaber’s formulas, for the sums of the powers of the first \(n\) whole numbers.

\(\displaystyle \sum_{i=1}^{n} i \!=\! \frac{n(n+1)}{2} \)
\(\displaystyle \sum_{i=1}^{n} i^2 \!=\! \frac{n(n+1)(2n+1)}{6} \)
\(\displaystyle \sum_{i=1}^{n} i^3 \!=\! \biggl(\frac{n(n+1)}{2}\biggr)^{\!2} \)
What is the value of \(\displaystyle \sum_{i=1}^{17} i \,?\)

Let me explain why that first formula is true; its kinda cheeky. Letting \(S\) denote the value of the sum, \[ \begin{array}{rccccccccc} S &= &1 &+& 2 &+\quad\cdots\quad+& (n\!-\!1) &+& n\\ S &= &n &+& (n\!-\!1) &+\quad\cdots\quad+& 2 &+& 1\\[1em] \implies 2S &= &(n\!+\!1) &+& (n\!+\!1) &+\quad\cdots\quad+& (n\!+\!1) &+& (n\!+\!1) \end{array} \] \[ 2S = n(n+1) \quad\implies\quad S = \tfrac{n(n+1)}{2} \] There’s another, more geometric, way to see it too. [draw the grid of blocks for, like, \({n=5}\)] The other Faulhaber formulas can be seen to be true for similarly cheeky reasons. Let’s get some practice just using them though.

What are the values of these sums? \[ \sum_{i=3}^{8} i^2 \qquad \sum_{i=1}^{7} \Bigl(3i - i^3\Bigr) \]

Pass out exercises/sigma.html.

Riemann Sums

Before next class, read §4.1 and §4.2, and skim §5.5.

Prepare the Maserati /display problems. Prepare the Desmos demo of the Maserati example.

Today we effectively begin studying integral calculus. Just like we started our study of differential calculus with a problems to solve — the problem of the dragster, and calculating its speed at an instant in time give its position — today we also start with a problem, the opposite problem as the dragster problem in a sense: given information about something’s speed, what can we say the distance its travelled?

A Maserati is speeding down a straight Nevada highway. For a twelve second interval of time it has a constant speed of 220 ft/s (approximately 147 mph). How far does the car travel in those twelve seconds?

This is a basic calculation, which is basic because the speed is constant. What if the speed is not constant, but we know that average speed?

A Maserati is speeding down a straight Nevada highway. For a twelve second interval of time it has an average constant speed of 220 ft/s (approximately 147 mph). How far does the car travel in those twelve seconds?

The calculation for this one is the same. But now what if we don’t know the average speed — what a tough to calculate bit of information, after all — but only have specific speeds?

You are standing on the shoulder of a straight Nevada highway, a radar gun in your hand, and a Maserati cruising on the highway headed towards you. You point the radar gun towards the car to measure its speed and, noticing you, the driver of the Maserati floors it. The car speeds towards you, past you, and then disappears towards the horizon. The first reading you were able to get with the radar gun was 120 ft/s (approximately 80 mph). The last reading you were able to get with the radar gun, exactly twelve seconds after the first reading, was 264 ft/s (approximately 176 mph). How far did the car travel in those twelve seconds?

[after they’ve read it, show Desmos demo] [calculate these two extreme possibilities and “average” case on the board] There’s not enough information to answer this question definitively. But there are a couple things we can conclude: if 120 ft/s was its slowest speed we can determine a lower bound on the distance it covered, and if 264 ft/s was its fastest speed we can determine an upper bound on the distance it covered. \[ 120\text{ ft/s} \times 12\text{ s} = 1440\text{ ft} \qquad 264\text{ ft/s} \times 12\text{ s} = 3168\text{ ft} \]

We could take a shot-in-the-dark at calculating the total distance travelled by assuming it’s the average of these two figures. That would be the same as assuming the Maserati’s average speed was the average of its lowest speed and highest speed: \[ \frac{120\text{ ft/s} + 264\text{ ft/s}}{2} \times 12\text{ s} = 2304\text{ ft} \] Could we improve this calculation if we had more information?

You are standing on the shoulder of a straight Nevada highway, a radar gun in your hand, and a Maserati cruising on the highway headed towards you. You point the radar gun towards the car to measure its speed and, noticing you, the driver of the Maserati floors it. The car speeds towards you, past you, and then disappears towards the horizon. The first reading you were able to get with the radar gun was 120 ft/s (approximately 80 mph). Exactly six seconds after after the first reading the radar gun reported a speed of 174 ft/s. The last reading you were able to get with the radar gun, exactly twelve seconds after the first reading, was 264 ft/s (approximately 176 mph). How far did the car travel in those twelve seconds?

[compute the two extreme cases on the board, leaving room for their calculations] [walk around the room a bit, update the Desmos demo] I’m seeing two threads of thought on this one (1) Taking one big average: \[ \frac{120\text{ ft/s} + 174\text{ ft/s} + 264\text{ ft/s}}{3} \times 12\text{ s} = 2232\text{ ft} \\[1em] (120\text{ ft/s} \times 4\text{ s}) + (174\text{ ft/s} \times 4\text{ s}) + (264\text{ ft/s} \times 4\text{ s}) = 2232\text{ ft} \] It ought to be pointed out that this calculations is the same as if you’d assumed it goes 120 ft/s for four seconds, then 174 ft/s for four seconds, then 264 ft/s for four seconds. Another thread of thought is (2) breaking up the problem into two sub-problems, supposing the total distance travelled is the sum of the distances travelled during the first six seconds and the last six seconds, and you can compute those individual distances using the average of the speeds at the endpoints \[ \biggl(\frac{120\text{ ft/s} + 174\text{ ft/s}}{2}\biggr) \times 6\text{ s} + \biggl(\frac{174\text{ ft/s} + 264\text{ ft/s}}{2}\biggr) \times 6\text{ s} = 2196\text{ ft} \] Both of these approaches seem reasonable. To get some practice and continue investigating, here’s some more information; update your calculations.

You are standing on the shoulder of a straight Nevada highway, a radar gun in your hand, and a Maserati cruising on the highway headed towards you. You point the radar gun towards the car to measure its speed and, noticing you, the driver of the Maserati floors it. The car speeds towards you, past you, and then disappears towards the horizon. The first reading you were able to get with the radar gun was 120 ft/s (approximately 80 mph). Exactly three seconds after after the first reading the radar gun reported a speed of 135.75 ft/s. Exactly six seconds after after the first reading the radar gun reported a speed of 174 ft/s. Exactly nine seconds after after the first reading the radar gun reported a speed of 221.25 ft/s. The last reading you were able to get with the radar gun, exactly twelve seconds after the first reading, was 264 ft/s (approximately 176 mph). How far did the car travel in those twelve seconds?

While y’all updating your calculations for the total distance travelled, I’m going to re-run the calculations for the lower- and upper-bounds on the total distance travelled: \[ (120\text{ ft/s} \times 3\text{ s}) + (135.75\text{ ft/s} \times 3\text{ s}) + \dotsb \\[1em] \dotsb + (174\text{ ft/s} \times 3\text{ s}) + (221.25\text{ ft/s} \times 3\text{ s}) = 1953\text{ ft} \] \[ (135.75\text{ ft/s} \times 3\text{ s}) + (174\text{ ft/s} \times 3\text{ s}) + \dotsb \\[1em] \dotsb + (221.25\text{ ft/s} \times 3\text{ s}) + (264\text{ ft/s} \times 3\text{ s}) = 2385\text{ ft} \]

For the total distance travelled, taking a big average: \[ \frac{120\text{ ft/s} + 135.75\text{ ft/s} + 174\text{ ft/s} + 221.25\text{ ft/s} + 264\text{ ft/s}}{5} \times 12\text{ s} \\[1em] = (120\text{ ft/s} \times \tfrac{12}{5}\text{ s}) + (135.75\text{ ft/s} \times \tfrac{12}{5}\text{ s}) + \dotsb \\[1em] \dotsb + (174\text{ ft/s} \times \tfrac{12}{5}\text{ s}) + (221.25\text{ ft/s} \times \tfrac{12}{5}\text{ s}) + (264\text{ ft/s} \times \tfrac{12}{5}\text{ s}) = 2196\text{ ft} \] or taking a big average on each subinterval and adding them up: \[ \biggl(\frac{120\text{ ft/s} + 135.75\text{ ft/s}}{2}\biggr) \times 3\text{ s} + \biggl(\frac{135.75\text{ ft/s} + 174\text{ ft/s}}{2}\biggr) \times 3\text{ s} + \dotsb \\[1em] \dotsb + \biggl(\frac{174\text{ ft/s} + 221.25\text{ ft/s}}{2}\biggr) \times 3\text{ s} + \biggl(\frac{221.25\text{ ft/s} + 264\text{ ft/s}}{2}\biggr) \times 3\text{ s} = 2169\text{ ft} \] These two numbers appear to be getting closer to each other. What if you are given even more data points? What if you are given all the data points? Can you take these calculations “to the limit” to compute the exact distance the Maserati travelled?

You are standing on the shoulder of a straight Nevada highway, a radar gun in your hand, and a Maserati cruising on the highway headed towards you. You point the radar gun towards the car to measure its speed and, noticing you, the driver of the Maserati floors it. The car speeds towards you, past you, and then disappears towards the horizon. The radar gun is equipped with a small computer and some statistics software. After collecting data on the Maserati as it passes, it reports a model \(f(t)\) for the car’s speed (velocity) at any time between \(t\!=\!0\) and \(t\!=\!12\) during the twelves it was able to record data: \[ f(t) = 120 + 2t^2 - \tfrac{1}{12}t^3\,. \] How far did the car travel in those twelve seconds?

I trust that you could keep doing this calculations. What I want to take away from doing this calculations is the importance of using averages to approximate true values, and how that approximation gets better and better the finer your averages get. But before we depart today, I want you to see a geometric interpretation of these calculations we’ve been doing. Each of these calculations has been a sum of a product of two numbers, \((\text{speed}\text{ ft/s})\times(\text{time}\text{ s}).\) In this scatterplot I’ve been maintaining, the Maserati’s \(\text{speed}\) is plotted along the \(y\)-dimension and \(\text{time}\) is plotted along the \(x\)-dimension. Each of these products \((\text{speed}\text{ ft/s})\times(\text{time}\text{ s})\) can be visualized geometrically a \((\text{height}\text{ ft/s})\times(\text{width}\text{ s}),\) as the area of a rectangle in this picture. [use Desmos and demonstrate all the sum of areas of rectangles. ] Each of these calculations we were doing could be interpreted as a Riemann sum, a sum of areas of rectangles each with the same uniform width, and with heights determined by the value of some function. And in ANY of the calculations we were doing, as our computations have more and more summands, as we are taking the areas of more and more rectangles, as we are considering the average speed of the Maserati on smaller and smaller intervals of time, the thing we are calculating appears to be approaching the area underneath the graph of \(f.\) [use Desmos to take the limit, and approximate the area under the graph]

Reflect on this, and tomorrow in class we continue from this very thought.

Definite Integrals & Accumulated Area

Before next week, carefully read §4.3 and generally read about The Fundamental Theorem of Calculus.

Display the Maserati example.

Yesterday I saw two emerging trails of thought towards answering this question.

  1. Average all the given velocities together to approximate the true, unknown, average velocity. For example if you considered the five sample velocities of the car, \(f(0)\), \(f(3)\), \(f(6)\), \(f(9)\), and \(f(12)\), took their average, and multiplied it by twelve seconds, \[\begin{align*} \left(\frac{f(0)+f(3)+f(6)+f(9)+f(12)}{5}\right) \times 12 = \left(\frac{915}{5}\right) \times 12 &= 2196\text{ ft} \\&\approx 0.415909\text{ miles} \end{align*}\] this would approximately be the answer to the question, and you’d get a better approximation the more samples you took.
  2. The other thought was a divide-and-conquer strategy, of approximating the average velocity between any two data points from the two endpoints of that interval, answering the distance question on each interval, and approximating the total distance travelled as the sum of all the distances travelled on all those intervals. \[\begin{align*} \frac{f(0)\!+\!f(3)}{2} \!\times 3 + \frac{f(3)\!+\!f(6)}{2} \!\times 3 + \frac{f(6)\!+\!f(9)}{2} \!\times 3 + \frac{f(9)\!+\!f(12)}{2} \!\times 3 &= 2169\text{ ft} \\&\approx 0.410795\text{ miles} \end{align*}\]

[pop open Desmos demo] Both of these approaches work towards answering the question, because both of these thoughts and the computations the require approximate the same thing: the area of the region under the graph of \(f.\) [take each computation to the limit] And this makes some sense when framed correctly. As the Maserati moves through time from \(t=0\) seconds to \(t=12\) seconds, it is accumulating distance as it goes. It’s speed is simply the rate at which it is accumulating distance. If, for example, there is a \(1\text{ s}\) interval where the Maserati’s average speed was \(123\text{ ft/s},\) then it accumulated \(123\text{ ft}\) of distance during that time. The area under the curve is a record of how much distance the Maserati has accumulated. [animate all this in Desmos]

This is all to say, the area under the graph of \(f\) is an important character in our story moving forward. We should introduce notation for it: \[ \int\limits_0^{12} f(t) \,\mathrm{d}t \] This is called the definite integral of \(f(t)\) on the interval \([0,12].\) That tall “S” symbol \(\int\) is the integral sign, and it really is based on the letter “S” for “\(\!\int\!\)ummation”. We refer to those numbers \(0\) and \(12\) as the bounds of integration. The \(\mathrm{d}t\) at the end is the differential (which you can just think of as part of the integral notation). But really \( f(t) \times \mathrm{d}t \) is the area of a rectangle with height \(f(t)\) and an infinitesimally tiny width \(\mathrm{d}t;\) The notation \( \int\limits_0^{12} f(t) \,\mathrm{d}t \) can literally be read as take the sum of all the areas of the infinitely many, infinitely thin rectangles bound above by the graph of \(f\) between \(t=0\) and \(t=12.\) Specifically in our example with the Maserati, it’s take the sum of all the infinitely many distances accumulated by the car over infinitely many tiny intervals of time per its speed on that interval between \(t=0\) seconds and \(t=12\) seconds.

We’ll revisit the Maserati problem next week, but today let’s talk about the definite integral in abstract; \[ \int\limits_a^b f(x) \,\mathrm{d}x,. \] The definite integral in general represents the signed area bound by the graph of \(f\) and the \(x\)-axis between \(x=a\) and \(x=b.\)

What is the value of \(\int_{0}^{5} \tfrac{1}{2}x-1 \,\mathrm{d}x \,?\)

Some “arithmetic” of integrals, and how they follow from the underlying geometry.

\(\displaystyle \int\limits_a^b f(x) \,\mathrm{d}x = -\int\limits_b^a f(x) \,\mathrm{d}x\)
\(\displaystyle \int\limits_a^b k f(x) \,\mathrm{d}x = k\int\limits_a^b f(x) \,\mathrm{d}x\)
\(\displaystyle \int\limits_a^b \bigl(f(x) \pm g(x)\bigr) \,\mathrm{d}x = \int\limits_a^b f(x) \,\mathrm{d}x \pm \int\limits_a^b f(x) \,\mathrm{d}x\)
\(\displaystyle \int\limits_a^a f(x) \,\mathrm{d}x = 0\)
\(\displaystyle \int\limits_a^b f(x) \,\mathrm{d}x + \int\limits_b^c f(x) \,\mathrm{d}x = \int\limits_a^c f(x) \,\mathrm{d}x\)
What is the value of \(\int_{5}^{0} \tfrac{1}{2}x-1 \,\mathrm{d}x \,?\)

Also note that \[\int_{0}^{5} \tfrac{1}{2}x-1 \,\mathrm{d}x = \tfrac{1}{2}\int_{0}^{5} x \,\mathrm{d}x - \int_{0}^{5} \,\mathrm{d}x \,.\]

Thinking about areas this way, as the sum of infinitely many values \(f(x)\) weighted by infinitesimally small widths \(\mathrm{d}x\) gives us a roundabout way of thinking about the average value of \(f.\) Let’s denote the average value of \(f\) (on some interval) as \(f_\text{avg}.\) Note that \[\bigl(b\!-\!a\bigr)\times\bigl(f_\text{avg}\bigr) = \int\limits_a^b f(x)\,\mathrm{d}x\] this is the same thought as the Maserati question being much easier to answer if only we knew its average speed on that 12 second interval. Per that last equation though, often times though the only way we can compute the average value of a function is in terms of the area that the corresponding integral represents: \[f_\text{avg} = \frac{1}{b\!-\!a}\int\limits_a^b f(x)\,\mathrm{d}x\]

What is the average value of the function \(f(x) = \tfrac{1}{2}x-1\) on the interval \([0,5]\,?\)

What is the area of the region bound in the first quadrant by the curve \(y = 9-x^2\,?\)

Write it as an integral, and approximate it every which way. The lower-bound triangle is 13.5 and upper-bound rectangle is 27. The upper-bound Riemann sum with \(n=1\) improves the upper-bound to 22. The trapezoid rule improves the lower-bound to 17.5.

The Fundamental Theorem of Calculus

Copy both parts of the FTC onto the board.

Have the full statement of the Maserati example ready.

This last week hasn’t been a completely new topic in calculus after all. Today we relate integration to differentiation, showing that, in a sense, they are inverse operations of each other.

Define the function \[F(x) = \int\limits_a^x f(t)\,\mathrm{d}t\] [draw a picture illustrating this function on the board] Question: what is the derivative of \(F?\)

\[\begin{align*} \frac{\mathrm{d}}{\mathrm{d}x}\Bigl(F(x)\Bigr) &= \frac{\mathrm{d}}{\mathrm{d}x}\biggl(\int\limits_a^x f(t)\,\mathrm{d}t\biggr) \\[1em]&= \lim_{h \to 0} \frac{\int\limits_a^{x+h} f(t)\,\mathrm{d}t - \int\limits_a^x f(t)\,\mathrm{d}t}{h} \\[1em]&= \lim_{h \to 0} \frac{1}{h}\Biggl(\int\limits_x^{x+h} f(t)\,\mathrm{d}t\Biggr) \\[1em]^{\ast}&= \lim_{h \to 0} \frac{1}{h}\bigl(f(x) \times h\bigr) \\[1em]&= f(x) \end{align*} \]

So, viewing integration as a function of its upper-bound, the operation of differentiation “undoes” integration. Thinking about this from the perspective of the Maserati example, if \(\int_0^{12} f(t) \,\mathrm{d}t\) is the total distance accumulated by the Maserati between \(t\!=\!0\) and \(t\!=\!12\) seconds, then \(\tfrac{\mathrm{d}}{\mathrm{d}x}\int_0^{x} f(t) \,\mathrm{d}t\) is the rate at which it’s accumulating that distance as \(x\) progresses from \(0\) to \(12\) … but that’s just speed.

Working the other way, let’s start from a familiar intuition: that the value of an integral — the sum total of stuff accumulated by \(f\) as it sweeps from \(a\) to \(b\) — could be easily evaluated if we knew the average value of \(f\) on the interval \([a,b].\) \[ \int\limits_a^b f(t) \,\mathrm{d}t = \bigl(f_\text{avg}\bigr)\times\bigl(b\!-\!a\bigr) \] Or in the specific case of the Maserati in the desert, with \(f(t)\) being the \(\text{speed}\) of the Maserati between \(t\!=\!0\) and \(t\!=\!12,\) \[ \int\limits_0^{12} \text{speed} \,\mathrm{d}t = \bigl(\text{average speed}\bigr)\times\bigl(12\!-\!0\bigr) \] But there’s another way of computing \(\text{average speed}:\) just the net change in position over time. Mathematically, let \(F\) denote any antiderivative of \(f.\) Since \(f\) is a speed — a rate of change in position — \(F\) must be a position function, the Maserati distance from some fixed starting point. The starting point doesn’t matter though if all we need to know is the change in position to calculate the average speed: \[\begin{align*} \bigl(\text{average speed}\bigr) = \frac{F(12)\!-\!F(0)}{12\!-\!0} \quad&\implies\quad \int\limits_0^{12} \text{speed} \,\mathrm{d}t = \biggl(\frac{F(12)\!-\!F(0)}{\cancel{12\!-\!0}}\biggr)\times\bigl(\cancel{12\!-\!0}\bigr) \\&\implies\quad \int\limits_0^{12} f(t) \,\mathrm{d}t = F(12)-F(0) \end{align*}\]

Let’s compute the answer to the Maserati question. [display the question page again briefly] \[ \begin{align*} \int\limits_0^{12} 120+2t^2-\tfrac{1}{12}t^3 \,\mathrm{d}t \;&=\;\; 120t \!+\! \tfrac{2}{3}t^3 \!-\! \tfrac{1}{48}t^4 \biggr\rvert_{t=0}^{t=12} \\[1em]&=\;\; \Bigl(120(12) \!+\! \tfrac{2}{3}(12)^3 \!-\! \tfrac{1}{48}(12)^4\Bigr)- \Bigl(120(0) \!+\! \tfrac{2}{3}(0)^3 \!-\! \tfrac{1}{48}(0)^4\Bigr) \\[1em]&=\;\; 12^2\bigl(10 + 8 - 3\bigr)- \bigl(0\bigr) \\[1em]&=\;\; 144\bigl(15\bigr) \\[1em]&=\;\; 2160\text{ feet} \end{align*} \] [be sure to explain the vertical bar “evaluated at” notation]

This is rather obvious on one level. Thinking of “distance” as something the Maserati collects according to its speed, the total distance the Maserati accumulates over some time is just the difference between how much distance it started with and how much distance it ended with. In general, given any rate of something being gathered over time, the total amount of something accumulated is just the difference in how much something you started with and how much something you ended with. On another level, remembering that an integral can be thought of as an area of the region under the graph of a function \(f,\) that area \(\int_a^b f(t)\,\mathrm{d}t\) can be computed as the difference of two numbers: \(F(b) - F(a).\)

What is the value of \(\int_{0}^{5} \tfrac{1}{2}x-1 \,\mathrm{d}x \,?\)
What is the area of the region bound in the first quadrant by the curve \(y = 9-x^2\,?\)
What are formulas for the following derivatives? \[ \frac{\mathrm{d}}{\mathrm{d}x}\int\limits_3^x t\cos(t) \,\mathrm{d}t \qquad \frac{\mathrm{d}}{\mathrm{d}x}\int\limits_{x^4}^5 t\cos(t) \,\mathrm{d}t \]

Indefinite Integrals

Write this table of antiderivatives/integrals on the side board

\(F(x)\) \(\frac{\mathrm{d}}{\mathrm{d}x} \bigl(F(x)\bigr)\)
\(\int f(x) \,\mathrm{d}x\) \(f(x)\)
\(C\) \(0\)
\(x^n+C\) \(nx^{n-1}\)
\(\tfrac{1}{n+1}x^{n+1}+C\) \(x^n\) (\(n\!\neq\!1\))
\(?\) \(\tfrac{1}{x}\)
\(F(x)\) \(\frac{\mathrm{d}}{\mathrm{d}x} \bigl(F(x)\bigr)\)
\(\int f(x) \,\mathrm{d}x\) \(f(x)\)
\(\sin(x)+C\) \(\cos(x)\)
\(\tan(x)+C\) \(\sec^2(x)\)
\(\sec(x)+C\) \(\sec(x)\tan(x)\)
\(?\) \(\tan(x)\)
\(?\) \(\sec(x)\)
\(F(x)\) \(\frac{\mathrm{d}}{\mathrm{d}x} \bigl(F(x)\bigr)\)
\(\int f(x) \,\mathrm{d}x\) \(f(x)\)
\(\cos(x)+C\) \(-\sin(x)\)
\(\cot(x)+C\) \(-\csc^2(x)\)
\(\csc(x)+C\) \(-\csc(x)\cot(x)\)
\(?\) \(\cot(x)\)
\(?\) \(\csc(x)\)

Write the definite integral on the board and label it “definite integral”, and later, at the correct point during lecture, write an indefinite integral and label it “indefinite integral”.

\(\displaystyle \int\limits_a^b f(x) \,\mathrm{d}x = F(a) - F(b) \)
Definite Integral
\(\displaystyle \int\limits_{\phantom{a}}^{\phantom{b}} f(x) \,\mathrm{d}x = F(x) + C \)
Indefinite Integral

The second part of the fundamental theorem of calculus will be our workhorse moving forward in this class. Using it requires us to figure out an antiderivative for the integrand of our integral. That’s why we practiced thinking about antiderivatives last week, and we’ll continue doing that today, but now with a different notation. The relationship between a definite integral and antidifferentiation that the second fundamental theorem of calculus gives us suggests the following notation, the indefinite integral of a function of \(f\) to denote the family of all antiderivatives of \(f.\)

That \(+C\) on the end represents any constant, since if we were to take a derivative, any constant on the end would disappear. More than that though, it acts as a sponge for constants; you’ll see what I mean by that later. Let’s work some examples.

Evaluate this indefinite integral: \(\displaystyle \int 3x^5 + \tfrac{7}{x^2} + \sqrt{x} \,\mathrm{d}x\)

Decrement for derivatives and increment for integrals

Evaluate this indefinite integral: \(\displaystyle \int 3\tan(x)\sec(x) \,\mathrm{d}x\)
Evaluate \(\displaystyle \int \sec^2(t) \,\mathrm{d}t\) and \(\displaystyle \int_{0}^{\pi/3} \sec^2(t) \,\mathrm{d}t\,.\)
Evaluate \(\displaystyle \int x^2 + \sin(x) \,\mathrm{d}x\) and \(\displaystyle \int_{-1}^{3} x^2 + \sin(x) \,\mathrm{d}x\,.\)
Evaluate \(\displaystyle \int \frac{\sin(\theta)}{\cos^2(\theta)} \,\mathrm{d}\theta\) and \(\displaystyle \int_{\pi/4}^{\pi/3} \frac{\sin(\theta)}{\cos^2(\theta)} \,\mathrm{d}\theta\)

The integrand is \(\sec(\theta)\tan(\theta)\) in disguise.

There are a couple of quirks of indefinite integrals to keep in the back of your mind. First, a note on antiderivatives we don’t know how to take (yet). \[ \int fg \,\mathrm{d}x {\;\;\color{firebrick}\neq\;\;} \int f \,\mathrm{d}x \int g \,\mathrm{d}x \qquad \int f/g \,\mathrm{d}x {\;\;\color{firebrick}\neq\;\;} \frac{\int f \,\mathrm{d}x}{\int g \,\mathrm{d}x} \] Just like we had special rules for the derivatives of products and quotients, we need special rules to take the antiderivatives of products and quotients. We actually learn a technique for this in the sequel class called integration by parts. For example, it won’t be until the next class that we learn to take these integrals: \[ \int x\sin(x) \,\mathrm{d}x \qquad\qquad \int x^3\sec^2(x) \,\mathrm{d}x \]

A quirk about style/notation: \[ \int \frac{1}{x^2} \,\mathrm{d}x \;\;=\;\; \int \frac{\mathrm{d}x}{x^2} \;\;=\;\; \int \mathrm{d}x\, \frac{1}{x^2} \]

A quirk about domains: a formula for an antiderivative is only valid on a connected component of its domain. \[ \int \frac{1}{x^2} \,\mathrm{d}x = \begin{cases} -\tfrac{1}{x} + C_1 \text{ for } x \lt 0 \\ -\tfrac{1}{x} + C_2 \text{ for } x \gt 0 \end{cases} \]

Another quirk about domains: to apply the fundamental theorem of calculus to a definite integral, the integrand may have jump discontinuities on its domain of integration, but not essential discontinuities (asymptotes). \[ \int\limits_{-1}^{4} \frac{1}{x^2} \,\mathrm{d}x {\;\;\color{firebrick}\neq\;\;} -\frac{1}{x}\biggr\rvert_{x=-1}^{x=4} = -\frac{5}{4} \]

Integration by Substitution; Change of Coordinates

\[\int {f'\bigl({\color{SteelBlue}{g(x)}}\bigr)\color{SteelBlue}{g'(x)}} \,\mathrm{d}x = f\bigl({\color{SteelBlue}{g(x)}}\bigr) + C \]

Yesterday we informally talked about two techniques for evaluating indefinite integrals: (1) the power rule, and (2) “just recognize it as a derivative”. Today we cover another technique to help you infer a function’s antiderivative call the method of substitution. It’s effectively a way to “undo” the chain rule. The lesson today will consist of many examples.

Evaluate \(\displaystyle \int 5\cos\bigl(5x\bigr) \,\mathrm{d}x\)

We could infer this by simply guessing that it’s \(\sin\bigl(5x\bigr),\) but we can work it out formally using the method of substitution.

Evaluate \(\displaystyle \int 2x\cos\bigl(x^2\bigr) \,\mathrm{d}x\)
Evaluate \(\displaystyle \int x^7\cos\bigl(x^8\bigr) \,\mathrm{d}x\)
Evaluate \(\displaystyle \int_0^1 \bigl(3t-1\bigr)^7 \,\mathrm{d}t\)
Evaluate \(\displaystyle \int_{\pi/4}^{\pi/2} \sqrt{\sin\bigl(\theta\bigr)}\cos\bigl(\theta\bigr) \,\mathrm{d}\theta\)
Evaluate \(\displaystyle \int_{4}^{2209} \frac{\sqrt{2+\sqrt{x}}}{\sqrt{x}} \,\mathrm{d}x\)
Evaluate \(\displaystyle \int_{2}^{7} x\sqrt{x+2} \,\mathrm{d}x\)
Evaluate \(\displaystyle \int_{1}^{3} 3x^3\sqrt{x^2+3} \,\mathrm{d}x\)

Note that both \(u = x^2+3\) and \(u = \sqrt{x^2+3}\) work.

Areas Between Curves

Before class tomorrow, skim over §5.2 and §5.3, paying special attention to the geometry, and how the solids being described are defined (look at pictures).

Pull up examples/areas.html

Today we use definite integrals to compute areas. Whereas before we only had formulas to compute the areas of circles and shapes with boundaries consisting of lines segments — triangles, quadrilaterals, etc — calculus gives us the definite integral which can be used to compute areas of regions whose boundaries are defined as the graphs of function: trigonometric curves, parabolic curves, cubic curves, etc.

Volumes of Solids

Before class tomorrow, skim §5.4 to consolidate how a math textbook talks about work as compared to how it’s described in your physics/mechanics classes, and look up what a gravity battery is.

Pull up examples/volumes.html.

Calculus allows us to compute the volume of any solid for which we can describe the areas of its cross sections along some “axis.” I will show you the extent of this capability today through examples.

There are virtues in viewing that familiar calculation as an integral: (1) the integrand representing the area of a cross-section could very well be a function, changing along the axis along which we are integrating, [draw a wibbly-wobbly cylinder with variable cross-sectional areas] and (2) that cross section does’t have to be a “slice” perpendicular to the axis along which we are integrating; it could be a radial cross section, or something more general.

[Draw the solid’s cross-sectional disks] Any such solid defined like this, by revolving a 2-dimensional region about an axis, is called a solid of revolution. We will focus on these solids in our remaining examples.

Caution: when studying, don’t formula-ize the “washer method” nor the “shell method” in your minds. Computing the volume of a solid of revolution is not an important skill like taking a derivative or an integral is a skill. The lesson today is the process. The lesson is in understanding how these volumes can be easily computed with techniques of calculus, particularly integration. The lesson is in seeing the value of regarding a three-dimensional solid as a union of two-dimensional cross sections. The goal of the lesson is not the examples themselves, but to learn from the examples; the examples are just means by which you become smarter. Your goal is to understand the ideas inherent to these examples at such a level that you can adapt them to other situations. Can you compute the volume of the solid generated by revolving the same region about the \(y\)-axis instead? Can you compute the volume of the solid generated by revolving it about the line \(y=7?\) What if instead of volumes, we want to compute surface areas?

Work: the Accumulation of Force

\[\begin{align*} \text{Force} &=& \text{Mass} &\times \text{Acceleration} \\ \bigl(\text{Newtons}\bigr) &=& \bigl(\text{kg}\bigr) &\times \bigl(\text{m/s²}\bigr) \end{align*}\]
\[\begin{align*} \text{Work} &=& \text{Force} &\times \text{Displacement} \\ \bigl(\text{Joules}\bigr) &=& \bigl(\text{Newtons}\bigr) &\times \bigl(\text{m}\bigr) \\ &=& \bigl(\text{Newton}&\text{-meters}\bigr) \end{align*}\]

We’ve gotta make sure our units match up today: all time is measured in seconds, all masses measured in kilograms, and all distances measured in meters.

Work is the accumulation of force over a displacement. Work is also referred to just as energy, because quite often the work done corresponds to some potential energy being stored. This is the most intuitive example of work, as a measurement of how much force was expended building up a store of potential energy. You will see examples of this in the problems we do today.

An important point to emphasize: work does not care how long it takes to do the work; the calculation is always taken with respect to an change in displacement (\(x\) not \(t\)).

Do example problems: examples/work.html.

Note that the “pumping water from a tank” examples require a different mental model than the other problems. Whereas the other problems involve moving some mass along a straight line and a work calculation as the integral of force along that linear displacement, the work done pumping water from a tank must be regarded as the sum of the work done pumping each “layer” of water from the tank, which is computed as an integral only as a limit of sum as the thickness of each layer approaches zero.

Numerical Integration

We have been using the fundamental theorem of calculus to evaluate definite integrals, \[\int\limits_a^b f(x)\,\mathrm{d}x\] which requires that we infer an antiderivative of that integrand \(f.\) It is quite difficult to teach a computer how to evaluate an integral this way. First we’d have to use a computer algebra system so the computer can understand \(f(x)\) symbolically, then we’d have to teach it an algorithm for inferring an antiderivative, which is notably hard and sometimes impossible: not every function has an antiderivative that can be expressed in terms of elementary functions. Certainly mathematicians have worked on this problem though. There are quite a few different computer algebra systems described in the Numerical Differentiation section, and there is an algorithm for determining a formula for an antiderivative of \(f\) if it exists. This algorithm is called the Risch algorithm — it was published as recently as 1968, and its description is famously more than 100 pages long. And while the algorithm can be described actually implementing the algorithm — coding it up — is another story altogether. As of this writing only portions of the Risch algorithm have been successfully implemented.

So while teaching a computer to symbolically evaluate a definite integral just like we do by using the fundamental theorem is technically possible, it’s not a good idea. It’s a better idea to lean into a computer’s strengths, fast number crunching, to evaluate integrals, and to do that we return to the original idea underlying the definite integral, the Riemann sum.

Considering the value of the definite integral \(\int_a^b f(x)\,\mathrm{d}x\) as the area of the region bound between the graph \(y=f(x)\) and the lines \(y=0\) and \(x=a\) and \(x=b,\) the core idea is to approximate/subdivide the region into simple shapes, the areas of which we can compute by elementary means. Many basic approaches just employ rectangles …

Chebyshev and Bernoulli Polynomials

TK

TK

Absement

Imagine your position function is measuring the position of a lever. That lever controls a floodgate that is closed at zero and opens as I move the lever towards 1. The absement of the situation is how much water is accumulated flowing at the floodgate as a function of time. I.e.~its measuring the “sustained position” of the lever.