Problem 39:  A difficult integral ($✓$ $✓$ $✓$) 1996 Paper II

Given that $tan\frac{1}{4}\pi =1$ show that $tan\frac{1}{8}\pi =\sqrt{2}-1\phantom{\rule{0.3em}{0ex}}$.

Let

$I={\int }_{-1}^{1}\frac{1}{\phantom{\rule{2.77695pt}{0ex}}\sqrt{1+x\phantom{\rule{2.77695pt}{0ex}}}+\sqrt{1-x\phantom{\rule{2.77695pt}{0ex}}}+2\phantom{\rule{2.77695pt}{0ex}}}\phantom{\rule{2.77695pt}{0ex}}dx\phantom{\rule{2.77695pt}{0ex}}.$

Show, by using the change of variable $x=sin4t\phantom{\rule{0.3em}{0ex}}$, that

$I={\int }_{0}^{\frac{1}{8}\pi }\frac{2cos4t}{{cos}^{2}t}\phantom{\rule{0.3em}{0ex}}dt\phantom{\rule{2.77695pt}{0ex}}.$

Hence show that

$I=4\sqrt{2}-\pi -2\phantom{\rule{2.77695pt}{0ex}}.$

This tests trigonometric manipulation and integration skills. You will certainly need $tan2𝜃$ in terms of $tan𝜃\phantom{\rule{0.3em}{0ex}}$, and $cos2𝜃$ in terms of $cos𝜃$, and maybe other formulae.

Both parts of the question are multistep: there are half a dozen consecutive steps, each different in nature, with no guidance. This is unusual in school-level mathematics but normal in university mathematics.

I checked the answer on Wolfram Alpha, which turned out to be very good indeed at doing this sort of thing. I asked it to do the indeﬁnite integral as well and, in less than a second, it came up with

$\sqrt{1-x}\left[-1-{\left(\sqrt{x+1}+1\right)}^{-1}\right]+{\left[\sqrt{x+1}+1\right]}^{-1}-2arcsin\sqrt{\frac{1}{2}\left(x+1\right)}\phantom{\rule{0.3em}{0ex}}.$

Not a pretty sight and not in its neatest form by a long way: for example, $2arcsin\sqrt{\frac{1}{2}\left(x+1\right)}\phantom{\rule{0.3em}{0ex}}$ reduces, after a bit of algebra, to $\frac{1}{2}\pi +arcsinx\phantom{\rule{0.3em}{0ex}}$. I also asked it to do the same integral with the 2 replaced by a parameter $k$ and it took four seconds. The answer was about 20 times longer than the $k=2$ result but it seemed to enjoy the problem, as far as I could tell.

Solution to problem 39

For the ﬁrst part, to save writing, let $t=tan\frac{\pi }{8}\phantom{\rule{0.3em}{0ex}}$. Then

$\frac{2t}{1-{t}^{2}}=1⇒{t}^{2}+2t-1=0⇒t=\frac{-2±\sqrt{8}}{2}=-1±\sqrt{2}\phantom{\rule{2.77695pt}{0ex}}.$

We take the root with the $+$ sign since we know that $t$ is positive.

Now the integral. Note ﬁrst that the integrand has an obvious symmetry: it is unchanged when $x↔-x$. This means that we can do the integral over the half-range $x=0$ to $x=1$ and double the result. A glance at the required result suggests that this is a good idea.

Substituting $x=sin4t$ as instructed then gives

$I=2{\int }_{0}^{\frac{1}{8}\pi }\frac{4cos4t}{\phantom{\rule{2.77695pt}{0ex}}\sqrt{1+sin4t\phantom{\rule{0.3em}{0ex}}}+\sqrt{1-sin4t\phantom{\rule{0.3em}{0ex}}}+2\phantom{\rule{2.77695pt}{0ex}}}\phantom{\rule{0.3em}{0ex}}\mathrm{d}t$

so to obtain the given answer we need to show that

$\sqrt{1+sin4t\phantom{\rule{0.3em}{0ex}}}+\sqrt{1-sin4t\phantom{\rule{0.3em}{0ex}}}+2=4{cos}^{2}t\phantom{\rule{0.3em}{0ex}},$

i.e.

$\sqrt{1+sin4t\phantom{\rule{0.3em}{0ex}}}+\sqrt{1-sin4t\phantom{\rule{0.3em}{0ex}}}=2cos2t\phantom{\rule{0.3em}{0ex}}.$

If we square both sides of this equation, noting that both sides are positive for the values of $t$ in the integral so this is not dangerous, nice things happen:

$\left(1+sin4t\right)+\left(1-sin4t\right)+2\sqrt{1-{sin}^{2}4t\phantom{\rule{0.3em}{0ex}}}=4{cos}^{2}2t$

i.e.

$2+2cos4t=4{cos}^{2}2t$

which is true by a standard trig. identity, so we have proved what we were required to prove.

For the last part, we have

$cos4t=2{cos}^{2}2t-1=2{\left(2{cos}^{2}t-1\right)}^{2}-1=8{cos}^{4}t-8{cos}^{2}t+1$

so

$I=2{\int }_{0}^{\frac{1}{8}\pi }\left(\right8{cos}^{2}t-8+{sec}^{2}t\right)\phantom{\rule{0.3em}{0ex}}\mathrm{d}t=2{\int }_{0}^{\frac{1}{8}\pi }\left(\right4cos2t-4+{sec}^{2}t\right)\phantom{\rule{0.3em}{0ex}}\mathrm{d}t=2\left[\right2sin2t-4t+tant{\left]\right}_{0}^{\frac{1}{8}\pi },$

which gives the required result.

Post-mortem

Manipulating the integrand after the change of variable was really quite demanding. You could easily go down the wrong track and become mired in algebra. I did it by writing down what I was trying to prove and then showing that it was indeed true. This of course is hazardous, because if you are not careful you might assume the result in order to prove the result. I ﬁnd it helps to write ‘RTP’ (Required To Prove) in the margin to indicate clearly to myself and others that I am not assuming it to be true.

The ﬁrst thing we did with the integral, guided by the given answer, was to use the symmetry $x↔-x$ to reduce the range of integration to $0\le x\le 1$, doubling the result. It is clear from a graph that this works but you could, if you were unsure, split the integral into two parts (integral from $-1$ to 0 plus integral from 0 to 1) then make the change of variable $y=-x$ in the lower integral to show that the two parts are equal.