@@ -19,6 +19,9 @@ half-infinite intervals in `ℝ`.
1919These lemmas are stated in terms of either `Iic` or `Ioi` (neglecting `Iio` and `Ici`) to match
2020mathlib's conventions for integrals over finite intervals (see `intervalIntegral`).
2121
22+ The file also proves **Frullani's integral** (`Frullani.integral_Ioi_eq`), together with its limit
23+ form `Frullani.tendsto_intervalIntegral`.
24+
2225## See also
2326
2427- `Mathlib/Analysis/SpecialFunctions/Integrals/Basic.lean`: specific integrals over finite intervals
@@ -292,28 +295,32 @@ namespace Frullani
292295
293296open Metric
294297
295- variable {E : Type *} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {f : ℝ → E}
298+ variable {E : Type *} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : ℝ → E}
296299 {a b c : ℝ} {L R : E}
297300
298- omit [CompleteSpace E] in
299- lemma intervalIntegrable_inv_smul (hf : ContinuousOn f (Ioi 0 )) {p q : ℝ} (hp : 0 < p)
301+ lemma intervalIntegrable_inv_smul (hf : LocallyIntegrableOn f (Ioi 0 )) {p q : ℝ} (hp : 0 < p)
300302 (hq : 0 < q) : IntervalIntegrable (fun x ↦ x⁻¹ • f x) volume p q := by
301- apply ContinuousOn.intervalIntegrable
302303 have hsub : uIcc p q ⊆ Ioi 0 := by simp [uIcc, Icc_subset_Ioi_iff, hp, hq]
303- exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).smul (hf.mono hsub)
304-
305- omit [CompleteSpace E] in
306- lemma intervalIntegrable_inv_smul_comp_mul (hf : ContinuousOn f (Ioi 0 )) {p q : ℝ} (hp : 0 < p)
307- (hq : 0 < q) (hc : 0 < c) : IntervalIntegrable (fun x ↦ x⁻¹ • f (c * x)) volume p q := by
308- apply ContinuousOn.intervalIntegrable
304+ have hf_int : IntervalIntegrable f volume p q :=
305+ intervalIntegrable_iff.mpr
306+ ((hf.integrableOn_compact_subset hsub isCompact_uIcc).mono_set uIoc_subset_uIcc)
307+ exact hf_int.continuousOn_smul (continuousOn_inv₀.mono fun x hx ↦ ne_of_gt (hsub hx))
308+
309+ lemma intervalIntegrable_inv_smul_comp_mul (hf : LocallyIntegrableOn f (Ioi 0 )) {p q : ℝ}
310+ (hp : 0 < p) (hq : 0 < q) (hc : 0 < c) :
311+ IntervalIntegrable (fun x ↦ x⁻¹ • f (c * x)) volume p q := by
309312 have hsub : uIcc p q ⊆ Ioi 0 := by simp [uIcc, Icc_subset_Ioi_iff, hp, hq]
310- exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).smul
311- (hf.comp (continuousOn_const.mul continuousOn_id) fun x hx ↦ mul_pos hc (hsub hx))
312-
313- omit [CompleteSpace E] in
314- lemma integral_comp_mul_inv_smul {ε r : ℝ} (hc : 0 < c) :
313+ have hf_cint : IntervalIntegrable f volume (c * p) (c * q) :=
314+ intervalIntegrable_iff.mpr
315+ ((hf.integrableOn_compact_subset (by simp [uIcc, Icc_subset_Ioi_iff, mul_pos hc hp,
316+ mul_pos hc hq]) isCompact_uIcc).mono_set uIoc_subset_uIcc)
317+ have hf_comp : IntervalIntegrable (fun x ↦ f (c * x)) volume p q := by
318+ have h := hf_cint.comp_mul_left (c := c)
319+ rwa [mul_div_cancel_left₀ p hc.ne', mul_div_cancel_left₀ q hc.ne'] at h
320+ exact hf_comp.continuousOn_smul (continuousOn_inv₀.mono fun x hx ↦ ne_of_gt (hsub hx))
321+
322+ lemma integral_comp_mul_inv_smul {ε r : ℝ} (hc : c ≠ 0 ) :
315323 ∫ x in ε..r, x⁻¹ • f (c * x) = ∫ x in c * ε..c * r, x⁻¹ • f x := by
316- have hc' : c ≠ 0 := ne_of_gt hc
317324 let u : ℝ → E := fun x ↦ x⁻¹ • f x
318325 have key : (fun x ↦ x⁻¹ • f (c * x)) = fun x ↦ c • u (c * x) := by
319326 funext x
@@ -322,7 +329,9 @@ lemma integral_comp_mul_inv_smul {ε r : ℝ} (hc : 0 < c) :
322329 field_simp
323330 rw [key, intervalIntegral.integral_smul, smul_integral_comp_mul_left]
324331
325- lemma norm_integral_inv_smul_sub_le (hf : ContinuousOn f (Ioi 0 )) {p q : ℝ} (hp : 0 < p)
332+ variable [CompleteSpace E]
333+
334+ lemma norm_integral_inv_smul_sub_le (hf : LocallyIntegrableOn f (Ioi 0 )) {p q : ℝ} (hp : 0 < p)
326335 (hq : 0 < q) {V : E} {δ : ℝ} (hδ : 0 ≤ δ) (h : ∀ x ∈ uIoc p q, ‖f x - V‖ ≤ δ) :
327336 ‖(∫ x in p..q, x⁻¹ • f x) - log (q / p) • V‖ ≤ δ * |log (q / p)| := by
328337 have hsub : uIcc p q ⊆ Ioi 0 := by simp [uIcc, Icc_subset_Ioi_iff, hp, hq]
@@ -334,7 +343,7 @@ lemma norm_integral_inv_smul_sub_le (hf : ContinuousOn f (Ioi 0)) {p q : ℝ} (h
334343 have hint_inv : IntervalIntegrable (fun x : ℝ ↦ x⁻¹ * δ) volume p q := by
335344 apply ContinuousOn.intervalIntegrable
336345 exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).mul continuousOn_const
337- calc
346+ calc ‖(∫ x in p..q, x⁻¹ • f x) - log (q / p) • V‖
338347 _ = ‖∫ x in p..q, x⁻¹ • (f x - V)‖ := by
339348 congr 1
340349 have : log (q / p) • V = ∫ x in p..q, x⁻¹ • V := by
@@ -359,7 +368,7 @@ lemma norm_integral_inv_smul_sub_le (hf : ContinuousOn f (Ioi 0)) {p q : ℝ} (h
359368 rw [heq, intervalIntegral.integral_const_mul, integral_inv_of_pos hp hq]
360369 exact (abs_mul δ (log (q / p))).trans (by rw [abs_of_nonneg hδ])
361370
362- lemma tendsto_integral_inv_smul_of_tendsto_uniform (hf : ContinuousOn f (Ioi 0 )) (ha : 0 < a)
371+ lemma tendsto_integral_inv_smul_of_tendsto_uniform (hf : LocallyIntegrableOn f (Ioi 0 )) (ha : 0 < a)
363372 (hb : 0 < b) {F : Filter ℝ} (hpos : ∀ᶠ t in F, 0 < t) {V : E}
364373 (huni : ∀ δ > 0 , ∀ᶠ t in F, ∀ x ∈ uIoc (a * t) (b * t), ‖f x - V‖ ≤ δ) :
365374 Tendsto (fun t ↦ ∫ x in (a * t)..(b * t), x⁻¹ • f x) F (𝓝 (log (b / a) • V)) := by
@@ -373,21 +382,21 @@ lemma tendsto_integral_inv_smul_of_tendsto_uniform (hf : ContinuousOn f (Ioi 0))
373382 have hbε : 0 < b * t := mul_pos hb ht_pos
374383 have hlog_eq : log (b * t / (a * t)) = log (b / a) := by
375384 rw [mul_div_mul_right b a (ne_of_gt ht_pos)]
376- calc
385+ calc dist (∫ x in a * t..b * t, x⁻¹ • f x) (log (b / a) • V)
377386 _ = ‖(∫ x in a * t..b * t, x⁻¹ • f x) - log (b / a) • V‖ := dist_eq_norm _ _
378387 _ = ‖(∫ x in a * t..b * t, x⁻¹ • f x) - log (b * t / (a * t)) • V‖ := by rw [hlog_eq]
379388 _ ≤ δ' * |log (b * t / (a * t))| :=
380389 norm_integral_inv_smul_sub_le hf haε hbε hδ'.le hbound
381390 _ = δ' * C := by rw [hlog_eq]
382391 _ < δ := by
383- calc
392+ calc δ' * C
384393 _ = δ * (C / (C + 1 )) := by ring
385394 _ < δ * 1 :=
386395 mul_lt_mul_of_pos_left ((div_lt_one (by positivity)).2 (lt_add_one C)) hδ
387396 _ = δ := mul_one δ
388397
389- lemma tendsto_integral_inv_smul_nhdsWithin (hf : ContinuousOn f (Ioi 0 )) (ha : 0 < a) (hb : 0 < b )
390- (hL : Tendsto f (𝓝[>] 0 ) (𝓝 L)) :
398+ lemma tendsto_integral_inv_smul_nhdsWithin (hf : LocallyIntegrableOn f (Ioi 0 )) (ha : 0 < a)
399+ (hb : 0 < b) ( hL : Tendsto f (𝓝[>] 0 ) (𝓝 L)) :
391400 Tendsto (fun ε ↦ ∫ x in (a * ε)..(b * ε), x⁻¹ • f x) (𝓝[>] 0 ) (𝓝 (log (b / a) • L)) := by
392401 apply tendsto_integral_inv_smul_of_tendsto_uniform hf ha hb self_mem_nhdsWithin
393402 intro δ hδ
@@ -405,7 +414,7 @@ lemma tendsto_integral_inv_smul_nhdsWithin (hf : ContinuousOn f (Ioi 0)) (ha : 0
405414 have hx_pos : 0 < x := lt_of_lt_of_le (lt_min haε hbε) (uIoc_subset_uIcc hx).1
406415 have hx_lt_η : dist x 0 < η := by
407416 rw [Real.dist_eq, sub_zero, abs_of_pos hx_pos]
408- calc
417+ calc x
409418 _ ≤ max (a * t) (b * t) := (uIoc_subset_uIcc hx).2
410419 _ = M * t := by rw [hM_def, max_mul_of_nonneg _ _ ht_pos.le]
411420 _ < M * (η / M) := mul_lt_mul_of_pos_left ht_bound hM
@@ -414,9 +423,9 @@ lemma tendsto_integral_inv_smul_nhdsWithin (hf : ContinuousOn f (Ioi 0)) (ha : 0
414423 rw [mem_setOf_eq, dist_eq_norm] at this
415424 exact le_of_lt this
416425
417- /-- If `f → R` as `x → +∞` and `f` is continuous on `(0, ∞)`, then the weighted integral
426+ /-- If `f → R` as `x → +∞` and `f` is locally integrable on `(0, ∞)`, then the weighted integral
418427`∫ x in a*r..b*r, x⁻¹ • f x` converges to `log(b/a) • R` as `r → +∞`. -/
419- lemma tendsto_integral_inv_smul_atTop (hf : ContinuousOn f (Ioi 0 )) (ha : 0 < a) (hb : 0 < b)
428+ lemma tendsto_integral_inv_smul_atTop (hf : LocallyIntegrableOn f (Ioi 0 )) (ha : 0 < a) (hb : 0 < b)
420429 (hR : Tendsto f atTop (𝓝 R)) :
421430 Tendsto (fun r ↦ ∫ x in (a * r)..(b * r), x⁻¹ • f x) atTop (𝓝 (log (b / a) • R)) := by
422431 apply tendsto_integral_inv_smul_of_tendsto_uniform hf ha hb
@@ -433,7 +442,7 @@ lemma tendsto_integral_inv_smul_atTop (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a)
433442 have haε : 0 < a * t := mul_pos ha ht_pos
434443 have hbε : 0 < b * t := mul_pos hb ht_pos
435444 have hNx : N ≤ x :=
436- calc
445+ calc N
437446 _ = min a b * (N / min a b) := by field_simp
438447 _ ≤ min a b * t :=
439448 mul_le_mul_of_nonneg_left ((le_max_right _ _).trans ht) hm.le
@@ -444,10 +453,10 @@ lemma tendsto_integral_inv_smul_atTop (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a)
444453 exact le_of_lt hdist
445454
446455/-- **Frullani's integral** , limit form, for functions valued in a complete normed space.
447- If `f` is continuous on `(0, ∞)` with `f x → L` as `x → 0⁺` and `f x → R` as `x → +∞`,
456+ If `f` is locally integrable on `(0, ∞)` with `f x → L` as `x → 0⁺` and `f x → R` as `x → +∞`,
448457and `0 < a` and `0 < b`, then `∫ x in ε..r, x⁻¹ • (f (a * x) - f (b * x)) → log (b / a) • (L - R)`
449458as `ε → 0⁺` and `r → +∞`. -/
450- theorem tendsto_intervalIntegral (hf : ContinuousOn f (Ioi 0 )) (ha : 0 < a) (hb : 0 < b)
459+ theorem tendsto_intervalIntegral (hf : LocallyIntegrableOn f (Ioi 0 )) (ha : 0 < a) (hb : 0 < b)
451460 (hL : Tendsto f (𝓝[>] 0 ) (𝓝 L)) (hR : Tendsto f atTop (𝓝 R)) :
452461 Tendsto (fun p : ℝ × ℝ ↦ ∫ x in p.1 ..p.2 , x⁻¹ • (f (a * x) - f (b * x)))
453462 ((𝓝[>] 0 ) ×ˢ atTop) (𝓝 (log (b / a) • (L - R))) := by
@@ -457,13 +466,13 @@ theorem tendsto_intervalIntegral (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a) (hb
457466 have hsplit {ε r : ℝ} (hε : 0 < ε) (hr : 0 < r) :
458467 ∫ x in ε..r, x⁻¹ • (f (a * x) - f (b * x)) =
459468 (∫ x in (a * ε)..(b * ε), u x) - ∫ x in (a * r)..(b * r), u x := by
460- calc
469+ calc ∫ x in ε..r, x⁻¹ • (f (a * x) - f (b * x))
461470 _ = (∫ x in ε..r, x⁻¹ • f (a * x)) - ∫ x in ε..r, x⁻¹ • f (b * x) := by
462471 simp_rw [smul_sub]
463472 exact integral_sub (intervalIntegrable_inv_smul_comp_mul hf hε hr ha)
464473 (intervalIntegrable_inv_smul_comp_mul hf hε hr hb)
465474 _ = (∫ y in a * ε..a * r, u y) - ∫ y in b * ε..b * r, u y := by
466- rw [integral_comp_mul_inv_smul ha, integral_comp_mul_inv_smul hb]
475+ rw [integral_comp_mul_inv_smul ha.ne' , integral_comp_mul_inv_smul hb.ne' ]
467476 _ = _ := integral_interval_sub_interval_comm
468477 (hint (mul_pos ha hε) (mul_pos ha hr))
469478 (hint (mul_pos hb hε) (mul_pos hb hr))
@@ -479,10 +488,10 @@ theorem tendsto_intervalIntegral (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a) (hb
479488 ((tendsto_integral_inv_smul_atTop hf ha hb hR).comp tendsto_snd)
480489
481490/-- **Frullani's integral** for functions valued in a complete normed space.
482- If `f` is continuous on `(0, ∞)` with `f x → L` as `x → 0⁺` and `f x → R` as `x → +∞`,
491+ If `f` is locally integrable on `(0, ∞)` with `f x → L` as `x → 0⁺` and `f x → R` as `x → +∞`,
483492`0 < a` and `0 < b`, and `x ↦ x⁻¹ • (f (a * x) - f (b * x))` is integrable on `(0, ∞)`, then
484493`∫ x in Ioi 0, x⁻¹ • (f (a * x) - f (b * x)) = log (b / a) • (L - R)`. -/
485- theorem integral_Ioi_eq (hf : ContinuousOn f (Ioi 0 )) (ha : 0 < a) (hb : 0 < b)
494+ theorem integral_Ioi_eq (hf : LocallyIntegrableOn f (Ioi 0 )) (ha : 0 < a) (hb : 0 < b)
486495 (hL : Tendsto f (𝓝[>] 0 ) (𝓝 L)) (hR : Tendsto f atTop (𝓝 R))
487496 (hint : IntegrableOn (fun x ↦ x⁻¹ • (f (a * x) - f (b * x))) (Ioi 0 )) :
488497 ∫ x in Ioi 0 , x⁻¹ • (f (a * x) - f (b * x)) = log (b / a) • (L - R) := by
0 commit comments