How I Impressed My Wife: Part 6b

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.

green lineSince Q is independent of a, I can substitute any convenient 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},

where C_R is the contour in the complex plane shown below (graphic courtesy of Mathworld).

Amazingly, contour integrals can be simply computed by evaluating the residues at every pole located inside of the contour. (See Wikipedia and Mathworld for more details.) In today’s post, I’ll use this method if |b| = 1. In this case,

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

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

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

= \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2 dz}{1+z^2}

I now set the denominator equal to zero to find the poles:

z^2 + 1 = 0

z^2 = -1

z = \pm i.

For sufficiently large R, there is only one pole within the contour, namely z_1 = i.

The integrand has the form \displaystyle g(z)/h(z), and the pole has order one. As shown earlier in this series, the residue at such pole is equal to

\displaystyle \frac{g(z_1)}{h'(z_1)}.

In this case, g(z) = 2 and h(z) = 1+z^2 so that h'(z) = 2z, and so the residue is \displaystyle \frac{2}{2i} = -i.

Finally, to evaluate the contour integral, I simply the sum of the residues within the contour by 2\pi i:

Q = \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2 dz}{1+z^2} = 2\pi i (-i) = 2\pi.

Unsurprisingly, this matches the results found earlier. Somewhat surprisingly, all of the imaginary parts cancel themselves out, leaving only a real number.

green line

The case of |b| = 1 was very straightforward. I’ll start the case of |b| > 1 in tomorrow’s post.

How I Impressed My Wife: Part 6a

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.
green lineSince Q is independent of a, I can substitute any convenient 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}

Earlier, I evaluated this last integral using partial fractions, separating into the cases |b| = 1, |b| > 1, and |b| < 1. Now, I’ll calculate this same integral using contour integration. (See Wikipedia and Mathworld for more details.)

It turns out that Q can be rewritten as

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

where C_R is the contour in the complex plane shown above (graphic courtesy of Mathworld). That’s because

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

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

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1} + \lim_{R \to \infty} \int_{\gamma_R} \frac{ 2(1+z^2) du}{z^4 + (4 b^2 - 2) z^2 + 1}

= Q + \displaystyle \lim_{R \to \infty} \int_{\gamma_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}

To show that the limit of the last integral is equal to 0, I use the parameterization z = R e^{i \theta}, so that dz = i R e^{i \theta}:

\displaystyle \lim_{R \to \infty} \left| \int_{\gamma_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1} \right|

= \displaystyle \lim_{R \to \infty} \left| \int_0^{\pi} \frac{ 2R(1+R^2 e^{2i\theta}) d\theta}{R^4 e^{4 i\theta} + (4 b^2 - 2) R^2 e^{2i\theta} + 1} \right|

\le \displaystyle \lim_{R \to \infty} \pi \max_{0 \le \theta \le \pi} \left| \frac{ 2R(1+R^2 e^{2i\theta})}{R^4 e^{4 i\theta} + (4 b^2 - 2) R^2 e^{2i\theta} + 1} \right|

= \displaystyle \pi \max_{0 \le \theta \le \pi} \lim_{R \to \infty} \left| \frac{ 2R(1+R^2 e^{2i\theta})}{R^4 e^{4 i\theta} + (4 b^2 - 2) R^2 e^{2i\theta} + 1} \right|

= \displaystyle \pi \max_{0 \le \theta \le \pi} 0

= 0.

The above limit is equal to zero because the numerator grows like R^3 while the denominator grows like R^4. (This can be more laboriously established using L’Hopital’s rule).

Therefore, I have shown that

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

and this contour integral can be computed using residues.

green line

I’ll continue with this fifth evaluation of the integral, starting with the case |b| = 1, in tomorrow’s post.

How I Impressed My Wife: Part 5j

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient 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 \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2}

\displaystyle \int_{-\infty}^{\infty} \left[ \frac{1}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{1}{[u + \sqrt{1-b^2}]^2 +b^2} \right] du

if |b| < 1. (The cases |b| = 1 and |b| > 1 have already been handled earlier in this series.)

To complete the calculation, I employ the now-familiar antiderivative

\displaystyle \int \frac{dx}{x^2 + b^2} = \displaystyle \frac{1}{|b|} \tan^{-1} \left( \frac{x}{b} \right).

Using this antiderivative and a simple substitution, I see that

Q = \displaystyle \left[ \frac{1}{|b|} \tan^{-1} \left( \frac{u - \sqrt{1-b^2}}{b} \right) + \frac{1}{|b|} \tan^{-1} \left( \frac{u - \sqrt{1-b^2}}{b} \right) \right]^{\infty}_{-\infty}

