Transformation of xy to polar coordinates for double integral I have a double integral (region is rectangle)
0< y < 1     0< x <1
When transforming it into polar coordinate
I have two possible cases. 0< r < sec(k) and 0< r< csc(k)
For each case, how can I determine the boundary of k?
 A: You need to split the integral as

$$ I =\int_{0}^{1}\int_{0}^{1}f(x,y) dxdy = \int_{0}^{\pi/4}\int_{0}^{\sec(\theta)}f(r\cos \theta,r \sin \theta) rdrd\theta $$
$$+ \int_{\pi/4}^{\pi/2}\int_{0}^{\csc(\theta)}f(r\cos \theta,r \sin \theta) rdrd\theta , $$

with certain conditions on $f(x,y)$.
A: Sometimes you need a picture. This one is better with two pictures, I think.

The figure on the left shows one of the points along the side of the square
given by the polar equation $r = \sec \theta$.
The figure on the right shows a point given by $r = \csc \theta$.
The first formula works for all radial lines between the positive $x$-axis
and the dashed line through the corner of the square
(like the one shown in the left diagram);
the second formula works for all radial lines between the dashed line
and the positive $y$-axis.
Everything in the other answer (except for the formula in the integrand)
is illustrated here if you think about where to look for it, so I hope
that answer will now be easier to understand.
The bounds you need are the angle of the positive $x$-axis, the angle of the
dashed line, and the angle of the positive $y$-axis.
