<s>[INST] Solution for $I = \int_1^2 \int_0^\sqrt{1-(1-x)^2} x/(x^2+y^2) \ \mathrm dy\ \mathrm dx$ The given integration is:
$$I = \int_1^2 \int_0^\sqrt{1-(1-x)^2} \dfrac{x}{x^2+y^2} \ \mathrm dy\ \mathrm dx$$
After substituting to polar coordinate, I get:
$$I = \int_0^{\pi/2} \int_0^{2\cos\theta} \cos\theta\ \mathrm dr\ \mathrm d\theta$$
And finally, I got $I = \pi/2$.
But the answer is 1/2.
Where I wrong is substitution to the second integration, which is surely $\pi/2$.
But I can't find the details.
Please let me find where I missed.
**Added : the region is upper right quarter of the circle of radius 1 centered at (1,0).
 [/INST] This is an attempt, I can't really find a simple way with polar coordinates.
Assuming your domain is the circle of radius $1$ with center at $(1,0)$ your integral can be written as
$$
\int_{-1}^1 \int_{1 - \sqrt{1-y^2}}^{1 + \sqrt{1-y^2}} \frac{x}{x^2+y^2}dxdy =
2 \int_{0}^1 \int_{1 - \sqrt{1-y^2}}^{1 + \sqrt{1-y^2}} \frac{x}{x^2+y^2}dxdy = \\
\int_{0}^1 \left( \int_{1 - \sqrt{1-y^2}}^{1 + \sqrt{1-y^2}} \frac{1}{x^2+y^2}dx^2 \right) dy =
\int_{0}^1 \log \left( \frac{1 + \sqrt{1 - y^2}}{1 - \sqrt{1 - y^2}}\right) dy
$$
Check the computations... note that
$$
\log \left( \frac{1 + \sqrt{1 - y^2}}{1 - \sqrt{1 - y^2}} \right) = 2 \tanh^{-1} \left(\sqrt{1 - y^2} \right)
$$
So we have the integral
$$
2 \int_0^1 \tanh^{-1} \left(\sqrt{1 - y^2} \right)dy = \left. 2y \tanh^{-1} \left(\sqrt{1 - y^2} \right) \right|_{0}^1 - 2 \int_{0}^1 y d \left(\tanh^{-1} \left(\sqrt{1 - y^2} \right)\right)
$$
The boundary term goes to 0, so we are left with
$$
2 \int_0^1 \tanh^{-1} \left(\sqrt{1 - y^2} \right)dy = - 2 \int_{0}^1 y d \left(\tanh^{-1} \left(\sqrt{1 - y^2} \right)\right)
$$
The derivative of the inverse tangent should be
$$
\frac{d}{dy} \left(\tanh^{-1} \left(\sqrt{1 - y^2} \right)\right) = -\frac{1}{y^2} \frac{y}{\sqrt{1 - y^2}}
$$
Substituing this in my last integral gives you the arcsin function evaluated between 0 and 1, at 0 you get 0 while at 1 you'll get your result.
Update
If you want to use the polar coordinates, given your domain define
$$
\left\{
\begin{array}{l}
x - 1 = r \cos \theta \\
y = r \sin \theta \\
\end{array}
\right.
$$
The differential won't change and your integral can be written as
$$
\int_{0}^1 \int_{0}^{2\pi} \frac{1 + r \cos \theta}{r^2 +2r \cos \theta + 1} dr d\theta
$$
</s>