This is probably going to be one of those questions where I can't believe I was so dumb but...What I'm trying to do is calculate the fourier series of some function. This is okay, but I'm having a problem with my integral.

In the fourier series Ao is given by

The fourier series I'm attempting to calculate is for

for

Let us note that this function is even

So Ao should simplify to

We then plug in the values and obtain

evaluated from 0-->2

This of course yields

Now, I was fiddling with this. And had I not changed my integral I get a different answer.

evaluted from -2-->2

I'm sure that I have violated some law in the second evaluation, i don't remember what is is though. Is this because the equation isn't valid on the left side of the XY domain and that the derivative at 0 doesn't exist? I think I vaguely remember something about this from first year.