@@ -3,15 +3,17 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson
5
5
-/
6
- import analysis.special_functions.trigonometric.deriv
6
+ import analysis.special_functions.trigonometric.basic
7
+ import topology.algebra.ordered.proj_Icc
8
+
7
9
8
10
/-!
9
11
# Inverse trigonometric functions.
10
12
11
13
See also `analysis.special_functions.trigonometric.arctan` for the inverse tan function.
12
14
(This is delayed as it is easier to set up after developing complex trigonometric functions.)
13
15
14
- Basic inequalities and derivatives .
16
+ Basic inequalities on trigonometric functions .
15
17
-/
16
18
17
19
noncomputable theory
@@ -227,112 +229,6 @@ begin
227
229
rw [this , sin_arcsin hx₁ hx₂],
228
230
end
229
231
230
- lemma deriv_arcsin_aux {x : ℝ} (h₁ : x ≠ -1 ) (h₂ : x ≠ 1 ) :
231
- has_strict_deriv_at arcsin (1 / sqrt (1 - x ^ 2 )) x ∧ times_cont_diff_at ℝ ⊤ arcsin x :=
232
- begin
233
- cases h₁.lt_or_lt with h₁ h₁,
234
- { have : 1 - x ^ 2 < 0 , by nlinarith [h₁],
235
- rw [sqrt_eq_zero'.2 this.le, div_zero],
236
- have : arcsin =ᶠ[𝓝 x] λ _, -(π / 2 ) :=
237
- (gt_mem_nhds h₁).mono (λ y hy, arcsin_of_le_neg_one hy.le),
238
- exact ⟨(has_strict_deriv_at_const _ _).congr_of_eventually_eq this.symm,
239
- times_cont_diff_at_const.congr_of_eventually_eq this ⟩ },
240
- cases h₂.lt_or_lt with h₂ h₂,
241
- { have : 0 < sqrt (1 - x ^ 2 ) := sqrt_pos.2 (by nlinarith [h₁, h₂]),
242
- simp only [← cos_arcsin h₁.le h₂.le, one_div] at this ⊢,
243
- exact ⟨sin_local_homeomorph.has_strict_deriv_at_symm ⟨h₁, h₂⟩ this.ne'
244
- (has_strict_deriv_at_sin _),
245
- sin_local_homeomorph.times_cont_diff_at_symm_deriv this.ne' ⟨h₁, h₂⟩
246
- (has_deriv_at_sin _) times_cont_diff_sin.times_cont_diff_at⟩ },
247
- { have : 1 - x ^ 2 < 0 , by nlinarith [h₂],
248
- rw [sqrt_eq_zero'.2 this.le, div_zero],
249
- have : arcsin =ᶠ[𝓝 x] λ _, π / 2 := (lt_mem_nhds h₂).mono (λ y hy, arcsin_of_one_le hy.le),
250
- exact ⟨(has_strict_deriv_at_const _ _).congr_of_eventually_eq this.symm,
251
- times_cont_diff_at_const.congr_of_eventually_eq this ⟩ }
252
- end
253
-
254
- lemma has_strict_deriv_at_arcsin {x : ℝ} (h₁ : x ≠ -1 ) (h₂ : x ≠ 1 ) :
255
- has_strict_deriv_at arcsin (1 / sqrt (1 - x ^ 2 )) x :=
256
- (deriv_arcsin_aux h₁ h₂).1
257
-
258
- lemma has_deriv_at_arcsin {x : ℝ} (h₁ : x ≠ -1 ) (h₂ : x ≠ 1 ) :
259
- has_deriv_at arcsin (1 / sqrt (1 - x ^ 2 )) x :=
260
- (has_strict_deriv_at_arcsin h₁ h₂).has_deriv_at
261
-
262
- lemma times_cont_diff_at_arcsin {x : ℝ} (h₁ : x ≠ -1 ) (h₂ : x ≠ 1 ) {n : with_top ℕ} :
263
- times_cont_diff_at ℝ n arcsin x :=
264
- (deriv_arcsin_aux h₁ h₂).2 .of_le le_top
265
-
266
- lemma has_deriv_within_at_arcsin_Ici {x : ℝ} (h : x ≠ -1 ) :
267
- has_deriv_within_at arcsin (1 / sqrt (1 - x ^ 2 )) (Ici x) x :=
268
- begin
269
- rcases em (x = 1 ) with (rfl|h'),
270
- { convert (has_deriv_within_at_const _ _ (π / 2 )).congr _ _;
271
- simp [arcsin_of_one_le] { contextual := tt } },
272
- { exact (has_deriv_at_arcsin h h').has_deriv_within_at }
273
- end
274
-
275
- lemma has_deriv_within_at_arcsin_Iic {x : ℝ} (h : x ≠ 1 ) :
276
- has_deriv_within_at arcsin (1 / sqrt (1 - x ^ 2 )) (Iic x) x :=
277
- begin
278
- rcases em (x = -1 ) with (rfl|h'),
279
- { convert (has_deriv_within_at_const _ _ (-(π / 2 ))).congr _ _;
280
- simp [arcsin_of_le_neg_one] { contextual := tt } },
281
- { exact (has_deriv_at_arcsin h' h).has_deriv_within_at }
282
- end
283
-
284
- lemma differentiable_within_at_arcsin_Ici {x : ℝ} :
285
- differentiable_within_at ℝ arcsin (Ici x) x ↔ x ≠ -1 :=
286
- begin
287
- refine ⟨_, λ h, (has_deriv_within_at_arcsin_Ici h).differentiable_within_at⟩,
288
- rintro h rfl,
289
- have : sin ∘ arcsin =ᶠ[𝓝[Ici (-1 :ℝ)] (-1 )] id,
290
- { filter_upwards [Icc_mem_nhds_within_Ici ⟨le_rfl, neg_lt_self (@zero_lt_one ℝ _ _)⟩],
291
- exact λ x, sin_arcsin' },
292
- have := h.has_deriv_within_at.sin.congr_of_eventually_eq this.symm (by simp),
293
- simpa using (unique_diff_on_Ici _ _ left_mem_Ici).eq_deriv _ this (has_deriv_within_at_id _ _)
294
- end
295
-
296
- lemma differentiable_within_at_arcsin_Iic {x : ℝ} :
297
- differentiable_within_at ℝ arcsin (Iic x) x ↔ x ≠ 1 :=
298
- begin
299
- refine ⟨λ h, _, λ h, (has_deriv_within_at_arcsin_Iic h).differentiable_within_at⟩,
300
- rw [← neg_neg x, ← image_neg_Ici] at h,
301
- have := (h.comp (-x) differentiable_within_at_id.neg (maps_to_image _ _)).neg,
302
- simpa [(∘), differentiable_within_at_arcsin_Ici] using this
303
- end
304
-
305
- lemma differentiable_at_arcsin {x : ℝ} :
306
- differentiable_at ℝ arcsin x ↔ x ≠ -1 ∧ x ≠ 1 :=
307
- ⟨λ h, ⟨differentiable_within_at_arcsin_Ici.1 h.differentiable_within_at,
308
- differentiable_within_at_arcsin_Iic.1 h.differentiable_within_at⟩,
309
- λ h, (has_deriv_at_arcsin h.1 h.2 ).differentiable_at⟩
310
-
311
- @[simp] lemma deriv_arcsin : deriv arcsin = λ x, 1 / sqrt (1 - x ^ 2 ) :=
312
- begin
313
- funext x,
314
- by_cases h : x ≠ -1 ∧ x ≠ 1 ,
315
- { exact (has_deriv_at_arcsin h.1 h.2 ).deriv },
316
- { rw [deriv_zero_of_not_differentiable_at (mt differentiable_at_arcsin.1 h)],
317
- simp only [not_and_distrib, ne.def, not_not] at h,
318
- rcases h with (rfl|rfl); simp }
319
- end
320
-
321
- lemma differentiable_on_arcsin : differentiable_on ℝ arcsin {-1 , 1 }ᶜ :=
322
- λ x hx, (differentiable_at_arcsin.2
323
- ⟨λ h, hx (or.inl h), λ h, hx (or.inr h)⟩).differentiable_within_at
324
-
325
- lemma times_cont_diff_on_arcsin {n : with_top ℕ} :
326
- times_cont_diff_on ℝ n arcsin {-1 , 1 }ᶜ :=
327
- λ x hx, (times_cont_diff_at_arcsin (mt or.inl hx) (mt or.inr hx)).times_cont_diff_within_at
328
-
329
- lemma times_cont_diff_at_arcsin_iff {x : ℝ} {n : with_top ℕ} :
330
- times_cont_diff_at ℝ n arcsin x ↔ n = 0 ∨ (x ≠ -1 ∧ x ≠ 1 ) :=
331
- ⟨λ h, or_iff_not_imp_left.2 $ λ hn, differentiable_at_arcsin.1 $ h.differentiable_at $
332
- with_top.one_le_iff_pos.2 (pos_iff_ne_zero.2 hn),
333
- λ h, h.elim (λ hn, hn.symm ▸ (times_cont_diff_zero.2 continuous_arcsin).times_cont_diff_at) $
334
- λ hx, times_cont_diff_at_arcsin hx.1 hx.2 ⟩
335
-
336
232
/-- Inverse of the `cos` function, returns values in the range `0 ≤ arccos x` and `arccos x ≤ π`.
337
233
If the argument is not between `-1` and `1` it defaults to `π / 2` -/
338
234
@[pp_nodot] noncomputable def arccos (x : ℝ) : ℝ :=
@@ -388,51 +284,4 @@ by rw [arccos_eq_pi_div_two_sub_arcsin, sin_pi_div_two_sub, cos_arcsin hx₁ hx
388
284
@[continuity]
389
285
lemma continuous_arccos : continuous arccos := continuous_const.sub continuous_arcsin
390
286
391
- lemma has_strict_deriv_at_arccos {x : ℝ} (h₁ : x ≠ -1 ) (h₂ : x ≠ 1 ) :
392
- has_strict_deriv_at arccos (-(1 / sqrt (1 - x ^ 2 ))) x :=
393
- (has_strict_deriv_at_arcsin h₁ h₂).const_sub (π / 2 )
394
-
395
- lemma has_deriv_at_arccos {x : ℝ} (h₁ : x ≠ -1 ) (h₂ : x ≠ 1 ) :
396
- has_deriv_at arccos (-(1 / sqrt (1 - x ^ 2 ))) x :=
397
- (has_deriv_at_arcsin h₁ h₂).const_sub (π / 2 )
398
-
399
- lemma times_cont_diff_at_arccos {x : ℝ} (h₁ : x ≠ -1 ) (h₂ : x ≠ 1 ) {n : with_top ℕ} :
400
- times_cont_diff_at ℝ n arccos x :=
401
- times_cont_diff_at_const.sub (times_cont_diff_at_arcsin h₁ h₂)
402
-
403
- lemma has_deriv_within_at_arccos_Ici {x : ℝ} (h : x ≠ -1 ) :
404
- has_deriv_within_at arccos (-(1 / sqrt (1 - x ^ 2 ))) (Ici x) x :=
405
- (has_deriv_within_at_arcsin_Ici h).const_sub _
406
-
407
- lemma has_deriv_within_at_arccos_Iic {x : ℝ} (h : x ≠ 1 ) :
408
- has_deriv_within_at arccos (-(1 / sqrt (1 - x ^ 2 ))) (Iic x) x :=
409
- (has_deriv_within_at_arcsin_Iic h).const_sub _
410
-
411
- lemma differentiable_within_at_arccos_Ici {x : ℝ} :
412
- differentiable_within_at ℝ arccos (Ici x) x ↔ x ≠ -1 :=
413
- (differentiable_within_at_const_sub_iff _).trans differentiable_within_at_arcsin_Ici
414
-
415
- lemma differentiable_within_at_arccos_Iic {x : ℝ} :
416
- differentiable_within_at ℝ arccos (Iic x) x ↔ x ≠ 1 :=
417
- (differentiable_within_at_const_sub_iff _).trans differentiable_within_at_arcsin_Iic
418
-
419
- lemma differentiable_at_arccos {x : ℝ} :
420
- differentiable_at ℝ arccos x ↔ x ≠ -1 ∧ x ≠ 1 :=
421
- (differentiable_at_const_sub_iff _).trans differentiable_at_arcsin
422
-
423
- @[simp] lemma deriv_arccos : deriv arccos = λ x, -(1 / sqrt (1 - x ^ 2 )) :=
424
- funext $ λ x, (deriv_const_sub _).trans $ by simp only [deriv_arcsin]
425
-
426
- lemma differentiable_on_arccos : differentiable_on ℝ arccos {-1 , 1 }ᶜ :=
427
- differentiable_on_arcsin.const_sub _
428
-
429
- lemma times_cont_diff_on_arccos {n : with_top ℕ} :
430
- times_cont_diff_on ℝ n arccos {-1 , 1 }ᶜ :=
431
- times_cont_diff_on_const.sub times_cont_diff_on_arcsin
432
-
433
- lemma times_cont_diff_at_arccos_iff {x : ℝ} {n : with_top ℕ} :
434
- times_cont_diff_at ℝ n arccos x ↔ n = 0 ∨ (x ≠ -1 ∧ x ≠ 1 ) :=
435
- by refine iff.trans ⟨λ h, _, λ h, _⟩ times_cont_diff_at_arcsin_iff;
436
- simpa [arccos] using (@times_cont_diff_at_const _ _ _ _ _ _ _ _ _ _ (π / 2 )).sub h
437
-
438
287
end real
0 commit comments