# How do you calculate the double integral of (xcos(x+y))dr where r is the region: 0 less than or equal to x less then or equal to (2pi)/6, 0 less than or equal to y less than or equal to (2pi)/4?

Apr 14, 2015

Could you clarify your question more? For one thing, you are sort of mixing rectangular and polar coordinates in the way you are stating it.

Apr 15, 2015

${\int}_{R} \int x \cos \left(x + y\right) \mathrm{dR}$

Where $R = \left\{\left(x , y\right) : 0 \le x \le \frac{\pi}{3} , \text{and} 0 \le y \le \frac{\pi}{2}\right\}$

(I've reduced the fractions.)

We can choose whether to integrate first with respect to $x$ or w.r.t. $y$. I'll find:

${\int}_{0}^{\frac{\pi}{3}} {\int}_{0}^{\frac{\pi}{2}} x \cos \left(x + y\right) \mathrm{dy} \mathrm{dx} = {\int}_{0}^{\frac{\pi}{3}} \left[{\int}_{0}^{\frac{\pi}{2}} x \cos \left(x + y\right) \mathrm{dy}\right] \mathrm{dx}$

I'll do the inner integral, then substitute.
int_0^(pi/2) xcos(x+y) dy = xsin(x+y)]_(y=0)^(y = pi/2) = xsin(x+ pi/2) - xsin(x)

Now we need to find

${\int}_{0}^{\frac{\pi}{3}} \left[x \sin \left(x + \frac{\pi}{2}\right) - x \sin \left(x\right)\right] \mathrm{dx}$

OK, maybe that wasn't easiest. Now I have to do 2 integration by parts, but rather than re-starting, we'll keep on this path.

We could replace $\sin \left(x + \frac{\pi}{2}\right)$ by $\cos x$, but many students won't notice that and it's probably not any simpler, so I'll keep on with the problem as I have it above.

First Integral:

${\int}_{0}^{\frac{\pi}{3}} x \sin \left(x + \frac{\pi}{2}\right) \mathrm{dx}$

Let $u = x$ and $\mathrm{dv} = \sin \left(x + \frac{\pi}{2}\right) \mathrm{dx}$

so $\mathrm{du} = \mathrm{dx}$ and $v = - \cos \left(x + \frac{\pi}{2}\right)$

${\int}_{0}^{\frac{\pi}{3}} x \sin \left(x + \frac{\pi}{2}\right) \mathrm{dx} = - x \cos \left(x + \frac{\pi}{2}\right) + \int \cos \left(x + \frac{\pi}{2}\right) \mathrm{dx}$

 = -xcos(x + pi/2) + sin(x + pi/2)]_0^(pi/3)

$= \left[- \frac{\pi}{3} \cos \left(\frac{5 \pi}{6}\right) + \sin \left(\frac{5 \pi}{6}\right)\right] - \left[0 + \sin \left(\frac{\pi}{2}\right)\right]$

$= - \frac{\pi}{3} \left(- \frac{\sqrt{3}}{2}\right) + \frac{1}{2} - 1 = \frac{\pi \sqrt{3}}{6} - \frac{1}{2} = \frac{\pi \sqrt{3} - 3}{6}$

Second Integral:

The second integral:
${\int}_{0}^{\frac{\pi}{3}} \left[- x \sin \left(x\right)\right] \mathrm{dx}$ is almost the same as the first integral.
Using the same method, we'll get

 = - (-xcos(x) + sin(x))]_0^(pi/3) = = xcos(x) - sin(x))]_0^(pi/3)

Which evaluates to:

$\frac{\pi}{3} \frac{1}{2} - \frac{\sqrt{3}}{2} - \left[0 \cos \left(0\right) - \sin \left(0\right)\right] = \frac{\pi - 3 \sqrt{3}}{6}$

Adding the two integrals gives us:

${\int}_{0}^{\frac{\pi}{3}} \left[x \sin \left(x + \frac{\pi}{2}\right) - x \sin \left(x\right)\right] \mathrm{dx} = \frac{\pi \sqrt{3} - 3}{6} + \frac{\pi - 3 \sqrt{3}}{6} = \frac{\pi \sqrt{3} - 3 \sqrt{3} + \pi - 3}{6}$