# compare some functions

Assume that I have three function:

sum1[n_] := Sum[Cos[k/n], {k, 0, n}]
sum2[n_] := Sum[Sin[k/n], {k, 0, 2n}]
sum3[n_] := Sum[Cos[k + 1/2n], {k, 0, 2n - 1}]


For each $n<100$, how can I compare these three function?

For example Mathematica tells me sum2[3]> sum1[3]>sum3[3] or sum3[5]>sum[5]>sum1[5].

• How about plotting them as a function of n? – bill s Oct 5 '17 at 13:33
• And @@ Table[sum2[n] > sum1[n] > sum3[n], {n, 1, 100}] evaluates to True – Bob Hanlon Oct 5 '17 at 14:40

DiscretePlot[{sum1[n], sum2[n], sum3[n]}, {n, 1, 100}]