First Year Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Differentiation under the integral sign

Differentiation under the integral sign (Leibniz rule, constant and variable limits) with definitions, theorems, proofs, formulas, and Feynman-style applications.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Engineers often face integrals that depend on a design or physical parameter (for example, damping factor, frequency, thermal diffusivity). Differentiation under the integral sign lets you compute such integrals by first differentiating with respect to the parameter, simplifying the integrand, and then integrating back. It is a powerful tool in signal processing, heat transfer, and probability when direct integration is hard.

Key ideas

  • Differentiation under the integral sign: A technique to compute d/da of an integral ∫ f(x, a) dx by moving the derivative inside the integral under certain conditions. Informally, d/da ∫ f = ∫ ∂f/∂a.
  • Leibniz integral rule (constant limits) — Statement: Let f(x, a) be defined on [α, β] × J, where J is an open interval of the parameter a. If (i) for each a in J, the function x ↦ f(x, a) is integrable on [α, β], (ii) f and ∂f/∂a are continuous on [α, β] × J (a sufficient set of conditions), then the function I(a) = ∫_α^β f(x, a) dx is differentiable on J and dI/da = ∫_α^β ∂f/∂a (x, a) dx. Meaning: We may “pull” the derivative inside the integral when the integrand and its partial derivative are nice (continuous) and integrable.
  • Leibniz integral rule (variable limits) — Statement: Let α(a), β(a) be differentiable functions of a, and f(x, a) have the properties above on the relevant domain. Then I(a) = ∫{x=α(a)}^{β(a)} f(x, a) dx is differentiable and dI/da = f(β(a), a)·β′(a) − f(α(a), a)·α′(a) + ∫{α(a)}^{β(a)} ∂f/∂a (x, a) dx. Assumptions: α, β are differentiable; f and ∂f/∂a are continuous in a region containing the integration band between x = α(a) and x = β(a), and integrable with respect to x.
  • How to derive the constant-limits rule — Common university derivation (sketch with steps):
    1. Define I(a) = ∫_α^β f(x, a) dx.
    2. Consider a small change h in a. Then I(a + h) − I(a) = ∫_α^β [f(x, a + h) − f(x, a)] dx.
    3. By the Mean Value Theorem for functions of one variable (in the parameter), for each x there exists θ = θ(x, h) in (0, 1) such that f(x, a + h) − f(x, a) = h·∂f/∂a (x, a + θh).
    4. Divide by h and let h → 0. By continuity of ∂f/∂a and a dominated/ boundedness condition that permits limit–integral interchange, we get dI/da = ∫_α^β ∂f/∂a (x, a) dx.
  • How to derive the variable-limits rule — Common university derivation (outline with steps):
    1. Write I(a) = ∫_{α(a)}^{β(a)} f(x, a) dx.
    2. Add and subtract an integral with fixed limits to use the Fundamental Theorem of Calculus (FTC): I(a + h) − I(a) = ∫{α(a+h)}^{β(a+h)} f(x, a + h) dx − ∫{α(a)}^{β(a)} f(x, a) dx.
    3. Split into three parts by adding and subtracting ∫{α(a)}^{β(a)} f(x, a + h) dx: [∫{α(a)}^{β(a)} (f(x, a + h) − f(x, a)) dx] + [∫{β(a)}^{β(a+h)} f(x, a + h) dx] − [∫{α(a)}^{α(a+h)} f(x, a + h) dx].
    4. Divide by h and let h → 0. The first bracket gives ∫_{α(a)}^{β(a)} ∂f/∂a (x, a) dx; the second tends to f(β(a), a)·β′(a) by FTC; the third tends to f(α(a), a)·α′(a). Combine signs to get the formula.
  • Sufficient conditions you can quote in exams: It is standard to assume f and ∂f/∂a are continuous on a rectangular domain in (x, a), and that the integrals exist for all a in an interval. For improper integrals, uniform convergence or a dominating integrable function (from the dominated convergence theorem) are used to justify limit–integral interchange. In exam answers at this level, state “assume continuity of f, ∂f/∂a and absolute integrability (or uniform convergence) so that interchange is valid.”
  • Feynman’s technique: Introduce a parameter to make the integral simpler after differentiating. Steps: (i) Define a parameterized integral I(λ) that reduces to the target integral when λ takes a specific value. (ii) Compute I′(λ) by bringing the derivative inside the integral. (iii) Integrate I′(λ) back with respect to λ and use initial/boundary conditions to determine the constant of integration.
  • When to use this technique: Use it when (i) the integrand becomes simpler after differentiating with respect to a parameter (for example, removes a logarithm, removes a division by x, or turns into a standard integral), and (ii) the conditions for Leibniz’s rule are satisfied.
  • Diagram to draw when asked (describe): Draw x–axis horizontally. Shade a strip between vertical lines x = α(a) and x = β(a). Above the strip, write “region of integration for parameter a.” Mark the height f(x, a) conceptually by a curve above the x–axis. Indicate the motion of the limits with small arrows showing α moving to α + δα and β moving to β + δβ. Label f(β(a), a)·β′(a) on the right boundary and −f(α(a), a)·α′(a) on the left boundary (minus sign). This supports the variable-limits rule explanation.

