# Generalized nested sine function [closed]

As sine functions are nested more and more in manner shown below, the shape of the function approaches that of a square wave. \begin{align} f^1(x)&=\sin(x)\\ f^2(x)&=\sin(\,\sin(x)\,)\\ f^3(x)&=\sin(\,\sin(\,\sin(x)\,)\,)\\ \end{align} Is it possible to define $$f^n(x)$$ where $$n$$ can be any rational number?

• How about negative $n$? Say, $n=-1$. Also $n$ is an integer and cannot denote an arbitrary rational number. Dec 1 '21 at 11:49
• I don't understand the motivation behind this question. Dec 1 '21 at 12:11
• Begin by asking you if there is an $f$ such that $f(f(x))=\sin(x)$... which is called a functional square root or half iterate. Dec 1 '21 at 12:24
• For issues concerning non-integer composition iterations, see the questions under the tab fractional-iteration in mathoverflow and a google search for fractional + iteration + function. For a reference that gives a fairly detailed survey of its origins in the late 1800s, see my answer to Is fractional inverse of a function a known thing? Dec 1 '21 at 14:17

There may be other extensions of $$\sin^n$$, but this one is fairly straightforward to compute. Essentially, given integer $$n$$, construct a Maclaurin polynomial for $$\sin^n(x)$$ centered at $$x=0$$. To do this, we need to compute $$M_p(n)=(-1)^p\frac{d^{2p+1}}{dx^{2p+1}}\sin^n(x)\mid_{x=0}$$. It turns out that given some $$p$$, $$M_p(n)$$ forms a polynomial in $$n$$ of degree $$p$$ (although I haven't proven this, it works for $$p\leq 3$$). This can be easily extended to any rational (or real) number by simply just plugging those numbers into the polynomial in $$n$$ which describes $$M_p(n)$$. Therefore, all you need to do is calculate $$M_p(0),M_p(1),\ldots,M_p(p-1),M_p(p)$$ for a total of $$p+1$$ points, which will determine the polynomial. Then, $$\sin^n(x)=\sum_{p=0}^{\infty} (-1)^pM_p(n)\frac{x^{2p+1}}{(2p+1)!}$$.

I have found $$M_p(n)$$ for $$p\leq 3$$. So far, the approximation for $$\sin^n(x)$$ around $$x=0$$ (which works for any real $$n$$) looks like: $$\sin^n(x\approx 0)=x-n\left(\frac{x^{3}}{3!}\right)+n\left(5n-4\right)\left(\frac{x^{5}}{5!}\right)-\frac{n\left(175n^{2}-336n+164\right)}{3}\left(\frac{x^{7}}{7!}\right)+O(x^9)$$

Edit: I just realized that because computing high derivatives of nested $$\sin$$ functions is computationally expensive, you can also compute that high derivative of a smaller composition of $$\arcsin$$ functions instead. So calculate $$M_p\left(-\left\lfloor \frac{p}{2}\right\rfloor\right),\ldots, M_p\left(\left\lceil \frac{p}{2}\right\rceil\right)$$, again for a total of $$p+1$$ points, where $$\sin^{-n}(x)=\arcsin^{n}(x)$$.

• The question asked how to extend to $n$ rational. It looks to me like you've shown how to compute for $n$ integer in an efficient way, am I missing something?
– Joe
Dec 1 '21 at 13:25
• @Joe I just edited it to try to make it more clear that the formula can be used for any real n, given that the taylor coefficients form polynomials in n, which it is easy to extend from the integers to the rationals or reals. Dec 1 '21 at 13:29
• Oh right, nice method! Apparently I'm having a slow brain day
– Joe
Dec 1 '21 at 13:31
• Beautiful answer! Dec 1 '21 at 16:00