# Squigonometry

Squigonometry or p-trigonometry is a branch of mathematics that extends traditional trigonometry to shapes other than circles, particularly to squircles, in the p-norm. Unlike trigonometry, which deals with the relationships between angles and side lengths of triangles and uses trigonometric functions, squigonometry focuses on analogous relationships within the context of a unit squircle.
Squigonometric functions are mostly used to solve certain indefinite integrals, using a method akin to trigonometric substitution.:$^{:99–100}$ This approach allows for the integration of functions that are otherwise computationally difficult to handle.
Squigonometry has been applied to find expressions for the volume of superellipsoids, such as the superegg.$^{:100–101}$

## Etymology

The term squigonometry is a portmanteau of squircle and trigonometry. The first use of the term "squigonometry" is undocumented: the coining of the word possibly emerged from mathematical curiosity and the need to solve problems involving squircle geometries. As mathematicians sought to generalize trigonometric ideas beyond circular shapes, they naturally extended these concepts to squircles, leading to the creation of new functions.
Nonetheless, it is well established that the idea of parametrizing curves that aren't perfect circles has been around for around 300 years. Over the span of three centuries, many mathematicians have thought about using functions similar to trigonometric functions to parameterize these generalized curves.

## Squigonometric functions
### Cosquine and squine
#### Definition through unit squircle

The cosquine and squine functions, denoted as $\operatorname {cq} _{p}(t)$ and $\operatorname {sq} _{p}(t),$ can be defined analogously to trigonometric functions on a unit circle, but instead using the coordinates of points on a unit squircle, described by the equation:
    $|x|^{p}+|y|^{p}=1$
where $p$ is a real number greater than or equal to 1. Here $x$ corresponds to $\operatorname {cq} _{p}(t)$ and $y$ corresponds to $\operatorname {sq} _{p}(t)$
Notably, when $p=2$, the squigonometric functions coincide with the trigonometric functions.

#### Definition through differential equations

Similarly to how trigonometric functions are defined through differential equations, the cosquine and squine functions are also uniquely determined by solving the coupled initial value problem
    ${\begin{cases}x'(t)=-|y(t)|^{p-1}\\y'(t)=|x(t)|^{p-1}\\x(0)=1\\y(0)=0\end{cases}}$
Where $x$ corresponds to $\operatorname {cq} _{p}(t)$ and $y$ corresponds to $\operatorname {sq} _{p}(t)$.

#### Definition through analysis

The definition of sine and cosine through integrals can be extended to define the squigonometric functions. Let $1<p<\infty$ and define a differentiable function $F_{p}:[0,1]\rightarrow {\mathbb {R} }$ by:
    $F_{p}(x)=\int _{0}^{x}{\frac {1}{{(1-t^{p})}^{\tfrac {p-1}{p}}}}\,dt$
Since $F_{p}$ is strictly increasing it is a one-to-one function on $[0,1]$ with range $[0,\pi _{p}/2]$, where $\pi _{p}$ is defined as follows:
    $\pi _{p}=2\int _{0}^{1}{\frac {1}{{(1-t^{p})}^{\tfrac {p-1}{p}}}}\,dt$
Let $\operatorname {sq} _{p}$ be the inverse of $F_{p}$ on $[0,\pi _{p}/2]$. This function can be extended to $[0,\pi _{p}]$ by defining the following relationship:
    $\operatorname {sq} _{p}(x)=\operatorname {sq} _{p}(\pi _{p}-x)$
By this means $sq_{p}$ is differentiable in ${\mathbb {R} }$ and, corresponding to this, the function $cq_{p}$ is defined by:
    ${\frac {d}{dx}}\operatorname {sq} _{p}(x)=\operatorname {cq} _{p}(x)^{p-1}.$

### Tanquent, cotanquent, sequent and cosequent

The tanquent, cotanquent, sequent and cosequent functions can be defined as follows:$^{:96}$
    $\operatorname {tq} _{p}(t)={\frac {\operatorname {sq} _{p}(t)}{\operatorname {cq} _{p}(t)}}$
    $\operatorname {ctq} _{p}(t)={\frac {\operatorname {cq} _{p}(t)}{\operatorname {sq} _{p}(t)}}$
    $\operatorname {seq} _{p}(t)={\frac {1}{\operatorname {cq} _{p}(t)}}$
    $\operatorname {cseq} _{p}(t)={\frac {1}{\operatorname {sq} _{p}(t)}}$

### Inverse squigonometric functions

General versions of the inverse squine and cosquine can be derived from the initial value problem above. Let $x=cq_{p}(y)$; by the inverse function rule, ${\frac {dx}{dy}}=-[\operatorname {sq} _{p}(y)]^{p-1}=(1-x^{p})^{(p-1)/p}$. Solving for $y$ gives the definition of the inverse cosquine:
    $y=\operatorname {cq} _{p}^{-1}(x)=\int _{x}^{1}{\frac {1}{(1-t^{p})^{\frac {p-1}{p}}}}\,dt$
Similarly, the inverse squine is defined as:
    $\operatorname {sq} _{p}^{-1}(x)=\int _{0}^{x}{\frac {1}{(1-t^{p})^{\frac {p-1}{p}}}}\,dt$

### Multiple ways to approach Squigonometry

Other parameterizations of squircles give rise to alternate definitions of these functions. For example, Edmunds, Lang, and Gurka define ${\tilde {F}}_{p}(x)$ as:
${\tilde {F}}_{p}(x)=\int _{0}^{x}(1-t^{p})^{-(1/p)}\,dt$.
Since $F_{p}$ is strictly increasing it has a =n inverse which, by analogy with the case $p=2$, we denote by $\sin _{p}$. This is defined on the interval $[0,\pi _{p}/2]$, where ${\tilde {\pi }}_{p}$ is defined as follows:
${\tilde {\pi }}_{p}=2\int _{0}^{1}(1-t^{p})^{-(1/p)}\,dt$.
Because of this, we know that $\sin _{p}$ is strictly increasing on $[0,{\tilde {\pi }}_{p}/2]$, $\sin _{p}(0)=0$ and $\sin _{p}({\tilde {\pi }}_{p}/2)=1$. We extend $\sin _{p}$ to $[0,{\tilde {\pi }}_{p}]$ by defining:
$\sin _{p}(x)=\sin _{p}({\tilde {\pi }}_{p}-x)$ for $x\in [{\tilde {\pi }}_{p}/2,{\tilde {\pi }}_{p}]$ Similarly $\cos _{p}(x)=(1-(\sin _{p}(x))^{p})^{\frac {1}{p}}$.
Thus $\cos _{p}$ is strictly decreasing on $[0,{\tilde {\pi }}_{p}/2]$, $\cos _{p}(0)=1$ and $\cos _{p}({\tilde {\pi }}_{2}/2)=0$. Also:
$|\sin _{p}x|^{p}+|\cos _{p}x|^{p}=1$ .
This is immediate if $x\in [0,{\tilde {\pi }}/2]$, but it holds for all $x\in \mathbb {R}$ in view of symmetry and periodicity.

## Applications
### Solving integrals

Squigonometric substitution can be used to solve integrals, such as integrals in the generic form $I=\int ({1-t^{p}})^{\frac {1}{p}}\,dt$.