# How I Impressed My Wife: Part 6e

This series was inspired by a question that my wife asked me: calculate

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}$

Originally, I multiplied the top and bottom of the integrand by $\tan^2 x$ and performed a substitution. However, as I’ve discussed in this series, there are four different ways that this integral can be evaluated.
Starting with today’s post, I’ll begin a fifth method. I really like this integral, as it illustrates so many different techniques of integration as well as the trigonometric tricks necessary for computing some integrals.

nvenient value of $a$ that I want without changing the value of $Q$. As shown in previous posts, substituting $a =0$ yields the following simplification:

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}$

$= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}$

$= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}$

$= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}$

$= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}$

$= \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}$

$= 2\pi \displaystyle \left[ \frac{1-r_1^2}{-2r_1^3 + (4b^2-2) r_1} +\frac{1-r_2^2}{-2r_2^3 + (4b^2-2) r_2} \right]$

where I’ve assumed $|b| > 1$, the contour $C_R$ in the complex plane is shown below (graphic courtesy of Mathworld),

and the positive constants $r_1$ and $r_2$ are given by

$r_1 = \sqrt{2b^2 - 1 + 2|b| \sqrt{b^2 - 1}}$,

$r_2 = \sqrt{2b^2 - 1 - 2|b| \sqrt{b^2 - 1}}$.

Now we have the small matter of simplifying our expression for $Q$. Actually, this isn’t a small matter because Mathematica 10.1 is not able to simplify this expression much at all:

Fortunately, humans can still do some things that computers can’t. The numbers $r_1$ and $r_2$ are chosen so that $\pm ir_1$ and $\pm ir_2$ are the roots of the denominator $z^4 + (4 b^2 - 2) z^2 + 1$. In other words,

$[ir_1]^4 + (4b^2 - 2) [ir_1]^2 + 1 = r_1^4 - [4b^2-2] r_1^2 + 1 = 0$,

$r_2^4 - [4b^2-2] r_2^2 + 1 = 0$

These relationships will be very handy for simplifying our expression for $Q$:

$Q = 2\pi \displaystyle \left[ \frac{1-r_1^2}{-2r_1^3 + (4b^2-2) r_1} +\frac{1-r_2^2}{-2r_2^3 + (4b^2-2) r_2} \right]$

$= 2\pi \left[ \displaystyle \frac{r_1^2-1}{2r_1^3-(4b^2-2)r_1} + \frac{r_2^2-1}{2r_2^3-(4b^2-2)r_2} \right]$

$= 2\pi \left[ \displaystyle \frac{r_1(r_1^2-1)}{2r_1^4-(4b^2-2)r_1^2} + \frac{r_2(r_2^2-1)}{2r_2^4-(4b^2-2)r_2^2} \right]$

$= 2\pi \left[ \displaystyle \frac{r_1(r_1^2-1)}{r_1^4 + r_1^4-(4b^2-2)r_1^2} + \frac{r_2(r_2^2-1)}{r_2^4+r_2^4-(4b^2-2)r_2^2} \right]$

$= 2\pi \left[ \displaystyle \frac{r_1(r_1^2-1)}{r_1^4 -1} + \frac{r_2(r_2^2-1)}{r_2^4-1} \right]$

$= 2\pi \left[ \displaystyle \frac{r_1(r_1^2-1)}{(r_1^2 -1)(r_1^2+1)} + \frac{r_2(r_2^2-1)}{(r_2^2-1)(r_2^2+1)} \right]$

$= 2\pi \left[ \displaystyle \frac{r_1}{r_1^2+1} + \frac{r_2}{r_2^2+1} \right]$

$= 2\pi \displaystyle \frac{r_1(r_2^2+1)+(r_1^2+1)r_2}{(r_1^2+1)(r_2^2+1)}$

$= 2\pi \displaystyle \frac{r_1 r_2^2+r_1+r_1^2 r_2 +r_2}{(r_1^2+1)(r_2^2+1)}$

$= 2\pi \displaystyle \frac{r_1 +r_2 + r_1 r_2 (r_1 + r_2)}{(r_1^2+1)(r_2^2+1)}$

$= 2\pi \displaystyle \frac{(r_1 +r_2)(1 + r_1 r_2)}{(r_1^2+1)(r_2^2+1)}$

To complete the calculation, we recall that

$r_1 = \sqrt{2b^2 - 1 + 2|b| \sqrt{b^2 - 1}}$,

$r_2 = \sqrt{2b^2 - 1 - 2|b| \sqrt{b^2 - 1}}$,

so that

$r_1^2 + r_2^2 = 4b^2 - 2$,

$r_1^2 r_2^2 = 1$,

and hence

$r_1 r_2 = 1$

since $r_1$ and $r_2$ are both positive. Also,

$(r_1 + r_2)^2 = r_1^2 + 2r_1 r_2 + r_2^2 = 4b^2 -2 + 2 = 4b^2$,

so that

$r_1 + r_2 = 2|b|$.

Finally,

$(r_1^2 + 1)(r_2^2 + 1) = (2b^2 + 2|b| \sqrt{b^2-1})(2b^2 - 2|b| \sqrt{b^2 -1})$

$= 4b^4 - 4b^2 (b^2-1)$

$= 4b^2$.

Therefore,

$Q = 2\pi \displaystyle \frac{(r_1 +r_2)(1 + r_1 r_2)}{(r_1^2+1)(r_2^2+1)} = 2\pi \displaystyle \frac{ 2|b| \cdot (1 + 1)}{4b^2} = \displaystyle \frac{8\pi |b|}{4 |b|^2} = \displaystyle \frac{2\pi}{|b|}$.

So far, I’ve evaluated the integral $Q$ for the cases $|b| = 1$ and $|b| > 1$. Beginning with tomorrow’s post, I’ll evaluate the integral for the case $|b| < 1$. As it turns out, the method presented above will again be utilized for simplifying the two residues.

## One thought on “How I Impressed My Wife: Part 6e”

This site uses Akismet to reduce spam. Learn how your comment data is processed.