# Problem 17.2 #31

In this problem, we are asked to compute the line integral
$\int_C \frac{-y, dx + x, dy}{x^2 + y^2}$
where $$C$$ is the line segment from $$(1,0)$$ to $$(0,1)$$. It turns out that this integral is particularly easy to compute in polar coordinates (although the work that I did in class probably made it seem hopelessly complicated!).

In polar coorinates, we have $$x = r \cos \theta$$ and $$y = r \sin \theta$$. To get $$dx$$ and $$dy$$ in terms of $$r$$, $$\theta$$ and $$d\theta$$ we have to do a little work differentiating. Since we are integrating over the curve $$C$$, we will eventually have $$r = r(\theta)$$, a function of theta. We compute
$dx = d(r \cos \theta) = \left(\frac{dr}{d\theta} \cos \theta – r \sin \theta \right), d\theta$
and similarly
$dy = d(r \sin \theta) = \left(\frac{dr}{d\theta} sin \theta + r \cos \theta \right), d\theta.$
Using these formulas, the numerator of the integrand simplifies immensely:
$– y, dx + x, dy = r^2 , d\theta.$
Therefore, the integral becomes (in polar coordinates)
$\int_C \frac{-y, dx + x, dy}{x^2 + y^2} = \int_C , d\theta.$
The curve $$C$$ can be written in polar coordinates as
$r(\theta) = \frac{1}{\cos \theta + \sin \theta}$
where $$0 \leq \theta \leq \pi / 2$$. To see this, notice the line satisfies $$y = 1 – x$$, or equivalently $$x + y = 1$$. In polar coordinates, this equation is $$r \cos \theta + r \sin \theta = 1$$, and solving for $$r$$ gives the equation for $$C$$. Therefore, we can compute the integral
$\int_C, d\theta = \int_0^{\pi / 2} , d\theta = \frac{\pi}{2}.$
So despite the imposing setup to the problem, the final integral turns out to be very simple.