the function you have defined is not even.
Comment 2: You refer to the period of 2L at the top, but its quite evident
that later you are working with period 2pi.
Comment 3: what do you think the expression "the first three terms" means
in this context. I would take the constant and the terms in cos(x) and sin(x),
even if some of them had zero as their coefficient. (this might give you an
even or odd function but it would still be correct for such a short series)
The first of your forms is correct.