Artificial intelligent assistant

'Cosine'-esque function with flat peaks and valleys I came up with this function: $$2\left(\frac{1}{1+e^{\textstyle\frac{-6\sin^{-1}(\cos(x))}{\pi/2}}}-\frac12\right)$$ to mimic a 'cosine'-esque function with flat peaks and valleys. Here it is as plotted by Wolfram Alpha: !Wolfram Alpha plot of above function What I was wondering is, is there a more elegant way to achieve this effect? (The values the function outputs need not be the same as those of this function - it only needs to look cosine-esque and have flat peaks and valleys).

Well, if you accept $x^{1/25}$ as being defined for all real $x$ and giving a negative value when $x$ is negative, just take $$ f(x) = \left( \cos x \right)^{1/25} $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 77cd05a050ce1fe3117a3de910c2e010