= \displaystyle \frac{1}{|b|} \left[ \left( \frac{\pi}{2} + \frac{\pi}{2} \right) - \left( \frac{-\pi}{2} + \frac{-\pi}{2} \right) \right]

= \displaystyle \frac{2\pi}{|b|}.

This completes the fourth method of evaluating the integral Q, using partial fractions.

green line

There’s at least one more way that the integral Q can be calculated, which I’ll begin with tomorrow’s post.

How I Impressed My Wife: Part 5i

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient 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 \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2}

if |b| < 1. (The cases |b| = 1 and |b| > 1 have already been handled earlier in this series.)

I will evaluate this integral using partial fractions. The denominator factors as the product of two irreducible quadratics, and so I must solve

\displaystyle \frac{ 2(1+u^2)}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)} = \displaystyle \frac{Au + B}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{Cu + D}{[u + \sqrt{1-b^2}]^2 +b^2},

or

\displaystyle \frac{ 2(1+u^2)}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)} = \displaystyle \frac{Au + B}{u^2 - 2u \sqrt{1-b^2} +1} + \frac{Cu + D}{u^2 + 2u\sqrt{1-b^2} + 1}.

I now clear out the denominators:

2(1+u^2) = (Au+B)(u^2 + 2u\sqrt{1-b^2} + 1) + (Cu+D)(u^2 - 2u\sqrt{1-b^2} + 1)

Now I multiply out the right-hand side:

Au^3 + 2Au^2 \sqrt{1-b^2} + Au + Bu^2 + 2Bu\sqrt{1-b^2} + B

+ Cu^3 - 2Cu^2 \sqrt{1-b^2} + Cu + Du^2 - 2Du\sqrt{1-b^2} + D

Equating this with 2u^2 + 2 and matching coefficients yields the following system of four equations in four unknowns:

A + C = 0

2A\sqrt{1-b^2} + B - 2C \sqrt{1-b^2} + D = 2

Au + 2Bu \sqrt{1-b^2} + Cu - 2Du \sqrt{1-b^2} = 0

B + D = 2

Ordinarily, four-by-four systems of equations are rather painful to solve, but this system isn’t so bad.

From the first equation, I see that C = -A.

From the third equation, I see that

Au + 2Bu \sqrt{1-b^2} + Cu - 2Du \sqrt{1-b^2} = 0

Au + 2Bu \sqrt{1-b^2} -Au - 2Du \sqrt{1-b^2} = 0

2Bu \sqrt{1-b^2} - 2Du \sqrt{1-b^2} = 0

B - D = 0

B = D.

From the fourth equation, I see that

B + D = 2

B + B = 2

2B = 2

B = 1,

so that D =1 as well. Finally, from the second equation, I see that

2A\sqrt{1-b^2} + B - 2C \sqrt{1-b^2} + D = 2

2A\sqrt{1-b^2} + 1 -2(-A) \sqrt{1-b^2} + 1 = 2

4A\sqrt{1-b^2} = 0

A= 0,

so that C = 0 as well. This yields the partial fractions decomposition

\displaystyle \frac{ 2(1+u^2)}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)} = \displaystyle \frac{1}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{1}{[u + \sqrt{1-b^2}]^2 +b^2}.

This can be confirmed by directly adding the fractions on the right-hand side:

\displaystyle \frac{1}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{1}{[u + \sqrt{1-b^2}]^2 +b^2}

