Integral of $$$\frac{\left(x - 4\right) \left(x - 2\right) \left(x - 1\right)}{x - 3}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \frac{\left(x - 4\right) \left(x - 2\right) \left(x - 1\right)}{x - 3}\, dx$$$.
Solution
Let $$$u=x - 3$$$.
Then $$$du=\left(x - 3\right)^{\prime }dx = 1 dx$$$ (steps can be seen »), and we have that $$$dx = du$$$.
The integral can be rewritten as
$${\color{red}{\int{\frac{\left(x - 4\right) \left(x - 2\right) \left(x - 1\right)}{x - 3} d x}}} = {\color{red}{\int{\frac{\left(u - 1\right) \left(u + 1\right) \left(u + 2\right)}{u} d u}}}$$
Expand the expression:
$${\color{red}{\int{\frac{\left(u - 1\right) \left(u + 1\right) \left(u + 2\right)}{u} d u}}} = {\color{red}{\int{\left(u^{2} + 2 u - 1 - \frac{2}{u}\right)d u}}}$$
Integrate term by term:
$${\color{red}{\int{\left(u^{2} + 2 u - 1 - \frac{2}{u}\right)d u}}} = {\color{red}{\left(- \int{1 d u} - \int{\frac{2}{u} d u} + \int{2 u d u} + \int{u^{2} d u}\right)}}$$
Apply the constant rule $$$\int c\, du = c u$$$ with $$$c=1$$$:
$$- \int{\frac{2}{u} d u} + \int{2 u d u} + \int{u^{2} d u} - {\color{red}{\int{1 d u}}} = - \int{\frac{2}{u} d u} + \int{2 u d u} + \int{u^{2} d u} - {\color{red}{u}}$$
Apply the power rule $$$\int u^{n}\, du = \frac{u^{n + 1}}{n + 1}$$$ $$$\left(n \neq -1 \right)$$$ with $$$n=2$$$:
$$- u - \int{\frac{2}{u} d u} + \int{2 u d u} + {\color{red}{\int{u^{2} d u}}}=- u - \int{\frac{2}{u} d u} + \int{2 u d u} + {\color{red}{\frac{u^{1 + 2}}{1 + 2}}}=- u - \int{\frac{2}{u} d u} + \int{2 u d u} + {\color{red}{\left(\frac{u^{3}}{3}\right)}}$$
Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=2$$$ and $$$f{\left(u \right)} = \frac{1}{u}$$$:
$$\frac{u^{3}}{3} - u + \int{2 u d u} - {\color{red}{\int{\frac{2}{u} d u}}} = \frac{u^{3}}{3} - u + \int{2 u d u} - {\color{red}{\left(2 \int{\frac{1}{u} d u}\right)}}$$
The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:
$$\frac{u^{3}}{3} - u + \int{2 u d u} - 2 {\color{red}{\int{\frac{1}{u} d u}}} = \frac{u^{3}}{3} - u + \int{2 u d u} - 2 {\color{red}{\ln{\left(\left|{u}\right| \right)}}}$$
Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=2$$$ and $$$f{\left(u \right)} = u$$$:
$$\frac{u^{3}}{3} - u - 2 \ln{\left(\left|{u}\right| \right)} + {\color{red}{\int{2 u d u}}} = \frac{u^{3}}{3} - u - 2 \ln{\left(\left|{u}\right| \right)} + {\color{red}{\left(2 \int{u d u}\right)}}$$
Apply the power rule $$$\int u^{n}\, du = \frac{u^{n + 1}}{n + 1}$$$ $$$\left(n \neq -1 \right)$$$ with $$$n=1$$$:
$$\frac{u^{3}}{3} - u - 2 \ln{\left(\left|{u}\right| \right)} + 2 {\color{red}{\int{u d u}}}=\frac{u^{3}}{3} - u - 2 \ln{\left(\left|{u}\right| \right)} + 2 {\color{red}{\frac{u^{1 + 1}}{1 + 1}}}=\frac{u^{3}}{3} - u - 2 \ln{\left(\left|{u}\right| \right)} + 2 {\color{red}{\left(\frac{u^{2}}{2}\right)}}$$
Recall that $$$u=x - 3$$$:
$$- 2 \ln{\left(\left|{{\color{red}{u}}}\right| \right)} - {\color{red}{u}} + {\color{red}{u}}^{2} + \frac{{\color{red}{u}}^{3}}{3} = - 2 \ln{\left(\left|{{\color{red}{\left(x - 3\right)}}}\right| \right)} - {\color{red}{\left(x - 3\right)}} + {\color{red}{\left(x - 3\right)}}^{2} + \frac{{\color{red}{\left(x - 3\right)}}^{3}}{3}$$
Therefore,
$$\int{\frac{\left(x - 4\right) \left(x - 2\right) \left(x - 1\right)}{x - 3} d x} = - x + \frac{\left(x - 3\right)^{3}}{3} + \left(x - 3\right)^{2} - 2 \ln{\left(\left|{x - 3}\right| \right)} + 3$$
Simplify:
$$\int{\frac{\left(x - 4\right) \left(x - 2\right) \left(x - 1\right)}{x - 3} d x} = \frac{x^{3}}{3} - 2 x^{2} + 2 x - 2 \ln{\left(\left|{x - 3}\right| \right)} + 3$$
Add the constant of integration (and remove the constant from the expression):
$$\int{\frac{\left(x - 4\right) \left(x - 2\right) \left(x - 1\right)}{x - 3} d x} = \frac{x^{3}}{3} - 2 x^{2} + 2 x - 2 \ln{\left(\left|{x - 3}\right| \right)}+C$$
Answer
$$$\int \frac{\left(x - 4\right) \left(x - 2\right) \left(x - 1\right)}{x - 3}\, dx = \left(\frac{x^{3}}{3} - 2 x^{2} + 2 x - 2 \ln\left(\left|{x - 3}\right|\right)\right) + C$$$A