<s>[INST] Calculating $\int_A \frac{z}{y^2}$ with $A:=\{z\ge0,x\ge1,y\ge 0, x^2+z^2<\min(2x,y^2)\}$ I want to calculate the following improper integral:
$$\int_A \frac{z}{y^2}\\
A:=\{z\ge0,x\ge1,y\ge 0, x^2+z^2<\min(2x,y^2)\}$$
First I noticed that the conditions imply $x^2<2x\rightarrow x<2;1<x^2<y^2\rightarrow y>1$, and thus $B=A\cap \{y>2\}=\{z\in(0,2),x\in(1,2), x^2+z^2<2x\}$. Thus this part of the integral is fairly easy:
$$\int_B\frac{z}{y^2}=\int_2^\infty\int_1^2\int_0^\sqrt{2x-x^2}\frac{z}{y^2}dzdxdy=\int_2^\infty\frac1{y^2}dy\int_1^2\frac{2x-x^2}{2}dx=\frac{1}{6}$$
We are now left with a "proper" integral (i.e. the region on which we are integration is finite, and the integrand is bounded):
$$\int_{A\cap\{y\in(1,2)\}}\frac{z}{y^2}$$
I tried to split the domain in two regions: $A'=\{x\in[1,2);y\in(x,\sqrt{2x});z\in [0,\sqrt{y^2-x^2})\}, A''=\{x\in[1,2);y\in[\sqrt{2x},2];z\in[0,\sqrt{2x-x^2})$
Is my approach correct (I'm not sure, since the computations that follow bring me to an uncorrect result)? Is there any other approach to computing this integral, perhaps less messy?
 [/INST] The conditions $z\ge 0$, $x\ge 1$, $y\ge 0$, $x^2+z^2 \lt 2x$, and $x^2+z^2 \lt y^2$ define the intersection of two solids.  Solid one is the quarter of the cylinder $(x-1)^2 + z^2 = 1$ to the right of the plane $x=1$ and above the plane $z=0$.  Solid two is the portion of the cone $x^2 + z^2 = y^2$ to the right of the plane $x=1$ and above the plane $z=0$.  For $y\ge 2$, the cone completely contains the cylinder, so $A$ is just the cylinder in this portion of $A$.  The integral is indeed $1/6$ over this subregion $A_1$.  

You can split the remainder of $A$ into two subregions $A_2$ and $A_3$.  The first is the subregion where the boundary of the cone is intersecting the slice of the plane $x=1$ between $z=0$ and $z=1$.  The second is the subregion where the boundary of the cone is intersecting the upper boundary of the cylinder between $x=1$ and $x=2$.  The integral over $A_2$ is
$$
  \begin{align}
  \int_{A_2} z/y^2 &= \int_1^{\sqrt{2}} \frac{1}{y^2} \int_0^{\sqrt{y^2-1}} z 
     \int_1^{\sqrt{y^2-z^2}} \,dx\,dz\,dy \\
  &= \int_1^{\sqrt{2}}\frac{1}{y^2}\int_0^{\sqrt{y^2-1}} (z\sqrt{y^2-z^2} - z) \, dz\, dy \\
  &= \int_1^{\sqrt{2}} \frac{1}{y^2} \left.\left(-(y^2-z^2)^{3/2}/3 - z^2/2\right)
     \right|_{z=0}^{z=\sqrt{y^2-1}} \,dy \\
  &= \int_1^{\sqrt{2}} \frac{1}{y^2}\left(\frac{1}{6} - \frac{y^2}{2} + \frac{y^3}{3}\right) \,dy \\
  &= \left. -\frac{1}{6y} - \frac{y}{2} + \frac{y^2}{6}\right|_1^{\sqrt{2}} \\
  &= \frac{5}{6} - \frac{7}{12}\sqrt{2}.
  \end{align}
$$


The integral over $A_3$ is
$$
  \int_{A_3} z/y^2 = \int_{\sqrt{2}}^{2}\frac{1}{y^2}\int_0^1 z 
    \int_1^{\min(\sqrt{1-z^2}+1, \sqrt{y^2-z^2})} \,dx\,dz\,dy. \\ 
$$
The cylinder boundary intersects the cone boundary at $z = y\sqrt{1-y^2/4}$.  This means that $\sqrt{y^2-z^2} \le \sqrt{1-z^2}+1$ for $0\le z \le y\sqrt{1-y^2/4}$ and $\sqrt{1-z^2}+1 \le \sqrt{y^2-z^2}$ for $y\sqrt{1-y^2/4} \le z \le 1$, so we can write
$$
\int_0^1 z \left({\min(\sqrt{1-z^2}+1, \sqrt{y^2-z^2})} - 1\right) \, dz 
$$
as the sum
$$
  \int_0^{y\sqrt{1-y^2/4}} \left(z\sqrt{y^2-z^2} - z\right) \, dz + 
  \int_{y\sqrt{1-y^2/4}}^1 z\sqrt{1-z^2} \, dz.
$$
This sum of two integrals simplifies to 
$$
  -\frac{y^4}{8} + \frac{y^3}{3} - \frac{1}{3}.
$$
So
$$
  \begin{align}
  \int_{A_3} z/y^2 &= \int_{\sqrt{2}}^2 -\frac{y^2}{8} + \frac{y}{3} - \frac{1}{3y^2} \, dy  \\
  &= \frac{1}{6} - \frac{\sqrt{2}}{12}.
  \end{align}
$$


So the integral over the entire region $A$ is 
$$
  \left(\frac{1}{6}\right) + \left(\frac{5}{6} - \frac{7}{12}\sqrt{2}\right) + 
      \left(\frac{1}{6} - \frac{1}{12}\sqrt{2}\right) = 
      \frac{7}{6} - \frac{2}{3}\sqrt{2}.
$$

</s>