Differentiation Under the Integral Sign

F(x)=∫01tx dt=1x+1F(x) = \int_0^1 t^x\,dt = \frac{1}{x+1} — drag along the curve and its tangent while the numerics confirm that differentiating inside the integral, ∫01txln⁡t dt\int_0^1 t^x \ln t\,dt, gives the tangent slope −1(x+1)2-\frac{1}{(x+1)^2}.

ddx∫01tx dt=∫01txln⁡t dt=−1(x+1)2\frac{d}{dx}\int_0^1 t^x\,dt = \int_0^1 t^x \ln t\,dt = -\frac{1}{(x+1)^2}

Examples & Exercises

Let F(x)=∫01tx dtF(x) = \int_0^1 t^x\,dt for x>0x > 0. Show by direct computation that F(x)=1x+1F(x) = \frac{1}{x+1} and F′(x)=−1(x+1)2F'(x) = -\frac{1}{(x+1)^2}, and prove completely, by direct substitution, that differentiating under the integral sign gives the same value: ∫01txln⁡t dt=−1(x+1)2\int_0^1 t^x \ln t\,dt = -\frac{1}{(x+1)^2}.

F(x)=1x+1,F′(x)=−1(x+1)2=∫01txln⁡t dtF(x) = \frac{1}{x+1}, \qquad F'(x) = -\frac{1}{(x+1)^2} = \int_0^1 t^x \ln t\,dt
x=1x = 1, n=200n = 200: quadrature ∫01t dt=0.5\int_0^1 t\,dt = 0.5 (matches 12\frac12), ∫01tln⁡t dt≈−0.24999807\int_0^1 t\ln t\,dt \approx -0.24999807 — within 2×10−62 \times 10^{-6} of −14-\frac14.
Show proof
  1. Fix x>0x > 0. On t∈(0,1]t \in (0, 1] an antiderivative of txt^x is tx+1x+1\frac{t^{x+1}}{x+1}, and tx+1→0t^{x+1} \to 0 as t→0+t \to 0^+ since x+1>0x + 1 > 0. Hence F(x)=∫01tx dt=[tx+1x+1]01=1x+1F(x) = \int_0^1 t^x\,dt = \left[\frac{t^{x+1}}{x+1}\right]_0^1 = \frac{1}{x+1}. Differentiating in xx gives F′(x)=−1(x+1)2F'(x) = -\frac{1}{(x+1)^2}.
  2. Now differentiate under the integral sign. For t∈(0,1]t \in (0, 1], ∂∂xtx=txln⁡t\frac{\partial}{\partial x} t^x = t^x \ln t (differentiate tx=exln⁡tt^x = e^{x \ln t}). At t=0t = 0 define the integrand as 00 — because lim⁡t→0+txln⁡t=0\lim_{t \to 0^+} t^x \ln t = 0 for x>0x > 0.
  3. Compute ∫01txln⁡t dt\int_0^1 t^x \ln t\,dt with u=−(x+1)ln⁡tu = -(x+1)\ln t. For t∈(0,1]t \in (0, 1], u∈[0,∞)u \in [0, \infty), t=e−u/(x+1)t = e^{-u/(x+1)}, dt=−1x+1e−u/(x+1) dudt = -\frac{1}{x+1}e^{-u/(x+1)}\,du. Then txln⁡t dt=ue−u(x+1)2 dut^x \ln t\,dt = \frac{u e^{-u}}{(x+1)^2}\,du, so ∫01txln⁡t dt=−1(x+1)2∫0∞ue−u du\int_0^1 t^x \ln t\,dt = -\frac{1}{(x+1)^2}\int_0^\infty u e^{-u}\,du. By parts, ∫0∞ue−u du=[−ue−u]0∞+∫0∞e−u du=0+1=1\int_0^\infty u e^{-u}\,du = \left[-u e^{-u}\right]_0^\infty + \int_0^\infty e^{-u}\,du = 0 + 1 = 1; hence the under-integral derivative equals −1(x+1)2-\frac{1}{(x+1)^2} — exactly the directly computed F′(x)F'(x).
  4. Numerically: at x=1x = 1 the analytic values are F(1)=12F(1) = \frac12, F′(1)=−14F'(1) = -\frac14. In the scene with n=200n = 200 Simpson panels, ∫01t dt=0.5\int_0^1 t\,dt = 0.5 exactly, and ∫01tln⁡t dt\int_0^1 t\ln t\,dt lands within 2×10−62 \times 10^{-6} of −14-\frac14 — all three estimates converge to one point.

