Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: compute the integral of sqrt (1 - x ^ 2) #6905

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions Mathlib/Analysis/SpecialFunctions/Integrals.lean
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,19 @@ theorem integral_cos_sq : ∫ x in a..b, cos x ^ 2 = (cos b * sin b - cos a * si
by field_simp [integral_cos_pow, add_sub_assoc]
#align integral_cos_sq integral_cos_sq

theorem integral_sqrt_one_sub_sq : ∫ x in (-1 : ℝ)..1, sqrt (↑1 - x ^ 2) = π / 2 :=
xroblot marked this conversation as resolved.
Show resolved Hide resolved
calc
_ = ∫ x in (-(π / 2))..(π / 2), sqrt (↑1 - sin x ^ 2) * cos x := by
rw [show ↑(-1) = sin (-(π / 2)) by { rw [sin_neg, sin_pi_div_two] }]
nth_rewrite 2 [← sin_pi_div_two]
exact (integral_comp_mul_deriv (fun x _ => hasDerivAt_sin x) continuousOn_cos
(by continuity)).symm
xroblot marked this conversation as resolved.
Show resolved Hide resolved
_ = ∫ x in (-(π / 2))..(π / 2), cos x ^ 2 := by
refine integral_congr_ae (MeasureTheory.ae_of_all _ fun _ h => ?_)
rw [uIoc_of_le (neg_le_self (le_of_lt (half_pos Real.pi_pos))), Set.mem_Ioc] at h
rw [ ← Real.cos_eq_sqrt_one_sub_sin_sq (le_of_lt h.1) h.2, pow_two]
_ = π / 2 := by simp

/-! ### Integral of `sin x ^ m * cos x ^ n` -/


Expand Down