# Fourier Series for a function that isn't 2pi periodic?

I've been studying Fourier Series and I think I have a decent understanding of it now, I can work out the Fourier series of most 2-pi periodic functions, however, I came across a question where the function was not 2-pi periodic, the period of the function was '-2 <= x <= 2'.

I've haven't yet figured out how to tackle a question set out like this. I'm just wondering if anyone can explain how to obtain the Fourier series for a function that isn't 2-pi periodic? What are the extra steps we have to take? My initial idea is that we try find a way to transform it into a 2-pi periodic function and then solve as normal but I'm not sure how I would achieve this.

Any help would be appreciated.

• An option is scaling the $x$-axis, so that your function in $[-2, 2]$ gets stretched a little bit to obtain an interval of size $2\pi$ Commented May 6, 2021 at 12:22
• if $f$ has a period $T>0$, then the function $F(x):=f\left(\frac{Tx}{2\pi}\right)$ has period $2\pi$, so you can expand this in a Fourier series in the way you're comfortable with. Once you do that, note that $f(x)=F\left(\frac{2\pi x}{T}\right)$, so this gives you the Fourier series for $f$. Commented May 6, 2021 at 12:26
• @peek-a-boo I understand the first line you've written, however, I'm a bit confused when you say we can expand this in a Fourier Series. Do i replace the x in my initial function for 'Tx/2pi' and then solve normally? Commented May 6, 2021 at 12:30
• yes, that's what my first line is about, and that's the purpose of defining the new function $F$. Now, proceed normally; your results will be in terms of "the new function $F$". So, if you want to "revert back" to the original function $f$, then simply use $f(x)=F\left(\frac{2\pi x}{T}\right)$. If you're getting confused by the use of $x$ in so many places, feel free to use different letters (just keep in mind that math doesn't really care about which letters you fancy the most:) Commented May 6, 2021 at 12:34
• @peek-a-boo Ok, this makes a lot of sense, so just to clarify (sorry, just want to make sure I've got it right), first I need to transform my function into one that has a period of 2pi by using the transformation you defined. Then I substitute Tx/2pi into my function and solve as a normal Fourier Series. The interval would be (-pi,pi) correct? Since we made the function 2-pi periodic. Commented May 6, 2021 at 12:54

The functions $$\sin(2\pi nx/L)$$ and $$\cos(2 \pi nx/L)$$ have period of length $$L$$, and can be used to write a Fourier series for a function with period $$L$$.