X = {0,1,2,2.5,3};
Y = {0,0.5,3,2,5};
T = 3.5;
len = Length[X];
plotPoints = ListPlot[Table[{X[[i]], Y[[i]]}, {i,0, len}],PlotRange -> {{-5, 5}, {0,7}}];
FD[x_]:= 2*Pi*x/T;
trigPoly[t_] := a0 + a1*Cos[t] + b1*Sin[t]+a2*Sin[2t]+b2*Cos[2t];
equations = Table[trigPoly[FD[X[[i]]]] == Y[[i]], {i, 1, len}];
coefficients = Solve[
equations, {a0, a1, b1,a2,b2}];
f[x_] = trigPoly[FD[x]] /. coefficients[[1]]
plotFunc = Plot[f[x], {x, -5, 5}];
Show[plotPoints, plotFunc]