Documentation

Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan

The arctan function. #

Inequalities, identities and Real.tan as an OpenPartialHomeomorph between (-(ฯ€ / 2), ฯ€ / 2) and the whole line.

The result of arctan x + arctan y is given by arctan_add, arctan_add_eq_add_pi or arctan_add_eq_sub_pi depending on whether x * y < 1 and 0 < x. As an application of arctan_add we give four Machin-like formulas (linear combinations of arctangents equal to ฯ€ / 4 = arctan 1), including John Machin's original one at four_mul_arctan_inv_5_sub_arctan_inv_239.

theorem Real.tan_add {x y : โ„} (h : ((โˆ€ (k : โ„ค), x โ‰  (2 * โ†‘k + 1) * Real.pi / 2) โˆง โˆ€ (l : โ„ค), y โ‰  (2 * โ†‘l + 1) * Real.pi / 2) โˆจ (โˆƒ (k : โ„ค), x = (2 * โ†‘k + 1) * Real.pi / 2) โˆง โˆƒ (l : โ„ค), y = (2 * โ†‘l + 1) * Real.pi / 2) :
tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
theorem Real.tan_add' {x y : โ„} (h : (โˆ€ (k : โ„ค), x โ‰  (2 * โ†‘k + 1) * Real.pi / 2) โˆง โˆ€ (l : โ„ค), y โ‰  (2 * โ†‘l + 1) * Real.pi / 2) :
tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
theorem Real.tan_sub {x y : โ„} (h : ((โˆ€ (k : โ„ค), x โ‰  (2 * โ†‘k + 1) * Real.pi / 2) โˆง โˆ€ (l : โ„ค), y โ‰  (2 * โ†‘l + 1) * Real.pi / 2) โˆจ (โˆƒ (k : โ„ค), x = (2 * โ†‘k + 1) * Real.pi / 2) โˆง โˆƒ (l : โ„ค), y = (2 * โ†‘l + 1) * Real.pi / 2) :
tan (x - y) = (tan x - tan y) / (1 + tan x * tan y)
theorem Real.tan_sub' {x y : โ„} (h : (โˆ€ (k : โ„ค), x โ‰  (2 * โ†‘k + 1) * Real.pi / 2) โˆง โˆ€ (l : โ„ค), y โ‰  (2 * โ†‘l + 1) * Real.pi / 2) :
tan (x - y) = (tan x - tan y) / (1 + tan x * tan y)
theorem Real.tan_two_mul {x : โ„} :
tan (2 * x) = 2 * tan x / (1 - tan x ^ 2)
theorem Real.continuous_tan :
Continuous fun (x : โ†‘{x : โ„ | cos x โ‰  0}) => tan โ†‘x

Real.tan as an OrderIso between (-(ฯ€ / 2), ฯ€ / 2) and โ„.

Equations
    Instances For
      noncomputable def Real.arctan (x : โ„) :

      Inverse of the tan function, returns values in the range -ฯ€ / 2 < arctan x and arctan x < ฯ€ / 2

      Equations
        Instances For
          theorem Real.arctan_tan {x : โ„} (hxโ‚ : -(Real.pi / 2) < x) (hxโ‚‚ : x < Real.pi / 2) :
          arctan (tan x) = x
          theorem Real.sin_sq_arctan (x : โ„) :
          sin (arctan x) ^ 2 = x ^ 2 / (1 + x ^ 2)
          @[deprecated Real.arctan_strictMono (since := "2025-10-20")]
          theorem Real.arctan_lt_arctan {x y : โ„} (hxy : x < y) :
          @[deprecated Real.arctan_mono (since := "2025-10-20")]
          theorem Real.arctan_le_arctan {x y : โ„} (hxy : x โ‰ค y) :
          theorem Real.arctan_add {x y : โ„} (h : x * y < 1) :
          arctan x + arctan y = arctan ((x + y) / (1 - x * y))
          theorem Real.arctan_add_eq_add_pi {x y : โ„} (h : 1 < x * y) (hx : 0 < x) :
          arctan x + arctan y = arctan ((x + y) / (1 - x * y)) + Real.pi
          theorem Real.arctan_add_eq_sub_pi {x y : โ„} (h : 1 < x * y) (hx : x < 0) :
          arctan x + arctan y = arctan ((x + y) / (1 - x * y)) - Real.pi
          theorem Real.two_mul_arctan {x : โ„} (hโ‚ : -1 < x) (hโ‚‚ : x < 1) :
          2 * arctan x = arctan (2 * x / (1 - x ^ 2))
          theorem Real.two_mul_arctan_add_pi {x : โ„} (h : 1 < x) :
          2 * arctan x = arctan (2 * x / (1 - x ^ 2)) + Real.pi
          theorem Real.two_mul_arctan_sub_pi {x : โ„} (h : x < -1) :
          2 * arctan x = arctan (2 * x / (1 - x ^ 2)) - Real.pi

          John Machin's 1706 formula, which he used to compute ฯ€ to 100 decimal places.

          Real.tan as an OpenPartialHomeomorph between (-(ฯ€ / 2), ฯ€ / 2) and the whole line.

          Equations
            Instances For