Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap05.section05

def ImproperIntegralRight (f : ) (a b l : ) :

Definition 5.5.1. For a function f : [a, b) → ℝ that is Riemann integrable on every [a, c] with c < b, we define ∫ a^b f as the limit lim_{c → b⁻} ∫ a^c f when it exists. For f : [a, ∞) → ℝ, integrable on every [a, c], we define ∫ a^∞ f as lim_{c → ∞} ∫ a^c f. The improper integral converges if the relevant limit exists and diverges otherwise. The analogous definitions for a left-hand endpoint are similar.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def ImproperIntegralAtTop (f : ) (a l : ) :

    Improper integral over [a, ∞) converging to l.

    Equations
    Instances For

      Convergence of an improper integral on [a, b).

      Equations
      Instances For

        Convergence of an improper integral on [a, ∞).

        Equations
        Instances For

          Helper: x ↦ 1 / x^p is integrable on any interval [1, c].

          theorem improperIntegral_p_test_integral_formula {a b p : } (ha : 0 < a) (hb : 0 < b) (hp : p 1) :
          (x : ) in a..b, 1 / x ^ p = (b ^ (1 - p) - a ^ (1 - p)) / (1 - p)

          Helper: explicit interval integral for x ↦ 1 / x^p on positive bounds.

          theorem improperIntegral_p_test (p : ) :
          (p > 1ImproperIntegralAtTop (fun (x : ) => 1 / x ^ p) 1 (1 / (p - 1))) (0 < pp 1¬ImproperIntegralAtTopConverges (fun (x : ) => 1 / x ^ p) 1) (0 < pp < 1Filter.Tendsto (fun (c : ) => (x : ) in c..1, 1 / x ^ p) (nhdsWithin 0 (Set.Ioi 0)) (nhds (1 / (1 - p)))) (p 1¬∃ (l : ), Filter.Tendsto (fun (c : ) => (x : ) in c..1, 1 / x ^ p) (nhdsWithin 0 (Set.Ioi 0)) (nhds l))

          Proposition 5.5.2 (p-test for integrals). The improper integral ∫₁^∞ x^{-p} converges to 1 / (p - 1) for p > 1 and diverges for 0 < p ≤ 1. The improper integral ∫₀^1 x^{-p} converges to 1 / (1 - p) for 0 < p < 1 and diverges for p ≥ 1.

          theorem eventually_eq_integral_split {f : } {a b : } (hb : b > a) (hInt : c > a, MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) :
          (fun (c : ) => (x : ) in a..c, f x) =ᶠ[Filter.atTop] fun (c : ) => ( (x : ) in a..b, f x) + (x : ) in b..c, f x
          theorem improperIntegralAtTop_of_tail {f : } {a b l : } (hb : b > a) (hInt : c > a, MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hbConv : ImproperIntegralAtTop f b l) :
          ImproperIntegralAtTop f a (( (x : ) in a..b, f x) + l)
          theorem improperIntegralAtTop_tail_of {f : } {a b l : } (hb : b > a) (hInt : c > a, MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (ha : ImproperIntegralAtTop f a l) :
          ImproperIntegralAtTop f b (l - (x : ) in a..b, f x)

          Proposition 5.5.3. If f : [a, ∞) → ℝ is Riemann integrable on every [a, c] with c > a, then for any b > a the improper integral ∫ b^∞ f converges if and only if ∫ a^∞ f converges, and in the convergent case ∫ a^∞ f = ∫ a..b, f + ∫ b^∞ f.

          theorem improperIntegral_tail_value {f : } {a b l₁ l₂ : } (hb : b > a) (hInt : c > a, MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (ha : ImproperIntegralAtTop f a l₁) (hbConv : ImproperIntegralAtTop f b l₂) :
          l₁ = ( (x : ) in a..b, f x) + l₂

          Proposition 5.5.3 (value identity). Under the same hypotheses as improperIntegral_tail_convergence, if the improper integrals from a and from b both converge, then the value from a splits as the sum of the integral over [a, b] and the improper integral from b to .

          theorem intervalIntegral_mono_upper {f : } {a s t : } (hInt : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hpos : ∀ (x : ), a x0 f x) (has : a s) (hst : s t) :
          (x : ) in a..s, f x (x : ) in a..t, f x
          theorem monotone_integral_max {f : } {a : } (hInt : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hpos : ∀ (x : ), a x0 f x) :
          Monotone fun (t : ) => (x : ) in a..max t a, f x
          theorem tendsto_integral_max {f : } {a l : } (hconv : ImproperIntegralAtTop f a l) :
          Filter.Tendsto (fun (t : ) => (x : ) in a..max t a, f x) Filter.atTop (nhds l)
          theorem range_integral_max_eq_image {f : } {a : } :
          (Set.range fun (t : ) => (x : ) in a..max t a, f x) = (fun (t : ) => (x : ) in a..t, f x) '' {t : | a t}
          theorem tendsto_integral_comp_seq {f : } {a l : } {x : } (hconv : ImproperIntegralAtTop f a l) (hx : Filter.Tendsto x Filter.atTop Filter.atTop) :
          Filter.Tendsto (fun (n : ) => (t : ) in a..x n, f t) Filter.atTop (nhds l)
          theorem improperIntegral_nonneg_sup_and_seq {f : } {a l : } (hInt : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hpos : ∀ (x : ), a x0 f x) (hconv : ImproperIntegralAtTop f a l) :
          l = sSup ((fun (t : ) => (x : ) in a..t, f x) '' {t : | a t}) ∀ (x : ), Filter.Tendsto x Filter.atTop Filter.atTop → (ImproperIntegralAtTop f a l Filter.Tendsto (fun (n : ) => (t : ) in a..x n, f t) Filter.atTop (nhds l))

          Proposition 5.5.4. Let f : [a, ∞) → ℝ be nonnegative and Riemann integrable on every interval [a, b] with b > a. (i) If the improper integral ∫ a^∞ f converges to l, then l = sup {∫ a..x, f x | x ≥ a}. (ii) For any sequence xₙ → ∞, the improper integral converges if and only if lim_{n → ∞} ∫ a^{xₙ} f exists, and in that case the two limits agree.

          theorem comparison_nonneg_g {a : } {f g : } (hbound : ∀ (x : ), a x|f x| g x) (x : ) :
          a x0 g x
          theorem integral_diff_eq_interval {a b c : } {f : } (hIntf : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hb : a b) (hbc : b c) :
          ( (x : ) in a..c, f x) - (x : ) in a..b, f x = (x : ) in b..c, f x
          theorem abs_integral_le_of_bound {a : } {f g : } (hIntg : ∀ (c : ), MeasureTheory.IntegrableOn g (Set.Icc a c) MeasureTheory.volume) (hbound : ∀ (x : ), a x|f x| g x) {c : } :
          a c| (x : ) in a..c, f x| (x : ) in a..c, g x
          theorem abs_integral_diff_le {a : } {f g : } (hIntf : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hIntg : ∀ (c : ), MeasureTheory.IntegrableOn g (Set.Icc a c) MeasureTheory.volume) (hbound : ∀ (x : ), a x|f x| g x) {b c : } :
          a bb c|( (x : ) in a..c, f x) - (x : ) in a..b, f x| (x : ) in b..c, g x
          theorem cauchy_partial_integrals_of_comparison {a : } {f g : } {lg : } (hIntf : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hIntg : ∀ (c : ), MeasureTheory.IntegrableOn g (Set.Icc a c) MeasureTheory.volume) (hbound : ∀ (x : ), a x|f x| g x) (hconv : ImproperIntegralAtTop g a lg) :
          Cauchy (Filter.map (fun (c : ) => (x : ) in a..c, f x) Filter.atTop)
          theorem limit_abs_le {F G : } {lf lg : } (hF : Filter.Tendsto F Filter.atTop (nhds lf)) (hG : Filter.Tendsto G Filter.atTop (nhds lg)) (hbound : ∀ᶠ (x : ) in Filter.atTop, |F x| G x) :
          |lf| lg
          theorem improperIntegral_comparison {a : } {f g : } (hIntf : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc a c) MeasureTheory.volume) (hIntg : ∀ (c : ), MeasureTheory.IntegrableOn g (Set.Icc a c) MeasureTheory.volume) (hbound : ∀ (x : ), a x|f x| g x) :

          Proposition 5.5.5 (comparison test for improper integrals). Let f g : [a, ∞) → ℝ be Riemann integrable on every [a, b] with b > a and assume |f x| ≤ g x for all x ≥ a. (i) If ∫ a^∞ g converges, then ∫ a^∞ f converges and |∫ a^∞ f| ≤ ∫ a^∞ g. (ii) If ∫ a^∞ f diverges, then ∫ a^∞ g diverges.

          theorem integrableOn_sin_sq_over_cubic_Icc {a c : } (ha : 0 a) :
          MeasureTheory.IntegrableOn (fun (x : ) => Real.sin (x ^ 2) * (x + 2) / (x ^ 3 + 1)) (Set.Icc a c) MeasureTheory.volume
          theorem bound_sin_sq_over_cubic {x : } (hx : 1 x) :
          |Real.sin (x ^ 2) * (x + 2) / (x ^ 3 + 1)| 3 / x ^ 2

          Example 5.5.6. The improper integral ∫₀^∞ (sin (x^2) * (x + 2)) / (x^3 + 1) converges, for instance by comparing its tail to 3 / x^2 on [1, ∞) and using the tail test.

          theorem intervalIntegral_one_div_sub {c : } (hc : 2 < c) :
          (x : ) in 2..c, 1 / (x - 1) = Real.log (c - 1)
          theorem intervalIntegral_one_div_add {c : } (hc : 2 < c) :
          (x : ) in 2..c, 1 / (x + 1) = Real.log (c + 1) - Real.log 3
          theorem intervalIntegrable_one_div_sub {c : } (hc : 2 < c) :
          IntervalIntegrable (fun (x : ) => 1 / (x - 1)) MeasureTheory.volume 2 c
          theorem intervalIntegrable_one_div_add {c : } (hc : 2 < c) :
          IntervalIntegrable (fun (x : ) => 1 / (x + 1)) MeasureTheory.volume 2 c
          theorem intervalIntegral_two_over_x_sq_sub_one {c : } (hc : 2 < c) :
          (x : ) in 2..c, 2 / (x ^ 2 - 1) = Real.log (c - 1) - Real.log (c + 1) + Real.log 3

          Example 5.5.7. The improper integral ∫₂^∞ 2 / (x^2 - 1) converges (in fact to log 3), but writing 2 / (x^2 - 1) = 1 / (x - 1) - 1 / (x + 1) does not allow splitting the improper integral, since both pieces diverge separately.

          def ImproperIntegralOpenInterval (f : ) (a b l : ) :

          Definition 5.5.8. For a function f : (a, b) → ℝ that is Riemann integrable on every closed subinterval [c, d] with a < c < d < b, the improper integral ∫ a^b f is defined as the iterated limit lim_{c → a⁺} lim_{d → b⁻} ∫_{c}^{d} f when this limit exists.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def ImproperIntegralRealLine (f : ) (l : ) :

            Definition 5.5.8 (whole line). If f : ℝ → ℝ is Riemann integrable on every bounded interval [a, b], then the improper integral ∫_{-∞}^{∞} f is defined as lim_{c → -∞} lim_{d → ∞} ∫_{c}^{d} f, when this limit exists.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Example 5.5.9. The improper integral of 1 / (1 + x^2) over the entire real line converges and has value π, computed via the antiderivative x ↦ arctan x and the limits at ±∞.

              Helper: integrability on all closed intervals implies interval integrability.

              theorem intervalIntegral_eq_sub_base {f : } (hInt : ∀ (a b : ), MeasureTheory.IntegrableOn f (Set.Icc a b) MeasureTheory.volume) (a b : ) :
              (x : ) in a..b, f x = ( (x : ) in 0..b, f x) - (x : ) in 0..a, f x

              Helper: express an interval integral via the basepoint 0.

              theorem tendsto_intervalIntegral_atBot_of_base {f : } (hInt : ∀ (a b : ), MeasureTheory.IntegrableOn f (Set.Icc a b) MeasureTheory.volume) {Lminus : } (hbot : Filter.Tendsto (fun (t : ) => (x : ) in 0..t, f x) Filter.atBot (nhds Lminus)) (b : ) :
              Filter.Tendsto (fun (a : ) => (x : ) in a..b, f x) Filter.atBot (nhds (( (x : ) in 0..b, f x) - Lminus))

              Helper: convergence of base integrals at -∞ gives left partial limits.

              theorem tendsto_intervalIntegral_atBot_atTop_of_base {f : } (hInt : ∀ (a b : ), MeasureTheory.IntegrableOn f (Set.Icc a b) MeasureTheory.volume) {Lminus Lplus : } (hbot : Filter.Tendsto (fun (t : ) => (x : ) in 0..t, f x) Filter.atBot (nhds Lminus)) (htop : Filter.Tendsto (fun (t : ) => (x : ) in 0..t, f x) Filter.atTop (nhds Lplus)) :
              Filter.Tendsto (fun (p : × ) => (x : ) in p.1..p.2, f x) (Filter.atBot ×ˢ Filter.atTop) (nhds (Lplus - Lminus))

              Helper: base limits at ±∞ yield the two-variable limit.

              theorem improperIntegral_iterated_limits_symm {f : } (hInt : ∀ (a b : ), MeasureTheory.IntegrableOn f (Set.Icc a b) MeasureTheory.volume) :
              ((∃ (g : ) (l : ), (∀ (a : ), Filter.Tendsto (fun (b : ) => (x : ) in a..b, f x) Filter.atTop (nhds (g a))) Filter.Tendsto g Filter.atBot (nhds l)) ∃ (h : ) (l : ), (∀ (b : ), Filter.Tendsto (fun (a : ) => (x : ) in a..b, f x) Filter.atBot (nhds (h b))) Filter.Tendsto h Filter.atTop (nhds l)) (∀ (g h : ) (l₁ l₂ : ), (∀ (a : ), Filter.Tendsto (fun (b : ) => (x : ) in a..b, f x) Filter.atTop (nhds (g a)))Filter.Tendsto g Filter.atBot (nhds l₁)(∀ (b : ), Filter.Tendsto (fun (a : ) => (x : ) in a..b, f x) Filter.atBot (nhds (h b)))Filter.Tendsto h Filter.atTop (nhds l₂)l₁ = l₂) ((∃ (g : ) (l : ), (∀ (a : ), Filter.Tendsto (fun (b : ) => (x : ) in a..b, f x) Filter.atTop (nhds (g a))) Filter.Tendsto g Filter.atBot (nhds l))∃ (l : ), ImproperIntegralRealLine f l Filter.Tendsto (fun (a : ) => (x : ) in -a..a, f x) Filter.atTop (nhds l))

              Proposition 5.5.10. If f : ℝ → ℝ is Riemann integrable on every bounded interval [a, b], then the iterated limits lim_{a → -∞} lim_{b → ∞} ∫_{a}^{b} f and lim_{b → ∞} lim_{a → -∞} ∫_{a}^{b} f converge together and have the same value. If either iterated limit exists, then the improper integral over the whole line converges to the same value and agrees with the limit of the symmetric integrals ∫_{-a}^{a} f as a → ∞.

              theorem improperIntegral_sign_diverges_but_symmetric_zero :
              (∀ a < 0, ¬ImproperIntegralAtTopConverges (fun (x : ) => if x = 0 then 0 else x / |x|) a) Filter.Tendsto (fun (a : ) => (x : ) in -a..a, if x = 0 then 0 else x / |x|) Filter.atTop (nhds 0)

              Example 5.5.11. For the function f(x) = x / |x| with f(0) = 0, integrable on every bounded interval, the improper integral over the whole line does not converge because for any fixed a < 0 the limit lim_{b → ∞} ∫_{a}^{b} f diverges. However, the symmetric partial integrals ∫_{-a}^{a} f are all zero for a > 0, so lim_{a → ∞} ∫_{-a}^{a} f = 0.

              noncomputable def sinc (x : ) :

              Example 5.5.12. The sinc function is defined by sinc x = sin x / x for x ≠ 0 and sinc 0 = 1. Its improper integral over the whole real line converges to π, while the improper integral of its absolute value diverges.

              Equations
              Instances For
                theorem sinc_tail_bound {s t : } (hs : 1 s) (hst : s t) :
                | (x : ) in s..t, sinc x| 3 / s

                Tail bound for the sinc primitive on positive intervals.

                theorem sinc_primitive_tendsto_atTop_exists :
                ∃ (L : ), Filter.Tendsto (fun (t : ) => (x : ) in 0..t, sinc x) Filter.atTop (nhds L)

                The primitive t ↦ ∫_0^t sinc has a finite limit at +∞.

                theorem sinc_eq_integral_cos_mul (x : ) :
                sinc x = (t : ) in 0..1, Real.cos (t * x)

                Integral representation sinc x = ∫_0^1 cos (t x) dt.

                noncomputable def muA (a : ) :
                Equations
                Instances For
                  theorem charFun_muA (a t : ) (ha : 0 < a) :
                  MeasureTheory.charFun (muA a) t = 1 / (a - t * Complex.I)
                  theorem integrableOn_exp_mul_comp_of_tendsto (F : ) (hFcont : Continuous F) {L : } (hL : Filter.Tendsto F Filter.atTop (nhds L)) (a : ) (ha : 0 a) :
                  theorem abel_weighted_tendsto_of_tendsto (F : ) (L : ) (hFcont : Continuous F) (hL : Filter.Tendsto F Filter.atTop (nhds L)) :
                  Filter.Tendsto (fun (n : ) => (x : ) in Set.Ioi 0, Real.exp (-x) * F ((n + 1) * x)) Filter.atTop (nhds L)
                  theorem weighted_primitive_eval (F : ) (hF0 : F 0 = 0) (hFderiv : ∀ (x : ), HasDerivAt F (Real.sinc x) x) {L : } (hL : Filter.Tendsto F Filter.atTop (nhds L)) (n : ) :
                  (x : ) in Set.Ioi 0, Real.exp (-x) * F ((n + 1) * x) = Real.arctan (n + 1)

                  Example 5.5.12. The improper integral of the sinc function over the real line converges and equals π, but the integral of its absolute value diverges, so the convergence is not absolute.

                  theorem integral_test_for_series {f : } {k : } (hmono : AntitoneOn f (Set.Ici k)) (hpos : ∀ (x : ), k x0 f x) (hInt : ∀ (c : ), MeasureTheory.IntegrableOn f (Set.Icc (↑k) c) MeasureTheory.volume) :
                  ((Summable fun (n : ) => f (n + k)) ImproperIntegralAtTopConverges f k) ∀ {l : }, ImproperIntegralAtTop f (↑k) l(Summable fun (n : ) => f (n + k))l ∑' (n : ), f (n + k) ∑' (n : ), f (n + k) f k + l

                  Proposition 5.5.13 (integral test for series). If f : [k, ∞) → ℝ is nonnegative and decreasing for some integer k, then the series ∑_{n = k}^{∞} f n converges if and only if the improper integral ∫ k^∞ f converges. In the convergent case, ∫ k^∞ f ≤ ∑_{n = k}^{∞} f n ≤ f k + ∫ k^∞ f.

                  theorem sum_range_sub_telescope (u : ) (N : ) :
                  nFinset.range N, (u n - u (n + 1)) = u 0 - u N

                  Telescoping sum for successive differences.

                  theorem inv_sq_ge_sub_inv_succ {m : } (hm : 1 m) :
                  1 / m ^ 2 1 / m - 1 / m.succ

                  For m ≥ 1, the term 1 / m^2 dominates the telescoping difference 1 / m - 1 / (m + 1).

                  theorem inv_sq_succ_le_sub_inv {m : } (hm : 1 m) :
                  1 / m.succ ^ 2 1 / m - 1 / m.succ

                  For m ≥ 1, the next term 1 / (m + 1)^2 is bounded above by the same telescoping difference 1 / m - 1 / (m + 1).

                  theorem tail_bounds_one_div_nat_sq {k : } (hk : 1 k) :
                  1 / k ∑' (n : ), 1 / ↑(n + k) ^ 2 ∑' (n : ), 1 / ↑(n + k) ^ 2 1 / k ^ 2 + 1 / k
                  theorem series_one_div_nat_sq_bounds {k : } (hk : 1 k) :
                  (Summable fun (n : ) => 1 / n.succ ^ 2) nFinset.range (k - 1), 1 / n.succ ^ 2 + 1 / k ∑' (n : ), 1 / n.succ ^ 2 ∑' (n : ), 1 / n.succ ^ 2 nFinset.range (k - 1), 1 / n.succ ^ 2 + 1 / k + 1 / k ^ 2

                  Example 5.5.14. Using the integral test with f x = 1 / x^2 gives explicit bounds on the Basel series. For any integer k ≥ 1, ∑_{n=1}^{k-1} 1 / n^2 + 1 / k ≤ ∑_{n=1}^{∞} 1 / n^2 ≤ ∑_{n=1}^{k-1} 1 / n^2 + 1 / k + 1 / k^2. Numerically, taking k = 10 shows the sum lies between 1.6397… and 1.6497…, while the exact value is π^2 / 6 ≈ 1.6449….