# '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:

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).

-
When you say large peaks and valleys, do you mean flat peaks and valleys, or something else? –  soandos Jan 20 '12 at 3:47
Flat, yes. That's a better way of putting it. I'll edit my question to say this and to include the wolfram link. –  ro44 Jan 20 '12 at 3:48
The elegant way would be to use $f(\cos x)$ for any roughly S-shaped $f\colon [0,1] \to [0,1]$, like $(3t - t^3)/2$ or $\sin(\pi t/2)$. –  Rahul Jan 20 '12 at 3:50
Thanks, you can submit this as an answer Rahul. –  ro44 Jan 20 '12 at 3:53

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}$$

-

$$\sqrt{\frac{1+b^2}{1+b^2 \cos^2 v}}\cos\,v$$
where $b$ is an adjustable parameter?
How about $f(x) = \sin(\tfrac{\pi}{2}\cos(x))$?