Generalized Trigonometric Functions $$ \newcommand{\ce}{\color{TealBlue}} \newcommand{\co}{\color{VioletRed}} \newcommand{\cosk}[1]{\operatorname{\mathfrak{c}_{#1}}} \newcommand{\sink}[1]{\operatorname{\mathfrak{s}_{#1}}} \newcommand{\tank}[1]{\operatorname{\mathfrak{t}_{#1}}} \newcommand{\ck}{\cosk{k}} \newcommand{\sk}{\sink{k}} \newcommand{\tk}{\tank{k}} $$
This page documents how trigonometric functions generalize to elliptical trigonometry and hyperbolic trigonometry.
Preliminaries
Recall the power series expansions of the conventional trigonometric functions and their inverses.
Trigonometric Functions
For the conventional trigonometric functions, we have the following series:
$$ \begin{alignat}{9} e^{x} &= \sum_{n=0}^{\infty}{\frac{x^{n}}{n!}}\quad &&= {\ce 1} &&+ {\co x} &&+ {\ce \frac{x^{2}}{2!}} &&+ {\co \frac {x^{3}}{3!}} &&+ {\ce \frac {x^{4}}{4!}} &&+ {\co \frac {x^{5}}{5!}} &&+ {\ce \frac {x^{6}}{6!}} &&+ {\co \frac {x^{7}}{7!}} &&+ \cdots \\ \\ \cos(x) &= \sum_{n=0}^{\infty}{(-1)^n \frac{x^{2n}}{(2n)!}}\quad &&= {\ce 1} && &&- {\ce \frac{x^2} {2!}} && &&+ {\ce \frac {x^4} {4!}} && &&- {\ce \frac {x^6} {6!}} && &&+ \cdots \\ \sin(x) &= \sum_{n=0}^{\infty}{(-1)^n \frac{x^{2n+1}}{(2n+1)!}}\quad &&= &&+ {\co x} && &&- {\co \frac{x^{3}}{3!}} && &&+ {\co \frac {x^{5}}{5!}} && &&- {\co \frac {x^{7}}{7!}} &&+ \cdots \\ \\ \cosh(x) &= \sum_{n=0}^{\infty}{(+1)^n \frac{x^{2n}}{(2n)!}}\quad &&= {\ce 1} && &&+ {\ce \frac{x^2} {2!}} && &&+ {\ce \frac{x^4} {4!}} && &&+ {\ce \frac{x^6} {6!}} && &&+ \cdots \\ \sinh(x) &= \sum_{n=0}^{\infty}{(+1)^n \frac{x^{2n+1}}{(2n+1)!}}\quad &&= &&+ {\co x} && &&+ {\co \frac{x^3} {3!}} && &&+ {\co \frac{x^5} {5!}} && &&+ {\co \frac{x^7} {7!}} &&+ \cdots \end{alignat} $$
In particular, note how the series for $\cos$/$\cosh$ contain all the ${\ce even}$ powers and for $\sin$/$\sinh$ contain all the ${\co odd}$ powers.
For example, it follows directly that:
$$ e^{x} = \cosh(x) + \sinh(x) $$
And also:
$$ \begin{align*} \cosh(x) &= \frac{1}{2} \big(e^{x} + e^{-x}\big) \\ \\ \sinh(x) &= \frac{1}{2} \big(e^{x} - e^{-x}\big) \end{align*} $$
Inverse Trigonometric Functions
Furthermore, we have the following series, which converge for for $|x| < 1$:
$$ \begin{alignat}{8} \log(1+x) &= \sum_{n=0}^{\infty}{(-1)^{n} \frac{x^{n+1}}{n+1}}\quad &&= {\co x} &&- {\ce \frac{x^{2}}{2}} &&+ {\co \frac {x^{3}}{3}} &&- {\ce \frac {x^{4}}{4}} &&+ {\co \frac {x^{5}}{5}} &&- {\ce \frac {x^{6}}{6}} &&+ {\co \frac {x^{7}}{7}} &&+ \cdots \\ \\ \tan^{-1}(x) &= \sum_{n=0}^{\infty}{(-1)^{n} \frac{x^{2n+1}}{2n+1}}\quad &&= {\co x} && &&- {\co \frac{x^{3}}{3}} && &&+ {\co \frac {x^{5}}{5}} && &&- {\co \frac {x^{7}}{7}} &&+ \cdots \\ \\ \tanh^{-1}(x) &= \sum_{n=0}^{\infty}{(+1)^{n} \frac{x^{2n+1}}{2n+1}}\quad &&= {\co x} && &&+ {\co \frac{x^{3}}{3}} && &&+ {\co \frac {x^{5}}{5}} && &&+ {\co \frac {x^{7}}{7}} &&+ \cdots \end{alignat} $$
For example, it follows directly that:
$$ \tanh^{-1}(x) = \frac{1}{2} \big(\log(1+x)-\log(1-x)\big) $$
Generalization
Definitions
The power series above suggest a possible generalization:
$$ \begin{alignat}{9} \ck(x) &= \sum_{n=0}^{\infty}{(-k)^{n} \frac{x^{2n}}{(2n)!}} &&= {\ce 1} && &&- {\ce k\frac{x^2}{2!}} && &&+ {\ce k^{2}\frac {x^4} {4!}} && &&- {\ce k^{3}\frac {x^6} {6!}} && &&+ \cdots \\ \sk(x) &= \sum_{n=0}^{\infty}{(-k)^{n} \frac{x^{2n+1}}{(2n+1)!}} &&= &&+ {\co x} && &&- {\co k\frac{x^{3}}{3!}} && &&+ {\co k^{2}\frac{x^{5}}{5!}} && &&- {\co k^{3}\frac {x^{7}}{7!}} &&+ \cdots \end{alignat} $$
Note that from these power series, it follows immediately:
$$ \begin{align*} \mathfrak{c}_{+1}(x) &= \cos(x) \\ \mathfrak{s}_{+1}(x) &= \sin(x) \\ \\ \mathfrak{c}_{0}(x) &= 1 \\ \mathfrak{s}_{0}(x) &= x \\ \\ \mathfrak{c}_{-1}(x) &= \cosh(x) \\ \mathfrak{s}_{-1}(x) &= \sinh(x) \end{align*} $$
As in conventional trigonometry, we can define the tangent function as:
$$ \tk(x) = \frac{\sk(x)}{\ck(x)} $$
The power series are sufficient to define $\ck$ and $\sk$. However, in practice, for numerical computation it is convenient to define these functions in terms of the commonly available trigonometric functions:
$$ \begin{align*} \ck(x) &= \begin{cases} \cos(\sqrt{k}\,x) & {\text{if }}k>0, \\ 1 & {\text{if }}k=0, \\ \cosh(\sqrt{-k}\,x) & {\text{if }}k<0. \end{cases} \\ \\ \sk(x) &= \begin{cases} \frac{1}{\sqrt{k}} \sin(\sqrt{k}\,x) & {\text{if }}k>0, \\ x & {\text{if }}k=0, \\ \frac{1}{\sqrt{-k}} \sinh(\sqrt{-k}\,x) & {\text{if }}k<0. \end{cases} \\ \\ \tk(x) &= \begin{cases} \frac{1}{\sqrt{k}} \tan(\sqrt{k}\,x) & {\text{if }}k>0, \\ x & {\text{if }}k=0, \\ \frac{1}{\sqrt{-k}} \tanh(\sqrt{-k}\,x) & {\text{if }}k<0. \end{cases} \end{align*} $$
The inverses of $\ck$, $\sk$, and $\tk$ can be computed as follows:
$$ \begin{align*} \ck^{-1}(x) &= \begin{cases} \frac{1}{\sqrt{k}} \cos^{-1}(x) & {\text{if }}k>0, \\ {\text{undefined}} & {\text{if }}k=0, \\ \frac{1}{\sqrt{-k}} \cosh^{-1}(x) & {\text{if }}k<0. \end{cases} \\ \\ \sk^{-1}(x) &= \begin{cases} \frac{1}{\sqrt{k}} \sin^{-1}(\sqrt{k}\,x) & {\text{if }}k>0, \\ x & {\text{if }}k=0, \\ \frac{1}{\sqrt{-k}} \sinh^{-1}(\sqrt{-k}\,x) & {\text{if }}k<0. \end{cases} \\ \\ \tk^{-1}(x) &= \begin{cases} \frac{1}{\sqrt{k}} \tan^{-1}(\sqrt{k}\,x) & {\text{if }}k>0, \\ x & {\text{if }}k=0, \\ \frac{1}{\sqrt{-k}} \tanh^{-1}(\sqrt{-k}\,x) & {\text{if }}k<0. \end{cases} \end{align*} $$
(Note: I first encountered these formulations in McRae.)
Identities
The generalized functions obey the following generalized "Pythagorean" identity:
$$ \ck(x)^{2} + k \sk(x)^{2} = 1 $$
The following angle addition/subtraction identities hold:
$$ \begin{align*} \ck(x \pm y) &= \ck(x) \ck(y) \mp k \sk(x) \sk(y) \\ \\ \sk(x \pm y) &= \sk(x) \ck(y) \pm \ck(x) \sk(y) \\ \\ \tk(x \pm y) &= \frac{\sk(x) \ck(y) \pm \ck(x) \sk(y)}{\ck(x) \ck(y) \mp k \sk(x) \sk(y)} = \frac{\tk(x) \pm \tk(y)}{1 \mp k \tk(x) \tk(y)} \end{align*} $$
The following angle multiplication/division identities hold:
$$ \begin{align*} \cosk{k}(xy) &= \cosk{kx^2}(y) = \cosk{ky^2}(x) \\ \\ \sink{k}(xy) &= x\sink{kx^2}(y) = y\sink{ky^2}(x) \\ \\ \tank{k}(xy) &= x\tank{kx^2}(y) = y\tank{ky^2}(x) \end{align*} $$
As special cases of the above, we have:
$$ \begin{align*} \cosk{k}(x) &= \cosk{kx^2}(1) \\ \\ \sink{k}(x) &= x\sink{kx^2}(1) \\ \\ \tank{k}(x) &= x\tank{kx^2}(1) \end{align*} $$
Derivatives
The derivatives of $\ck$, $\sk$, and $\tk$ are as follows:
$$ \begin{align*} \ck'(x) &= -k\sk(x) \\ \\ \sk'(x) &= \ck(x) \\ \\ \tk'(x) &= 1 + k\tk(x)^{2} \end{align*} $$
Plots
By plotting $\ck$ for varying values of $k$ we obtain:
By plotting $\sk$ for varying values of $k$ we obtain:
By plotting $\mathfrak{t}_{k}$ for varying values of $k$ we obtain:
Polar Coordinates
Let us consider the following parametric equation:
$$ \begin{pmatrix}x \\ y\end{pmatrix} = \begin{pmatrix}r\ck(\theta) \\ r\sk(\theta)\end{pmatrix} $$
With the aid of the generalized "Pythagorean" identity we can derive the implicit form by eliminating $\theta$:
$$x^{2} + k y^{2} = r^{2}$$
By setting $r^{2}=1$ and plotting this equation for varying values of $k$ we obtain:
As can be seen in the plot, resulting shapes are:
- Ellipses for $k>0$
- Paralell Line Pair for $k=0$
- Hyperbolas for $k<0$
Demos
Angles
The demo below illustrates the generalized concept of angles for varying values of $k$.
Polar Coordinates
The demo below shows the real (solid) and imaginary (dashed) unit circles for varying values of $k$ along with a point specified in polar coordinates.