Gaussian integral with a linear term
ProvedBanditAlgorithm.integral_exp_quadraticanalysisgaussianintegral
The Gaussian integral with a linear term: for and any ,
Mathlib has the pure Gaussian integral but not this completed-square version, which is what every method-of-mixtures computation needs. The proof completes the square, , and uses translation invariance of Lebesgue measure.
Preamble
import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral open MeasureTheory Real
Formal statement
theorem BanditAlgorithm.integral_exp_quadratic {a : ℝ} (ha : 0 < a) (c : ℝ) :
∫ x : ℝ, Real.exp (-a * x ^ 2 + c * x)
= Real.sqrt (Real.pi / a) * Real.exp (c ^ 2 / (4 * a)) := by
sorrySource
Standard: the Gaussian integral with a linear term, obtained from the pure Gaussian integral by completing the square. Absent from Mathlib.