Calculate the following integral: double integral over D
Calculate the following integral: $$ \iint_D \cos(x+y)\,dx\,dy, $$ where the region $D$ is bounded by the lines $x=0$, $y=\pi$, and $y=x$.
Explanation of Method
The triangle has vertices $(0,0)$, $(0,\pi)$, $(\pi,\pi)$. With $y$ as the outer variable, $x$ runs from $0$ to $y$; integrating $\cos(x+y)$ with respect to $x$ produces a difference of sines that then integrates cleanly over $y\in[0,\pi]$.
- Find the vertices of the triangular region.
- Integrate with respect to $x$ using $u=x+y$.
- Integrate the resulting $\sin(2y)-\sin y$ over $[0,\pi]$.
Step 1 · Identify the region
Intersections: $x=0$ with $y=x$ gives $(0,0)$; $x=0$ with $y=\pi$ gives $(0,\pi)$; $y=x$ with $y=\pi$ gives $(\pi,\pi)$. Vertices: $(0,0),(0,\pi),(\pi,\pi)$.
Step 2 · Set up the integral
For each $y\in[0,\pi]$, $x$ runs from $0$ to $y$:
$$ I = \int_0^{\pi}\int_0^{y} \cos(x+y)\,dx\,dy. $$
Step 3 · Integrate with respect to $x$
With $u=x+y$: $\displaystyle\int_0^{y}\cos(x+y)\,dx = \int_y^{2y}\cos u\,du = \Big[\sin u\Big]_y^{2y} = \sin(2y)-\sin y$.
Step 4 · Integrate with respect to $y$
$$ I = \int_0^{\pi}\sin(2y)\,dy - \int_0^{\pi}\sin y\,dy. $$
First: $\left[-\frac{\cos2y}{2}\right]_0^{\pi} = -\frac{\cos2\pi}{2}+\frac{\cos0}{2} = -\frac12+\frac12=0$.
Second: $\Big[-\cos y\Big]_0^{\pi} = -\cos\pi+\cos0 = 1+1=2$.
Step 5 · Combine the results
$$ I = 0 - 2 = -2. $$
Additional Notes
- The first piece, $\int_0^\pi\sin(2y)\,dy$, vanishes because $\sin(2y)$ completes a full oscillation over $[0,\pi]$.
Result
The solution to the integral is: