126. Leibniz’s Rule

Differentiation under the integral sign. When the integrand and the limits depend on a parameter 𝑄, the derivative splits into three pieces: one from the integrand changing, two from the moving limits.

dd𝑄∫𝑎(𝑄)𝑏(𝑄)ℎ(𝑥,𝑄)d𝑥=∫𝑎(𝑄)𝑏(𝑄)𝜕ℎ𝜕𝑄d𝑥⏟integrand varies+ℎ(𝑏(𝑄),𝑄)⋅𝑏′(𝑄)⏟upper limit moves−ℎ(𝑎(𝑄),𝑄)⋅𝑎′(𝑄)⏟lower limit moves

Reading the three terms:

126.1. Special cases

dd𝑄∫𝑎𝑏ℎ(𝑥,𝑄)d𝑥=∫𝑎𝑏𝜕ℎ𝜕𝑄d𝑥dd𝑄∫𝑎𝑄ℎ(𝑥)d𝑥=ℎ(𝑄)
Example

The newsvendor overage term ∫0𝑄(𝑄−𝑥)𝑓(𝑥)d𝑥 has ℎ(𝑥,𝑄)=(𝑄−𝑥)𝑓(𝑥), upper limit 𝑏(𝑄)=𝑄, lower limit fixed:

dd𝑄∫0𝑄(𝑄−𝑥)𝑓(𝑥)d𝑥=∫0𝑄𝑓(𝑥)d𝑥+(𝑄−𝑄)𝑓(𝑄)⏟=0=𝐹(𝑄)

The boundary term vanishes because the integrand is zero at 𝑥=𝑄.