88public import Mathlib.MeasureTheory.Integral.IntervalAverage
99
1010/-!
11- # First mean value theorem for integrals
11+ # First mean value theorem for interval integrals
1212
13- We prove versions of the first mean value theorem for (unordered) interval integrals
14- w.r.t. an arbitrary measure in `ℝ`
13+ We prove versions of the first mean value theorem for interval integrals.
1514
16- One assuming almost-everywhere nonnegativity of `g` under an arbitrary measure,
17- and one assuming pointwise nonnegativity together with continuity of `g`.
15+ ## Main results
1816
19- ## Main statements
20-
21- - `exists_eq_const_mul_integral_of_ae_nonneg`:
22- **First mean value theorem for integrals** for (unordered) interval integrals when
23- `g` is interval integrable on `a..b` w.r.t. an arbitrary measure `μ` and satisfies
24- `g ≥ 0` almost everywhere on `uIoc a b`.
25- - `exists_eq_const_mul_integral_of_nonneg`:
26- **First mean value theorem for integrals** for (unordered) interval integrals when
27- `g` is continuous on `uIoc a b` and nonnegative there (Lebesgue measure).
17+ * `exists_eq_const_mul_intervalIntegral_of_ae_nonneg`:
18+ `∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x ∂μ) = f c * (∫ x in a..b, g x ∂μ)`.
19+ * `exists_eq_const_mul_intervalIntegral_of_nonneg'`:
20+ `∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x ∂μ) = f c * (∫ x in a..b, g x ∂μ)`.
21+ * `exists_eq_const_mul_intervalIntegral_of_nonneg`:
22+ `∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x) = f c * (∫ x in a..b, g x)`.
2823
2924 ## References
3025
@@ -34,30 +29,33 @@ and one assuming pointwise nonnegativity together with continuity of `g`.
3429
3530 ## Tags
3631
37- mean value theorem, interval integral, measure, nonnegative, continuous, integrable
32+ mean value theorem, interval integral
3833-/
3934
4035@[expose] public section
4136
4237open MeasureTheory Set intervalIntegral
4338
44- /-- **First mean value theorem for integrals (interval integral, arbitrary measure).**
45- Let `μ` be a measure on `ℝ`. If `f : ℝ → ℝ` is continuous on `uIcc a b` and
46- `g : ℝ → ℝ` is interval integrable on `a..b` w.r.t. `μ`, and `g ≥ 0` almost
47- everywhere on `uIoc a b`, then there exists `c ∈ uIcc a b` such that
48- `∫ x in a..b, f x * g x ∂μ = f c * ∫ x in a..b, g x ∂μ`. -/
49- theorem exists_eq_const_mul_integral_of_ae_nonneg
50- {a b : ℝ} {f g : ℝ → ℝ} {μ : Measure ℝ}
39+ open scoped Interval
40+
41+ variable {a b : ℝ} {f g : ℝ → ℝ} {μ : Measure ℝ}
42+
43+ /-- **First mean value theorem for interval integrals (arbitrary measure, a.e. nonnegativity).**
44+ Let `f g : ℝ → ℝ` and let `μ` be a measure on `ℝ`. Assume that `f` is continuous on `uIcc a b`,
45+ that `g` is interval integrable on `a..b` w.r.t. `μ`, and that `g ≥ 0` a.e. on `Ι a b` w.r.t.
46+ `μ.restrict (Ι a b)`. Then
47+ `∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x ∂μ) = f c * (∫ x in a..b, g x ∂μ)`. -/
48+ theorem exists_eq_const_mul_intervalIntegral_of_ae_nonneg
5149 (hf : ContinuousOn f (uIcc a b))
5250 (hg : IntervalIntegrable g μ a b)
53- (hg0 : ∀ᵐ x ∂(μ.restrict (uIoc a b)), 0 ≤ g x) :
51+ (hg0 : ∀ᵐ x ∂(μ.restrict (Ι a b)), 0 ≤ g x) :
5452 ∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x ∂μ) = f c * (∫ x in a..b, g x ∂μ) := by
5553 wlog hle : a ≤ b generalizing a b
5654 · simp at hle
5755 obtain ⟨c, c_in_uIcc, that⟩ :=
5856 this (a := b) (b := a) (by rwa [uIcc_comm]) hg.symm (by rwa [uIoc_comm]) hle.le
5957 refine ⟨c, by rwa [uIcc_comm], by simpa [integral_symm b a]⟩
60- let s := uIoc a b
58+ let s := Ι a b
6159 have hs : s = Ioc a b := uIoc_of_le hle
6260 have hs_meas : MeasurableSet s := measurableSet_uIoc
6361 let ρ := fun x ↦ ENNReal.ofReal (g x)
@@ -129,18 +127,26 @@ theorem exists_eq_const_mul_integral_of_ae_nonneg
129127 field_simp
130128 _ = _ := by simp [hg1]
131129
132- /-- **First mean value theorem for integrals (interval integral).**
133- Let `f g : ℝ → ℝ` be continuous on `uIcc a b`. If `g ≥ 0` on `uIoc a b`,
134- then there exists `c ∈ uIcc a b` such that
135- `∫ x in a..b, f x * g x = f c * ∫ x in a..b, g x`. -/
136- theorem exists_eq_const_mul_integral_of_nonneg
137- {a b : ℝ} {f g : ℝ → ℝ}
130+ /-- **First mean value theorem for interval integrals (arbitrary measure, nonnegativity).**
131+ Let `f g : ℝ → ℝ` and let `μ` be a measure on `ℝ`. Assume that `f` is continuous on `uIcc a b`,
132+ that `g` is interval integrable on `a..b` w.r.t. `μ`, and that `g ≥ 0` on `Ι a b`. Then
133+ `∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x ∂μ) = f c * (∫ x in a..b, g x ∂μ)`. -/
134+ theorem exists_eq_const_mul_intervalIntegral_of_nonneg'
135+ (hf : ContinuousOn f (uIcc a b))
136+ (hg : IntervalIntegrable g μ a b)
137+ (hg0 : ∀ x ∈ Ι a b, 0 ≤ g x) :
138+ ∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x ∂μ) = f c * (∫ x in a..b, g x ∂μ) := by
139+ have hg0_ae : ∀ᵐ x ∂(μ.restrict (Ι a b)), 0 ≤ g x := by
140+ rw [ae_restrict_iff' measurableSet_uIoc]
141+ exact ae_of_all μ hg0
142+ exact exists_eq_const_mul_intervalIntegral_of_ae_nonneg hf hg hg0_ae
143+
144+ /-- **First mean value theorem for interval integrals (Lebesgue measure, nonnegativity).**
145+ Let `f g : ℝ → ℝ` be continuous on `uIcc a b`. If `g ≥ 0` on `Ι a b`, then
146+ `∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x) = f c * (∫ x in a..b, g x)`. -/
147+ theorem exists_eq_const_mul_intervalIntegral_of_nonneg
138148 (hf : ContinuousOn f (uIcc a b))
139149 (hg : ContinuousOn g (uIcc a b))
140- (hg0 : ∀ x ∈ uIoc a b, 0 ≤ g x) :
150+ (hg0 : ∀ x ∈ Ι a b, 0 ≤ g x) :
141151 ∃ c ∈ uIcc a b, (∫ x in a..b, f x * g x) = f c * (∫ x in a..b, g x) := by
142- have hg0_ae : ∀ᵐ x ∂(volume.restrict (uIoc a b)), 0 ≤ g x := by
143- rw [ae_restrict_iff' measurableSet_uIoc]
144- exact ae_of_all volume hg0
145- exact exists_eq_const_mul_integral_of_ae_nonneg
146- hf hg.intervalIntegrable hg0_ae
152+ exact exists_eq_const_mul_intervalIntegral_of_nonneg' hf hg.intervalIntegrable hg0
0 commit comments