4.8 Complex trigonometric functions
The standard trigonometric functions are supported for complex numbers.
complex
cos
(complex z)
Return the complex cosine of z, which is
\[
\cos(z)
= \textrm{cosh}(z \, i)
= \frac{\displaystyle \exp(z \, i) + \exp(-z \, i)}
{\displaystyle 2}.
\]
Available since 2.28
complex
sin
(complex z)
Return the complex sine of z,
\[
\sin(z)
= -\textrm{sinh}(z \, i) \, i
= \frac{\displaystyle \exp(z \, i) - \exp(-z \, i)}
{\displaystyle 2 \, i}.
\]
Available since 2.28
complex
tan
(complex z)
Return the complex tangent of z,
\[
\tan(z)
= -\textrm{tanh}(z \, i) \, i
= \frac{(\exp(-z \, i) - \exp(z \, i)) \, i}
{\exp(-z \, i) + \exp(z \, i)}.
\]
Available since 2.28
complex
acos
(complex z)
Return the complex arc (inverse) cosine of z,
\[
\textrm{acos}(z)
= \frac{1}{2} \pi + \log (z \, i + \sqrt{1 - z^2}) \, i.
\]
Available since 2.28
complex
asin
(complex z)
Return the complex arc (inverse) sine of z,
\[
\text{asin}(z)
= -\log(z \, i + \sqrt{1 - z^2}) \, i.
\]
Available since 2.28
complex
atan
(complex z)
Return the complex arc (inverse) tangent of z,
\[
\text{atan}(z)
= - \frac{1}{2} (\log(1 - z \, i) - \log(1 + z \, i)) \, i.
\]
Available since 2.28