Calculus · real student question

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

Question

Evaluate

Rxcos(x+y)dA\iint_R x\cos(x+y)\,dA

where RR is the triangle with vertices (0,0)(0,0), (π,0)(\pi,0) and (π,π)(\pi,\pi).

Step-by-step solution

  1. Turn the three vertices into boundary equations. The side from (0,0)(0,0) to (π,0)(\pi,0) lies on y=0y=0; the side from (π,0)(\pi,0) to (π,π)(\pi,\pi) is the vertical line x=πx=\pi; the side from (0,0)(0,0) to (π,π)(\pi,\pi) is the line y=xy=x. So the triangle is the set of points with 0xπ0\le x\le\pi and 0yx0\le y\le x.

  2. Choose the order dydxdy\,dx. Integrating in yy first keeps the xx limits constant (00 to π\pi) and makes the yy limits the two simple functions 00 and xx. It also helps that xx is a constant during the inner integration, so the factor xx slides outside:

    0π ⁣ ⁣0xxcos(x+y)dydx.\int_0^\pi\!\!\int_0^x x\cos(x+y)\,dy\,dx.

  3. Do the inner integral. With xx fixed, cos(x+y)dy=sin(x+y)\int\cos(x+y)\,dy=\sin(x+y):

    x[sin(x+y)]y=0y=x=x(sin2xsinx).x\Big[\sin(x+y)\Big]_{y=0}^{y=x}=x\big(\sin 2x-\sin x\big).

  4. Handle 0πxsin2xdx\int_0^\pi x\sin 2x\,dx by parts. Take u=xu=x, dv=sin2xdxdv=\sin 2x\,dx, so du=dxdu=dx and v=cos2x2v=-\tfrac{\cos 2x}{2}:

    [xcos2x2]0π+120πcos2xdx=π2+[sin2x4]0π=π2.\left[-\frac{x\cos 2x}{2}\right]_0^\pi+\frac12\int_0^\pi\cos 2x\,dx=-\frac{\pi}{2}+\left[\frac{\sin 2x}{4}\right]_0^\pi=-\frac{\pi}{2}.

  5. Handle 0πxsinxdx\int_0^\pi x\sin x\,dx the same way. With u=xu=x, v=cosxv=-\cos x:

    [xcosx]0π+0πcosxdx=π+[sinx]0π=π.\Big[-x\cos x\Big]_0^\pi+\int_0^\pi\cos x\,dx=\pi+\Big[\sin x\Big]_0^\pi=\pi.

  6. Combine the two pieces. The outer integral is the difference of the results:

    Rxcos(x+y)dA=π2π=3π24.712.\iint_R x\cos(x+y)\,dA=-\frac{\pi}{2}-\pi=-\frac{3\pi}{2}\approx -4.712.

    The answer is negative, which is expected: on most of this triangle x+yx+y lies between π2\tfrac{\pi}{2} and 3π2\tfrac{3\pi}{2}, where cos(x+y)\cos(x+y) is negative, and the weight xx is largest exactly there. Numerical integration returns 4.71239-4.71239, matching 3π2-\tfrac{3\pi}{2}.

Answer

3π24.712-\frac{3\pi}{2}\approx -4.712

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