I have an equation built from obscure (step) functions, which I'd like to approximate in standard mathematical functions; it is quite lengthy and produces an odd geometric shape, which I cannot decipher:
Might someone assist me in finding an equation roughly following this shape? Many thanks.
EDIT:
By "non-obscure functions", I intended for any function built from standard operators (addition, subtraction, multiplication, division, powers) and trigonometric functions. The absolute value function may also be used, though it would be preferable if fractional part functions, sigma notation, etc. were not included - really anything seen below highschool-level precalculus.



$$y(x)= -\frac{1}{8}|\sin(\pi x)| +\frac{1}{2}\left(-(x-\lfloor x\rfloor )^2 -\lfloor x\rfloor )x^2 \right) -\frac{1}{2}(x-1)x $$ On the range $0<x<1 \qquad y(x)=f(x)=-\frac{1}{8}\sin(\pi x) -\frac{1}{2}(x-1)x$
Since the function is periodic, a method to accurately approximate it is the Fourier series : $$y(x)\simeq a_0 + \sum_{k=1}^{k=n} a_k \cos(2\pi k x)$$ No need for the sin terms because the function is even.
The values of the coefficients are computed with the next integrals : $$a_0=\int_0^1 f(x)dx = \int_0^1 \left(-\frac{1}{8}\sin(\pi x) -\frac{1}{2}(x-1)x \right)dx$$ $$a_k=2\int_0^1 f(x)\cos(2\pi k x)dx =2\int_0^1 \left(-\frac{1}{8}\sin(\pi x) -\frac{1}{2}(x-1)x \right)\cos(2\pi k x)dx$$
The deviations depend on the number of terms $n$.
For example, with $n=10$ , mean absolute error = $0.000077$
The maximum error lies around the integer values of $x$.
For example with $n=10$ :
$ ...=y(-2)=y(-1)=y(0)=y(1)=y(2)=...=0.001024\quad $ instead of $0$.