How to find The Fourier series of $f(x,y)=x|y|+\cos^2(x+2y)$

206 Views Asked by At

I'm trying to find the fourier series of $f(x,y)=x|y|+\cos^2(x+2y)$ where $-\pi <x,y<\pi$

my tryings:

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

the co-efficients:

$$a_n(y)=\frac{1}{\pi}\int^{\pi}_{-\pi}f(x,y)\cos(nx)dx$$ $$b_n(y)=\frac{1}{\pi}\int^{\pi}_{-\pi}f(x,y)\sin(nx)dx$$ and then

$$a_n(y)=\frac{1}{2}a_{n0}+\sum_{m=1}^\infty [ a_{nm}\cos(my)+b_{nm}\sin(my)]$$ $$b_n(y)=\frac{1}{2}c_{n0}+\sum_{m=1}^\infty [ c_{nm}\cos(my)+d_{nm}\sin(my)]$$

where

$$a_{nm}=\frac{1}{\pi^2}\int^{\pi}_{-\pi}\int^{\pi}_{-\pi}f(x,y)\cos(nx)\cos(my)dxdy$$ $$b_{nm}=\frac{1}{\pi^2}\int^{\pi}_{-\pi}\int^{\pi}_{-\pi}f(x,y)\cos(nx)\sin(my)dxdy$$ $$c_{nm}=\frac{1}{\pi^2}\int^{\pi}_{-\pi}\int^{\pi}_{-\pi}f(x,y)\sin(nx)\cos(my)dxdy$$ $$d_{nm}=\frac{1}{\pi^2}\int^{\pi}_{-\pi}\int^{\pi}_{-\pi}f(x,y)\sin(nx)\sin(my)dxdy$$

but it became more compicated to take these integral to me. Isn't it correct way to solve this enter image description here

or this one is the correct integral? I cant find any example like this one.( searched 2d fourier, multiple variable fourier, double fourier etc.)