= \displaystyle \frac{[u + \sqrt{1-b^2}]^2 +b^2 + [u - \sqrt{1-b^2}]^2 +b^2}{([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)}

= \displaystyle \frac{u^2 + 2u\sqrt{1-b^2} + 1 - b^2 + b^2 + u^2 - 2u\sqrt{1-b^2} + 1 - b^2 + b^2}{([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)}

= \displaystyle \frac{2u^2 + 2}{([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)}.

green line

I’ll continue with this fourth evaluation of the integral, continuing the case |b| < 1, in tomorrow’s post.

How I Impressed My Wife: Part 5h

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient 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}

The four roots of the denominator satisfy

u^2 = \displaystyle 1 - 2b^2 \pm 2|b| \sqrt{b^2 - 1}

So far, I’ve handled the cases |b| = 1 and |b| > 1. In today’s post, I’ll start considering the case |b| < 1.

Factoring the denominator is a bit more complicated if |b| < 1. Using the quadratic equation, we obtain

u^2 = \displaystyle 1 - 2b^2 \pm 2|b| i \sqrt{1-b^2}

However, unlike the cases |b| \ge 1, the right-hand side is now a complex number. So, To solve for u, I’ll use DeMoivre’s Theorem and some surprisingly convenient trig identities. Notice that

(1-2b^2)^2 + (2|b| \sqrt{1-b^2})^2 = 1 - 4b^2 + b^4 + 4b^2 (1 - b^2) = 1 - 4b^2 + b^4 + 4b^2 - b^4 = 1.

Therefore, the four complex roots of the denominator satisfy |u^2| = 1, or |u| = 1. This means that all four roots can be written in trigonometric form so that

u^2 = \cos 2\phi + i \sin 2\phi,

where 2\phi is some angle. (I chose the angle to be 2\phi instead of \phi for reasons that will become clear shortly.)

I’ll begin with solving

u^2 = \displaystyle 1 - 2b^2 + 2|b| i \sqrt{1-b^2}.

Matching the real and imaginary parts, we see that

\cos 2\phi = 1-2b^2,

\sin 2\phi = 2|b| \sqrt{1-b^2}

This completely matches the form of the double-angle trig identities

\cos 2\phi = 1 - 2\sin^2 \phi,

\sin 2 \phi = 2 \sin\phi \cos \phi,

and so the problem reduces to solving

u^2 = \cos 2\phi + i \sin 2\phi,

where $\sin \phi = |b|$ and $\cos \phi = \sqrt{1-b^2}$. By De Moivre’s Theorem, I can conclude that the two solutions of this equation are

u = \pm(\cos \phi + i \sin \phi),

or

u = \pm( \sqrt{1-b^2} + i |b|).

I could re-run this argument to solve u^2 = \displaystyle 1 - 2b^2 - 2|b| i \sqrt{1-b^2} and get the other two complex roots. However, by the Conjugate Root Theorem, I know that the four complex roots of the denominator u^4 + (4 b^2 - 2) u^2 + 1 must come in conjugate pairs. Therefore, the four complex roots are

u = \pm \sqrt{1-b^2} \pm i |b|.

Therefore, I can factor the denominator as follows:

u^4 + (4 b^2 - 2) u^2 + 1 = (u - [\sqrt{1-b^2} + i|b|])(u - [\sqrt{1-b^2} - i|b|])

\qquad \times (u - [-\sqrt{1-b^2} + i|b|])(u - [-\sqrt{1-b^2} + i|b|])

= (u - \sqrt{1-b^2} - i|b|)(u - \sqrt{1-b^2} + i|b])

\qquad \times (u +\sqrt{1-b^2} + i|b|)(u +\sqrt{1-b^2} + i|b|)

= ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)

To double-check my work, I can directly multiply this product:

([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)

= (u^2 - 2u \sqrt{1-b^2} + 1 - b^2 + b^2) (u^2 + 2u \sqrt{1-b^2} + 1 - b^2 + b^2)

= ([u^2 +1] - 2u\sqrt{1-b^2})([u^2+1] + 2u\sqrt{1-b^2})

= [u^2+1]^2 - [2u\sqrt{1-b^2}]^2

= u^4 + 2u^2 + 1 - 4u^2 (1-b^2)

= u^4 + u^2 (2 - 4[1-b^2]) + 1

= u^4 + u^2 (4b^2 - 2) + 1.

So, at last, I can rewrite the integral Q as

Q = \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)}

green line

I’ll continue with this fourth evaluation of the integral, continuing the case |b| < 1, in tomorrow’s post.

How I Impressed My Wife: Part 5g

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient 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 \int_{-\infty}^{\infty} \left[ \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_1^2} + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_2^2} \right] du,

where k_1 and k_2 are the positive numbers so that

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

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

so that

u^4 + (4 b^2 - 2) u^2 + 1 = (u^2 + k_1^2) (u^2 + k_2^2)

At this point in the calculation, we can employ the now familiar antiderivative

\displaystyle \int \frac{du}{u^2 +k^2} = \displaystyle \frac{1}{k} \tan^{-1} \left( \frac{u}{k} \right) + C,

so that

Q = \left[ \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{k_1}\tan^{-1} \left( \frac{u}{k_1} \right) + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \displaystyle \frac{1}{k_2} \tan^{-1} \left( \frac{u}{k_2} \right) \right]^{\infty}_{-\infty}

= \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{k_1} \left( \frac{\pi}{2} - \frac{-\pi}{2} \right) + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \displaystyle \frac{1}{k_2} \tan^{-1} \left(\frac{\pi}{2} - \frac{-\pi}{2} \right)

= \displaystyle\frac{\pi}{k_2^2-k_1^2} \left( \frac{2 - 2k_1^2}{k_1} + \frac{2 .k_2^2 - 2}{k_2} \right)

