Антония Тихомирова Чекръкчиева Ф Номер 61564

Plot1=ListPlot[{{0,1},{1,5},{2,2},{3,4},{4,2}}]

n=2;
coeffA=Table[(Subscript[a, i]),{i,0,n}];
coeffB=Table[(Subscript[b, i]),{i,1,n}];
cosA=Table[Cos[k*x],{k,0,n}];
sinB=Table[Sin[k*x],{k,1,n}];
trigPoly[x_]=coeffA.cosA+coeffB.sinB

t=2Pi/5*x;
2Pi/5*0
2Pi/5*1
2Pi/5*2
2Pi/5*3
2Pi/5*4

r=NSolve[{trigPoly[0]==1,trigPoly[((2 π)/5)]==5,trigPoly[((4 π)/5)]==2, trigPoly[((6 π)/5)]==4,trigPoly[((8 π)/5)]==2}]

z=trigPoly[x]/.r

Plot2=Plot[z,{x,1,4}]

Show[{Plot1,Plot2}]

`