opus said:
Ok so then since k is the counting index from 1 to 4, and n = 4, then k is the the number of equal intervals throughout n (assuming regular partition)?
And let me clear this part up also before I confuse myself. Notation is always my weak point:
FactChecker said:
But it is also used to calculate the input to the cosine function for each term.
Say we are doing a summation and we are on something like ##i=2## where ##n=4##. For the ##i=2##, we aren't necessarily evaluated at ##i=2## but using a left-most or right-most point of the second interval that was evenly divided into ##n##? In other words, just because ##i=2##, it isn't always the case that the ##i## acts like an input ##x## that we plug in ##i## to the function and evaluate it.
I'm not quite sure I understood it correctly, it's a bit confusing. What we have is
$$
\underbrace{\frac{1}{n}}_{\text{factor from}\\ \text{arithmetic mean}} \cdot \underbrace{\sum_{i=1}^{i=n}}_{\text{counting index i}}\quad \underbrace{f(i,n)}_{\text{function values to be added;}\\ \text{possibly dependent}\\ \text{on counting variable i}\\ \text{and constants like n or }\pi}
\\
\frac{1}{4} \cdot \underbrace{\sum_{k=1}^4}_{\text{counting k}} \, \underbrace{\cos(\frac{k}{4}\cdot \pi)}_{\text{input k}}
$$
If the values ##v## we add
do not depend on "when" we add them, then we have ##\sum_{j=1}^N\,v=N\cdot v## simply "number added times value" as result.
Usually, the values ##v(j)## we add,
do depend on "when", i.e. are affected by the counting number, here ##j##. In this case the terms we add vary and we get as result ##\sum_{j=1}^{N}\,v(j)=v(1)+v(2)+\ldots +v(N)##.
What you have written was ##\sum_{k=1}^4\cos(\pi x)##. So the function value ##\cos(\pi x)## was constant! It did not vary, since all that varies is ##k## and the summand ##\cos(\pi x)## has no dependency on ##k##. Thus you had the case ##\sum_{j=1}^N\,v=N\cdot v=\sum_{k=1}^4\,v=4\cdot \cos(\pi x)=4\cos(\pi x)##.
However, you wanted to add ##\cos(\frac{1}{4}\pi)+\cos(\frac{2}{4}\pi)+\cos(\frac{3}{4}\pi)+\cos(\frac{4}{4}\pi)##. Therefore you had to choose the second case, a dependent ##v(k)=\cos(\frac{k}{4}\pi)##. The ##x## had no special meaning in your sum ##\sum_{k=1}^4\cos(\pi x)##, since it did not occur in the summation instruction. From the perspective of the summation ##\sum## it was a constant, just a simple unknown number.
P.S.: I wildly used different summation indices as ##i,j,k## to stress, that they are only valid within a certain summation instruction and which letter is used isn't of any importance. Only rule of course is, not to use more than one per summation. Sometimes we read ##\sum_{i,j} v(i,j)## but this is only an abbreviation for two sums: ##\sum_{i,j}v(i,j)=\sum_i \left(\sum_j v(i,j) \right)##.