# How do you integrate int sqrt(x^2+4) by trigonometric substitution?

Jul 23, 2016

$= \frac{x}{2} \sqrt{{x}^{2} + 4} + 2 \ln \left(\frac{1}{2} \left(x + \sqrt{{x}^{2} + 4}\right)\right) + C$

#### Explanation:

we try a tan sub relying on the ID:

${\tan}^{2} \psi + 1 = {\sec}^{2} \psi \quad \star$

so here let ${x}^{2} = 4 {\tan}^{2} z , x = 2 \tan z , \mathrm{dx} = 2 {\sec}^{2} z \setminus \mathrm{dz}$

the integration becomes

$\int \sqrt{{x}^{2} + 4} \setminus \mathrm{dx}$

$= \int \sqrt{4 {\tan}^{2} z + 4} \setminus 2 {\sec}^{2} z \setminus \mathrm{dz}$

$= \int 2 \sec z \setminus 2 {\sec}^{2} z \setminus \mathrm{dz}$

$I = 4 \int {\sec}^{3} z \setminus \mathrm{dz} q \quad \triangle$

and maybe re-use that ID in $\star$ again....

$= 4 \int \sec z \left({\tan}^{2} z + 1\right) \setminus \mathrm{dz}$

$I = 4 \int \textcolor{red}{{\tan}^{2} z \sec z} + \sec z \setminus \mathrm{dz} q \quad \square$

we can have a crack at the red bit using IBP

$\int {\tan}^{2} z \sec z \setminus \mathrm{dz} = \int \tan z \left(\sec z \tan z\right) \setminus \mathrm{dz}$

$= \int \tan z \frac{d}{\mathrm{dz}} \left(\sec z\right) \setminus \mathrm{dz}$

by IBP

$= \sec z \tan z - \int \frac{d}{\mathrm{dz}} \left(\tan z\right) \sec z \setminus \mathrm{dz}$

$= \sec z \tan z - \int {\sec}^{3} z \setminus \mathrm{dz}$

$= \sec z \tan z - \frac{I}{4}$ from $\triangle$

so re-stating $\square$

$I = 4 \int \textcolor{red}{{\tan}^{2} z \sec z} \setminus \mathrm{dz} + 4 \int \setminus \sec z \setminus \mathrm{dz}$

$= 4 \left(\sec z \tan z - \frac{I}{4}\right) + 4 \int \setminus \sec z \setminus \mathrm{dz}$

$I = 2 \sec z \tan z + 2 \int \setminus \sec z \setminus \mathrm{dz}$

and using the standard integral for $\sec z$

$I = 2 \sec z \tan z + 2 \ln \left(\tan z + \sec z\right) + C$

recap
$\tan z = \frac{x}{2}$
$\sec z = \sqrt{{x}^{2} / 4 + 1}$

$I = 2 \frac{x}{2} \sqrt{{x}^{2} / 4 + 1} + 2 \ln \left(\frac{x}{2} + \sqrt{{x}^{2} / 4 + 1}\right) + C$

$= \frac{x}{2} \sqrt{{x}^{2} + 4} + 2 \ln \left(\frac{1}{2} \left(x + \sqrt{{x}^{2} + 4}\right)\right) + C$