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$.