At university we are given a voluntary hand in in the use of Maple/Matlab. In that regard I have a double integral I am in dire need to compute, using first Cartesian then polar coordinates.
http://www.math.ntnu.no/emner/MA1103/2012v/maplematlab2.pdf
I need to find
$$ \iint_R f(x,y)\,\mathrm{d}A $$
Where $R$ is the region below the curve $y = 3 + \sqrt{9-x^2} \, |x|<3$ and above the line $y = \dfrac{x}{3} + 2$, and $ \displaystyle f(x,y) = \frac{x}{\sqrt{x^2+y^2\,}\,\,}$.
After making a nice drawing, I thought the integral could be expressed like this
$$ \int_{-3}^{3} \int_{x/3 + 2}^{3 + \sqrt{9-x^2}} f(x,y)\,\mathrm{d}y\,\mathrm{d}x \approx -2.01.$$
Is this correct? Now I also need to compute this double integral using polar coordinates. Firstly I thought the circle could be express as
$$y = 3 + \sqrt{9 – x^2} \ , \ |x| \quad \Leftrightarrow \quad r_2 = 6 \sin \theta \ , \, \pi/4 < \theta < 3\pi/4$$
and the line could be expressed as
$$y = x/3 + 2 \quad \Leftrightarrow \quad r_1 = \frac{6}{3 \sin \theta – \cos \theta}$$
Which finally give me the following integral in polar coordinates:
$$\int_{\pi/4}^{3\pi/4} \int_{r_1}^{r_2} f(x,y) r \, \mathrm{d}r \, \mathrm{d}\theta \, \approx \, 17.28.$$
But this is wrong. I think it is due to my angles. How can I compute the double integral in a proper way using both Cartesian and polar coordinates? I appreciate all help =)
Best Answer
Not a bad problem on computer-assisted multivariable integration.
Since $f(-x,y)=f(x,y)$, we can ignore parts of the domain that are symmetric about the $y$-axis. For example, the integral could just as well be $$\int_{-3}^{3} \int_{x/3 + 2}^{3 } f(x,y)\,\mathrm{d}y\,\mathrm{d}x $$ without $+\sqrt{9-x^2}$ in the upper limit. This does not change it fundamentally, though: we still need a numeric integration routine to arrive at $\approx -2.01$ (which is correct). And for the polar coordinates it's probably better to keep the semicircular shape as is.
The polar integral that you set up evaluates to $$\int_{\pi/4}^{3\pi/4} \int_{r_1}^{r_2} r \cos\theta \, \mathrm{d}r \, \mathrm{d}\theta \approx -0.81$$ which is not the number you gave.
But the discrepancy between 1 and 2 remains, why? Because the polar integral does not include a triangular bit of $R$ in the bottom left corner. This is the triangle between $x=-3$, $y=x/2+3$, and $\theta=3\pi/4$. In polar terms, this piece contributes $$\int_{3\pi/4}^{\pi-\arctan (1/3)} \int_{r_1}^{-3/\cos\theta} r \cos\theta \, \mathrm{d}r \, \mathrm{d}\theta \approx -1.20$$ which reconciles the computations.