It is neither even nor odd.
Find the half range fourier cosine and sine series for for
1) Firstly, I would like to know whether this is an even or odd function before I evaluate the half range Sine / Cosine Series
My attempt: f(x)=f(-x) implies even fn, therefore
, replace x with -x giving
I attempt to start of with Is this correct so far?
Well, L = pi/2. Use the right L, and you should be on the right track.
The function is neither even nor odd. But the function isn't even defined from -pi/2 to 0 so it wasn't capable of being even or odd in the first place. What we can do is extend f so that it is defined from -pi/2 to 0 in a manner such that the extended function is even. That is, define f_1(x) such that f_1(x) = f(x) for 0 < x < pi/2 and f_1(-x) = f(x) for -pi/2 < x < 0. So f_1 is even and f_1 agrees exactly with f over the interval of interest (0 < x < pi/2). Now compute the Fourier series coefficients for f_1. Since f_1 is even, its Fourier series expansion only contains cosine terms. The integral you have written for a_n will give you those coefficients, provided you use the correct L. The Fourier series for f_1 is what you are calling the half range cosine series.
Of course, you could also extend f to make it an odd function. That is, you could define f_2(x) = f(x) for 0 < x < pi/2, and f_2(-x) = -f(x) for -pi/2 < x < 0. The Fourier series for f_2 contains only sine terms and is what you are calling the half range sine series. (Most texts omit the "half range" part and just call these the Fourier Sine Series and Fourier Cosine Series).
And, it's worth noting that you can do this with any function that's defined only for 0 < x < L, that is, defined only for positive x. The function doesn't have to exhibit any sort of symmetry and only has to be reasonably well behaved (whatever the requirements are for a function to have a Fourier series expansion, I forget what exactly). You can extend the function to be either even or odd, and create a both a cosine and a sine series.
1) How is L =pi/2? From my notes by definition the period P =2L where P is given in this problem as pi/2 hence L=pi/4?
2) So is it not necessary to draw the function in extended format in order to find the solution because that is where I have the difficulty doing.
1. The extended versions of f range from -pi/2 < x < pi/2. Therefore the period is pi.
2. Although you can technically compute the coefficients by just blindly applying formulas, you should be able to draw the even/odd extensions just to make sure you really follow the concept. This guy does a pretty good job of explaining extensions: at around 46 minutes. To be more technically correct, you extend the function so that it is both even AND periodic (or odd and periodic to generate the sine series).