# Thread: Fourier series no.2 :)

1. ## Fourier series no.2 :)

Hey guys.
So I have this function f(x) between -pi and pi.
I found the fourier series for it.
Now I need to find the fourier series for g(x). The problem is, I'm not sure about g(x), is it correct what I did?

2. Originally Posted by asi123
Hey guys.
So I have this function f(x) between -pi and pi.
I found the fourier series for it.
Now I need to find the fourier series for g(x). The problem is, I'm not sure about g(x), is it correct what I did?
Say that, $\displaystyle f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos nx + b_n \sin nx$ (we can think of $\displaystyle f$ as extended periodically).

This means,
$\displaystyle f(x+y) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos [n(x+y)] + b_n \sin [n(x+y)]$

But,
$\displaystyle \cos [n(x+y)] = \cos [nx + ny] = \cos (nx) \cos (ny) - \sin (nx) \sin (ny)$
$\displaystyle \sin [n(x+y)] = \sin [nx + ny] = \sin (nx) \cos (ny) + \cos (nx) \sin (ny)$

Therefore,
$\displaystyle g(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} A_n \cos (nx) + B_n \sin (nx)$

Where, $\displaystyle A_n = a_n \cos (ny) + b_n\sin (ny)$ now find $\displaystyle B_n$.

3. Originally Posted by ThePerfectHacker
Say that, $\displaystyle f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos nx + b_n \sin nx$ (we can think of $\displaystyle f$ as extended periodically).

This means,
$\displaystyle f(x+y) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos [n(x+y)] + b_n \sin [n(x+y)]$

But,
$\displaystyle \cos [n(x+y)] = \cos [nx + ny] = \cos (nx) \cos (ny) - \sin (nx) \sin (ny)$
$\displaystyle \sin [n(x+y)] = \sin [nx + ny] = \sin (nx) \cos (ny) + \cos (nx) \sin (ny)$

Therefore,
$\displaystyle g(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} A_n \cos (nx) + B_n \sin (nx)$

Where, $\displaystyle A_n = a_n \cos (ny) + b_n\sin (ny)$ now find $\displaystyle B_n$.
Thanks a lot.
Another thing, what about the complex "version".
Is it correct what I did in the pic?
I'm not sure about the last part, can I say that f and g are actually the same?

And another thing (last one).
a_n and b_n also depends on x (cos(nx), sin(nx)). is changing only the outside cos(nx) and sin(nx) is enough? shouldn't I also place x+y inside of a_n and b_n instead of the x or maybe to recalculate them using the c_n?