f0(x) = 0.0
f1(x) = 2.0 * sin(x)
f2(x) = -sin(2.0 * x)
f3(x) = 2.0 / 3.0 * sin(3.0 * x)
f4(x) = -(2.0) / 4.0 * sin(4.0 * x)
f5(x) = 2.0 / 5.0 * sin(5.0 * x)
f6(x) = -(2.0) / 6.0 * sin(6.0 * x)
n = 0 (slider from 0 to 10, step 1)
f7(x) = 2.0 / 7.0 * sin(7.0 * x)
f8(x) = -(2.0) / 8.0 * sin(8.0 * x)
f9(x) = 2.0 / 9.0 * sin(9.0 * x)
f(x) = sgn(Max[0.0, n]) * f0(x) + sgn(Max[0.0, n - 1.0]) * f1(x) + sgn(Max[0.0, n - 2.0]) * f2(x) + sgn(Max[0.0, n - 3.0]) * f3(x) + sgn(Max[0.0, n - 4.0]) * f4(x) + sgn(Max[0.0, n - 5.0]) * f5(x) + sgn(Max[0.0, n - 6.0]) * f6(x) + sgn(Max[0.0, n - 7.0]) * f7(x) + sgn(Max[0.0, n - 8.0]) * f8(x) + sgn(Max[0.0, n - 9.0]) * f9(x)
dds(x) = ((x - 3.141592653589793) / (2.0 * 3.141592653589793) - floor((x - 3.141592653589793) / (2.0 * 3.141592653589793)) - 1.0 / 2.0) * 2.0 * 3.141592653589793
d(x) = dds(x) - f(x)