# How I Impressed My Wife: Part 3e

Previously in this series, I showed 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|}.$

My wife had asked me to compute this integral by hand because Mathematica 4 and Mathematica 8 gave different answers. At the time, I eventually obtained the solution by multiplying the top and bottom of the integrand by $\sec^2 x$ and then employing the substitution $u = \tan x$ (after using trig identities to adjust the limits of integration).
But this wasn’t the only method I tried. Indeed, I tried two or three different methods before deciding they were too messy and trying something different. So, for the rest of this series, I’d like to explore different ways that the above integral can be computed.

So far, I have shown 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 \int_0^{2\pi} \frac{2 \, dx}{1+\cos 2x + 2 a \sin 2x + (a^2 + b^2)(1-\cos 2x)}$ $= 2 \displaystyle \int_0^{2\pi} \frac{d\theta}{(1+a^2+b^2) + 2 a \sin \theta + (1 - a^2 - b^2) \cos \theta}$ $= 2 \displaystyle \int_{0}^{2\pi} \frac{d\theta}{S + R \cos (\theta - \alpha)}$ $= 2 \displaystyle \int_{0}^{2\pi} \frac{d\phi}{S + R \cos \phi}$.

where $R = \sqrt{(2a)^2 + (1-a^2-b^2)^2}$ and $S = 1 + a^2 + b^2$ (and $\alpha$ is a certain angle that is now irrelevant at this point in the calculation).

I now write $Q$ as a new sum $Q_5 + Q_6$ by again dividing the region of integration: $Q_5 = 2 \displaystyle \int_{0}^{\pi} \frac{d\phi}{S + R \cos \phi}$, $Q_6 = 2 \displaystyle \int_{\pi}^{2\pi} \frac{d\phi}{S + R \cos \phi}$.

For $Q_6$, I employ the substitution $u = \phi - 2\pi$, so that $\phi = u + 2\pi$ and $d\phi= du$. Also, the interval of integration changes from $\pi \le \phi \le 2\pi$ to $-\pi \le u \le 0$, so that $Q_6 = 2 \displaystyle \int_{-\pi}^{0} \frac{du}{S + R \cos (u + 2\pi)}$

Next, I employ the trigonometric identity $\cos(u + 2\pi) = \cos u$: $Q_6 = 2 \displaystyle \int_{-\pi}^{0} \frac{du}{S + R \cos u} = 2 \displaystyle \int_{-\pi}^{0} \frac{d\phi}{S + R \cos \phi}$,

where I have changed the dummy variable from $u$ back to $\phi$.

Therefore, $Q = Q_6 + Q_5$ becomes $Q = 2 \displaystyle \int_{-\pi}^{0} \frac{d\phi}{S + R \cos \phi} + 2 \displaystyle \int_{0}^{\pi} \frac{d\phi}{S + R \cos \phi}$ $= 2 \displaystyle \int_{-\pi}^{\pi} \frac{d\phi}{S + R \cos \phi}$.

Once again, the fact that the integrand is over an interval of length $2\pi$ allows me to shift the interval of integration. I’ll continue this different method of evaluating this integral in tomorrow’s post.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8958757,"math_prob":0.99997795,"size":676,"snap":"2019-51-2020-05","text_gpt3_token_len":146,"char_repetition_ratio":0.13690476,"word_repetition_ratio":0.0,"special_character_ratio":0.22337279,"punctuation_ratio":0.1521739,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000066,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-07T14:04:33Z\",\"WARC-Record-ID\":\"<urn:uuid:90843e28-2bcb-4660-81f1-06aed1692cdf>\",\"Content-Length\":\"99116\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3c30c901-cb3b-4819-99aa-ee922c664558>\",\"WARC-Concurrent-To\":\"<urn:uuid:c7ce7593-0326-4d8f-b091-683b479c9f1d>\",\"WARC-IP-Address\":\"192.0.78.25\",\"WARC-Target-URI\":\"https://meangreenmath.com/2015/07/30/how-i-impressed-my-wife-part-3e-2/\",\"WARC-Payload-Digest\":\"sha1:YAWZKDO25FLH3JNZVQ47K5MHR7TJNV4P\",\"WARC-Block-Digest\":\"sha1:HF5DUJ3Q3NNVC3DZDTXWA2F6WERFKMKI\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575540499439.6_warc_CC-MAIN-20191207132817-20191207160817-00170.warc.gz\"}"}