Shape of triangular wave function

340 Views Asked by At

A triangular wave function can be modelled as:

$$ f(x)= \frac{2}{\pi} \arcsin(\sin(\pi x)) $$

The above function can be simplified to the following, since $\sin$ and $\arcsin$ are inverses of each other:

$$ g(x)= 2x $$

Yet, when I plot $f(x)$ in a software such as Desmos I get the expected outcome of the triangular wave and not a linear relationship. Why does this happen?

1

There are 1 best solutions below

0
On

Note that the codomain of the $\arcsin$ is usually defined as $[-\pi/2, \pi/2]$. This means that $\arcsin$ is only the inverse of $\sin$ on this interval, which means that $g(x) = 2x$ only holds for $x\in [-1/2, 1/2]$.

For $x\in [1/2,3/2]$ you will get $g(x) = -2x+4$ and so on, so in general for $x\in[(n-1)/2, (n+1)/2]$ for some $n \in \mathbb Z$. you will get $$g(x) = (-1)^n (2x - 2n)$$ (if I didn't make any mistake), which is exactly a "triangle wave".

Note that nothing would hold you back to define the codomain of the $\arcsin$ as e.g. $[\pi/2, 3\pi/2]$, but you cannot define an inverse of the $\sin$-function for any larger interval. On a larger interval you're guarateed to have two values $u\neq v$ for which $\sin u = \sin v$. This means we cannot invert $\sin$ for such a larger interval.