Numerics confirm that differentiating inside the integral matches the tangent slope. Drag the point and its tangent along the curve.
Differentiating the whole or the inside gives the same answer. Each point's change accumulates into the total change. A domination condition makes the swap safe.
For example, measure how fast a room's average 🌡️ thermometer reading rises: averaging how fast each spot warms up gives the same answer.
dxd∫01txdt=∫01txlntdt=−(x+1)21
Examples & Exercises
Let F(x)=∫01txdt for x>0.
Show by direct computation that F(x)=x+11 and F′(x)=−(x+1)21, and prove completely, by direct substitution, that differentiating under the integral sign gives the same value: ∫01txlntdt=−(x+1)21.
F(x)=x+11,F′(x)=−(x+1)21=∫01txlntdt
x=1, n=200: quadrature ∫01tdt=0.5 (matches 21), ∫01tlntdt≈−0.24999807 — within 2×10−6 of −41.Show proof
Fix x>0. On t∈(0,1] an antiderivative of tx is x+1tx+1, and tx+1→0 as t→0+ since x+1>0.
Hence F(x)=∫01txdt=[x+1tx+1]01=x+11.
Differentiating in x gives F′(x)=−(x+1)21.
Now differentiate under the integral sign.
For t∈(0,1], ∂x∂tx=txlnt (differentiate tx=exlnt).
At t=0 define the integrand as 0 — because limt→0+txlnt=0 for x>0.
Compute ∫01txlntdt with u=−(x+1)lnt. For t∈(0,1], u∈[0,∞), t=e−u/(x+1), dt=−x+11e−u/(x+1)du.
Then txlntdt=(x+1)2ue−udu, so ∫01txlntdt=−(x+1)21∫0∞ue−udu.
By parts, ∫0∞ue−udu=[−ue−u]0∞+∫0∞e−udu.
The boundary term vanishes: it is 0 at u=0, and as u→∞, eu≥2u2 for u≥0 gives 0≤ue−u≤u2→0. Hence the integral is 0+1=1; the under-integral derivative equals −(x+1)21 — exactly the directly computed F′(x).
Numerically: at x=1 the analytic values are F(1)=21, F′(1)=−41. In the scene with n=200 Simpson panels, ∫01tdt=0.5 exactly, and ∫01tlntdt lands within 2×10−6 of −41 — all three estimates converge to one point.
Let f(t,x)=tx, ∂x∂f(t,x)=txlnt (t∈[0,1], defined as 0 at t=0).
For 0<δ<A, show that f and ∂x∂f are continuous on the rectangle [δ,A]×[0,1], and use this to prove rigorously that F′(x)=∫01txlntdt for every x>0.
f,fx continuous on [δ,A]×[0,1]⇒dxd∫01fdt=∫01fxdt
∣txlnt∣≤tδ∣lnt∣t→0+0(x≥δ>0)
x=2, n=200: the quadrature of ∫01t2lntdt is within 10−8 of −91 — the agreement that continuity on [1,4]×[0,1] guarantees.Show proof
First, continuity. For t>0, tx=exlnt is continuous in (t,x), so both f and fx are continuous there.
At t=0 we defined the value as 0; for x≥δ>0, ∣txlnt∣=tx∣lnt∣≤tδ∣lnt∣→0 as t→0+, uniformly in x∈[δ,A].
Hence f and fx are continuous on the compact rectangle [δ,A]×[0,1].
Now prove the theorem: if f, fx are continuous on [a,b]×[c,d], then F(x)=∫cdf(t,x)dt is differentiable with F′(x0)=∫cdfx(t,x0)dt. The difference quotient is hF(x0+h)−F(x0)=∫cdhf(t,x0+h)−f(t,x0)dt.
Avoid selecting a mean-value point (its measurability in t is not guaranteed) and use the integral form instead: since fx is continuous in x, f(t,x0+h)−f(t,x0)=∫x0x0+hfx(t,u)du=h∫01fx(t,x0+θh)dθ, so hf(t,x0+h)−f(t,x0)−fx(t,x0)=∫01(fx(t,x0+θh)−fx(t,x0))dθ. Taking absolute values, hf(t,x0+h)−f(t,x0)−fx(t,x0)≤sup∣u−x0∣≤∣h∣∣fx(t,u)−fx(t,x0)∣.
Since fx is uniformly continuous on the compact rectangle, this bound tends to 0 uniformly in t as h→0.
Hence hF(x0+h)−F(x0)−∫cdfx(t,x0)dt≤(d−c)suptsup∣u−x0∣≤∣h∣∣fx(t,u)−fx(t,x0)∣→0 — the limit-integral interchange is justified.
For any x0>0, put δ=x0/2, A=2x0, so x0 is interior to [δ,A].
Continuity from step 1 plus the theorem from step 2 give F′(x0)=∫01tx0lntdt, which equals −(x0+1)21 by the direct computation of problem 1.
So the three estimates meeting in the scene is no accident — it is forced by uniform continuity on the compact rectangle.
Numerically: at x=2 the analytic values are F(2)=31, F′(2)=−91.
With n=200 the Simpson approximation of ∫01t2lntdt is within 10−8.
Even though lnt blows up near t=0, the factor t2 tames it (t2∣lnt∣→0), and the numerics show the integral converging cleanly.
Let φ(u)=30u2(1−u)2 (0<u<1), 0 elsewhere, and f(x,t)=φ(t/x) (x>0, 0<t<x), 0 elsewhere (x,t∈[0,1]).
With F(x)=∫01f(x,t)dt, show (a) F(x)=x for 0<x<1, so the right derivative at 0 is 1; (b) ∂x∂f(0,t)=0 for every t∈[0,1], so ∫01∂x∂f(0,t)dt=0; (c) hence the under-integral differentiation formula fails at x=0.
(d) Pinpoint where the hypotheses break.
F(x)=x(0<x<1),F+′(0)=1=0=∫01fx(0,t)dt
f(x,x/2)=815→0=f(0,0),fx(x,x/4)=−32x45→−∞
This problem is about the "bump" counterexample, not the scene's tx — the preset is the scene default x=1, n=200.Show proof
First check ∫01φ=1: ∫0130u2(1−u)2du=30∫01(u2−2u3+u4)du=30(31−21+51)=30⋅301=1.
For 0<x<1, F(x)=∫01f(x,t)dt=∫0x30(t/x)2(1−t/x)2dt (nonzero only for 0<t<x). With u=t/x, F(x)=x∫0130u2(1−u)2du=x⋅1=x.
Since F(0)=0, the right derivative at 0 is limh→0+hF(h)−F(0)=limh→0+hh=1.
Next, ∂x∂f(0,t)=0. Fix t>0: for 0<h<t we have t<h false, so f(h,t)=0 (f is nonzero only when 0<t<h).
Hence the difference quotient hf(h,t)−f(0,t)=0 for every h<t, and the limit is 0. At t=0, f(h,0)=0 too.
So ∂x∂f(0,t)=0 for every t∈[0,1], and ∫01∂x∂f(0,t)dt=0=1 — different from the right derivative. The under-integral formula breaks at x=0.
Now locate the broken hypothesis. On the line t=x/2, f(x,x/2)=30(21)2(21)2=815=1.875, independent of x; so f→1.875=0=f(0,0) along (x,x/2)→(0,0) — f itself is discontinuous at (0,0).
The partial derivative is worse: with u=t/x, ∂x∂f=−x60u2(1−u)(1−2u) (0<t<x), and on the line t=x/4 (u=1/4) this is −32x45→−∞ as x→0+.
So fx is unbounded in every neighborhood of (0,0), cannot be uniformly continuous, and the key step of problem 2's proof — uniform convergence of the difference quotients — collapses. Without the continuity hypotheses, the limit-integral interchange is not guaranteed — that is the moral of the counterexample.