pls help me just giv the formula for Ao An and Bn
Your title said "solve for a and b" but the body says "just giv the formula for Ao An and Bn" without saying what "a", "b", "Ao", "An", or "Bn" are.
I think the problem is not so much the formulas, which I suspect you have in your textbook, as understanding what the problem is asking, so I am going to do a lot more than "giv the formula"!
The function does NOT, strictly speaking, have "sine" and "cosine" Fourier series or any Fourier series at all! Only periodic functions have Fourier series so you have to fill in the part where the given function is 0 in a periodic way.
But there are many ways doing that and the result depends on how you do that.
Since sine is an odd function, if you define this new function so it is a periodic odd function, you will get the sine series. Since cosine is an even function, if you define this new function so it is a periodic even function, you will get the cosine series.
Draw the graph of y= 1- x just between 0 and 1. Now reflect it through the y-axis so you get a "triangle". This is now an even function: y(x)= 1- x for x between 0 and 1, x-1 for x between -1 and 0. Repeating that "triangle" now gives an even periodic function with period 1- (-1)= 2.
Draw the graph of y= 1-x between 0 and 1 again but now reflect it through the origin. For this particular function that will give just y= 1- x for x from -1 to 1. Repeating it gives an odd periodic function with period 2.
If f(x) is a function with period from -a to a, so it has period 2a, then the coefficient of the term is
where C is a "normalizing factor", chosen so that if f(x) were equal to itself, the coefficient would be just 1: We must have .
The coefficient of the term is essentially the same:
If n=0 then sin(0)= 0 but cos(0)= 1 so there is no "0" sine term but there is a "0" cosine term. It's cofficient is given by
where, now, .
Those are the "Bn", "An", and "A0", respectively.
With the choice of odd continuation, as above, both An and A0 will be 0. With the choice of even continuation, Bn will be 0.