@@ -9,7 +9,7 @@ import measure_theory.interval_integral
9
9
# Integration of specific interval integrals
10
10
11
11
This file contains proofs of the integrals of various specific functions. This includes:
12
- * Integrals of simple functions, such as `id`, `pow`, `exp`, `inv `
12
+ * Integrals of simple functions, such as `id`, `pow`, `inv`, ` exp`, `log `
13
13
* Integrals of some trigonometric functions, such as `sin`, `cos`, `1 / (1 + x^2)`
14
14
* The integral of `cos x ^ 2 - sin x ^ 2`
15
15
* Reduction formulae for the integrals of `sin x ^ n` and `cos x ^ n` for `n ≥ 2`
@@ -195,10 +195,6 @@ by simpa using integral_pow 1
195
195
lemma integral_one : ∫ x in a..b, (1 : ℝ) = b - a :=
196
196
by simp only [mul_one, smul_eq_mul, integral_const]
197
197
198
- @[simp]
199
- lemma integral_exp : ∫ x in a..b, exp x = exp b - exp a :=
200
- by rw integral_deriv_eq_sub'; norm_num [continuous_on_exp]
201
-
202
198
@[simp]
203
199
lemma integral_inv (h : (0 :ℝ) ∉ interval a b) : ∫ x in a..b, x⁻¹ = log (b / a) :=
204
200
begin
@@ -225,6 +221,30 @@ by simp only [one_div, integral_inv_of_pos ha hb]
225
221
lemma integral_one_div_of_neg (ha : a < 0 ) (hb : b < 0 ) : ∫ x : ℝ in a..b, 1 /x = log (b / a) :=
226
222
by simp only [one_div, integral_inv_of_neg ha hb]
227
223
224
+ @[simp]
225
+ lemma integral_exp : ∫ x in a..b, exp x = exp b - exp a :=
226
+ by rw integral_deriv_eq_sub'; norm_num [continuous_on_exp]
227
+
228
+ @[simp]
229
+ lemma integral_log (h : (0 :ℝ) ∉ interval a b) :
230
+ ∫ x in a..b, log x = b * log b - a * log a - b + a :=
231
+ begin
232
+ obtain ⟨h', heq⟩ := ⟨λ x hx, ne_of_mem_of_not_mem hx h, λ x hx, mul_inv_cancel (h' x hx)⟩,
233
+ convert integral_mul_deriv_eq_deriv_mul (λ x hx, has_deriv_at_log (h' x hx))
234
+ (λ x hx, has_deriv_at_id x) (continuous_on_inv'.mono $ subset_compl_singleton_iff.mpr h)
235
+ continuous_on_const using 1 ; simp [integral_congr heq, mul_comm, ← sub_add],
236
+ end
237
+
238
+ @[simp]
239
+ lemma integral_log_of_pos (ha : 0 < a) (hb : 0 < b) :
240
+ ∫ x in a..b, log x = b * log b - a * log a - b + a :=
241
+ integral_log $ not_mem_interval_of_lt ha hb
242
+
243
+ @[simp]
244
+ lemma integral_log_of_neg (ha : a < 0 ) (hb : b < 0 ) :
245
+ ∫ x in a..b, log x = b * log b - a * log a - b + a :=
246
+ integral_log $ not_mem_interval_of_gt ha hb
247
+
228
248
@[simp]
229
249
lemma integral_sin : ∫ x in a..b, sin x = cos a - cos b :=
230
250
by rw integral_deriv_eq_sub' (λ x, -cos x); norm_num [continuous_on_sin]
0 commit comments