Formulas

I(a) = ∫_α^β f(x, a) dx

  • I(a): value of the integral as a function of parameter a (dimension depends on f and x; often dimensionless in pure math). x: integration variable. α, β: constant limits.
  • Applies to definite integrals with constant limits.

dI/da = ∫_α^β ∂f/∂a (x, a) dx

  • dI/da: derivative of I with respect to a. ∂f/∂a: partial derivative of f with respect to parameter a.
  • Units: same as I per a-unit, i.e., (units of f × x-units) per a-unit; typically dimensionless in pure math examples.
  • Applies when f and ∂f/∂a are continuous and integrable on [α, β] × J.

I(a) = ∫_{α(a)}^{β(a)} f(x, a) dx

  • α(a), β(a): differentiable limit functions of a.
  • Applies to parameter-dependent limits of integration.

dI/da = f(β(a), a)·β′(a) − f(α(a), a)·α′(a) + ∫_{α(a)}^{β(a)} ∂f/∂a (x, a) dx

  • β′(a), α′(a): derivatives of the limits with respect to a (units: x-units per a-unit).
  • Applies under conditions of continuity of f, ∂f/∂a and differentiability of limits.

∫_0^1 x^m dx = 1/(m + 1)

  • m: real parameter with m > −1 to ensure integrability near x = 0 (dimensionless). Result is dimensionless.
  • Used to build integrals with ln x by differentiating with respect to m.

∫_0^1 x^m ln x dx = −1/(m + 1)^2

  • Obtained by differentiating ∫_0^1 x^m dx with respect to m. m > −1.

∫_0^∞ e^{−a x} cos(b x) dx = a/(a^2 + b^2)

  • a > 0 (1/x-units), b ∈ ℝ (1/x-units). Result dimension: x (same units as x).
  • Standard Laplace transform pair used in worked examples.

∫_0^∞ e^{−a x} (sin(b x))/x dx = arctan(b/a)

  • a > 0, b ∈ ℝ. Result in radians (dimensionless).
  • Found by differentiating with respect to parameter b and integrating back.

d/da ∫_α^β f(x, a) dx = ∫_α^β ∂f/∂a (x, a) dx and d/da ∫_{α(a)}^{β(a)} f(x, a) dx = f(β(a), a)·β′(a) − f(α(a), a)·α′(a) + ∫_{α(a)}^{β(a)} ∂f/∂a (x, a) dx

  • Summary of Leibniz rules for constant and variable limits.

Worked examples

Example 1 (theory + application): Prove the Leibniz rule for variable limits and apply it.

  • Part A: Proof outline (what to write)
    1. State: If α(a), β(a) are differentiable and f, ∂f/∂a are continuous on a region containing {(x, a): α(a) ≤ x ≤ β(a)}, then d/da ∫{α(a)}^{β(a)} f(x, a) dx = f(β(a), a)·β′(a) − f(α(a), a)·α′(a) + ∫{α(a)}^{β(a)} ∂f/∂a (x, a) dx.
    2. Proof steps as in Key ideas: difference quotient, split into three integrals, apply FTC and limit.
    3. Conclude with a sentence on regularity assumptions (continuity, differentiability) allowing interchange.
  • Part B: Application Evaluate I(a) = ∫_{x=a}^{2a} ln(1 + x a) dx for a > 0. Steps:
    1. Identify f(x, a) = ln(1 + a x), α(a) = a, β(a) = 2a.
    2. Compute ∂f/∂a = x/(1 + a x).
    3. Apply Leibniz rule: dI/da = f(β, a)·β′ − f(α, a)·α′ + ∫_{a}^{2a} x/(1 + a x) dx. Here β′ = 2, α′ = 1.
    4. Boundary terms: f(2a, a)·2 − f(a, a)·1 = 2·ln(1 + 2a^2) − ln(1 + a^2).
    5. Integral term: ∫_{a}^{2a} x/(1 + a x) dx. Substitute u = 1 + a x ⇒ du = a dx, x = (u − 1)/a. Then ∫ x/(1 + a x) dx = ∫ ((u − 1)/a)/u · (du/a) = (1/a^2) ∫ (1 − 1/u) du = (1/a^2)(u − ln u) + C. Evaluate from x = a (u = 1 + a^2) to x = 2a (u = 1 + 2a^2): Integral term = (1/a^2)[(1 + 2a^2) − ln(1 + 2a^2) − (1 + a^2 − ln(1 + a^2))] = (1/a^2)[a^2 − ln(1 + 2a^2) + ln(1 + a^2)] = 1 − (1/a^2) ln((1 + 2a^2)/(1 + a^2)).
    6. So dI/da = 2 ln(1 + 2a^2) − ln(1 + a^2) + 1 − (1/a^2) ln((1 + 2a^2)/(1 + a^2)).
    7. If required, integrate dI/da with respect to a to recover I(a) up to a constant; but since the original I(a) could be integrated directly, the exam may accept dI/da as the final derivative. (Direct integration: ∫ ln(1 + a x) dx by parts.) Final check: dimensions are consistent (dimensionless logarithms), a > 0.

