77
88public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic
99public import Mathlib.MeasureTheory.Integral.MeanValue
10+ public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
1011
1112/-!
1213# First mean value theorem for interval integrals
@@ -33,7 +34,7 @@ mean value theorem, interval integral
3334
3435@[expose] public section
3536
36- open MeasureTheory Set intervalIntegral
37+ open MeasureTheory Set intervalIntegral Real
3738
3839open scoped Interval
3940
@@ -81,3 +82,24 @@ theorem exists_eq_const_mul_intervalIntegral_of_nonneg
8182 rw [ae_restrict_iff' measurableSet_uIoc]
8283 exact ae_of_all μ hg0
8384 exact exists_eq_const_mul_intervalIntegral_of_ae_nonneg hf hg hg0_ae
85+
86+ theorem exists_integral_div_eq_mul_log {p q : ℝ} {f : ℝ → ℝ} (hp : 0 < p) (hq : 0 < q)
87+ (hf : ContinuousOn f (uIcc p q)) :
88+ ∃ c ∈ uIcc p q, ∫ x in p..q, f x / x = f c * log (q / p) := by
89+ let g : ℝ → ℝ := fun x ↦ 1 / x
90+ have hfg (x : ℝ) : f x / x = f x * g x := by unfold g; field_simp
91+ have h_integrand_eq : (∫ x in p..q, f x * g x) = (∫ x in p..q, f x / x) := by simp [hfg]
92+ rw [← h_integrand_eq]
93+ have hg' : IntervalIntegrable g volume p q := by
94+ unfold g
95+ simp only [one_div, intervalIntegrable_inv_iff]
96+ right
97+ exact notMem_uIcc_of_lt (by linarith) (by linarith)
98+ have hg_nonneg : ∀ x ∈ uIoc p q, 0 ≤ g x := by
99+ intro x hx
100+ rw [one_div_nonneg]
101+ rw [mem_uIoc] at hx
102+ rcases hx with h | h
103+ all_goals linarith
104+ rw [← integral_one_div_of_pos hp hq]
105+ exact exists_eq_const_mul_intervalIntegral_of_nonneg hf hg' hg_nonneg
0 commit comments