Let f(t,x)=txf(t, x) = t^x, ∂f∂x(t,x)=txln⁡t\frac{\partial f}{\partial x}(t, x) = t^x \ln t (t∈[0,1]t \in [0, 1], defined as 00 at t=0t = 0). For 0<δ<A0 < \delta < A, show that ff and ∂f∂x\frac{\partial f}{\partial x} are continuous on the rectangle [δ,A]×[0,1][\delta, A] \times [0, 1], and use this to prove rigorously that F′(x)=∫01txln⁡t dtF'(x) = \int_0^1 t^x \ln t\,dt for every x>0x > 0.

f,fx continuous on [δ,A]×[0,1]  ⇒  ddx∫01f dt=∫01fx dtf, f_x \text{ continuous on } [\delta, A] \times [0, 1] \;\Rightarrow\; \frac{d}{dx}\int_0^1 f\,dt = \int_0^1 f_x\,dt
∣txln⁡t∣≤tδ ∣ln⁡t∣→t→0+0(x≥δ>0)\left|t^x \ln t\right| \le t^{\delta}\,|\ln t| \xrightarrow[t \to 0^+]{} 0 \quad (x \ge \delta > 0)
x=2x = 2, n=200n = 200: the quadrature of ∫01t2ln⁡t dt\int_0^1 t^2 \ln t\,dt is within 10−810^{-8} of −19-\frac19 — the agreement that continuity on [1,4]×[0,1][1, 4] \times [0, 1] guarantees.
Show proof
  1. First, continuity. For t>0t > 0, tx=exln⁡tt^x = e^{x\ln t} is continuous in (t,x)(t, x), so both ff and fxf_x are continuous there. At t=0t = 0 we defined the value as 00; for x≥δ>0x \ge \delta > 0, ∣txln⁡t∣=tx∣ln⁡t∣≤tδ∣ln⁡t∣→0|t^x \ln t| = t^x |\ln t| \le t^{\delta}|\ln t| \to 0 as t→0+t \to 0^+, uniformly in x∈[δ,A]x \in [\delta, A]. Hence ff and fxf_x are continuous on the compact rectangle [δ,A]×[0,1][\delta, A] \times [0, 1].
  2. Now prove the theorem: if ff, fxf_x are continuous on [a,b]×[c,d][a, b] \times [c, d], then F(x)=∫cdf(t,x) dtF(x) = \int_c^d f(t, x)\,dt is differentiable with F′(x0)=∫cdfx(t,x0) dtF'(x_0) = \int_c^d f_x(t, x_0)\,dt. The difference quotient is F(x0+h)−F(x0)h=∫cdf(t,x0+h)−f(t,x0)h dt\frac{F(x_0+h) - F(x_0)}{h} = \int_c^d \frac{f(t, x_0+h) - f(t, x_0)}{h}\,dt. By the mean value theorem in xx, for each tt there is ξh,t\xi_{h,t} between x0x_0 and x0+hx_0+h with f(t,x0+h)−f(t,x0)h=fx(t,ξh,t)\frac{f(t, x_0+h) - f(t, x_0)}{h} = f_x(t, \xi_{h,t}). Since fxf_x is uniformly continuous on the compact rectangle, fx(t,ξh,t)→fx(t,x0)f_x(t, \xi_{h,t}) \to f_x(t, x_0) uniformly in tt as h→0h \to 0. Hence ∣F(x0+h)−F(x0)h−∫cdfx(t,x0) dt∣≤(d−c)sup⁡t∣fx(t,ξh,t)−fx(t,x0)∣→0\left|\frac{F(x_0+h)-F(x_0)}{h} - \int_c^d f_x(t, x_0)\,dt\right| \le (d-c)\sup_t |f_x(t, \xi_{h,t}) - f_x(t, x_0)| \to 0 — the limit-integral interchange is justified.
  3. For any x0>0x_0 > 0, put δ=x0/2\delta = x_0/2, A=2x0A = 2x_0, so x0x_0 is interior to [δ,A][\delta, A]. Continuity from step 1 plus the theorem from step 2 give F′(x0)=∫01tx0ln⁡t dtF'(x_0) = \int_0^1 t^{x_0}\ln t\,dt, which equals −1(x0+1)2-\frac{1}{(x_0+1)^2} 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.
  4. Numerically: at x=2x = 2 the analytic values are F(2)=13F(2) = \frac13, F′(2)=−19F'(2) = -\frac19. With n=200n = 200 the Simpson approximation of ∫01t2ln⁡t dt\int_0^1 t^2 \ln t\,dt is within 10−810^{-8}. Even though ln⁡t\ln t blows up near t=0t = 0, the factor t2t^2 tames it (t2∣ln⁡t∣→0t^2|\ln t| \to 0), and the numerics show the integral converging cleanly.

