# How I Impressed My Wife: Part 5b

Amazingly, the integral below has a simple solution:

$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|}.$

Even more amazingly, the integral $Q$ ultimately does not depend on the parameter $a$. For several hours, I tried to figure out a way to demonstrate that $Q$ is independent of $a$, but I couldn’t figure out a way to do this without substantially simplifying the integral, but I’ve been unable to do so (at least so far).

So here’s what I have been able to develop to prove that $Q$ is independent of $a$ without directly computing the integral $Q$.

Earlier in this series, I showed that

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

$= 2 \displaystyle \int_{-\pi/2}^{\pi/2} \frac{\sec^2 x dx}{1 + 2 a \tan x + (a^2 + b^2) \tan^2 x}$

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

$= \displaystyle \frac{2}{a^2+b^2} \int_{-\infty}^{\infty} \frac{dv}{v^2 + \displaystyle \frac{b^2}{(a^2+b^2)^2} }$

$= \displaystyle 2 \int_{-\infty}^{\infty} \frac{(a^2+ b^2) dv}{(a^2 + b^2) v^2 + b^2 }$

Yesterday, I showed used the substitution $w = (a^2 + b^2) v$ to show that $Q$ was independent of $a$. Today, I’ll use a different method to establish the same result. Let

$Q(a) = \displaystyle 2 \int_{-\infty}^{\infty} \frac{(a^2+b^2) dv}{(a^2+b^2)^2 v^2 + b^2 }$.

Notice that I’ve written this integral as a function of the parameter $a$. I will demonstrate that $Q'(a) = 0$, so that $Q(c)$ is a constant with respect to $a$. In other words, $Q(a)$ does not depend on $a$.

To do this, I differentiate under the integral sign with respect to $a$ (as opposed to $x$) using the Quotient Rule:

$Q'(a) = \displaystyle 2 \int_{-\infty}^{\infty} \frac{ 2a \left[ (a^2+b^2)^2 v^2 + b^2\right] - 2 (a^2+b^2) \cdot (a^2+b^2) v^2 \cdot 2a }{\left[ (a^2+b^2)^2 v^2 + b^2 \right]^2} dv$

$Q'(a) = \displaystyle 4a \int_{-\infty}^{\infty} \frac{(a^2+b^2)^2 v^2 + b^2- 2 (a^2+b^2)^2 v^2}{\left[ (a^2+b^2)^2 v^2 + b^2 \right]^2} dv$

$Q'(a) = \displaystyle 4a \int_{-\infty}^{\infty} \frac{b^2-(a^2+b^2)^2 v^2}{\left[ (a^2+b^2)^2 v^2 + b^2 \right]^2} dv$

I now apply the trigonometric substitution $v = \displaystyle \frac{b}{a^2+b^2} \tan \theta$, so that

$(a^2+b^2)^2 v^2 = (a^2+b^2)^2 \displaystyle \left[ \frac{b}{a^2+b^2} \tan \theta \right]^2 = b^2 \tan^2 \theta$

and

$dv = \displaystyle \frac{b}{a^2+b^2} \sec^2 \theta \, d\theta$

The endpoints of integration change from $-\infty < v < \infty$ to $-\pi/2 < \theta < \pi/2$, and so

$Q'(a) = \displaystyle 4a \int_{-\pi/2}^{\pi/2} \frac{b^2- b^2 \tan^2 \theta}{\left[ b^2 \tan^2 \theta + b^2 \right]^2} \frac{b}{a^2+b^2} \sec^2 \theta \, d\theta$

$= \displaystyle \frac{4ab^3}{a^2+b^2} \int_{-\pi/2}^{\pi/2} \frac{[1- \tan^2 \theta] \sec^2 \theta}{\left[ \tan^2 \theta +1 \right]^2} d\theta$

$= \displaystyle \frac{4ab^3}{a^2+b^2} \int_{-\pi/2}^{\pi/2} \frac{[1-\tan^2 \theta] \sec^2 \theta}{\left[ \sec^2 \theta \right]^2} d\theta$

$= \displaystyle \frac{4ab^3}{a^2+b^2} \int_{-\pi/2}^{\pi/2} \frac{[1-\tan^2 \theta] \sec^2 \theta}{\sec^4 \theta} d\theta$

$= \displaystyle \frac{4ab^3}{a^2+b^2} \int_{-\pi/2}^{\pi/2} \frac{[1- \tan^2 \theta]}{\sec^2 \theta} d\theta$

$= \displaystyle \frac{4ab^3}{a^2+b^2} \int_{-\pi/2}^{\pi/2} [1- \tan^2 \theta] \cos^2 \theta \, d\theta$

$= \displaystyle \frac{4ab^3}{a^2+b^2} \int_{-\pi/2}^{\pi/2} [\cos^2 \theta -\sin^2 \theta] d\theta$

$= \displaystyle \frac{4ab^3}{a^2+b^2} \int_{-\pi/2}^{\pi/2} \cos 2\theta \, d\theta$

$= \displaystyle \left[ \frac{2ab^3}{a^2+b^2} \sin 2\theta \right]^{\pi/2}_{-\pi/2}$

$= \displaystyle \frac{2ab^3}{a^2+b^2} \left[ \sin \pi - \sin (-\pi) \right]$

$= \displaystyle \frac{2ab^3}{a^2+b^2} \left[ 0- 0 \right]$

$= 0$.

I’m not completely thrilled with this demonstration that $Q$ is independent of $a$, mostly because I had to do so much simplification of the integral $Q$ to get this result. As I mentioned in yesterday’s post, I’d love to figure out a way to directly start with

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

and demonstrate that $Q$ is independent of $a$, perhaps by differentiating $Q$ with respect to $a$ and demonstrating that the resulting integral must be equal to 0. However, despite several hours of trying, I’ve not been able to establish this result without simplifying $Q$ first.