= \displaystyle\frac{\pi}{k_2^2-k_1^2} \left( \frac{(2 - 2k_1^2)k_2 + (2 k_2^2 - 2)k_1 }{k_1 k_2} \right)

= \displaystyle\frac{\pi}{k_2^2-k_1^2} \left( \frac{2 k_2 - 2k_1^2 k_2 + 2 k_1 k_2^2 - 2 k_1 }{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{k_2^2-k_1^2} \left( \frac{k_2 - k_1^2 k_2 + k_1 k_2^2 - k_1 }{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{k_2^2-k_1^2} \left( \frac{k_2 - k_1 - k_1^2 k_2 + k_1 k_2^2 }{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{(k_2-k_1)(k_2+k_1)} \left( \frac{(k_2 - k_1) + k_1 k_2 (k_2 - k_1)}{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{(k_2-k_1)(k_2+k_1)} \left( \frac{(k_2 - k_1)(1+ k_1 k_2)}{k_1 k_2} \right)

= \displaystyle 2\pi \left( \frac{1+ k_1 k_2}{(k_2+k_1) k_1 k_2} \right).

Now it remains to simplify this fraction. To do this, we note that

u^4 + (4 b^2 - 2) u^2 + 1 = (u^2 + k_1^2) (u^2 + k_2^2),

so that

u^4 + (4b^2 - 2)u^2 + 1 = u^4 + (k_1^2 + k_2^2)u^2 + k_1^2 k_2^2

Matching coefficients, we see that

k_1^2 + k_2^2 = 4b^2 -2,

k_1^2 k_2^2 = 1

Since both k_1 and k_2 are positive, we see that k_1 k_2 = 1 from the last equation. Therefore,

k_1^2 + 2 k_1 k_2 + k_2^2 = 4b^2 -2 + 2

(k_1+k_2)^2 = 4b^2

k_1 + k_2 = 2|b|

Plugging these in, we finally conclude that

Q = \displaystyle 2\pi \left( \frac{1+ 1}{2 |b| \cdot 1} \right) = \displaystyle \frac{2\pi}{|b|},

again matching our earlier result.

green line

Using the fourth method, I’ve shown that Q = \displaystyle \frac{2\pi}{|b|} for the cases |b| = 1 and |b| > 1. With tomorrow’s post, I’ll consider the remaining case of |b| < 1.

How I Impressed My Wife: Part 5f

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient 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}

The four roots of the denominator satisfy

u^2 = \displaystyle 1 - 2b^2 \pm 2|b| \sqrt{b^2 - 1}

In yesterday’s post, I handled the case |b| = 1. In today’s post, I’ll consider the case |b| > 1, so that u^2 is a real number for the four roots of the denominator.

For the sake of simplicity, let me define the positive numbers k_1 and k_2 so that

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

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

Clearly 2b^2 + 2|b| \sqrt{b^2-1} - 1 > 0 if |b| > 1, and so we can choose k_1 to be positive. For k_2, notice that

(2b^2 - 1)^2 = 4b^4 - 4b^2 + 1,

while

\left[ 2|b| \sqrt{b^2-1} \right]^2 = 4b^2 (b^2 - 1) = 4b^4 - 4b^2.

Therefore,

(2b^2 - 1)^2 > \left[ 2|b| \sqrt{b^2-1} \right]^2

2b^2 - 1 > 2|b| \sqrt{b^2-1}

2b^2 - 2|b| \sqrt{b^2-1} - 1 > 0

So k_2 can also be chosen to be a positive number.

Using k_1 and k_2, I can write

u^4 + (4 b^2 - 2) u^2 + 1 = (u^2 + k_1^2)(u^2 + k_2^2),

and so the integrand must have the partial fractions decomposition

\displaystyle \frac{ 2(1+u^2)}{u^4 + (4 b^2 - 2) u^2 + 1} = \displaystyle \frac{A}{u^2 + k_1^2} + \displaystyle \frac{B}{u^2 + k_2^2},

Notice that ordinarily, when the denominator contains an irreducible quadratic, the numerator of the partial fractions decomposition has the form Au + B and not A. However, there are no u^3 and u terms in the denominator, I can treat u^2 as the variable for the purposes of the decomposition. Since the right-hand side has linear terms in u^2, it suffices to use a constant for finding the decomposition.

To solve for the constants A and B, I clear out the denominator:

2u^2 + 2 = A \left[ u^2 + k_2^2 \right] + B \left[ u^2 + k_1^2 \right]

Matching coefficients, this yields the system of equations

A + B = 2

A k_2^2 + B k_1^2 = 2

Substituting B = 2-A into the second equation, I get

A k_2^2 + (2-A) k_1^2 = 2

2 k_1^2 + A (k_2^2 - k_1^2) = 2

A (k_2^2 - k_1^2) = 2 - 2k_1^2

A = \displaystyle \frac{2 - 2k_1^2}{k_2^2 - k_1^2}

Therefore,

B = 2 - A = 2 - \displaystyle \frac{2 - 2k_1^2}{k_2^2 - k_1^2}

B = \displaystyle \frac{2(k_2^2 - k_1^2) - (2 - 2k_1^2)}{k_2^2 - k_1^2}

B = \displaystyle \frac{2 k_2^2 - 2}{k_2^2 - k_1^2}

Therefore, the integrand has the partial fractions decomposition

\displaystyle \frac{ 2(1+u^2)}{u^4 + (4 b^2 - 2) u^2 + 1} = \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_1^2} + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_2^2}

green line

I’ll continue with this fourth evaluation of the integral, continuing the case |b| > 1, in tomorrow’s post.

How I Impressed My Wife: Part 5e

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient 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}

To evaluate this integral, I need to find the four complex roots of the denominator:

u^4 + (4b^2 - 2) u^2 + 1 = 0

u^2 = \displaystyle \frac{ 2 - 4b^2 \pm \sqrt{(4b^2 - 2)^2 - 4}}{2}

u^2 = \displaystyle \frac{2 - 4b^2 \pm \sqrt{16b^4 - 16b^2 - 4 + 4}}{2}

u^2 = \displaystyle \frac{2 - 4b^2 \pm \sqrt{16b^4 - 16b^2}}{2}

u^2 = \displaystyle \frac{2 - 4b^2 \pm 4|b| \sqrt{b^2 - 1}}{2}

u^2 = \displaystyle 1 - 2b^2 \pm 2|b| \sqrt{b^2 - 1}

To solve for u, there are three separate cases that have to be considered: |b| = 1, |b| > 1, and |b| < 1. I’ll begin with the easiest case of |b| = 1. In this case, the integral Q is easy to evaluate:

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

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 \cdot [1^2] - 2) u^2 + 1}

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

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

=\displaystyle \int_{-\infty}^{\infty} \frac{ 2 du}{1+u^2}

=\displaystyle \left[ 2\tan^{-1} x \right]^{\infty}_{-\infty}

=\displaystyle \left[ 2 \frac{\pi}{2} - 2 \frac{-\pi}{2} \right]

= 2\pi

This matches the expected answer of Q = \displaystyle \frac{2\pi}{|b|} since I used the assumption that |b| = 1.

green line

I’ll continue with this fourth evaluation of the integral, examining the two remaining cases, in future posts.

How I Impressed My Wife: Part 5d

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient 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}

I now employ the magic substitution u = \tan x/2, so that

\cos x = \displaystyle \frac{1-u^2}{1+u^2},

\sin x = \displaystyle \frac{2u}{1+u^2},

dx = \displaystyle \frac{2 \, du}{1+u^2}.

The endpoints change from -\pi < x < \pi to -\infty < u < \infty, and so

Q = \displaystyle \int_{-\infty}^{\infty} \frac{ \displaystyle \frac{2}{1+u^2} du}{ \left[\displaystyle \frac{1-u^2}{1+u^2} \right]^2 + b^2 \left[\displaystyle \frac{2u}{1+u^2}\right]^2}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{ \left[1-u^2 \right]^2 + b^2 \left[2u \right]^2}

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

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

I have transformed the integral Q into a new integral involving a fairly simple rational function that can be evaluated using standard (and non-standard) techniques.

Hypothetically, the magic substitution can be applied to the original integral. Unfortunately, I was unable to make any headway in finding the four complex roots of the resulting rational function. However, since I made the replacement a =0 at the start, this new rational function is much more tractable.

green line

I’ll continue with this fourth evaluation of the integral in tomorrow’s post.

How I Impressed My Wife: Part 5c

Earlier in this series, I gave three different methods of showing that

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 \frac{2\pi}{|b|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient value of a that I want without changing the value of Q. For example, let me substitute a =0:

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}

So that I can employ the magic substitution u = \tan x/2, I’ll divide the interval of integration into two pieces and then perform the substitution x = t + 2\pi on the second piece:

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

= \displaystyle \int_{0}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x} + \int_{-\pi}^{0} \frac{dt}{\cos^2 (t+2\pi) + b^2 \sin^2 (t+2\pi)}

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

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

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

green line

I’ll continue with this fourth evaluation of the integral in tomorrow’s post.