# Determine the fourier series

## Homework Statement

In the following problem I am trying to extend the function $$f(x) = x$$ defined on the interval $$(0,\pi)$$ into the interval $$(-\pi,0)$$ as a even function. Then I need to find the Fourier series of this function.

## The Attempt at a Solution

So I believe I have extending the function onto the interval $(-\pi,0)$ correctly below.
$$f(x) = -x, (-\pi,0)$$
I am having a little trouble understanding the question. I believe I need to find the Fourier series of this function which is now -x. Since the function is now an even function the Fourier series should just consist of the terms a_0 and a_n since b_n has sin attached to it making it a odd function and therefore making it 0
However I am a little confused what formula now to use,
should I use the following formulas? and if so what is L? once I get these matters figured out I can proceed myself with the calculations, thanks!
$$f(x) = \frac{a_0}{2} + \sum^{\infty}_{n=0} a_n cos(nx)$$
$$a_0 = \frac{2}{L} \int^L_0f(x)dx$$
$$a_n = \frac{2}{L}\int^L_0f(x)cos(\frac{n\pi x}{L})dx$$

Ray Vickson
Homework Helper
Dearly Missed

## Homework Statement

In the following problem I am trying to extend the function $$f(x) = x$$ defined on the interval $$(0,\pi)$$ into the interval $$(-\pi,0)$$ as a even function. Then I need to find the Fourier series of this function.

## The Attempt at a Solution

So I believe I have extending the function onto the interval $(-\pi,0)$ correctly below.
$$f(x) = -x, (-\pi,0)$$
I am having a little trouble understanding the question. I believe I need to find the Fourier series of this function which is now -x. Since the function is now an even function the Fourier series should just consist of the terms a_0 and a_n since b_n has sin attached to it making it a odd function and therefore making it 0
However I am a little confused what formula now to use,
should I use the following formulas? and if so what is L? once I get these matters figured out I can proceed myself with the calculations, thanks!
$$f(x) = \frac{a_0}{2} + \sum^{\infty}_{n=0} a_n cos(nx)$$
$$a_0 = \frac{2}{L} \int^L_0f(x)dx$$
$$a_n = \frac{2}{L}\int^L_0f(x)cos(\frac{n\pi x}{L})dx$$
The function ##f(x) = x##, for ##x \in (0,\pi)##, extends as an even function to ##(-\pi,0)## just by using $$f(x) = |x|, \; x \in (-\pi,\pi).$$

The general formula is
$$a_n = \frac{1}{L} \int_{-L}^L f(x) \cos \left( \frac{n \pi x}{L} \right) \, dx,$$
but that becomes what you wrote above when ##f(x)## is an even function.