Skip to content

Commit e549dc0

Browse files
committed
feat(Trigonometry): add tanh_eq (#32694)
Add `tanh_eq`, which is the counterpart of `sinh_eq` and `cosh_eq`.
1 parent 255f610 commit e549dc0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Mathlib/Analysis/Complex/Trigonometric.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,10 @@ theorem cosh_sub : cosh (x - y) = cosh x * cosh y - sinh x * sinh y := by
732732
nonrec theorem tanh_eq_sinh_div_cosh : tanh x = sinh x / cosh x :=
733733
ofReal_inj.1 <| by simp [tanh_eq_sinh_div_cosh]
734734

735+
/-- The definition of `tanh` in terms of `exp`. -/
736+
theorem tanh_eq (x : ℝ) : tanh x = (exp x - exp (-x)) / (exp x + exp (-x)) := by
737+
rw [tanh_eq_sinh_div_cosh, sinh_eq, cosh_eq, div_div_div_cancel_right₀ two_ne_zero]
738+
735739
@[simp]
736740
theorem tanh_zero : tanh 0 = 0 := by simp [tanh]
737741

0 commit comments

Comments
 (0)