MATH 1071 — Calculus for Business & Economics
Lecture Notes. This is NOT meant to be a substitute for coming to lecture or consulting the textbook directly, but rather a helpful resource to review for exams/ review what was discussed in lecture. Each section ends with a Self-Check taken from the in-class activity — try the problem first, then click the button to see the answer.
What Is Calculus?
Calculus is the study of how things change. It has two halves:
- Derivatives measure the rate of change of a function (for example, velocity is the rate of change of distance). Taking the derivative of a derivative gives the rate of change of the rate of change (for example, acceleration).
- Integrals measure accumulated quantities, such as the area under a curve.
Both halves are built on limits. In this course, the main business applications include marginal cost, revenue and profit, optimization, and elasticity of demand.
Slopes
Recall that to find the slope of a line, we need two points \((x_1,y_1)\) and \((x_2,y_2)\):
\[ m = \frac{y_2-y_1}{x_2-x_1} = \frac{\Delta y}{\Delta x} = \frac{\text{rise}}{\text{run}}. \]The slope tells us the rate of change of the line. If a line has slope 4, then every time \(x\) goes up by 1, \(y\) goes up by 4. A line has the same slope everywhere.
What if we have a curve instead? A curve such as \(y=x^2\) is flat at the bottom, gets less steep as you approach the bottom from the left, and gets steeper and steeper as you move to the right. So a curve does not have one single slope; its steepness changes from point to point. We measure the steepness at one point using the tangent line: the line that just touches the curve at that point and points in the same direction as the curve there.
Secant Lines to Tangent Lines
The slope of the secant line measures how fast the function values are changing between \(a\) and \(b\) on average, so it is also called the average rate of change of \(f\) on \([a,b]\). If the function measures distance traveled, then \(\dfrac{\Delta\text{distance}}{\Delta\text{time}}\) is the average velocity on the time interval \([a,b]\).
Idea: to find the slope of the tangent line at \(x=a\), find the slope of the secant line from \(a\) to \(b\) and let \(b\) get really close to \(a\). We can't just plug in \(b=a\): that gives \(\frac{f(a)-f(a)}{a-a} = \frac00\), and we can't divide by 0. Making "let \(b\) get really close to \(a\)" precise is exactly what limits are for.
As the interval shrinks, the average rates of change get closer and closer to \(2\). So the instantaneous rate of change of \(f(x) = x^2\) at \(x = 1\) (the slope of the tangent line at \(x=1\)) is approximately \(2\). Next we will use limits to show it is exactly 2.
The "Other Half" of Calculus
The second big question in calculus is: how do we find the area under a curve, and why would we want to? To find area under a curve we use integrals. One business reason: integrals let us go from marginal profit back to total profit. We will come back to this later in the course.
Self-Check
From the Exam 2 Review (Problem 1), plus a practice problem in the style of the lecture example
(a) Let \(f(x) = x^3+2x^2+1\). Find the average rate of change of \(f\) from \(x=1\) to \(x=3\).
(b) For the same \(f\), find the average rate of change on \([2,2.1]\), \([2,2.01]\) and \([2,2.001]\). Use your answers to estimate the instantaneous rate of change of \(f\) at \(x=2\).
Exploring with Tables
We want to describe the behavior of functions that might be undefined at a point (or defined to be some other value at that point) but whose \(y\)-values are approaching a certain number as \(x\) gets close to some number. Let's look at two examples.
Plugging in \(x=2\) gives \(\frac{4-4}{2-2} = \frac00\), which is undefined. So instead we plug in numbers close to 2:
| \(x\) | 1.9 | 1.99 | 1.999 | 2 | 2.001 | 2.01 | 2.1 |
|---|---|---|---|---|---|---|---|
| \(f(x)\) | 3.9 | 3.99 | 3.999 | undefined | 4.001 | 4.01 | 4.1 |
From both sides, the outputs are getting closer and closer to 4. In fact \(\frac{x^2-4}{x-2} = \frac{(x+2)(x-2)}{x-2} = x+2\) for \(x\neq2\), so the graph is the line \(y = x+2\) with a hole at \((2,4)\).
Plugging in \(x=2\) gives \(\frac10\), which is undefined. Plugging in numbers close to 2:
| \(x\) | 1.9 | 1.99 | 1.999999 | 2 | 2.000001 | 2.01 | 2.1 |
|---|---|---|---|---|---|---|---|
| \(g(x)\) | \(-9\) | \(-99\) | \(-999{,}999\) | undefined | \(1{,}000{,}001\) | \(101\) | \(11\) |
This time the outputs do not settle down. As \(x\to2\) from the left (numbers less than 2), \(g(x)\) heads to \(-\infty\); from the right (numbers bigger than 2), \(g(x)\) heads to \(+\infty\). The graph has a vertical asymptote at \(x = 2\).
The Definition of a Limit
Sometimes the function approaches one number from one side and a different number from the other side. We use one-sided limits to express this.
- \(\displaystyle\lim_{x\to a^-} f(x) = L\) means \(f(x)\) gets really close to \(L\) as \(x\) gets close to \(a\) using only numbers to the left of \(a\) (less than \(a\)). This is the left-hand limit.
- \(\displaystyle\lim_{x\to a^+} f(x) = L\) means \(f(x)\) gets really close to \(L\) as \(x\) gets close to \(a\) using only numbers to the right of \(a\) (bigger than \(a\)). This is the right-hand limit.
Limits from a Graph
| \(a=1\) | \(a=2\) | \(a=3\) | |
|---|---|---|---|
| \(\lim_{x\to a^-}f(x)\) | 2 | 4 | 1 |
| \(\lim_{x\to a^+}f(x)\) | 3 | 4 | 1 |
| \(\lim_{x\to a}f(x)\) | DNE (\(2\neq3\)) | 4 | 1 |
| \(f(a)\) | 3 | 4 | undefined |
At \(a=1\) the curve coming from the left heads to the open circle at height 2, while the piece on the right starts at the filled dot at height 3. At \(a = 3\) both sides head to height 1, so the limit is 1, even though there is no dot there (the point is not filled in).
At \(x=0\) both sides head to the open circle at height 1, so the limit is 1, even though the dot (the actual value \(g(0)\)) is at height 2.
Self-Check
From Activity 9: Intro to Limits
(a) Let \(f(x) = \dfrac{x^2+x-6}{x-2}\).
- Find the domain of \(f(x)\).
- Fill in a table of values of \(f(x)\) for \(x = 1.9,\ 1.99,\ 1.999,\ 2.001,\ 2.01,\ 2.1\).
- Based on your table, what is \(\lim_{x\to2}f(x)\)? Use algebra to confirm your answer.
- Is \(x = 2\) a vertical asymptote or a hole for \(f(x)\)?
(b) Use the graph of \(y=f(x)\) below (a different function) to evaluate each of the following:
Direct Substitution
The first thing to try is always to plug the value \(x\) is approaching into the function. As long as the function is defined at the point and near the point, the limit equals the function value.
But \(\displaystyle\lim_{x\to3}\frac{x+2}{x-3}\) gives \(\frac{5}{0}\) on direct substitution, so we need to do more work.
After direct substitution, there are three possibilities:
- You get a number: that's the limit.
- You get \(\dfrac{\text{non-zero}}{0}\): the function is blowing up to \(\pm\infty\) (see below).
- You get \(\dfrac00\): this is called an indeterminate form. It doesn't tell you the answer — you have to use algebra to rewrite the function first (see below).
Infinite Limits and Vertical Asymptotes
Direct substitution gives \(\frac50\), so each one-sided limit is \(+\infty\) or \(-\infty\).
- \(x\to3^-\): try \(x = 2.9\). The top is \(4.9\) (positive) and the bottom is \(-0.1\) (negative), so the fraction is \(\frac{+}{-} = -\). Hence \(\displaystyle\lim_{x\to3^-}\frac{x+2}{x-3} = -\infty\).
- \(x\to3^+\): try \(x = 3.1\). The top is \(5.1\) (positive) and the bottom is \(0.1\) (positive), so the fraction is \(\frac{+}{+} = +\). Hence \(\displaystyle\lim_{x\to3^+}\frac{x+2}{x-3} = +\infty\).
So \(\frac{x+2}{x-3}\) has a vertical asymptote at \(x=3\), and the two-sided limit does not exist.
Direct substitution gives \(\frac{-1}{0}\). Near \(x = 2\) the top is about \(-1\) (negative).
\[ \lim_{x\to2^-}\frac{x-3}{x-2} = \frac{(-)}{(-)} = +\infty, \qquad \lim_{x\to2^+}\frac{x-3}{x-2} = \frac{(-)}{(+)} = -\infty. \]There is a vertical asymptote at \(x = 2\): the graph shoots up on the left of the asymptote and down on the right.
Possible vertical asymptotes are where the denominator is zero. Factoring, \(x^2+4x+3 = (x+1)(x+3)\), so the candidates are \(x=-1\) and \(x = -3\). Check each one with a limit:
\[ \lim_{x\to-1}\frac{(x+1)(x+5)}{(x+1)(x+3)} = \lim_{x\to-1}\frac{x+5}{x+3} = \frac{4}{2} = 2. \]The limit is a finite number, so \(x = -1\) is a hole, not a vertical asymptote.
\[ \lim_{x\to-3}\frac{x^2+6x+5}{x^2+4x+3} = \frac{9-18+5}{0} = \frac{-4}{0} = \pm\infty. \]This is non-zero over zero, so \(x = -3\) is a vertical asymptote.
The \(\tfrac00\) Case: Use Algebra
Often (especially in calculus) direct substitution gives \(\frac00\). Then we use algebra — multiplying out, factoring, a common denominator, or multiplying by the conjugate — to cancel the factor causing the zero on the bottom, then try direct substitution again.
Factoring
Direct substitution gives \(\frac{9-6-3}{9-9} = \frac00\). Factor the top and bottom, and cancel:
\[ \lim_{x\to3}\frac{(x-3)(x+1)}{(x-3)(x+3)} = \lim_{x\to3}\frac{x+1}{x+3} = \frac46 = \frac23. \]Common Denominator
Direct substitution gives \(\frac{\frac13-\frac13}{0} = \frac00\). Our goal is to remove the \(3-x\) from the bottom. First combine the small fractions on top using the common denominator \(3x\):
\[ \frac13-\frac1x = \frac{x}{3x} - \frac{3}{3x} = \frac{x-3}{3x}. \]Dividing by \(3-x\) is the same as multiplying by \(\frac{1}{3-x}\), and \(3-x = -(x-3)\):
\[ \lim_{x\to3}\frac{x-3}{3x}\cdot\frac{1}{3-x} = \lim_{x\to3}\frac{x-3}{3x\cdot(-(x-3))} = \lim_{x\to3}\frac{1}{-3x} = -\frac19. \]Each piece blows up as \(x\to0\), giving "\(\pm\infty \pm\infty\)," which is another indeterminate form. Our goal is to cancel the \(x\) on the bottom. Use the common denominator \(x(x-5)\):
\[ \lim_{x\to0}\left(\frac{x-5}{x(x-5)} + \frac{5}{x(x-5)}\right) = \lim_{x\to0}\frac{x-5+5}{x(x-5)} = \lim_{x\to0}\frac{x}{x(x-5)} = \lim_{x\to0}\frac{1}{x-5} = -\frac15. \]Multiplying by the Conjugate
with no more radicals. To clear the radical from the numerator of \(\frac{5-\sqrt3}{6}\) ("rationalize the numerator"), multiply by the "special 1" \(\frac{5+\sqrt3}{5+\sqrt3}\):
\[ \frac{5-\sqrt3}{6}\cdot\frac{5+\sqrt3}{5+\sqrt3} = \frac{25-3}{6(5+\sqrt3)} = \frac{22}{6(5+\sqrt3)}. \]Direct substitution gives \(\frac00\), and there are square roots on top, so multiply top and bottom by the conjugate \(\sqrt x+\sqrt5\). Don't multiply out the bottom — we want to keep the \(x-5\) so it can cancel:
\[ \lim_{x\to5}\frac{(\sqrt x-\sqrt5)(\sqrt x+\sqrt5)}{(x-5)(\sqrt x+\sqrt5)} = \lim_{x\to5}\frac{x-5}{(x-5)(\sqrt x+\sqrt5)} = \lim_{x\to5}\frac{1}{\sqrt x+\sqrt5} = \frac{1}{\sqrt5+\sqrt5} = \frac{1}{2\sqrt5}. \]One-Sided Limits of Piecewise Functions
For a piecewise function, the left-hand limit at a break point uses the piece for \(x\) values less than the break point, and the right-hand limit uses the piece for \(x\) values greater than it.
Find \(\lim_{x\to2^+}f(x)\), \(\lim_{x\to2^-}f(x)\), and \(\lim_{x\to2}f(x)\).
For \(x\to2^+\) (numbers bigger than 2), use the top piece: \(\lim_{x\to2^+}f(x) = 3(2)-2 = 4\).
For \(x\to2^-\) (numbers less than 2), use the bottom piece. Plugging in gives \(\frac00\), so do more work:
\[ \lim_{x\to2^-}\frac{x^2-4}{x-2} = \lim_{x\to2^-}\frac{(x+2)(x-2)}{x-2} = \lim_{x\to2^-}(x+2) = 4. \]The one-sided limits are equal, so \(\lim_{x\to2}f(x) = 4\).
The limit exists when the two one-sided limits are equal.
\[ \lim_{x\to2^-}f(x) = 3(2)+b = 6+b, \qquad \lim_{x\to2^+}f(x) = 2^2+4(2) = 12. \]We need \(6 + b = 12\), so \(b = 6\). With this value, \(\lim_{x\to2}f(x) = 12\). Notice that \(f(2) = 5\) has nothing to do with the limit: the graph has two pieces meeting at an open circle at \((2,12)\), and a lone dot at \((2,5)\).
Self-Check
From the Limits In-Class Worksheet (Problems 6 and 7)
(a) Evaluate \[ \lim_{x\to2}\frac{x-1}{x-2}, \qquad \lim_{x\to2^-}\frac{x-1}{x-2}, \qquad \lim_{x\to2^+}\frac{x-1}{x-2}. \] Where is the vertical asymptote?
(b) Evaluate \(\displaystyle\lim_{x\to0}\frac{(2+x)^2-4}{x}\).
(c) Evaluate \(\displaystyle\lim_{x\to7}\frac{\sqrt{x+2}-3}{x-7}\).
The Definition of Continuity
The idea: a function is continuous if you can draw its graph without lifting your pencil. A graph can have sharp corners and still be continuous; what is not allowed is a hole, a jump, or a vertical asymptote.
- \(f(a)\) is defined;
- \(\lim_{x\to a}f(x)\) exists (that is, \(\lim_{x\to a^-}f(x) = \lim_{x\to a^+}f(x)\));
- \(\lim_{x\to a}f(x) = f(a)\).
(1) \(f(2) = \frac{4-4}{2-2} = \frac00\) is undefined (with no limit in front, \(\frac00\) just means we can't evaluate). Condition (1) fails, so \(f\) is not continuous at \(x=2\). Its graph is the line \(y = x+2\) with a hole at \((2,4)\).
(1) \(f(3) = -3^2+4 = -9+4 = -5\). (Use the top piece, since \(3\le3\).)
(2) Does \(\lim_{x\to3}f(x)\) exist?
\[ \lim_{x\to3^-}f(x) = -3^2+4 = -5, \qquad \lim_{x\to3^+}f(x) = 4(3)-8 = 4. \]Since \(-5\neq4\), the limit does not exist, so \(f\) is not continuous at \(x=3\). (The graph is a downward parabola that jumps up at \(x = 3\).)
Are they continuous at \(x=1\)? Both have the same formula near \(x = 1\), so they have the same limit:
\[ \lim_{x\to1}\frac{x^2-4x+3}{x-1} = \lim_{x\to1}\frac{(x-1)(x-3)}{x-1} = \lim_{x\to1}(x-3) = -2. \]- For \(f\): \(f(1) = 2\) is defined and the limit exists, but \(\lim_{x\to1}f(x) = -2\neq 2 = f(1)\). Condition (3) fails, so \(f\) is not continuous. (Its graph is the line \(y = x - 3\) with a hole at \((1,-2)\) and a stray dot at \((1,2)\).)
- For \(g\): \(g(1) = -2\) and \(\lim_{x\to1}g(x) = -2\). All three conditions hold, so \(g\) is continuous at \(x = 1\). (Defining \(g(1)=-2\) fills in the hole.)
(1) \(f(3) = 5\) is defined. (2) \(\lim_{x\to3}\frac{1}{x-3}\) gives \(\frac10 = \pm\infty\), so the limit does not exist. Hence \(f\) is not continuous at \(x = 3\); it has a vertical asymptote there.
Types of Discontinuities
| Name | Situation | Picture |
|---|---|---|
| Hole (removable discontinuity) | \(\lim_{x\to a}f(x)\) exists, but \(f(a)\) is undefined or \(f(a)\neq\lim_{x\to a}f(x)\) | an open circle on an otherwise unbroken curve (possibly with the dot somewhere else) |
| Jump discontinuity | \(\lim_{x\to a^-}f(x)\neq\lim_{x\to a^+}f(x)\) (both finite) | the graph jumps to a different height |
| Infinite discontinuity (vertical asymptote) | \(\lim_{x\to a}f(x) = \pm\infty\), or either one-sided limit is \(\pm\infty\) | the graph shoots up or down along a vertical line |
Making Piecewise Functions Continuous
Go through the three conditions.
So \(a = -5\) and \(b = -1\). (Check: the left piece is \(x^2-10\), which equals \(-1\) at \(x=3\); the right piece \(5-2x\) also equals \(-1\) at \(x = 3\).)
Self-Check
From Activity 11: Limits/Continuity
(a) Given the piecewise function \[ f(x) = \begin{cases}\dfrac{x^2+x-2}{x+2} & \text{if } x<-2,\\[2mm] 3x+b & \text{if } x\ge-2,\end{cases} \] where \(b\) is some constant, find the value of \(b\) so that \(f(x)\) is continuous at \(x=-2\). Once computed, what is the domain of \(f(x)\)?
(b) Let \[ g(x) = \begin{cases}\dfrac{-x}{x^2+x} & \text{if } x<0,\\[2mm] 2x-1 & \text{if } 0\le x\le4,\\ x-1 & \text{if } x>4.\end{cases} \] Find every \(x\)-value where \(g(x)\) has a discontinuity, and classify each one (hole, vertical asymptote, or jump). Be sure to check the break points \(x = 0\) and \(x=4\).
Tangent Lines as Limits of Secant Lines
In Preview of Calculus we found the slope of a secant line and used it to estimate the slope of the tangent line:
\[ m_{\text{sec}} = \frac{f(b)-f(a)}{b-a}. \]Now we let the second point slide toward the first. Calling the moving point \(x\) and letting \(x\) get close to \(a\):
Alternate form: write the nearby point as \(x = a+h\), where \(h\) is small. Then \(x - a = h\), and \(x\to a\) is the same as \(h\to0\):
\[ m_{\tan} = \lim_{h\to0}\frac{f(a+h)-f(a)}{h}. \]To write the equation of a line we need a point and a slope.
Point: \((3, f(3)) = (3,9)\).
Slope: use the alternate form with \(a = 3\):
\[ \lim_{h\to0}\frac{f(3+h)-f(3)}{h} = \lim_{h\to0}\frac{(3+h)^2-3^2}{h} = \lim_{h\to0}\frac{9+6h+h^2-9}{h} = \lim_{h\to0}\frac{h(6+h)}{h} = \lim_{h\to0}(6+h) = 6. \](Recall \((3+h)^2 = (3+h)(3+h) = 9+6h+h^2\), not \(9 + h^2\).) Using point-slope form:
\[ y - 9 = 6(x-3) \quad\Longrightarrow\quad y = 6x - 18 + 9 = 6x-9. \]Plugging in \(h = 0\) gives \(\frac00\). Combine the fractions on top with the common denominator \(2(2+h)\):
\[ \frac{1}{2+h}-\frac12 = \frac{2}{2(2+h)} - \frac{2+h}{2(2+h)} = \frac{2-2-h}{2(2+h)} = \frac{-h}{2(2+h)}. \]Dividing by \(h\) is the same as multiplying by \(\frac1h\):
\[ \lim_{h\to0}\frac{-h}{2(2+h)}\cdot\frac1h = \lim_{h\to0}\frac{-1}{2(2+h)} = \frac{-1}{2(2)} = -\frac14. \]This makes sense: \(\frac1x\) is decreasing at \(x = 2\), so the slope is negative.
The Derivative at a Point
Here \(a = 1\) and \(f(1) = 3+2 = 5\). Using the first form:
\[ f'(1) = \lim_{x\to1}\frac{f(x)-f(1)}{x-1} = \lim_{x\to1}\frac{3x^2+2x-5}{x-1} = \lim_{x\to1}\frac{(3x+5)(x-1)}{x-1} = \lim_{x\to1}(3x+5) = 8. \]This is \(\frac00\) with square roots, so multiply by the conjugate:
\[ \lim_{h\to0}\frac{(\sqrt{4+2h}-\sqrt4)(\sqrt{4+2h}+\sqrt4)}{h(\sqrt{4+2h}+\sqrt4)} = \lim_{h\to0}\frac{(4+2h)-4}{h(\sqrt{4+2h}+\sqrt4)} = \lim_{h\to0}\frac{2h}{h(\sqrt{4+2h}+\sqrt4)} \] \[ = \lim_{h\to0}\frac{2}{\sqrt{4+2h}+\sqrt4} = \frac{2}{2+2} = \frac12. \]What Does the Derivative Tell Us?
Marginal Cost
Let \(C(x)\) be the cost (in dollars) to produce \(x\) gallons of paint. What does each quantity tell us?
- \(C(20)\): the cost to produce 20 gallons of paint.
- \(C(20.1)\): the cost to produce 20.1 gallons of paint.
- \(C(20.1)-C(20)\): the cost to produce an extra 0.1 gallons after already producing 20.
- \(\dfrac{C(20.1)-C(20)}{0.1}\): the cost of those 0.1 gallons divided by 0.1 gallons, i.e. the cost per gallon; roughly the cost to produce the next gallon. (This is the slope of a secant line.)
Letting the 0.1 shrink to 0 turns this secant slope into the derivative \(C'(20)\).
Velocity
| \(t\) | 0 | 10 | 60 | 61 |
|---|---|---|---|---|
| \(d(t)\) | 0 | 50 m | 1500 m | 1503 m |
\(d(60) = 1500\): the car has traveled 1500 meters after 60 seconds.
\[ d'(60) \approx \frac{d(61)-d(60)}{61-60} = \frac{1503-1500}{1} = \frac{\text{distance traveled in 1 second}}{1 \text{ second}} = 3 \text{ m/s}. \]\(d'(60)\) is the velocity (speed) of the car at 60 seconds, in meters per second; here about 3 m/s.
Self-Check
From Activities 12 and 13: Derivatives
(a) Given \(f(x) = x^2-2\), use the limit definition \(f'(a) = \displaystyle\lim_{h\to0}\frac{f(a+h)-f(a)}{h}\) to find \(f'(1)\) and \(f'(2)\).
(b) Suppose a revenue function \(R(x)\) has \(R(20) = 100\), and we have the following data:
| \(x\) | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|
| \(\dfrac{R(20)-R(x)}{20-x}\) | 18.4 | 19.01 | 19.8 | 19.85 | 19.94 | undefined |
The curve of best fit for \(R(x)\) predicts \(R(20.1) = 102.1\). Use this information to guess the value of \(R'(20)\). What does \(R'(20)\) mean in the context of the problem?
From a Point to a Function
Repeating the same work with \(a = 2\) and \(a = 3\) gives \(f'(2) = 20\) and \(f'(3) = 30\). That's a lot of repeated work! Instead, do it once with a general \(x\):
\[ \begin{aligned} f'(x) &= \lim_{h\to0}\frac{f(x+h)-f(x)}{h} = \lim_{h\to0}\frac{5(x+h)^2-5x^2}{h} = \lim_{h\to0}\frac{5(x^2+2xh+h^2)-5x^2}{h}\\ &= \lim_{h\to0}\frac{5x^2+10xh+5h^2-5x^2}{h} = \lim_{h\to0}\frac{h(10x+5h)}{h} = \lim_{h\to0}(10x+5h) = 10x. \end{aligned} \]Now plug in: \(f'(1) = 10\), \(f'(2) = 20\), \(f'(3) = 30\), all at once.
- Find \(f(x+h)\) by plugging \(x+h\) in for every \(x\) in the formula, and replace \(f(x)\) with the given formula. Put parentheses around \(f(x)\) so the minus sign distributes.
- Multiply out (or get a common denominator, or multiply by the conjugate) and simplify. Everything without an \(h\) should cancel.
- Factor an \(h\) out of the top and cancel it with the \(h\) on the bottom.
- Now plug in \(h = 0\). (Keep writing "\(\lim_{h\to0}\)" until this step.)
(Multiplying out the top: \((\sqrt{x+h}-\sqrt x)(\sqrt{x+h}+\sqrt x) = (x+h) + \sqrt{x+h}\sqrt x - \sqrt x\sqrt{x+h} - x = h\); the middle terms cancel.)
(Inside the limit \(h\neq0\), so \(\frac0h = 0\).) This makes sense: the graph of \(y=6\) is a horizontal line, which has slope 0 everywhere.
Again this makes sense: \(y = 4x+3\) is a line with slope 4 everywhere.
Notation
If we write the function as \(f(x)\), we can write the derivative as
\[ f'(x), \qquad \frac{d}{dx}(f), \qquad \frac{df}{dx}. \]If we write the function as \(y\) (like \(y = x^2\)), we can write the derivative as
\[ y', \qquad \frac{dy}{dx}. \]The symbol \(\frac{d}{dx}\) means "take the derivative with respect to \(x\)."
Graphing the Derivative
The derivative \(f'(x)\) is the slope of \(f\) at each point. So to sketch \(f'\) from the graph of \(f\), estimate the slope at each point and plot that number as the \(y\)-value of \(f'\):
- Where \(f\) is going up (positive slopes), the graph of \(f'\) is above the \(x\)-axis.
- Where \(f\) is going down (negative slopes), the graph of \(f'\) is below the \(x\)-axis.
- Where \(f\) has a horizontal tangent (a peak, a valley, or a flat spot), \(f'\) crosses or touches the \(x\)-axis (\(f' = 0\)).
- Where \(f\) is steepest, \(f'\) is farthest from the \(x\)-axis.
Reading \(f\) left to right: it rises (\(f'>0\)) up to a peak at \(x=-1\) (\(f'(-1) = 0\)), falls (\(f'<0\)) down to a valley at \(x = 1\) (\(f'(1) = 0\)), then rises again (\(f'>0\)). It falls most steeply at \(x = 0\), which is where \(f'\) is lowest. (Once we learn the power rule, we can check that \(f'(x) = 3x^2-3\).)
When Is a Function Not Differentiable?
A function fails to have a derivative at \(x = a\) in these situations:
- It is not continuous at \(a\) (a hole, a jump, or a vertical asymptote).
- Corner, e.g. \(y = |x|\) at \(x=0\): the slope is \(-1\) on the left and \(+1\) on the right, so there is no single tangent line.
- Cusp, e.g. \(y = x^{2/3}\) at \(x = 0\): a very sharp point where both sides become vertical.
- Vertical tangent, e.g. \(y = x^{1/3}\) at \(x=0\): the tangent line is vertical, and a vertical line has undefined slope.
Higher-Order Derivatives
Since \(f'(x)\) is a function, we can take its derivative too, and then take the derivative again, and again.
| Function | First derivative | Second derivative | Third derivative |
|---|---|---|---|
| \(f(x)\) | \(f'(x)\) | \(f''(x)\) | \(f'''(x)\) |
| \(y\) | \(y'\) | \(y''\) | \(y'''\) |
| \(f\) | \(\dfrac{df}{dx}\) | \(\dfrac{d^2f}{dx^2}\) | \(\dfrac{d^3f}{dx^3}\) |
| e.g. \(x^2\) | \(2x\) | \(2\) | \(0\) |
(Every derivative after the third derivative of \(x^2\) is also \(0\).) If \(f\) is distance, \(f'\) is velocity and \(f''\) is acceleration (the rate of change of the rate of change).
Self-Check
From Activities 12 and 13: Derivatives
(a) Let \(f(x) = x^2-2\). Determine where the function is continuous. Then use the limit definition \(f'(x) = \displaystyle\lim_{h\to0}\frac{f(x+h)-f(x)}{h}\) to compute \(f'(x)\).
(b) Let \(f(x) = \dfrac{1}{4x}\). Use the limit definition to find \(f'(x)\), and use it to find the equation of the tangent line to \(f(x)\) at \(x=2\).
We've seen that (1) the derivative of a function tells us the slope of the tangent line at each point, and (2) we can find the derivative using \(f'(x) = \lim_{h\to0}\frac{f(x+h)-f(x)}{h}\). Now we learn some "short-cut" rules to find derivatives without having to use limits.
The Constant Rule
The graph of \(y = c\) is a horizontal line, which has slope 0. For example, if \(f(x) = 3\) then \(f'(x) = 0\); if \(y = 5\) then \(y' = 0\); if \(g(x) = 153e\) then \(g'(x) = 0\) (\(153e\) is just a number).
The Power Rule
We saw (using limits) that \(\frac{d}{dx}(x^2) = 2x\) and \(\frac{d}{dx}(\sqrt x) = \frac{1}{2\sqrt x}\). These are both cases of one rule.
- \(\dfrac{d}{dx}(x^3) = 3x^2\).
- If \(f(x) = x^5\), then \(f'(x) = 5x^4\).
- \(\dfrac{d}{dx}\left(\sqrt[3]x\right) = \dfrac{d}{dx}\left(x^{1/3}\right) = \dfrac13x^{1/3-1} = \dfrac13x^{-2/3} = \dfrac{1}{3x^{2/3}} = \dfrac{1}{3\sqrt[3]{x^2}}\).
- If \(g(x) = \sqrt[3]{x^5} = x^{5/3}\) (power on top, root on bottom), then \(g'(x) = \dfrac53x^{2/3}\), since \(\frac53-1 = \frac53-\frac33 = \frac23\).
- \(\dfrac{d}{dx}(x) = \dfrac{d}{dx}(x^1) = 1\cdot x^0 = 1\). This matches the slope of the line \(y = x\).
Sum, Difference, and Constant Multiple Rules
Rewrite first: \(\frac{2}{x^2} = 2x^{-2}\) and \(\frac x2 = \frac12x\).
\[ \frac{d}{dx}\left[2x^{-2}-2+\tfrac12x\right] = 2(-2x^{-3}) - 0 + \tfrac12(1) = -4x^{-3}+\frac12 = -\frac{4}{x^3}+\frac12. \]| \(f(x)\) | Rewrite | \(f'(x)\) |
|---|---|---|
| \(x^{15}\) | — | \(15x^{14}\) |
| \(3x^2+4x\) | — | \(6x+4\) |
| \(2+\dfrac{5}{x^3}\) | \(2+5x^{-3}\) | \(-15x^{-4}\) |
| \(\dfrac{x^3}{8}-16\sqrt x\) | \(\tfrac18x^3-16x^{1/2}\) | \(\tfrac38x^2-8x^{-1/2}\) |
Split the fraction into separate terms (or multiply by \(x^{-2}\)) first:
\[ f(x) = \frac{x^3}{x^2}+\frac{4x}{x^2}-\frac{3}{x^2} = x+4x^{-1}-3x^{-2}, \qquad f'(x) = 1-4x^{-2}+6x^{-3}. \]Multiply out first: \(f(x) = (x+3)(x+3) = x^2+6x+9\), so \(f'(x) = 2x+6\).
Warning: the power rule needs just \(x\) in the base, so don't apply it directly to \((x+3)^2\). For now, multiply out first. (The shortcut for powers of an expression like \((x+3)^2\) is the chain rule, covered later.)
We don't have a product rule yet, so multiply out first:
\[ f(x) = x^3+x^2+2x^2+2x = x^3+3x^2+2x, \qquad f'(x) = 3x^2+6x+2. \]Tangent Lines with the Rules
(a) Find the equation of the tangent line at \(x=2\).
Point: \(f(2) = 3(4)+2(2)+1 = 17\), so \((2,17)\). Slope: \(f'(x) = 6x+2\), so \(f'(2) = 14\).
\[ y-17 = 14(x-2) \quad\Longrightarrow\quad y = 14x-11. \](b) Find where the tangent line is horizontal.
A horizontal line has slope 0, so we need the derivative to be 0:
\[ f'(x) = 6x+2 = 0 \;\Longrightarrow\; 6x = -2 \;\Longrightarrow\; x = -\frac13. \]This is the vertex of the parabola (matching the vertex formula \(x = -\frac{b}{2a} = -\frac{2}{2(3)}\) from Unit 1).
Self-Check
From Activities 14 and 15: Derivatives; Derivative Interpretation and Chain Rule
Compute the derivative of each function.
\[ \text{(a)}\ f(x) = 5x^3+7x-4 \qquad \text{(b)}\ f(x) = 4\sqrt x+14x^2 \qquad \text{(c)}\ f(x) = \frac{x^2-7x}{x^3} \qquad \text{(d)}\ f(x) = 15x^4-\frac{4}{5x^3}+\sqrt[4]{x^3} \]The Product Rule
Let \(f(x) = x(x^2+1)\). It is tempting to take the derivative of each factor and multiply: \(1\cdot2x = 2x\). This is wrong! How do we know? Multiply out first: \(f(x) = x^3+x\), so \(f'(x) = 3x^2+1\), which is not \(2x\). The derivative of a product is not the product of the derivatives.
It is fine to leave answers like these unsimplified unless you are asked to simplify.
| \(x\) | \(g(x)\) | \(g'(x)\) | \(h(x)\) | \(h'(x)\) |
|---|---|---|---|---|
| 2 | 3 | 1 | 4 | 5 |
The Quotient Rule
Hi: \(x^2+1\); D-Hi: \(2x\); Lo: \(3x+2\); D-Lo: \(3\).
\[ \frac{d}{dx}\left(\frac{x^2+1}{3x+2}\right) = \frac{(3x+2)(2x)-(x^2+1)(3)}{(3x+2)^2} = \frac{6x^2+4x-3x^2-3}{(3x+2)^2} = \frac{3x^2+4x-3}{(3x+2)^2}. \]Combining Rules
Take each term separately: \(2x\) uses the power rule, \(x^2(3x+1)\) is a product, and \(\frac{5}{x+1}\) is a quotient.
\[ f'(x) = 2+\Big[x^2(3)+(2x)(3x+1)\Big]+\frac{(x+1)(0)-5(1)}{(x+1)^2} = 2+3x^2+2x(3x+1)-\frac{5}{(x+1)^2}. \]This is a quotient, and the top is itself a product.
- Hi: \((x+1)(x^2+3x)\); D-Hi (product rule): \((x+1)(2x+3)+(1)(x^2+3x)\).
- Lo: \(x^2+2x+1\); D-Lo: \(2x+2\).
- \(f(x) = x^2(3x-1)+2x\): \(\ f'(x) = (x^2)(3)+(2x)(3x-1)+2 = 9x^2-2x+2\).
- \(g(x) = \dfrac{3}{x+6}\): \(\ g'(x) = \dfrac{(x+6)(0)-3(1)}{(x+6)^2} = \dfrac{-3}{(x+6)^2}\).
- \(h(x) = \dfrac{17x^2+4}{2x+1}\): \(\ h'(x) = \dfrac{(2x+1)(34x)-(17x^2+4)(2)}{(2x+1)^2}\).
- \(y = \dfrac{x^2+4x+1}{(x^2+3)(x-2)}\): the bottom is a product, so D-Lo \(= (x^2+3)(1)+(2x)(x-2)\), and \[ y' = \frac{(x^2+3)(x-2)(2x+4)-(x^2+4x+1)\big[(x^2+3)(1)+(2x)(x-2)\big]}{\big((x^2+3)(x-2)\big)^2}. \]
| \(x\) | \(g(x)\) | \(g'(x)\) | \(h(x)\) | \(h'(x)\) |
|---|---|---|---|---|
| 3 | 2 | 1 | 4 | 5 |
Self-Check
Practice problems in the style of the lecture examples (no in-class activity for this lecture)
(a) Use the product rule to find the derivative of \(f(x) = (2x^3-x)(x^2+4)\). Check your answer by multiplying out first.
(b) Find the derivative of \(g(x) = \dfrac{x^2-3}{2x+1}\) and simplify the numerator.
(c) Use the table to find \(p'(1)\) and \(q'(1)\), where \(p(x) = f(x)g(x)\) and \(q(x) = \dfrac{f(x)}{g(x)}\).
| \(x\) | \(f(x)\) | \(f'(x)\) | \(g(x)\) | \(g'(x)\) |
|---|---|---|---|---|
| 1 | 2 | \(-1\) | 3 | 4 |
Marginal Cost, Revenue, and Profit
\(C'(x) = 5\). When \(x\) increases by 1, \(C(x)\) goes up by 5: it costs $5 to produce each extra item. This is the variable (marginal) cost from Unit 1; the 3 is the fixed cost.
At \(x = 2\), the rate of change of cost is $7 per item. In words: after we've produced 2 items, the cost of the next item (the 3rd item) is approximately $7.
Why "the Next Item"?
Return to the limit definition. If we let \(h = 1\) instead of letting it go to 0, we get an approximation:
\[ f'(x) = \lim_{h\to0}\frac{f(x+h)-f(x)}{h} \approx \frac{f(x+1)-f(x)}{1} = f(x+1)-f(x). \]When \(f\) is cost, \(C(x+1)\) is the cost to produce items \(1,2,\dots,x,x+1\), and \(C(x)\) is the cost to produce items \(1,2,\dots,x\). Subtracting leaves the cost of item number \(x+1\) alone.
Approximating the Next Value
\(C(3) = 4\): it costs $4 to produce 3 lbs. \(C'(3) = 2\): after producing 3 lbs, cost is increasing at a rate of $2 per pound, so the next pound costs about $2.
\[ C(4)\approx C(3)+C'(3) = 4+2 = 6. \]This idea extends to other settings as well.
(a) Approximate \(P(3)\). On day 0 there are 1000 mosquitoes, and the population is increasing by about 75 mosquitoes per day. So
\[ P(1)\approx1075, \qquad P(2)\approx1150, \qquad P(3)\approx1225. \](b) Find the equation of the tangent line to \(P(t)\) at \(t=0\). Point: \((0,1000)\). Slope: \(75\).
\[ y-1000 = 75(t-0) \quad\Longrightarrow\quad y = 1000+75t. \]Notice the estimates in (a) are just points on this tangent line: the tangent line is the "straight-line" approximation of the function near \(t=0\).
\(p(2) = 2^2+3(2) = 10\): if we sell 2 items, the profit is $10.
\(p'(x) = 2x+3\), so \(p'(2) = 7\): after selling 2 items, profit is increasing at a rate of $7 per item, so the next (3rd) item will earn a profit of about $7.
Self-Check
From Activities 14 and 15: Derivatives; Derivative Interpretation and Chain Rule
(a) Given the demand function \(p_D(x) = 12-0.5x\), find the marginal revenue (the revenue from producing the next item) at \(x = 5\) items. (Hint: first find the revenue function \(R(x)\).)
(b) Given a cost function \(C(x) = x^2+4x+5\), find \(C'(4)\) and interpret its meaning in the context of the problem.
Review: Composition of Functions
Recall from Unit 1 that \((f\circ g)(x) = f(g(x))\): plug the whole function \(g(x)\) in as the input of \(f\). For example, if \(f(x) = x^5\) and \(g(x) = x^2+2\), then \(f(g(x)) = (x^2+2)^5\).
For the chain rule we need to go the other way: given \(h(x)\), find an outside function \(f\) and an inside function \(g\) with \(h(x) = f(g(x))\).
| \(h(x)\) | Outside \(f(x)\) | Inside \(g(x)\) |
|---|---|---|
| \((x^2+5x)^3\) | \(x^3\) | \(x^2+5x\) |
| \(\sqrt{x^2+5}\) | \(\sqrt x\) | \(x^2+5\) |
| \(e^{x^3+2x}\) | \(e^x\) | \(x^3+2x\) |
| \(\ln\!\left(\dfrac{x^2+1}{5x}\right)\) | \(\ln(x)\) | \(\dfrac{x^2+1}{5x}\) |
The Chain Rule
Outside: \(f(x) = x^3\), so \(f'(x) = 3x^2\) and \(f'(g(x)) = 3(x^2+5x)^2\). Inside: \(g(x) = x^2+5x\), so \(g'(x) = 2x+5\).
\[ \frac{d}{dx}\left[(x^2+5x)^3\right] = 3(x^2+5x)^2\cdot(2x+5). \]Rewrite as \((x^2+5)^{1/2}\). Outside: \(x^{1/2}\), with derivative \(\frac12x^{-1/2}\). Inside: \(x^2+5\), with derivative \(2x\).
\[ \frac{d}{dx}\left(x^2+5\right)^{1/2} = \frac12(x^2+5)^{-1/2}(2x) = \frac{2x}{2\sqrt{x^2+5}} = \frac{x}{\sqrt{x^2+5}}. \]The Chain Rule with the Power Rule
The most common use of the chain rule is a power of some inside function.
For \(h(x) = \dfrac{1}{(6x+3)^3}\), rewrite first so we can use the power rule: \(h(x) = (6x+3)^{-3}\), so
\[ h'(x) = -3(6x+3)^{-4}(6) = \frac{-18}{(6x+3)^4}. \]In the last one, dividing by the constant 5 is the same as multiplying by \(\frac15\), so no quotient rule is needed.
Combining the Chain Rule with Other Rules
(a) \(f(x) = \dfrac{(x^2+2)^8}{x+2}\). Quotient rule, where D-Hi needs the chain rule: Hi \(= (x^2+2)^8\), D-Hi \(= 8(x^2+2)^7(2x)\), Lo \(= x+2\), D-Lo \(= 1\).
\[ f'(x) = \frac{(x+2)\cdot8(x^2+2)^7(2x)-(x^2+2)^8(1)}{(x+2)^2}. \](b) \(g(x) = 16x^2(x+7)^{16}\). Product rule, where the second factor needs the chain rule: \(\frac{d}{dx}(x+7)^{16} = 16(x+7)^{15}(1)\).
\[ g'(x) = (16x^2)\cdot16(x+7)^{15}(1)+32x(x+7)^{16}. \](c) \(h(x) = \dfrac{1}{(6x+3)^2}\) — two ways.
Chain rule: \(h(x) = (6x+3)^{-2}\), so \(h'(x) = -2(6x+3)^{-3}(6) = \dfrac{-12}{(6x+3)^3}\).
Quotient rule:
\[ h'(x) = \frac{(6x+3)^2(0)-1\cdot2(6x+3)(6)}{\big((6x+3)^2\big)^2} = \frac{-12(6x+3)}{(6x+3)^4} = \frac{-12}{(6x+3)^3}. \]Same answer! Rewriting with a negative exponent is usually faster.
Hi: \((3x^2+6)^{1/2}\); D-Hi: \(\frac12(3x^2+6)^{-1/2}(6x)\); Lo: \(2x\); D-Lo: \(2\).
\[ \frac{d}{dx}\left(\frac{\sqrt{3x^2+6}}{2x}\right) = \frac{(2x)\cdot\frac12(3x^2+6)^{-1/2}(6x)-\sqrt{3x^2+6}\,(2)}{(2x)^2}. \]Hi: \(x^2(x+1)^6\). D-Hi needs the product rule and the chain rule: \(x^2\cdot6(x+1)^5(1)+2x(x+1)^6\). Lo: \(7x+4\); D-Lo: \(7\).
\[ \frac{d}{dx}\left(\frac{x^2(x+1)^6}{7x+4}\right) = \frac{(7x+4)\big(x^2\cdot6(x+1)^5+2x(x+1)^6\big)-x^2(x+1)^6(7)}{(7x+4)^2}. \]Self-Check
From Activities 15 and 16: Derivative Interpretation and Chain Rule; Derivative of Exponential Functions
Find the derivative of each function.
\[ \text{(a)}\ f(x) = \sqrt{3x^2-\frac7x} \qquad\qquad \text{(b)}\ h(x) = (4x^2-3x+2)^{-2} \]The Derivative of \(e^x\)
- \(f(x) = e^x+5\): \(\ f'(x) = e^x\).
- \(f(x) = 3e^x\): \(\ f'(x) = 3e^x\).
- \(f(x) = e^{4x}\) (outside \(e^x\), inside \(4x\)): \(\ f'(x) = e^{4x}\cdot\dfrac{d}{dx}(4x) = 4e^{4x}\).
- \(f(x) = e^{6x^2+1}\): \(\ f'(x) = e^{6x^2+1}\cdot\dfrac{d}{dx}(6x^2+1) = 12x\,e^{6x^2+1}\).
Other Bases
What about an exponential like \(2^x\) with a base other than \(e\)? Since \(a = e^{\ln a}\), we can rewrite \(a^x = \left(e^{\ln a}\right)^x = e^{(\ln a)x}\). The chain rule then gives \(\frac{d}{dx}e^{(\ln a)x} = e^{(\ln a)x}\cdot\ln a\), that is:
Continuous Compounding
Recall from Unit 1 that with continuous compounding, \(F(t) = Pe^{rt}\). By the chain rule, \(F'(t) = Pe^{rt}\cdot r = rPe^{rt}\): the rate at which the account grows is \(r\) times the current balance.
The Derivative of \(\ln(x)\)
Chain rule, then quotient rule for the inside:
\[ \frac{1}{\frac{x+1}{x-1}}\cdot\frac{d}{dx}\left(\frac{x+1}{x-1}\right) = \frac{x-1}{x+1}\cdot\frac{(x-1)(1)-(x+1)(1)}{(x-1)^2} = \frac{x-1}{x+1}\cdot\frac{-2}{(x-1)^2} = \frac{-2}{(x+1)(x-1)}. \]Log rules first: \(\ln\!\left(\frac{x+1}{x-1}\right) = \ln(x+1)-\ln(x-1)\), so the derivative is
\[ \frac{1}{x+1}-\frac{1}{x-1} = \frac{(x-1)-(x+1)}{(x+1)(x-1)} = \frac{-2}{(x+1)(x-1)}. \]Using log rules first is often much easier.
All the Rules in One
This is a quotient whose top is a product.
- Hi: \((3x+2)^2\ln(x^2+1)\).
- D-Hi (product rule, with the chain rule on each factor): \((3x+2)^2\cdot\dfrac{2x}{x^2+1}+2(3x+2)(3)\ln(x^2+1)\).
- Lo: \(e^{4x}+1\); D-Lo: \(4e^{4x}\).
Self-Check
From Activity 16: Derivative of Exponential Functions
(a) Suppose you open an account with a $1000 initial payment at a 4% interest rate compounded continuously.
- Find the amount of money you will have in 10 years.
- Find the derivative of \(F(t)\), the function giving the amount in the account after \(t\) years.
- What is the interpretation of \(F'(10)\) in the context of the problem?
(b) Find the derivative of each function.
\[ \text{(i)}\ f(x) = \ln\!\left(1-5x^2+\sqrt x\right) \qquad\qquad \text{(ii)}\ g(x) = \frac{2^{5x+7}}{x^3-\frac9x} \]