How do you integrate int 1/sqrt(e^(2x)+12e^x+27)dx using trigonometric substitution?

Dec 21, 2015

$\int \frac{1}{\sqrt{{e}^{2 x} - 12 {e}^{x} + 27}} \mathrm{dx} =$

$\frac{2 \ln \left(\sqrt{3 {e}^{x} + 9} - \sqrt{{e}^{x} + 9}\right) - x}{3 \sqrt{3}} + C$

where $C$ is an integration constant.

Explanation:

Completing the square at the denominator gives

${e}^{2 x} + 12 {e}^{x} + 27 \equiv {\left({e}^{x} + 6\right)}^{2} - 9$

To make use of the identity

${\sec}^{2} u - 1 \equiv {\tan}^{2} u$,

substitute $3 \sec u = {e}^{x} + 6$.

Differentiate both sides w.r.t. $x$ to get

$3 \sec u \tan u \frac{\mathrm{du}}{\mathrm{dx}} = {e}^{x}$

$= 3 \sec u - 6$

$\frac{\mathrm{du}}{\mathrm{dx}} = \frac{3 \sec u - 6}{3 \sec u \tan u}$

$= \frac{1 - 2 \cos u}{\tan u}$

Now plugging it into the integration,

$\int \frac{1}{\sqrt{{\left({e}^{x} + 6\right)}^{2} - 9}} \mathrm{dx} = \int \frac{1}{\sqrt{{\left(3 \sec u\right)}^{2} - 9}} \frac{\tan u}{1 - 2 \cos u} \mathrm{du}$

$= \frac{1}{3} \int \frac{\mathrm{du}}{1 - 2 \cos u}$

As $\cos u \equiv \frac{1 - {\tan}^{2} \left(\frac{u}{2}\right)}{1 + {\tan}^{2} \left(\frac{u}{2}\right)}$

Let $v = \tan \left(\frac{u}{2}\right)$

Differentiating both sides w.r.t. $u$,

$\frac{\mathrm{dv}}{\mathrm{du}} = \frac{1}{2} {\sec}^{2} \left(\frac{u}{2}\right)$

$= \frac{1 + {\tan}^{2} \left(\frac{u}{2}\right)}{2}$

$= \frac{1 + {v}^{2}}{2}$

Plugging it into the integration,

$\frac{1}{3} \int \frac{\mathrm{du}}{1 - 2 \cos u} = \frac{1}{3} \int \frac{\frac{2 \mathrm{dv}}{1 + {v}^{2}}}{1 - 2 \left(\frac{1 - {v}^{2}}{1 + {v}^{2}}\right)}$

$= \frac{1}{3} \int \frac{2 \mathrm{dv}}{\left(1 + {v}^{2}\right) - 2 \left(1 - {v}^{2}\right)}$

$= \frac{1}{3} \int \frac{2 \mathrm{dv}}{3 {v}^{2} - 1}$

$= \frac{1}{3} \int \left(\frac{1}{\sqrt{3} v - 1} - \frac{1}{\sqrt{3} v + 1}\right) \mathrm{dv}$

$= \frac{1}{3 \sqrt{3}} \int \left(\frac{\sqrt{3}}{\sqrt{3} v - 1} - \frac{\sqrt{3}}{\sqrt{3} v + 1}\right) \mathrm{dv}$

$= \frac{1}{3 \sqrt{3}} \ln \left(\frac{\sqrt{3} v - 1}{\sqrt{3} v + 1}\right) + {C}_{1}$, where ${C}_{1}$ is the constant of integration.

$= \frac{1}{3 \sqrt{3}} \ln \left(\frac{\tan \left(\frac{u}{2}\right) - \frac{1}{\sqrt{3}}}{\tan \left(\frac{u}{2}\right) + \frac{1}{\sqrt{3}}}\right) + {C}_{1}$

As ${\tan}^{2} \left(\frac{u}{2}\right) \equiv \frac{\sec u - 1}{\sec u + 1}$

$\frac{1}{3 \sqrt{3}} \ln \left(\frac{\tan \left(\frac{u}{2}\right) - \frac{1}{\sqrt{3}}}{\tan \left(\frac{u}{2}\right) + \frac{1}{\sqrt{3}}}\right) + {C}_{1} = \frac{1}{3 \sqrt{3}} \ln \left(\frac{\sqrt{\frac{\sec u - 1}{\sec u + 1}} - \frac{1}{\sqrt{3}}}{\sqrt{\frac{\sec u - 1}{\sec u + 1}} + \frac{1}{\sqrt{3}}}\right) + {C}_{1}$

$= \frac{1}{3 \sqrt{3}} \ln \left(\frac{\sqrt{\frac{\frac{{e}^{x} + 6}{3} - 1}{\frac{{e}^{x} + 6}{3} + 1}} - \frac{1}{\sqrt{3}}}{\sqrt{\frac{\frac{{e}^{x} + 6}{3} - 1}{\frac{{e}^{x} + 6}{3} + 1}} + \frac{1}{\sqrt{3}}}\right) + {C}_{1}$

$= \frac{1}{3 \sqrt{3}} \ln \left(\frac{\sqrt{\frac{{e}^{x} + 3}{{e}^{x} + 9}} - \frac{1}{\sqrt{3}}}{\sqrt{\frac{{e}^{x} + 3}{{e}^{x} + 9}} + \frac{1}{\sqrt{3}}}\right) + {C}_{1}$

$= \frac{1}{3 \sqrt{3}} \ln \left(\frac{\sqrt{3} \sqrt{{e}^{x} + 3} - \sqrt{{e}^{x} + 9}}{\sqrt{3} \sqrt{{e}^{x} + 3} + \sqrt{{e}^{x} + 9}}\right) + {C}_{1}$

$= \frac{1}{3 \sqrt{3}} \ln \left(\frac{{\left(\sqrt{3} \sqrt{{e}^{x} + 3} - \sqrt{{e}^{x} + 9}\right)}^{2}}{3 \left({e}^{x} + 3\right) - \left({e}^{x} + 9\right)}\right) + {C}_{1}$

$= \frac{1}{3 \sqrt{3}} \ln \left(\frac{{\left(\sqrt{3} \sqrt{{e}^{x} + 3} - \sqrt{{e}^{x} + 9}\right)}^{2}}{2 {e}^{x}}\right) + {C}_{1}$

$= \frac{1}{3 \sqrt{3}} \ln \left({\left(\sqrt{3} \sqrt{{e}^{x} + 3} - \sqrt{{e}^{x} + 9}\right)}^{2}\right) - \frac{1}{3 \sqrt{3}} \ln \left(2 {e}^{x}\right) + {C}_{1}$

$= \frac{2}{3 \sqrt{3}} \ln \left(\sqrt{3} \sqrt{{e}^{x} + 3} - \sqrt{{e}^{x} + 9}\right) - \frac{x}{3 \sqrt{3}} + {C}_{2}$, where ${C}_{2} = {C}_{1} - \frac{\ln 2}{3 \sqrt{3}}$

$= \frac{2 \ln \left(\sqrt{3 {e}^{x} + 9} - \sqrt{{e}^{x} + 9}\right) - x}{3 \sqrt{3}} + {C}_{2}$