Integral of $$$\frac{x^{2}}{x^{4} - 2 x^{2} - 8}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \frac{x^{2}}{x^{4} - 2 x^{2} - 8}\, dx$$$.
Solution
Perform partial fraction decomposition (steps can be seen »):
$${\color{red}{\int{\frac{x^{2}}{x^{4} - 2 x^{2} - 8} d x}}} = {\color{red}{\int{\left(\frac{1}{3 \left(x^{2} + 2\right)} - \frac{1}{6 \left(x + 2\right)} + \frac{1}{6 \left(x - 2\right)}\right)d x}}}$$
Integrate term by term:
$${\color{red}{\int{\left(\frac{1}{3 \left(x^{2} + 2\right)} - \frac{1}{6 \left(x + 2\right)} + \frac{1}{6 \left(x - 2\right)}\right)d x}}} = {\color{red}{\left(\int{\frac{1}{6 \left(x - 2\right)} d x} - \int{\frac{1}{6 \left(x + 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x}\right)}}$$
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{6}$$$ and $$$f{\left(x \right)} = \frac{1}{x + 2}$$$:
$$\int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x} - {\color{red}{\int{\frac{1}{6 \left(x + 2\right)} d x}}} = \int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x} - {\color{red}{\left(\frac{\int{\frac{1}{x + 2} d x}}{6}\right)}}$$
Let $$$u=x + 2$$$.
Then $$$du=\left(x + 2\right)^{\prime }dx = 1 dx$$$ (steps can be seen »), and we have that $$$dx = du$$$.
Thus,
$$\int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x} - \frac{{\color{red}{\int{\frac{1}{x + 2} d x}}}}{6} = \int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x} - \frac{{\color{red}{\int{\frac{1}{u} d u}}}}{6}$$
The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:
$$\int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x} - \frac{{\color{red}{\int{\frac{1}{u} d u}}}}{6} = \int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x} - \frac{{\color{red}{\ln{\left(\left|{u}\right| \right)}}}}{6}$$
Recall that $$$u=x + 2$$$:
$$- \frac{\ln{\left(\left|{{\color{red}{u}}}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x} = - \frac{\ln{\left(\left|{{\color{red}{\left(x + 2\right)}}}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \int{\frac{1}{3 \left(x^{2} + 2\right)} d x}$$
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{3}$$$ and $$$f{\left(x \right)} = \frac{1}{x^{2} + 2}$$$:
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + {\color{red}{\int{\frac{1}{3 \left(x^{2} + 2\right)} d x}}} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + {\color{red}{\left(\frac{\int{\frac{1}{x^{2} + 2} d x}}{3}\right)}}$$
Let $$$u=\frac{\sqrt{2}}{2} x$$$.
Then $$$du=\left(\frac{\sqrt{2}}{2} x\right)^{\prime }dx = \frac{\sqrt{2}}{2} dx$$$ (steps can be seen »), and we have that $$$dx = \sqrt{2} du$$$.
Thus,
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{{\color{red}{\int{\frac{1}{x^{2} + 2} d x}}}}{3} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{{\color{red}{\int{\frac{\sqrt{2}}{2 \left(u^{2} + 1\right)} d u}}}}{3}$$
Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=\frac{\sqrt{2}}{2}$$$ and $$$f{\left(u \right)} = \frac{1}{u^{2} + 1}$$$:
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{{\color{red}{\int{\frac{\sqrt{2}}{2 \left(u^{2} + 1\right)} d u}}}}{3} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{{\color{red}{\left(\frac{\sqrt{2} \int{\frac{1}{u^{2} + 1} d u}}{2}\right)}}}{3}$$
The integral of $$$\frac{1}{u^{2} + 1}$$$ is $$$\int{\frac{1}{u^{2} + 1} d u} = \operatorname{atan}{\left(u \right)}$$$:
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{\sqrt{2} {\color{red}{\int{\frac{1}{u^{2} + 1} d u}}}}{6} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{\sqrt{2} {\color{red}{\operatorname{atan}{\left(u \right)}}}}{6}$$
Recall that $$$u=\frac{\sqrt{2}}{2} x$$$:
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{\sqrt{2} \operatorname{atan}{\left({\color{red}{u}} \right)}}{6} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \int{\frac{1}{6 \left(x - 2\right)} d x} + \frac{\sqrt{2} \operatorname{atan}{\left({\color{red}{\frac{\sqrt{2}}{2} x}} \right)}}{6}$$
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{6}$$$ and $$$f{\left(x \right)} = \frac{1}{x - 2}$$$:
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6} + {\color{red}{\int{\frac{1}{6 \left(x - 2\right)} d x}}} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6} + {\color{red}{\left(\frac{\int{\frac{1}{x - 2} d x}}{6}\right)}}$$
Let $$$u=x - 2$$$.
Then $$$du=\left(x - 2\right)^{\prime }dx = 1 dx$$$ (steps can be seen »), and we have that $$$dx = du$$$.
Thus,
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6} + \frac{{\color{red}{\int{\frac{1}{x - 2} d x}}}}{6} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6} + \frac{{\color{red}{\int{\frac{1}{u} d u}}}}{6}$$
The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6} + \frac{{\color{red}{\int{\frac{1}{u} d u}}}}{6} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6} + \frac{{\color{red}{\ln{\left(\left|{u}\right| \right)}}}}{6}$$
Recall that $$$u=x - 2$$$:
$$- \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\ln{\left(\left|{{\color{red}{u}}}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6} = - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\ln{\left(\left|{{\color{red}{\left(x - 2\right)}}}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2}}{2} x \right)}}{6}$$
Therefore,
$$\int{\frac{x^{2}}{x^{4} - 2 x^{2} - 8} d x} = \frac{\ln{\left(\left|{x - 2}\right| \right)}}{6} - \frac{\ln{\left(\left|{x + 2}\right| \right)}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2} x}{2} \right)}}{6}$$
Simplify:
$$\int{\frac{x^{2}}{x^{4} - 2 x^{2} - 8} d x} = \frac{\ln{\left(\left|{x - 2}\right| \right)} - \ln{\left(\left|{x + 2}\right| \right)} + \sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2} x}{2} \right)}}{6}$$
Add the constant of integration:
$$\int{\frac{x^{2}}{x^{4} - 2 x^{2} - 8} d x} = \frac{\ln{\left(\left|{x - 2}\right| \right)} - \ln{\left(\left|{x + 2}\right| \right)} + \sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2} x}{2} \right)}}{6}+C$$
Answer
$$$\int \frac{x^{2}}{x^{4} - 2 x^{2} - 8}\, dx = \frac{\ln\left(\left|{x - 2}\right|\right) - \ln\left(\left|{x + 2}\right|\right) + \sqrt{2} \operatorname{atan}{\left(\frac{\sqrt{2} x}{2} \right)}}{6} + C$$$A