a_0

a_1

a_2

a_3

a_4

a_5

b_1

b_2

b_3

b_4

b_5

f(x) = a_0/2 + a_1 cos(x) + a_2 cos(2x) + ... + a_5 cos(5x) + b_1 sin(x) + b_2 sin(2x) + ... + b_5 sin(5x)

listea: {x = -7, x = -6, x = -5, x = -4, x = -3, x = -2}
A_0 = Point(listea)
A_1 = Point(listea)
A_2 = Point(listea)
A_3 = Point(listea)
A_4 = Point(listea)
A_5 = Point(listea)
G = Point(xAxis)
H = Point(xAxis)
I = Point(xAxis)
J = Point(xAxis)
K = Point(xAxis)
L = Point(xAxis)
g = Segment(H, A_1)
h = Segment(I, A_2)
i = Segment(J, A_3)
j = Segment(K, A_4)
k = Segment(L, A_5)
listeb: {x = 2, x = 3, x = 4, x = 5, x = 6}
B_1 = Point(listeb)
B_2 = Point(listeb)
B_3 = Point(listeb)
B_4 = Point(listeb)
B_5 = Point(listeb)
R = Point(xAxis)
S = Point(xAxis)
T = Point(xAxis)
U = Point(xAxis)
V = Point(xAxis)
p: y = 0
l = Segment(R, B_1)
m = Segment(S, B_2)
n = Segment(T, B_3)
q = Segment(U, B_4)
r = Segment(V, B_5)
s = Segment(G, A_0)
f(x) = y(A_0) / 2 + (y(A_1) * cos(x)) + (y(A_2) * cos((2 * x))) + (y(A_3) * cos((3 * x))) + (y(A_4) * cos((4 * x))) + (y(A_5) * cos((5 * x))) + (y(B_1) * sin(x)) + (y(B_2) * sin((2 * x))) + (y(B_3) * sin((3 * x))) + (y(B_4) * sin((4 * x))) + (y(B_5) * sin((5 * x)))