Evaluation of the double integral

37 Views Asked by At

Let $A = [0, 1] \times [0, 1] \to \mathbb{R}^2$. Evaluate: $$\iint\limits_{A} \cos(\pi \max\{x, y\})\, dx dy$$

Answer: $-\dfrac{4}{\pi^2}$

Writing the given integral as $$\iint\limits_{A} \cos(\pi \max\{x, y\}) dx dy = \int_{x=0}^1\int_{y=0}^x \cos(\pi x) \,dy dx + \int_{y=0}^1\int_{x=0}^y \cos(\pi y)\, dx dy$$

Is my approach correct? But answer coming is $\frac{4}{\pi^2}$. Any discrepancy?