Example 2 (Feynman technique on [0, 1]): Evaluate J = ∫_0^1 x^m ln x dx for m > −1.

  • Step 1: Define I(m) = ∫_0^1 x^m dx. This is a standard integral.
  • Step 2: Compute I(m) using the power rule: I(m) = [x^{m+1}/(m+1)] from 0 to 1 = 1/(m + 1), valid for m > −1.
  • Step 3: Differentiate with respect to m, bringing derivative inside the integral: dI/dm = ∫_0^1 ∂/∂m (x^m) dx = ∫_0^1 x^m ln x dx = d/dm (1/(m + 1)) = −1/(m + 1)^2.
  • Therefore, J = ∫_0^1 x^m ln x dx = −1/(m + 1)^2. Final answer: J is negative (since ln x ≤ 0 on (0, 1)).

Example 3 (Improper integral with parameter; classic result): Evaluate K(b) = ∫_0^∞ e^{−a x} (sin b x)/x dx for a > 0 and real b.

  • Strategy: Define F(b) = ∫_0^∞ e^{−a x} (sin b x)/x dx. Differentiate with respect to b.
  • Justification (brief): For a > 0, e^{−a x} decays exponentially, and |sin(b x)| ≤ min(1, |b x|), so |e^{−a x} (sin b x)/x| ≤ e^{−a x}·min(|b|, 1/|x|). This gives an integrable dominant on (0, ∞) and justifies the interchange by dominated convergence; this is standard in transforms.
  • Step 1: Differentiate under the integral sign: F′(b) = ∫_0^∞ e^{−a x} cos(b x) dx.
  • Step 2: Use the standard Laplace transform integral (quote or derive by elementary calculus): ∫_0^∞ e^{−a x} cos(b x) dx = a/(a^2 + b^2), for a > 0.
  • Step 3: Integrate F′(b) with respect to b: F(b) = ∫ a/(a^2 + b^2) db = a · ∫ 1/(a^2 + b^2) db = a · (1/a) arctan(b/a) + C = arctan(b/a) + C.
  • Step 4: Determine C using F(0) = ∫_0^∞ e^{−a x} (sin 0)/x dx = 0. So C = 0.
  • Result: K(b) = F(b) = arctan(b/a). Final answer in radians (dimensionless).

Common mistakes

  • Ignoring conditions: Differentiating under the integral for an improper integral without checking convergence, leading to wrong steps at x = 0 or ∞.
  • Mixing variables: Treating x as a function of a inside ∂f/∂a; remember x is the dummy integration variable (held fixed when differentiating with respect to a).
  • Losing constants of integration in Feynman’s technique: After integrating F′(a) or F′(b), forgetting to use a boundary condition to fix the constant.
  • Algebra slips in substitution: In integrals like ∫ x/(1 + a x) dx, mistakes in u-substitution or in evaluating definite limits lead to sign errors in the final term.
  • Domain restrictions: Using formulas like ∫_0^1 x^m dx = 1/(m + 1) without mentioning m > −1.

For your exam

  • Short notes: Explain Feynman’s technique with a short example (e.g., derive ∫_0^1 x^m ln x dx). Include the idea of introducing a parameter and boundary conditions.
  • Derivations: Prove the constant-limits rule and/or variable-limits rule. Include the difference quotient, the splitting into terms, and the FTC step. Mention assumptions for interchange of limit and integral.
  • Numericals/Computations: Evaluate integrals by differentiating with respect to a parameter (typical: logarithm integrals, 1/x factors, exponential damping). Show: (i) define I(parameter), (ii) compute derivative inside the integral, (iii) integrate back, (iv) apply boundary condition.
  • Improper integrals: Problems like ∫_0^∞ e^{−a x} sin(b x)/x dx. Full marks require stating a > 0, showing the derivative step clearly, quoting the standard integral, and fixing the constant using the b = 0 case.
  • Diagrams: If asked, draw and label the variable-limits strip with boundary contributions as described earlier.
  • Connections to other topics: You may reference “Laplace transforms” ideas (without deriving them), and relate to “Beta and gamma functions” and “Error function” where parameter differentiation also appears. Do not re-teach those topics; only mention them to justify a known integral if needed.

Quick check

  1. State the Leibniz rule for d/da ∫_{α(a)}^{β(a)} f(x, a) dx.
  2. Compute ∫_0^1 x^m ln x dx in terms of m (m > −1) using differentiation under the integral sign.
  3. Let F(b) = ∫_0^∞ e^{−a x} (sin b x)/x dx with a > 0. Find F′(b) and hence F(b) up to a constant.

Answers: (1) d/da ∫{α(a)}^{β(a)} f(x, a) dx = f(β(a), a)·β′(a) − f(α(a), a)·α′(a) + ∫{α(a)}^{β(a)} ∂f/∂a (x, a) dx. (2) −1/(m + 1)^2. (3) F′(b) = ∫_0^∞ e^{−a x} cos(b x) dx = a/(a^2 + b^2); hence F(b) = arctan(b/a) + C (use F(0) = 0 to get C = 0).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?