How do you evaluate the integral int (sin^2x-cos^2x)/cosx from [-pi/4, pi/4]?

1 Answer
Nov 4, 2016

${\int}_{- \frac{\pi}{4}}^{\frac{\pi}{4}} \frac{{\sin}^{2} x - {\cos}^{2} x}{\cos} x \mathrm{dx} = \ln \left(3 + 2 \sqrt{2}\right)$

Explanation:

Using the fundamental trig Identity ${\sin}^{2} A + {\cos}^{2} A \equiv 1$ we have

${\int}_{- \frac{\pi}{4}}^{\frac{\pi}{4}} \frac{{\sin}^{2} x - {\cos}^{2} x}{\cos} x \mathrm{dx} = {\int}_{- \frac{\pi}{4}}^{\frac{\pi}{4}} \frac{1 - {\cos}^{2} x - {\cos}^{2} x}{\cos} x \mathrm{dx}$

$= {\int}_{- \frac{\pi}{4}}^{\frac{\pi}{4}} \frac{1 - 2 {\cos}^{2} x}{\cos} x \mathrm{dx}$
$= {\int}_{- \frac{\pi}{4}}^{\frac{\pi}{4}} \frac{1}{\cos} x - 2 \cos x \mathrm{dx}$
$= {\int}_{- \frac{\pi}{4}}^{\frac{\pi}{4}} \sec x - 2 \cos x \mathrm{dx}$
$= {\left[\ln | \sec x + \tan x | - 2 \sin x\right]}_{- \frac{\pi}{4}}^{\frac{\pi}{4}}$

$= \left(\ln | \sec \left(\frac{\pi}{4}\right) + \tan \left(\frac{\pi}{4}\right) | - 2 \sin \left(\frac{\pi}{4}\right)\right) - \left(\ln | \sec \left(- \frac{\pi}{4}\right) + \tan \left(- \frac{\pi}{4}\right) | - 2 \sin \left(- \frac{\pi}{4}\right)\right)$

$= \left(\ln \left(\sqrt{2} + 1\right) - 2 \frac{1}{2} \sqrt{2}\right) - \left(\ln \left(\sqrt{2} - 1\right) - 2 \frac{1}{2} \sqrt{2}\right)$
$= \ln \left(\sqrt{2} + 1\right) - 2 \frac{1}{2} \sqrt{2} - \ln \left(\sqrt{2} - 1\right) + 2 \frac{1}{2} \sqrt{2}$
$= \ln \left(\sqrt{2} + 1\right) - \ln \left(\sqrt{2} - 1\right)$
$= \ln \left(\frac{\sqrt{2} + 1}{\sqrt{2} - 1}\right)$
$= \ln \left(\frac{\sqrt{2} + 1}{\sqrt{2} - 1} \cdot \frac{\sqrt{2} + 1}{\sqrt{2} + 1}\right)$
$= \ln \left(\frac{2 + 2 \sqrt{2} + 1}{2 - 1}\right)$
$= \ln \left(3 + 2 \sqrt{2}\right)$