Calculus: Integrals IV
Trigonometric Substitution
The method of trigonometric substitution takes advantage of trigonometric identities. While it may seem counterintuitive to substitute a more complicated term for a simpler one, it in fact ultimately reduces the overall complexity of the integral. The following substitutions prove profitable in this domain:
$$\text{For } \sqrt{a^2-b^2x^2} \text{, let } \dfrac{a}{b}\sin(\theta) = x$$
$$\text{For } \sqrt{a^2 + b^2x^2} \text{, let } \dfrac{a}{b}\tan(\theta) = x$$
$$\text{For } \sqrt{b^2x^2 - a^2} \text{, let } \dfrac{a}{b}\sec^2(\theta) = x$$
Once the substitution has been made, find the proper trigonometric identity to use in order to reduce the sum (or difference) to a single term. For example, the identity $1-\sin^2(\theta) = \cos^2(\theta)$ will do nicely for the first case above. From here, the integral should (hopefully) be simpler to solve.
If often happens that the integral, once evaluated, will no longer be in terms of the original trigonometric function. Perhaps you substituted in a sine but are left with a cosine. How can this ever be resolved? Simply remember the ratios from which sine, cosine, tangent, and the other trigonometric functions are derived. Sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, and so on. Solve for the missing side using the Pythagorean Theorem, and use it to complete the substitution. For example, if the original substitution was $\sin(\theta)=x$, but the result of the integral is in terms of $\cos(\theta)$, then you can substitute $\sqrt{1-x^2}$ back in for $\cos(\theta)$.
Problems
Consider the following integral: $\displaystyle\int \sqrt{x^2+1} + \sqrt{x^2-4} - \sqrt{9-x^2} \, dx$
Part 1: Which trig substitutions should be made for each term of the integral?
Part 2: Make the substitutions and simplify each integral to products of trig functions by eliminating the square roots.Part 1:
For $\sqrt{x^2+1}$, the subsitution should be $\tan(\theta) = x$ such that $\dfrac{dx}{d\theta} = \sec^2(\theta)$.
For $\sqrt{x^2-4}$, the substitution should be $2\sec(\phi) = x$ such that $\dfrac{dx}{d\phi} = 2\tan(\phi)\sec(\phi)$
For $\sqrt{9-x^2}$, the substitution should be $3\sin(\varrho) = x$ such that $\dfrac{dx}{d\varrho} = 3\cos(\varrho)$
Part 2:
$\displaystyle\int \sqrt{x^2+1} + \sqrt{x^2-4} - \sqrt{9-x^2} \, dx \\ = \displaystyle\int \sqrt{x^2+1} \, dx + \displaystyle\int \sqrt{x^2-4} \, dx - \displaystyle\int \sqrt{9-x^2} \, dx \\ = \displaystyle\int \sqrt{\tan^2(\theta) + 1 } \sec^2(\theta) \, d\theta + \displaystyle\int \sqrt{4\sec^2(\phi) - 4}\,2\tan(\phi)\sec(\phi) \, d\phi + \\ \displaystyle\int \sqrt{9 - 9\sin^2(\varrho)}\,3\cos(\rho) \, d\rho \\ = \displaystyle\int \sqrt{\tan^2(\theta) + 1 } \sec^2(\theta) \, d\theta + \displaystyle\int 2\sqrt{\sec^2(\phi) - 1}\,2\tan(\phi)\sec(\phi) \, d\phi + \\ \displaystyle\int 3\sqrt{1 - \sin^2(\varrho)}\,3\cos(\rho) \, d\rho \\ = \displaystyle\int \sqrt{\sec^2(\theta)} \sec^2(\theta) \, d\theta + 4\displaystyle\int \sqrt{\tan^2(\phi)}\tan(\phi)\sec(\phi) \, d\phi + 9\displaystyle\int \sqrt{\cos^2(\varrho)}\cos(\rho) \, d\rho \\ = \displaystyle\int \sec^3(\theta) \, d\theta + 4\displaystyle\int \tan^2(\phi)\sec(\phi) \, d\phi + 9\displaystyle\int \cos^2(\rho) \, d\rho \\ $Evaluate: $\displaystyle\int \sqrt{4-x^2} \, dx$
$\displaystyle\int \sqrt{4-x^2} \, dx = \int \sqrt{2^2-x^2} \, dx \\$
Let $x = 2\sin(\theta)$ such that $\dfrac{dx}{d\theta} = 2\cos(\theta)$. Then $dx = 2\cos(\theta) \, d\theta$. Now substitute back into the original equation:
$ \displaystyle\int \sqrt{4-x^2} \, dx = \int 2\cos(\theta)\sqrt{2^2 - \left(2\sin(\theta)\right)^2} \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = \int 2\cos(\theta)\sqrt{2^2 - 2^2\sin^2(\theta)} \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = \int 4\cos(\theta)\sqrt{1 - \sin^2(\theta)} \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = \int 4\cos(\theta)\sqrt{\cos^2(\theta)} \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = \int 4\cos(\theta)\cos(\theta) \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = \int 4\cos^2(\theta) \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = \int 4\left(\dfrac{1+\cos(2\theta)}{2}\right) \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = \int 2 + 2\cos(2\theta) \, d\theta \\ \displaystyle\int \sqrt{4-x^2} \, dx = 2\theta + \sin(2\theta) + c \\ \displaystyle\int \sqrt{4-x^2} \, dx = 2\theta + 2\sin(\theta)\cos(\theta) + c \\ \displaystyle\int \sqrt{4-x^2} \, dx = 2\theta + 2\sin(\theta)\sqrt{1-\sin^2(\theta)} + c \\ \displaystyle\int \sqrt{4-x^2} \, dx = 2\sin^{-1}\left(\dfrac{x}{2}\right) + x\sqrt{1-\dfrac{1}{4}x^2} + c \\ $Evaluate: $\displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx$
$\displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = \int \dfrac{\sqrt{3^2x^2-9}}{x^2-1} \, dx \\ \displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = \int \dfrac{3\sqrt{x^2-1}}{x^2-1} \, dx \\ \displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = 3\int \dfrac{\sqrt{x^2-1}}{x^2-1} \, dx \\$
Let $x = \sec(\theta)$ such that $\dfrac{dx}{d\theta} = \sec(\theta)\tan(\theta)$. Then $dx = \sec(\theta)\tan(\theta) \, d\theta$. Now substitute back into the original equation:
$\displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = 3 \int \dfrac{\sqrt{\sec^2(\theta) - 1}}{\sec^2(\theta)-1} \sec(\theta)\tan(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = 3 \int \dfrac{\sqrt{\tan^2(\theta)}}{\tan^2(\theta)}\sec(\theta)\tan(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = 3 \int \dfrac{\tan(\theta)}{\tan^2(\theta)}\sec(\theta)\tan(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = 3 \int \sec(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = 3\left(\ln\left| \tan(\theta) + \sec(\theta) \right| + c \right) \\ \displaystyle\int \dfrac{\sqrt{(3x)^2-9}}{x^2-1} \, dx = 3\ln\left| \tan(\theta) + \sec(\theta) \right| + c \\ $
If $\dfrac{\text{Hypotenuse}}{\text{Adjacent}} = \dfrac{x}{1}$, then $\dfrac{\text{Opposite}}{\text{Adjacent}} = \dfrac{\sqrt{x^2-1^2}}{1}$
$y = 3\ln\left| \sqrt{x^2-1} + x \right| + c \\$Simplify: $y = \displaystyle\int \dfrac{\sqrt{x^2-1}}{x^2} \, dx$
$y = \displaystyle\int \dfrac{\sqrt{x^2-1}}{x^2} \, dx$
Let $x = \sec(\theta)$ such that $\dfrac{dx}{d\theta} = \tan(\theta)\sec(\theta)$. Then $dx = \tan(\theta)\sec(\theta) \, d\theta$. Now substitute back into the original equation:
$ y = \int \dfrac{\sqrt{\sec^2(\theta)-1}}{\sec^2(\theta)}\tan(\theta)\sec(\theta) \, d\theta \\ y = \int \dfrac{\sqrt{\tan^2(\theta)}}{\sec^2(\theta)}\tan(\theta)\sec(\theta) \, d\theta \\ y = \int \dfrac{\tan(\theta)}{\sec^2(\theta)}\tan(\theta)\sec(\theta) \, d\theta \\ y = \int \dfrac{\tan^2(\theta)}{\sec(\theta)} \, d\theta \\ y = \int \tan^2(\theta)\cos(\theta) \, d\theta \\ y = \int \left(\sec^2(\theta)-1\right)\cos(\theta) \, d\theta \\ y = \int \cos(\theta)\sec^2(\theta) - \cos(\theta) \, d\theta \\ y = \int \sec(\theta) - \cos(\theta) \, d\theta \\ y = \ln(\tan(\theta) + \sec(\theta)) - \sin(\theta) + c \\ $
If $\dfrac{\text{Hypotenuse}}{\text{Adjacent}} = \dfrac{x}{1}$, then $\text{Opposite} = \sqrt{x^2-1}$:
$y = \ln\left|\dfrac{\sqrt{x^2-1}}{1} + x\right| - \dfrac{\sqrt{x^2-1}}{x} + c \\ y = \ln\left|\sqrt{x^2-1} + x\right| - \dfrac{\sqrt{x^2-1}}{x} + c \\ $Evaluate: $\displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx$
$\displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx \\$
Let $\sec(\theta) = x$ such that $\dfrac{dx}{d\theta} = \tan(\theta)\sec(\theta)$. Then $dx = \tan(\theta)\sec(\theta) \, d\theta$. Now substitute back into the original equation:
$\displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \int \dfrac{\sqrt{\sec^2(\theta)-1}}{\sec(\theta)}\tan(\theta)\sec(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \int \sqrt{\sec^2(\theta)-1}\tan(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \int \sqrt{\tan^2(\theta)}\tan(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \int \tan^2(\theta) \, d\theta \\ \displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \int \sec^2(\theta) - 1 \, d\theta\\ \displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \tan(\theta) - \theta + C $
If $\dfrac{\text{Hypotenuse}}{\text{Adjacent}} = \dfrac{x}{1}$, then $\text{Opposite} = \sqrt{x^2-1}$.
$\displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \tan(\theta) - \theta + c \\ \displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \dfrac{\sqrt{x^2-1}}{1} - \sec^{-1}(x) + c \\ \displaystyle\int \dfrac{\sqrt{x^2-1}}{x} \, dx = \sqrt{x^2-1} - \sec^{-1}(x) + c \\ $Evaluate: $\displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx $ using trigonometric substitution.
$\displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx \\$
Let $\sin(\theta) = x$ such that $\dfrac{dx}{d\theta} = \cos(\theta)$. Then $dx = \cos(\theta) \, d\theta$. Now substitute back into the original equation:
$ \displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \displaystyle\int \dfrac{\sin(\theta)}{\left(1-\sin^2(\theta)\right)^{3/2}} \cos(\theta) \, d\theta \\ \displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \displaystyle\int \dfrac{\sin(\theta)\cos(\theta)}{\left(\cos^2(\theta)\right)^{3/2}} \, d\theta \\ \displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \displaystyle\int \dfrac{\sin(\theta)\cos(\theta)}{\cos^3(\theta)} \, d\theta \\ \displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \displaystyle\int \dfrac{\sin(\theta)}{\cos^2(\theta)} \, d\theta \\ $
You thought this would only involve trigonometric substitution? Nope. Let $u = \cos(\theta)$ such that $\dfrac{du}{d\theta} = -\sin(\theta)$. Then $du = -\sin(\theta) \, d\theta$. Now substitute back into the above equation:
$\displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \displaystyle\int \dfrac{-1}{u^2} \, du \\ \displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \dfrac{1}{u} + c \\ \displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \dfrac{1}{\cos(\theta)} + c \\ $
If $\dfrac{\text{Opposite}}{\text{Hypotenuse}} = \dfrac{x}{1}$ then $\text{Adjacent} = \sqrt{1-x^2}$
$\displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \dfrac{1}{\cos(\theta)} + c \\ \displaystyle\int\dfrac{x}{\left(1 - x^2 \right)^{3/2}} \, dx = \dfrac{1}{\sqrt{1-x^2}} + c \\ $Evaluate: $\displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx$
$\displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \displaystyle\int \dfrac{1}{16x^2\sqrt{x^2+1}} \, dx \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16}\displaystyle\int\dfrac{1}{x^2\sqrt{x^2+1}} \, dx \\ $
Let $x = \tan(\theta)$ such that $\dfrac{dx}{d\theta} = \sec^2(\theta)$
Then $dx = \sec^2(\theta) \, d\theta$
$ \dfrac{1}{16}\displaystyle\int\dfrac{1}{x^2\sqrt{x^2+1}} \, dx = \dfrac{1}{16}\displaystyle\int\dfrac{\sec^2(\theta)}{\tan^2(\theta)\sqrt{\tan^2(\theta)+1}} \, d\theta \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16}\displaystyle\int\dfrac{\sec^2(\theta)}{\tan^2(\theta)\sqrt{\sec^2(\theta)}} \, d\theta \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16}\displaystyle\int\dfrac{\sec^2(\theta)}{\tan^2(\theta)\sec(\theta)} \, d\theta \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16}\displaystyle\int\dfrac{\sec(\theta)}{\tan^2(\theta)} \, d\theta \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16}\displaystyle\int\dfrac{\cos^2(\theta)}{\sin^2(\theta)\cos(\theta)} \, d\theta \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16}\displaystyle\int\dfrac{\cos(\theta)}{\sin^2(\theta)} \, d\theta \\ $
Let $u = \sin(\theta)$ such that $\dfrac{du}{d\theta} = \cos(\theta)$. Then $du = \cos(\theta) \, d\theta$. Now substitute back into the above equation:
$\displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16} \displaystyle\int \dfrac{1}{u^2} \, du \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{1}{16}\left(\dfrac{-1}{u} + c \right)\\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{-1}{16\sin(\theta)} + c \\ $
If $\dfrac{\text{Opposite}}{\text{Adjacent}} = \dfrac{x}{1}$, then $\text{Hypotenuse} = \sqrt{x^2+1}$.
$\displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{-1}{16\sin(\theta)} + c \\ \displaystyle\int \dfrac{1}{4x^2\sqrt{16x^2+16}} \, dx = \dfrac{-\sqrt{x^2+1}}{x} + c \\ $Evaluate: $\displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx$
$\displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx$
Let $u = e^x$ such that $\dfrac{du}{dx} = e^x = u$. Then $dx = \dfrac{du}{u}$. Now substitute back into the original equation:
$\displaystyle\int \dfrac{1}{u^2\sqrt{u^2+1}} \, du$
Let $\tan(\theta) = u$ such that $\dfrac{du}{d\theta} = \sec^2(\theta)$. Then $du = \sec^2(\theta) \, d\theta$. Now substitute back into the above equation:
$\displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{1}{\tan^2(\theta)\sqrt{\tan^2(\theta)+1}}\sec^2(\theta) \, d\theta \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{1}{\tan^2(\theta)\sqrt{\sec^2(\theta)}}\sec^2(\theta) \, d\theta \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{1}{\tan^2(\theta)\sec(\theta)}\sec^2(\theta) \, d\theta \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{1}{\tan^2(\theta)}\sec(\theta) \, d\theta \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{\cos^2(\theta)}{\sin^2(\theta)}\sec(\theta) \, d\theta \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{\cos(\theta)}{\sin^2(\theta)} \, d\theta \\ $
Let $q = \sin(\theta)$ such that $\dfrac{dq}{d\theta} = \cos(\theta)$. Then $dq = \cos(\theta) \, d\theta$. Now substitute back into the above equation:
$\displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{\cos(\theta)}{\sin^2(\theta)} \, d\theta \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \displaystyle\int \dfrac{1}{q^2} \, dq \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \dfrac{-1}{q} + c \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \dfrac{-1}{\sin(\theta) } + c \\ $
If $\dfrac{\text{Opposite}}{\text{Adjacent}} = \dfrac{u}{1}$, then $\text{Hypotenuse} = \sqrt{u^2+1}$. Now substitute back into the above equation:
$\displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \dfrac{-1}{\sin(\theta) } + c \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \dfrac{-\sqrt{u^2+1}}{u} + c \\ \displaystyle\int \dfrac{1}{e^x\sqrt{e^{2x}+1}} \, dx = \dfrac{-\sqrt{e^2x + 1}}{e^x} + c \\ $Evaluate: $\displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx$
$\displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx \\$
Let $u = e^x$ such that $\dfrac{du}{dx} = e^x$. Then $du = e^x \, dx$. Now substitute back into the original equation:
$\displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \displaystyle\int \dfrac{1}{\sqrt{1-u^2}} \, du \\ $
Let $\sin(\theta) = u$ such that $\dfrac{du}{d\theta} = \cos(\theta)$. Then $du = \cos(\theta) \, d\theta$. Now substitute into the above equation:
$\displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \displaystyle\int \dfrac{\cos(\theta)}{\sqrt{1-\sin^2(\theta)}} \, d\theta \\ \displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \displaystyle\int \dfrac{\cos(\theta)}{\sqrt{\cos^2(\theta)}} \, d\theta \\ \displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \displaystyle\int \dfrac{\cos(\theta)}{\cos(\theta)} \, d\theta \\ \displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \displaystyle\int \, d\theta \\ \displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \theta + c \\ \displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \sin^{-1}(u) + c \\ \displaystyle\int \dfrac{e^x}{\sqrt{1-e^{2x}}} \, dx = \sin^{-1}\left(e^x\right) + c \\ $Evaluate: $\displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx$
$\displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{1}{x\left(\left(x^2+1\right)^{1/2}\right)^{3}} \, dx \\ $
Let $\tan(\theta) = x$ such that $\dfrac{dx}{d\theta} = \sec^2(\theta)$. Then $dx = \sec^2(\theta) \, d\theta$. Now substitute back into the original equation:
$\displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{1}{x\left(\left(x^2+1\right)^{1/2}\right)^{3}} \, dx \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{\sec^2(\theta)}{\tan(\theta)\left(\left(\tan^2(\theta)+1\right)^{1/2}\right)^{3}} \, d\theta \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{\sec^2(\theta)}{\tan(\theta)\left(\left(\sec^2(\theta)\right)^{1/2}\right)^{3}} \, d\theta \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{\sec^2(\theta)}{\tan(\theta)\sec^3(\theta)} \, d\theta \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{1}{\tan(\theta)\sec(\theta)} \, d\theta \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{\cos^2(\theta)}{\sin(\theta)} \, d\theta \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int\dfrac{1-\sin^2(\theta)}{\sin(\theta)} \, d\theta \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = \displaystyle\int \csc(\theta) -\sin(\theta) \, d\theta \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = -\ln\left| \csc(\theta) + \cot(\theta) \right| + \cos(\theta) + c \\ $
If $\dfrac{\text{Opposite}}{\text{Adjacent}} = \dfrac{x}{1}$, then $\text{Hypotenuse} = \sqrt{x^2+1}$
$\displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = -\ln\left| \csc(\theta) + \cot(\theta) \right| + \cos(\theta) + c \\ \displaystyle\int\dfrac{1}{x\left(x^2+1\right)^{3/2}} \, dx = -\ln\left| \dfrac{\sqrt{x^2+1}}{x} + \dfrac{1}{x} \right| + \dfrac{1}{\sqrt{x^2+1}} + c \\ $