your answer seems to have the wrong constant term
you should get 1/3 (a0 is 2/3 and you want half of it)
see the following page for explanation (take l = 1 in your problem)
half range fourier series of f(x) = x in (0,l)
for the deduction
put x = pi
for the formulae use http://keral2008.blogspot.com/2009/0...er-series.html