#### Answer

$$\frac{{{{\ln }^3}x}}{3} - {\ln ^2}x - \ln \left| x \right| + C$$

#### Work Step by Step

$$\eqalign{
& \int {\frac{{{{\ln }^2}x + 2\ln x - 1}}{x}} dx \cr
& = \int {\left( {\frac{{{{\ln }^2}x}}{x} - \frac{{2\ln x}}{x} - \frac{1}{x}} \right)} dx \cr
& {\text{split integrand}} \cr
& = \int {\frac{{{{\ln }^2}x}}{x}} dx - \int {\frac{{2\ln x}}{x}} dx - \int {\frac{1}{x}} dx \cr
& = \int {{{\ln }^2}x\left( {\frac{1}{x}} \right)} dx - 2\int {\ln x\left( {\frac{1}{x}} \right)} dx - \int {\frac{1}{x}} dx \cr
& {\text{integrate by the power rule}} \cr
& = \frac{{{{\ln }^3}x}}{3} - 2\left( {\frac{{{{\ln }^2}x}}{2}} \right) - \ln \left| x \right| + C \cr
& {\text{simplify}} \cr
& = \frac{{{{\ln }^3}x}}{3} - {\ln ^2}x - \ln \left| x \right| + C \cr} $$