Let φ(u)=30u2(1−u)2\varphi(u) = 30u^2(1-u)^2 (0<u<10 < u < 1), 00 elsewhere, and f(x,t)=φ(t/x)f(x, t) = \varphi(t/x) (x>0x > 0, 0<t<x0 < t < x), 00 elsewhere (x,t∈[0,1]x, t \in [0, 1]). With F(x)=∫01f(x,t) dtF(x) = \int_0^1 f(x, t)\,dt, show (a) F(x)=xF(x) = x for 0<x<10 < x < 1, so the right derivative at 00 is 11; (b) ∂f∂x(0,t)=0\frac{\partial f}{\partial x}(0, t) = 0 for every t∈[0,1]t \in [0, 1], so ∫01∂f∂x(0,t) dt=0\int_0^1 \frac{\partial f}{\partial x}(0, t)\,dt = 0; (c) hence the under-integral differentiation formula fails at x=0x = 0. (d) Pinpoint where the hypotheses break.

F(x)=x  (0<x<1),F+′(0)=1≠0=∫01fx(0,t) dtF(x) = x\;(0 < x < 1), \quad F'_+(0) = 1 \ne 0 = \int_0^1 f_x(0, t)\,dt
f(x,x/2)=158↛0=f(0,0),fx(x,x/4)=−4532x→−∞f(x, x/2) = \tfrac{15}{8} \not\to 0 = f(0, 0), \qquad f_x(x, x/4) = -\tfrac{45}{32x} \to -\infty
This problem is about the "bump" counterexample, not the scene's txt^x — the preset is the scene default x=1x = 1, n=200n = 200.
Show proof
  1. First check ∫01φ=1\int_0^1 \varphi = 1: ∫0130u2(1−u)2 du=30∫01(u2−2u3+u4) du=30(13−12+15)=30⋅130=1\int_0^1 30u^2(1-u)^2\,du = 30\int_0^1 (u^2 - 2u^3 + u^4)\,du = 30\left(\frac13 - \frac12 + \frac15\right) = 30 \cdot \frac{1}{30} = 1. For 0<x<10 < x < 1, F(x)=∫01f(x,t) dt=∫0x30(t/x)2(1−t/x)2 dtF(x) = \int_0^1 f(x, t)\,dt = \int_0^x 30(t/x)^2(1-t/x)^2\,dt (nonzero only for 0<t<x0 < t < x). With u=t/xu = t/x, F(x)=x∫0130u2(1−u)2 du=x⋅1=xF(x) = x\int_0^1 30u^2(1-u)^2\,du = x \cdot 1 = x. Since F(0)=0F(0) = 0, the right derivative at 00 is lim⁡h→0+F(h)−F(0)h=lim⁡h→0+hh=1\lim_{h \to 0^+} \frac{F(h) - F(0)}{h} = \lim_{h \to 0^+} \frac{h}{h} = 1.
  2. Next, ∂f∂x(0,t)=0\frac{\partial f}{\partial x}(0, t) = 0. Fix t>0t > 0: for 0<h<t0 < h < t we have t<ht < h false, so f(h,t)=0f(h, t) = 0 (ff is nonzero only when 0<t<h0 < t < h). Hence the difference quotient f(h,t)−f(0,t)h=0\frac{f(h, t) - f(0, t)}{h} = 0 for every h<th < t, and the limit is 00. At t=0t = 0, f(h,0)=0f(h, 0) = 0 too. So ∂f∂x(0,t)=0\frac{\partial f}{\partial x}(0, t) = 0 for every t∈[0,1]t \in [0, 1], and ∫01∂f∂x(0,t) dt=0≠1\int_0^1 \frac{\partial f}{\partial x}(0, t)\,dt = 0 \ne 1 — different from the right derivative. The under-integral formula breaks at x=0x = 0.
  3. Now locate the broken hypothesis. On the line t=x/2t = x/2, f(x,x/2)=30(12)2(12)2=158=1.875f(x, x/2) = 30\left(\frac12\right)^2\left(\frac12\right)^2 = \frac{15}{8} = 1.875, independent of xx; so f→1.875≠0=f(0,0)f \to 1.875 \ne 0 = f(0, 0) along (x,x/2)→(0,0)(x, x/2) \to (0, 0) — ff itself is discontinuous at (0,0)(0, 0). The partial derivative is worse: with u=t/xu = t/x, ∂f∂x=−60u2(1−u)(1−2u)x\frac{\partial f}{\partial x} = -\frac{60u^2(1-u)(1-2u)}{x} (0<t<x0 < t < x), and on the line t=x/4t = x/4 (u=1/4u = 1/4) this is −4532x→−∞-\frac{45}{32x} \to -\infty as x→0+x \to 0^+. So fxf_x is unbounded in every neighborhood of (0,0)(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.

10. Integration