TITLE: Examples of using Green's theorem to compute one-variable integrals?
QUESTION [10 upvotes]: We all know that the complex integral calculus can be useful for computing real integrals. I was wondering if there are any similar example where we can use Green's theorem to compute one-variables integrals. 
Now it is clear that if we have an integral $\int_a^b f dx$ on the real line we can view this as a curve integral in the plane of $\int P dx + Q dy$ for infinitely many choices of $P$ and $Q$ where we integrate over the line between $a$ and $b$. We could then integrate this vector field over some other curve, $\gamma$, with the same endpoints and try computing the difference between our original integral and the new one with Green's theorem. It is clear that for random choices of $P$, $Q$ and $\gamma$ we will not have simplified our problem.
But are there any examples where this technique is useful?

REPLY [4 votes]: It is easy to compute $\int_{-\infty}^\infty e^{-x^2/2}dx$ by an elementary argument, but maybe you want the integral $\int_{-\infty}^\infty e^{-x^2/2}\cos(\lambda x)dx$ without having complex analysis (Cauchy's theorem) at your disposal. So you can apply Green's theorem to the vector field 
$$(P,Q):=e^{(y^2-x^2)/2}\bigl(\cos(x y),\sin(x y)\bigr)$$
and an elongated rectangle $[-a,a]\times[0,\lambda]$; then let $a\to\infty$.