Double integration, solution verification

I want to calculate the integral of

$f(x,y)=xy-3\cos(x+y)$ over the set

$A=\{(x,y)\in\mathbb{R}^2: 0\leq x,y~~\text{and}~~ x+y\leq\pi\}$.

The main reason I ask is to check if I have interpreted the boundaries of the integrals correctly. The calculation it self does not need to be checked, as it should be correct.

$\int_0^\pi\int_0^{\pi-x} xy-\cos(x+y) \,dy\,dx=\frac16\pi^4$.

Thanks in advance.


Solution 1:

Yes.$$\{\langle x,y\rangle\in\Bbb R^2:0\leq x~, 0\leq y~, x+y\leq\pi\}=\{\langle x,y\rangle\in\Bbb R^2:0\leq x\leq\pi~, 0\leq y\leq\pi-x\}$$

Solution 2:

As I mentioned in comments, your bounds are correct but you have not evaluated the integral correctly.

$ \displaystyle \int_0^\pi\int_0^{\pi-x} (xy - \cos(x+y)) ~dy ~dx$

$ \displaystyle \int_0^\pi\int_0^{\pi-x} xy ~dy ~dx = \frac{\pi^4}{24}$

$ \displaystyle \int_0^\pi\int_0^{\pi-x} - \cos(x+y) ~dy ~dx$

$ = \displaystyle \int_0^\pi \left[- \sin(x+y)\right]_{y=0}^{y=\pi-x} ~dx$

$ = \displaystyle \int_0^{\pi} \sin x ~dx = \left[- \cos x\right]_{0}^{\pi} = 2$

So the answer should be $ \displaystyle 2 + \frac{\pi^4}{24}$