This Calculus concept is the current idea: keep the same invariant visible across Intuition, Math, Code, Interactive Demo.
Calculus
Taylor Expansion and Local Approximation
Taylor expansion uses value, slope, and curvature at one point to make a local model, then shows why local models eventually fail.
Concept Structure
Taylor Expansion and Local Approximation
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learner Contract
What this page should let you do.
1 prerequisite listed; refresh them before leaning on the math or code.
Explain the mechanism, trace the main notation, and test one prediction in the live demo.
Read the intuition before the notation; the math should name a mechanism you already felt.
Follow this edge after making one prediction here; the next page should reuse the result, not restart the route.
Claim/source review status
Substantive review recorded
1/1 claims have bounded review metadata; still check caveats and source scope.Metadata-derived; review may be AI-assisted. Not a human certification.01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
A derivative is already a prediction machine.
At a point , the derivative says: "for a tiny move , expect the output to change by about ." That is a tangent-line model. Taylor expansion keeps the same idea but asks for a better local model: if we also know the curvature at , can we predict the bend?
The first-order model is the tangent. The second-order model is a tiny curved patch. Both are promises made near , not global descriptions of the function.
This distinction matters everywhere in deep learning. Gradient descent trusts a local linear model of the loss. Newton-style methods trust a local quadratic model. Loss-landscape language about sharpness, curvature, and step-size stability is Taylor language in disguise.
The useful mental model is:
- choose an anchor point,
- use derivatives at that anchor to build a local model,
- move only as far as that local model deserves trust.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Let be differentiable near , and define the displacement
The first-order Taylor model is
This is the tangent-line prediction: keep the current value and add slope times displacement.
If has a second derivative near , the second-order Taylor model is
The new term is the curvature correction. The factor is not decoration: it is the coefficient that makes the quadratic model match the second derivative at the anchor.
For a smooth function with higher derivatives, the degree- Taylor polynomial is
The local caveat is the point. A Taylor polynomial is exact for a polynomial of low enough degree, and often excellent near , but the remainder can dominate far from the anchor.
The multivariable version is the one optimization uses. For , current point , and small displacement ,
where is the gradient and is the Hessian matrix.
Gradient descent comes from the first-order term. If , then
which predicts a local decrease. The second-order term warns that curvature can shrink, improve, or overturn that prediction when the step is too large.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
def f(x):
return np.sin(x) + 0.12 * x**3
def df(x):
return np.cos(x) + 0.36 * x**2
def d2f(x):
return -np.sin(x) + 0.72 * x
x0 = 0.4
f0 = f(x0)
for h in [0.05, 0.75, 1.6]:
true = f(x0 + h)
linear = f0 + df(x0) * h
quadratic = linear + 0.5 * d2f(x0) * h**2
print("h =", h)
print(" true ", round(true, 6))
print(" linear ", round(linear, 6), "error", round(abs(true - linear), 6))
print(" quadratic", round(quadratic, 6), "error", round(abs(true - quadratic), 6))
The small step makes both models look impressive. The medium step shows why curvature can matter. The large step reminds you that a Taylor model is a local contract, not a license to extrapolate forever.
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
Use the lab below as a local-approximation prediction check. Pick a probe, inspect the anchor and displacement , then predict which local model will be closest at :
- the tangent line,
- the quadratic patch,
- or neither model because the step is too wide.
Then reveal the true value, the two estimates, the residuals, and the trust note. Try changing : the formulas stay the same, but the amount of trust they deserve changes quickly.
Live Concept Demo
Explore Taylor Expansion and Local Approximation
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Taylor Expansion and Local Approximation should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Taylor expansion uses value, slope, and curvature at one point to make a local model, then shows why local models eventually fail.
Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Taylor Expansion and Local Approximation should make visible.
Visual Inquiry
Make the image answer a mathematical question
Taylor expansion uses value, slope, and curvature at one point to make a local model, then shows why local models eventually fail.
Which visible object should carry the first intuition?
Pick the cue that should make Taylor Expansion and Local Approximation easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Supports Taylor polynomials, local linearization, and multivariate first- and second-order Taylor expansions.
Open sourceUses second-order Taylor approximation to explain gradient steps, curvature, and why large steps can move uphill.
Open sourceSupports first- and second-order Taylor models, directional derivative intuition, and Newton's method as a quadratic-model minimizer.
Open sourceClaim Review
Taylor expansion uses value, slope, and curvature at one point to make a local model, then shows why local models eventually fail.
Claims without a substantive review badge still need exact source-support review.
deisenroth-2020-mml-taylor, goodfellow-2016-deep-learning-numerical, boyd-2004-convex-optimization-taylor
Use equations, runnable code, and demos to check whether the source support is operational.
The three sources consistently ground Taylor expansion as a local polynomial model built from derivatives at the expansion point. They support the tangent/curvature story and its optimization use.
Sources: Mathematics for Machine Learning, Deep Learning, Convex OptimizationThis page teaches smooth one-variable examples plus the standard multivariate formula. It does not prove rigorous remainder bounds, analytic continuation, nonsmooth subgradient theory, or convergence guarantees for deep-learning optimization.A bounded review summary is present; still check caveats and exact reference scope.Checked MML vector-calculus Taylor sections for univariate Taylor polynomials, local approximation, and multivariate first/second-order terms; checked Goodfellow et al. numerical computation for the second-order Taylor model used to reason about gradient descent and curvature; checked Boyd/Vandenberghe for first-order directional approximations, second-order models, and Newton-step motivation. GPT Pro publication critique remains pending because the user-confirmed Oracle browser lane refused connection.
Reviewer: codex-local-source-review; reviewed 2026-07-02Source support candidates
book 2020Mathematics for Machine LearningSupports Taylor polynomials, local linearization, and multivariate first- and second-order Taylor expansions.
book 2016Deep LearningUses second-order Taylor approximation to explain gradient steps, curvature, and why large steps can move uphill.
book 2004Convex OptimizationSupports first- and second-order Taylor models, directional derivative intuition, and Newton's method as a quadratic-model minimizer.
Practice Loop
Try the idea before it explains itself
Taylor expansion uses value, slope, and curvature at one point to make a local model, then shows why local models eventually fail.
Before touching the demo, predict one visible change that should happen in Taylor Expansion and Local Approximation.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to a claim, equation, code, or demo
Pick the concept, equation, source, runnable code, claim, misconception, or demo state before asking for help. The handoff keeps that page item in context.Open the draft below to save one note and next action in this browser.
Taylor Expansion and Local Approximation
What is the smallest example that makes Taylor Expansion and Local Approximation click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays in this browser, attached to the selected learning item.
- References to inspect: attached references on this page.
- Definition, prerequisite, and contrast concept links
- The equation or runnable code that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Taylor Expansion and Local Approximation Selected item key: recorded for copy. Context: Calculus Page anchor: recorded for copy. Open question: What is the smallest example that makes Taylor Expansion and Local Approximation click without losing the math? Evidence to inspect: - References to inspect: attached references on this page. - Definition, prerequisite, and contrast concept links - The equation or runnable code that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/calculus/taylor-expansion-local-approximation
concept:calculus/taylor-expansion-local-approximation