# 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, $f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos nx + b_n \sin nx$ (we can think of $f$ as extended periodically).

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

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

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

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

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

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

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

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

Where, $A_n = a_n \cos (ny) + b_n\sin (ny)$ now find $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?