Same Q1 formula, harder function. And a hidden connection to Q6.
A secant line is a straight line that cuts through a curve at two points. Its slope is the average rate of change of the function between those two $x$-values — "how much did $g$ change, per unit of $x$?"
Geometrically: the secant line is a "ruler" laid across the curve between two anchor points, and the slope is the steepness of that ruler. We're not trying to find the curve's slope at any single point — we're finding the slope of one straight line that connects two points on the curve.
For $g(x) = -x^3 + 1$ between $x = -1$ and $x = 2$: the function changes dramatically (it's a cubic — steep, non-linear), but the secant is just one straight line connecting the start and end. We're averaging all that chaos into a single number.
This is exactly the formula from Q1, no new tool required:
$$m_{\text{secant}} = \frac{g(b) - g(a)}{b - a}$$
where $a$ and $b$ are the two $x$-values. For us: $a = -1$, $b = 2$. Two steps: (1) evaluate $g$ at both, (2) subtract and divide.
$$g(-1) = -(-1)^3 + 1 = -(-1) + 1 = 1 + 1 = 2$$
The cube of $-1$ is $-1$, the leading minus flips it to $+1$, then $+1$. So the point is $(-1, 2)$.
$$g(2) = -(2)^3 + 1 = -8 + 1 = -7$$
The cube of $2$ is $8$, the leading minus keeps it negative, then $+1$. So the point is $(2, -7)$.
$$m_{\text{secant}} = \frac{g(2) - g(-1)}{2 - (-1)} = \frac{-7 - 2}{2 + 1} = \frac{-9}{3} = \boxed{-3}$$
The line falls 9 units in $y$ while running 3 units in $x$, so the slope is $-3$. Negative makes intuitive sense: $g$ is a downward-cubic (negative leading coefficient), and from $x=-1$ to $x=2$ the function is falling overall.
This is the most important idea in the pretest so far. Secant slopes and derivatives are two sides of the same coin, and Q7 sits exactly between Q1 and Q6.
| Question | Tool | What it measures | Limit interpretation |
|---|---|---|---|
| Q1 slope of $x^2$ over $[-1, 3]$ |
Secant slope | Average rate of change over an interval | Discrete — no limit yet |
| Q7 slope of $-x^3+1$ over $[-1, 2]$ |
Secant slope | Average rate of change over an interval | Discrete — no limit yet |
| Q6 $f'(-3)$ for $f(x) = -2x^2$ |
Derivative | Instantaneous rate at one point | Limit of secant as the two points collide |
Q1 and Q7 are the same kind of question (secant slopes), with different functions and intervals. Q6 is what you get if you take the Q1 formula and squeeze the interval down to a single point — that's the derivative. Three questions, one underlying concept: slope of a function, at different granularities.
The Mean Value Theorem (MVT) connects Q1/Q7 and Q6 with a guarantee: if $g$ is continuous on $[a, b]$ and differentiable on $(a, b)$, then somewhere in the open interval $(a, b)$ there is a point $c$ where the derivative equals the average slope over $[a, b]$.
In our case, the secant slope over $[-1, 2]$ is $-3$. The MVT promises: there exists a $c \in (-1, 2)$ such that
$$g'(c) = -3$$
We can even find it. $g'(x) = -3x^2$, so $-3x^2 = -3$ gives $x^2 = 1$, so $x = \pm 1$. But we need $c \in (-1, 2)$ — so $c = 1$ works (the boundary $c = -1$ is excluded because MVT guarantees an open interval). The MVT is satisfied: $g'(1) = -3$ matches our secant slope.
Why this matters in Data Science: MVT is the rigorous version of "the average must equal one of the instants." It shows up in optimization theory, error bounds for numerical methods, and the proof of the Fundamental Theorem of Calculus. We don't need it yet, but every time you see an average in a model and a derivative in a loss function, MVT is the bridge.
Units: if $g(x)$ is in "meters" and $x$ is in "seconds," the secant slope is in "meters per second" — a rate. Even though we don't have a real-world $g$ here, the dimensional analysis tells you the answer is a rate of change, not a position. The $-3$ means: as $x$ increases by 1, $g$ decreases by 3, on average. That matches the curve.
Mini-question: Find the slope of the secant line to $h(x) = 2x^2 - 5$ through $x = 0$ and $x = 3$.
$h(0) = -5$, $h(3) = 2(9) - 5 = 13$. Slope = $\frac{13 - (-5)}{3 - 0} = \frac{18}{3} = 6$.
Sanity: $h$ is a parabola opening upward; on $[0, 3]$ it's growing, so the secant slope should be positive — 6 fits.
Stretch your legs with these:
© Data Science Tutor · datascience.aidalee.com