Calculus · real student question

Evaluate the double integral of x*cos(x + y) over the triangle with vertices (0,0), (pi,0) and (pi,pi).

Question

Evaluate the double integral of xcos(x+y)x\cos(x+y) over the triangular region with vertices (0,0)(0,0), (π,0)(\pi,0) and (π,π)(\pi,\pi).

Step-by-step solution

  1. Describe the triangle with inequalities. The three vertices are joined by y=0y=0, x=πx=\pi and y=xy=x, so the region is {0xπ, 0yx}\{0\le x\le\pi,\ 0\le y\le x\}. Integrating in yy first keeps the variable limits on the inside where they belong.

  2. Integrate in y. 0xcos(x+y)dy=[sin(x+y)]0x=sin2xsinx\int_0^{x}\cos(x+y)\,dy=\left[\sin(x+y)\right]_0^{x}=\sin 2x-\sin x, so the inner result carries the factor xx out front: x(sin2xsinx)x\left(\sin 2x-\sin x\right).

  3. Split into two standard integrals. 0πxsin2xdx\int_0^{\pi}x\sin 2x\,dx and 0πxsinxdx\int_0^{\pi}x\sin x\,dx, both handled by parts with u=xu=x.

  4. Evaluate the first by parts. xsin2xdx=xcos2x2+sin2x4\int x\sin 2x\,dx=-\frac{x\cos 2x}{2}+\frac{\sin 2x}{4}. At x=πx=\pi this is π2-\frac{\pi}{2} (since cos2π=1\cos 2\pi=1, sin2π=0\sin 2\pi=0) and at x=0x=0 it is 00, so the value is π2-\frac{\pi}{2}.

  5. Evaluate the second by parts. xsinxdx=xcosx+sinx\int x\sin x\,dx=-x\cos x+\sin x. At x=πx=\pi this is π\pi (since cosπ=1\cos\pi=-1) and at x=0x=0 it is 00, so the value is π\pi.

  6. Combine with the minus sign. The integral is π2π=3π24.712389-\frac{\pi}{2}-\pi=-\frac{3\pi}{2}\approx -4.712389.

  7. Numerical check. Adaptive quadrature over the triangle returns 4.71238898-4.71238898, and 3π2=4.71238898-\frac{3\pi}{2}=-4.71238898, so the exact value is confirmed.

Answer

3π2-\frac{3\pi}{2}

Need to solve a different problem like this? Open the solver →