# Integrating over an area

I need to integrate $f(x,y):=x^2y^2$ over an area $B\subset\mathbb R^2$that is restricted by the following 4 functions: $$y=\frac x9;\;y=\frac x4;\;y=\frac 1x;\;y=\frac4x;$$ Of course due to the symmetry we can integrate just over the area in the positive $x$-$y$ region and then multiply the result by two.

I am confused by choosing the boundaries for integration. On the one hand it could be $$\frac x9 \leq y\leq \frac x4,\;2\leq x\leq6$$ or alternatively $$\frac 1x \leq y\leq \frac 4x,\;2\leq x\leq6$$

So how do I choose the boundaries to calculate $\int_Bx^2y^2d\mu(x,y)?$ • If the two boundaries lead to different answers, then there is something wrong in your derivation. They are supposed to give you the same answer in the end, and as of such, you are free to choose which ever boundaries you please, preferably the ones that lead to the easiest calculations. – fromGiants Jun 20 '14 at 13:59
• In our case $x$ goes obviously from $2$ to $6$, but $y$ is restricted by $$\frac1x, \; \frac4x,\;\frac x9,\; \frac x4$$ Say we choose $\frac x9 \leq y\leq \frac x4,\;2\leq x\leq6$. We restrict the area by two hyperbolas and two vertical lines $x=2$ and $x=6$, but not lines $y=x/9$ and $y=x/4$ – Dmitry Kazakov Jun 20 '14 at 14:07
• Do you have the final answer? – Pranav Arora Jun 20 '14 at 14:54

You need to use a nonstandard change of coordinates to solve this. Adopt $u = xy$ and $v = x/y$.

The motivation for this is as follows: you can rewrite the equations $y=1/x$ and $y=4/x$ as $xy =1$ and $xy=4$, therefore we obtain the change $u=xy$.

You can rewrite the other two equations $y=x/4$ and $y=x/9$ as $x/y=4$ and $x/y=9$, leading to $v=x/y$. Isolating $x$ and $y$ in terms of $u$ and $v$ as defined you get $$x = \sqrt{uv}, \quad y = \sqrt{\frac{u}{v}}.$$ Computing the Jacobian and taking the absolute value gives $$|J(u,v)| = \frac{1}{2v}.$$ The new limits are $1 \leq u \leq 4$ and $4 \leq v \leq 9$. The function $f(x,y) = x^2y^2$ is now $g(u,v) = u^2$ and the integral is $$I = \frac{1}{2} \int_1^4 \int_4^9 \frac{u^2}{v} \, dv \, du.$$ My computation yields $$I = 21 \ln \left( \frac{3}{2} \right).$$

• That's absolutely perfect. The one question is: do I always need to consider parametrization when coming across boundaries, that are not defined by vertical or horizontal lines? – Dmitry Kazakov Jun 20 '14 at 14:45
• They don't even need to be lines. The problem was possibly set up to have a nice Jacobian to facilitate computations. If you were considering the region between hyperboles and ellipses the computations might have been utterly complicated. =) – Mark Fantini Jun 20 '14 at 14:50
• But you've miscalculated the integral :) Your integral yields $21\log\left(\frac32\right)$ – Dmitry Kazakov Jun 20 '14 at 15:14
• You're right. Sorry! I've edited. – Mark Fantini Jun 20 '14 at 18:22

Switch to polar coordinates. Then you have the following integral: $$\int_{\tan^{-1}\frac{1}{9}}^{\tan^{-1}\frac{1}{4}} \int_{\sqrt{2\csc(2\theta)}}^{2\sqrt{2\csc(2\theta)}}r^5\sin^2\theta\cos^2\theta\,dr\,d\theta=\frac{1}{6}\int_{\tan^{-1}\frac{1}{9}}^{\tan^{-1}\frac{1}{4}}\sin^2\theta\cos^2\theta (504\csc^3(2\theta))\,d\theta$$ $$=\frac{504}{6}\int_{\tan^{-1}\frac{1}{9}}^{\tan^{-1}\frac{1}{4}}\frac{\sin^2\theta\cos^2\theta}{8\sin^3\theta \cos^3\theta}\,d\theta=\frac{504}{24}\int_{\tan^{-1}\frac{1}{9}}^{\tan^{-1}\frac{1}{4}}\csc(2\theta)\,d\theta$$ $$=\boxed{21\ln\left(\frac{3}{2}\right)}$$

• Fantini's sub seems easier to be calculated afterwards. I am doing the calculations, so will check now, if one of the answers is right. – Dmitry Kazakov Jun 20 '14 at 15:06
• @DmitryKazakov: I don't know much about what Fantini did because of my zero knowledge about Jacobians. Can you please confirm the final answer from the answer key if possible? Thanks! – Pranav Arora Jun 20 '14 at 15:07
• My calculations yielded $21\log\left(\frac32\right)$ – Dmitry Kazakov Jun 20 '14 at 15:12
• @DmitryKazakov: And that is what I get. :D Thanks! :) – Pranav Arora Jun 20 '14 at 15:12
• Actually Fatini has just miscalculated his integral, because his integral yields the same numeric result as yours. – Dmitry Kazakov Jun 20 '14 at 15:15

EDIT: The first part is the calculation of the area B, the second part is the integration of function $f(x,y)$ in the area B.

The intersection of $y_1=\frac x4$ with $y_2=\frac4x$ is at $x=4,y=1$.

The intersection of $y_3=\frac x9$ with $y_4=\frac 1x$ is at $x=3,y=1/3$.

So the area is given by:

$$B=\int_{2}^{4}y_1(x) dx+\int_{4}^{6} y_2(x) dx-\int_{2}^{3}y_4(x) dx-\int_{3}^{6} y_3(x) dx$$ $$=\int_{2}^{4}\frac x4 dx+\int_{4}^{6} \frac4x dx-\int_{2}^{3}\frac 1x dx-\int_{3}^{6} \frac x9 dx=\ln\left(\frac{27}{8}\right)$$

EDIT: Now I add the part of the integration of function $f(x,y)$ in the area B.

$$\int\int_B f(x,y)dxdy=\int_{2}^3x^2 \left(\int_{y_4(x)}^{y_1(x)} y^2 dy\right)dx+\int_{3}^4x^2 \left(\int_{y_3(x)}^{y_1(x)} y^2 dy\right)dx+\int_{4}^6 x^2 \left(\int_{y_3(x)}^{y_2(x)} y^2 dy\right)dx=21\ln(3/2)$$

• I am afraid you are missing something, have a look at the answer above yours. – Dmitry Kazakov Jun 20 '14 at 14:58
• And I know. What, the problem asks not to compute the area, that is restricted by 4 functions, but to integrate a function $f(x,y)=x^2y^2$ over this area. – Dmitry Kazakov Jun 20 '14 at 15:02
• I added the integration of f(x,y) in B and the answer is also $21\ln(3/2)$. – mike Jun 20 '14 at 15:31
• Ok I see, that's correct. Thanks for your time, man! – Dmitry Kazakov Jun 20 '14 at 15:36