User:LucasVB/Square sine and cosine functions



The square sine and square cosine functions are akin to their trigonometric counterparts, but instead of defining an unit circle, they define a square of "radius" 1 (that is, side 2). I'm not sure if such functions are already properly defined in the mathematical community, but I never heard of them. I doubt I'm the first to toy with this concept, though.

The square sine ("sinsk") can be written as:


 * $$\mbox{sinsq}(x) = \mbox{PP}_4(x) \sin(x)$$

The square cosine ("cosk") is defined as:
 * $$\mbox{cossq}(x) = \mbox{PP}_4(x) \cos(x)$$

The function $$\mbox{PP}_{n}(x) = \sec(\tfrac{2}{n}\sin^{-1}(\sin(\tfrac{n}{2}x)))$$ gives the radius for a n-sided polygon at the angle x. In other words, $$\mbox{PP}_n(x)$$ is the "polar polygon function". N-gon sine/cosine functions are analogous. As n increases, the functions will approach the circular sine and cosines.

Approximations
An interesting approximation can be done by using iterated trigonometric functions:

Define a function ts such as:
 * $$\mbox{ts}_0(x) = x$$
 * $$\mbox{ts}_1(x) = \tan(\sin(x))$$
 * $$\mbox{ts}_n(x) = \tan(\sin(\mbox{ts}_{n-1}(x)))$$

The square sine can then be approximated by:


 * $$\mbox{sinsq}(x) \approx \frac{2}{\pi} \mbox{ts}_7(x) $$

Which gives a smooth curve that differs no more than 0.1082300356377... from the square sine. I wonder if there's a better approximation...