Double Integral $\int\limits_0^\pi \int\limits_0^\pi|\cos(x+y)|\,dx\,dy$ First off, I apologize for any English mistakes.I've come across a double integral problem that I haven't been able to solve: Find 
$$\int_0^\pi \int_0^\pi|\cos(x+y)|\,dx\,dy$$
Intuitively, I thought it could be solved in a similar manner to what you would do for a regular integral with and absolute value. For example, to solve $\int_0^\pi |\cos(x)| \,dx$, you just take the interval where $\cos(x)$ is positive and multiply it by two:
$$\int_0^\pi |\cos(x)|\,dx = 2\int_0^{\frac{\pi}{2}} \cos(x) \, dx$$
So I naively assumed my initial problem could be solved in a similar manner, that is:
$$\int_0^\pi \int_0^\pi |\cos(x+y)| \,dx\,dy = 4\int_0^{\frac{\pi}{4}}\int_0^{\frac{\pi}{4}}\cos(x+y) \,dx\,dy$$
However, this does not give me the right answer. I'm not really sure how this integral is actually solved.
Thanks a lot for your help!

A handful of hints to get you started, each for different directions. 
Most require you to just use some alternative definition of $\cos(x)$, as mentioned in the comments...


*

*Use the piecewise definition of $\left|\cos(x+y)\right|$, and add together the separate integrands

*Note that if $x,y\in\Bbb R$, then $\left|\cos(x+y)\right|=\sqrt{\cos^2(x+y)}$

*$\cos(x+y)=\cos(x) \cos(y)-\sin(x) \sin(y)$

*You could always use the definition $\cos(x+y)=\frac 12 e^{-i x-i y}+\frac 12 e^{i x+i y} $, but that can end up being much more difficult.


Start with the first suggestion, though. Try to redefine the function as a piecewise one. Here's a basic example of how a simple integral of an absolute value works from Paul's Online Notes (example 5):
$$\int_0^3\left|3t-5\right|\mathrm{d}t=\int_0^{\frac 5 3} 5-3t\,\mathrm{d}t+\int_{\frac 5 3}^3 3t-5\,\mathrm{d}t$$
