@@ -10,7 +10,7 @@ import data.complex.basic
10
10
# Exponential, trigonometric and hyperbolic trigonometric functions
11
11
12
12
This file contains the definitions of the real and complex exponential, sine, cosine, tangent,
13
- hyperbolic sine, hypebolic cosine, and hyperbolic tangent functions.
13
+ hyperbolic sine, hyperbolic cosine, and hyperbolic tangent functions.
14
14
15
15
-/
16
16
local notation `abs' ` := _root_.abs
@@ -609,6 +609,47 @@ by rw [← mul_right_inj' (@two_ne_zero' ℂ _ _ _), mul_sub,
609
609
lemma cosh_sq_sub_sinh_sq : cosh x ^ 2 - sinh x ^ 2 = 1 :=
610
610
by rw [sq_sub_sq, cosh_add_sinh, cosh_sub_sinh, ← exp_add, add_neg_self, exp_zero]
611
611
612
+ lemma cosh_square : cosh x ^ 2 = sinh x ^ 2 + 1 :=
613
+ begin
614
+ rw ← cosh_sq_sub_sinh_sq x,
615
+ ring
616
+ end
617
+
618
+ lemma sinh_square : sinh x ^ 2 = cosh x ^ 2 - 1 :=
619
+ begin
620
+ rw ← cosh_sq_sub_sinh_sq x,
621
+ ring
622
+ end
623
+
624
+ lemma cosh_two_mul : cosh (2 * x) = cosh x ^ 2 + sinh x ^ 2 :=
625
+ by rw [two_mul, cosh_add, pow_two, pow_two]
626
+
627
+ lemma sinh_two_mul : sinh (2 * x) = 2 * sinh x * cosh x :=
628
+ begin
629
+ rw [two_mul, sinh_add],
630
+ ring
631
+ end
632
+
633
+ lemma cosh_three_mul : cosh (3 * x) = 4 * cosh x ^ 3 - 3 * cosh x :=
634
+ begin
635
+ have h1 : x + 2 * x = 3 * x, by ring,
636
+ rw [← h1, cosh_add x (2 * x)],
637
+ simp only [cosh_two_mul, sinh_two_mul],
638
+ have h2 : sinh x * (2 * sinh x * cosh x) = 2 * cosh x * sinh x ^ 2 , by ring,
639
+ rw [h2, sinh_square],
640
+ ring
641
+ end
642
+
643
+ lemma sinh_three_mul : sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x :=
644
+ begin
645
+ have h1 : x + 2 * x = 3 * x, by ring,
646
+ rw [← h1, sinh_add x (2 * x)],
647
+ simp only [cosh_two_mul, sinh_two_mul],
648
+ have h2 : cosh x * (2 * sinh x * cosh x) = 2 * sinh x * cosh x ^ 2 , by ring,
649
+ rw [h2, cosh_square],
650
+ ring,
651
+ end
652
+
612
653
@[simp] lemma sin_zero : sin 0 = 0 := by simp [sin]
613
654
614
655
@[simp] lemma sin_neg : sin (-x) = -sin x :=
@@ -729,9 +770,32 @@ by rw [two_mul, sin_add, two_mul, add_mul, mul_comm]
729
770
lemma cos_square : cos x ^ 2 = 1 / 2 + cos (2 * x) / 2 :=
730
771
by simp [cos_two_mul, div_add_div_same, mul_div_cancel_left, two_ne_zero', -one_div]
731
772
773
+ lemma cos_square' : cos x ^ 2 = 1 - sin x ^ 2 :=
774
+ by { rw [←sin_sq_add_cos_sq x], simp }
775
+
732
776
lemma sin_square : sin x ^ 2 = 1 - cos x ^ 2 :=
733
777
by { rw [←sin_sq_add_cos_sq x], simp }
734
778
779
+ lemma cos_three_mul : cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x :=
780
+ begin
781
+ have h1 : x + 2 * x = 3 * x, by ring,
782
+ rw [← h1, cos_add x (2 * x)],
783
+ simp only [cos_two_mul, sin_two_mul, mul_add, mul_sub, mul_one, pow_two],
784
+ have h2 : 4 * cos x ^ 3 = 2 * cos x * cos x * cos x + 2 * cos x * cos x ^ 2 , by ring,
785
+ rw [h2, cos_square'],
786
+ ring
787
+ end
788
+
789
+ lemma sin_three_mul : sin (3 * x) = 3 * sin x - 4 * sin x ^ 3 :=
790
+ begin
791
+ have h1 : x + 2 * x = 3 * x, by ring,
792
+ rw [← h1, sin_add x (2 * x)],
793
+ simp only [cos_two_mul, sin_two_mul, cos_square'],
794
+ have h2 : cos x * (2 * sin x * cos x) = 2 * sin x * cos x ^ 2 , by ring,
795
+ rw [h2, cos_square'],
796
+ ring
797
+ end
798
+
735
799
lemma exp_mul_I : exp (x * I) = cos x + sin x * I :=
736
800
(cos_add_sin_I _).symm
737
801
@@ -853,15 +917,27 @@ lemma neg_one_le_cos : -1 ≤ cos x :=
853
917
lemma cos_two_mul : cos (2 * x) = 2 * cos x ^ 2 - 1 :=
854
918
by rw ← of_real_inj; simp [cos_two_mul]
855
919
920
+ lemma cos_two_mul' : cos (2 * x) = cos x ^ 2 - sin x ^ 2 :=
921
+ by rw ← of_real_inj; simp [cos_two_mul']
922
+
856
923
lemma sin_two_mul : sin (2 * x) = 2 * sin x * cos x :=
857
924
by rw ← of_real_inj; simp [sin_two_mul]
858
925
859
926
lemma cos_square : cos x ^ 2 = 1 / 2 + cos (2 * x) / 2 :=
860
927
of_real_inj.1 $ by simpa using cos_square x
861
928
929
+ lemma cos_square' : cos x ^ 2 = 1 - sin x ^ 2 :=
930
+ by { rw [←sin_sq_add_cos_sq x], simp }
931
+
862
932
lemma sin_square : sin x ^ 2 = 1 - cos x ^ 2 :=
863
933
eq_sub_iff_add_eq.2 $ sin_sq_add_cos_sq _
864
934
935
+ lemma cos_three_mul : cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x :=
936
+ by rw ← of_real_inj; simp [cos_three_mul]
937
+
938
+ lemma sin_three_mul : sin (3 * x) = 3 * sin x - 4 * sin x ^ 3 :=
939
+ by rw ← of_real_inj; simp [sin_three_mul]
940
+
865
941
/-- The definition of `sinh` in terms of `exp`. -/
866
942
lemma sinh_eq (x : ℝ) : sinh x = (exp x - exp (-x)) / 2 :=
867
943
eq_div_of_mul_eq two_ne_zero $ by rw [sinh, exp, exp, complex.of_real_neg, complex.sinh, mul_two,
@@ -894,23 +970,40 @@ by simp [sub_eq_add_neg, sinh_add, sinh_neg, cosh_neg]
894
970
lemma cosh_sub : cosh (x - y) = cosh x * cosh y - sinh x * sinh y :=
895
971
by simp [sub_eq_add_neg, cosh_add, sinh_neg, cosh_neg]
896
972
897
- lemma cosh_sq_sub_sinh_sq (x : ℝ) : cosh x ^ 2 - sinh x ^ 2 = 1 :=
898
- begin
899
- rw [sinh, cosh],
900
- have := congr_arg complex.re (complex.cosh_sq_sub_sinh_sq x),
901
- rw [pow_two, pow_two] at this ,
902
- change (⟨_, _⟩ : ℂ).re - (⟨_, _⟩ : ℂ).re = 1 at this ,
903
- rw [complex.cosh_of_real_im x, complex.sinh_of_real_im x, mul_zero, sub_zero, sub_zero] at this ,
904
- rwa [pow_two, pow_two],
905
- end
906
-
907
973
lemma tanh_eq_sinh_div_cosh : tanh x = sinh x / cosh x :=
908
974
of_real_inj.1 $ by simp [tanh_eq_sinh_div_cosh]
909
975
910
976
@[simp] lemma tanh_zero : tanh 0 = 0 := by simp [tanh]
911
977
912
978
@[simp] lemma tanh_neg : tanh (-x) = -tanh x := by simp [tanh, neg_div]
913
979
980
+ lemma cosh_add_sinh : cosh x + sinh x = exp x :=
981
+ by rw ← of_real_inj; simp [cosh_add_sinh]
982
+
983
+ lemma sinh_add_cosh : sinh x + cosh x = exp x :=
984
+ by rw ← of_real_inj; simp [sinh_add_cosh]
985
+
986
+ lemma cosh_sq_sub_sinh_sq (x : ℝ) : cosh x ^ 2 - sinh x ^ 2 = 1 :=
987
+ by rw ← of_real_inj; simp [cosh_sq_sub_sinh_sq]
988
+
989
+ lemma cosh_square : cosh x ^ 2 = sinh x ^ 2 + 1 :=
990
+ by rw ← of_real_inj; simp [cosh_square]
991
+
992
+ lemma sinh_square : sinh x ^ 2 = cosh x ^ 2 - 1 :=
993
+ by rw ← of_real_inj; simp [sinh_square]
994
+
995
+ lemma cosh_two_mul : cosh (2 * x) = cosh x ^ 2 + sinh x ^ 2 :=
996
+ by rw ← of_real_inj; simp [cosh_two_mul]
997
+
998
+ lemma sinh_two_mul : sinh (2 * x) = 2 * sinh x * cosh x :=
999
+ by rw ← of_real_inj; simp [sinh_two_mul]
1000
+
1001
+ lemma cosh_three_mul : cosh (3 * x) = 4 * cosh x ^ 3 - 3 * cosh x :=
1002
+ by rw ← of_real_inj; simp [cosh_three_mul]
1003
+
1004
+ lemma sinh_three_mul : sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x :=
1005
+ by rw ← of_real_inj; simp [sinh_three_mul]
1006
+
914
1007
open is_absolute_value
915
1008
916
1009
/- TODO make this private and prove ∀ x -/
0 commit comments