f(x)= modulus(x) over the interval(-pi,pi)

i have split the function into -x for (-pi,0)

and x for(0,pi)

i was wondering whether this was the right path to take i have figured out a0 to be pi

also I need a little direction on teh fourier series on f(x)=cos(ax) where a is NOT an integer therefore I am uncertain on what to do is teh question sayin a can be a rational number?