Integral of $$$r \ln\left(r\right) - r + 1$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \left(r \ln\left(r\right) - r + 1\right)\, dr$$$.
Solution
Integrate term by term:
$${\color{red}{\int{\left(r \ln{\left(r \right)} - r + 1\right)d r}}} = {\color{red}{\left(\int{1 d r} - \int{r d r} + \int{r \ln{\left(r \right)} d r}\right)}}$$
Apply the constant rule $$$\int c\, dr = c r$$$ with $$$c=1$$$:
$$- \int{r d r} + \int{r \ln{\left(r \right)} d r} + {\color{red}{\int{1 d r}}} = - \int{r d r} + \int{r \ln{\left(r \right)} d r} + {\color{red}{r}}$$
Apply the power rule $$$\int r^{n}\, dr = \frac{r^{n + 1}}{n + 1}$$$ $$$\left(n \neq -1 \right)$$$ with $$$n=1$$$:
$$r + \int{r \ln{\left(r \right)} d r} - {\color{red}{\int{r d r}}}=r + \int{r \ln{\left(r \right)} d r} - {\color{red}{\frac{r^{1 + 1}}{1 + 1}}}=r + \int{r \ln{\left(r \right)} d r} - {\color{red}{\left(\frac{r^{2}}{2}\right)}}$$
For the integral $$$\int{r \ln{\left(r \right)} d r}$$$, use integration by parts $$$\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}$$$.
Let $$$\operatorname{u}=\ln{\left(r \right)}$$$ and $$$\operatorname{dv}=r dr$$$.
Then $$$\operatorname{du}=\left(\ln{\left(r \right)}\right)^{\prime }dr=\frac{dr}{r}$$$ (steps can be seen ») and $$$\operatorname{v}=\int{r d r}=\frac{r^{2}}{2}$$$ (steps can be seen »).
Therefore,
$$- \frac{r^{2}}{2} + r + {\color{red}{\int{r \ln{\left(r \right)} d r}}}=- \frac{r^{2}}{2} + r + {\color{red}{\left(\ln{\left(r \right)} \cdot \frac{r^{2}}{2}-\int{\frac{r^{2}}{2} \cdot \frac{1}{r} d r}\right)}}=- \frac{r^{2}}{2} + r + {\color{red}{\left(\frac{r^{2} \ln{\left(r \right)}}{2} - \int{\frac{r}{2} d r}\right)}}$$
Apply the constant multiple rule $$$\int c f{\left(r \right)}\, dr = c \int f{\left(r \right)}\, dr$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(r \right)} = r$$$:
$$\frac{r^{2} \ln{\left(r \right)}}{2} - \frac{r^{2}}{2} + r - {\color{red}{\int{\frac{r}{2} d r}}} = \frac{r^{2} \ln{\left(r \right)}}{2} - \frac{r^{2}}{2} + r - {\color{red}{\left(\frac{\int{r d r}}{2}\right)}}$$
Apply the power rule $$$\int r^{n}\, dr = \frac{r^{n + 1}}{n + 1}$$$ $$$\left(n \neq -1 \right)$$$ with $$$n=1$$$:
$$\frac{r^{2} \ln{\left(r \right)}}{2} - \frac{r^{2}}{2} + r - \frac{{\color{red}{\int{r d r}}}}{2}=\frac{r^{2} \ln{\left(r \right)}}{2} - \frac{r^{2}}{2} + r - \frac{{\color{red}{\frac{r^{1 + 1}}{1 + 1}}}}{2}=\frac{r^{2} \ln{\left(r \right)}}{2} - \frac{r^{2}}{2} + r - \frac{{\color{red}{\left(\frac{r^{2}}{2}\right)}}}{2}$$
Therefore,
$$\int{\left(r \ln{\left(r \right)} - r + 1\right)d r} = \frac{r^{2} \ln{\left(r \right)}}{2} - \frac{3 r^{2}}{4} + r$$
Simplify:
$$\int{\left(r \ln{\left(r \right)} - r + 1\right)d r} = \frac{r \left(2 r \ln{\left(r \right)} - 3 r + 4\right)}{4}$$
Add the constant of integration:
$$\int{\left(r \ln{\left(r \right)} - r + 1\right)d r} = \frac{r \left(2 r \ln{\left(r \right)} - 3 r + 4\right)}{4}+C$$
Answer
$$$\int \left(r \ln\left(r\right) - r + 1\right)\, dr = \frac{r \left(2 r \ln\left(r\right) - 3 r + 4\right)}{4} + C$$$A