\(\text{Given integtral, }\int\frac{\ln^2x+2\ln x-1}{x}dx\)

\(\text{we have to find the given integral.}\)

\(\text{here,}\int\frac{\ln^2x+2\ln x-1}{x}dx\)

\(\text{substitute } \ln x=t\Rightarrow\frac{1}{x}\frac{dx}{dt}=1\Rightarrow\frac{1}{x}dx=dt\)

\(\Rightarrow, \int\frac{\ln^2x+2\ln x-1}{x}dx=\int(t^2+2t-1)dt\)

\(=\int t^2dt+2\int tdt-\int 1dt\)

\(=\frac{t^3}{3}+2\frac{t^2}{2}-t+C\)

\(=\frac{t^3}{3}+t^2-t+C\)

\(\text{undo substitution }t=\ln x\)

\(\Rightarrow\int\frac{\ln^2x+2\ln x-1}{x}dx=\frac{\ln^3x}{3}+\ln^2x-\ln x+C\)

\(\text{this is the required answer}\)

\(\text{we have to find the given integral.}\)

\(\text{here,}\int\frac{\ln^2x+2\ln x-1}{x}dx\)

\(\text{substitute } \ln x=t\Rightarrow\frac{1}{x}\frac{dx}{dt}=1\Rightarrow\frac{1}{x}dx=dt\)

\(\Rightarrow, \int\frac{\ln^2x+2\ln x-1}{x}dx=\int(t^2+2t-1)dt\)

\(=\int t^2dt+2\int tdt-\int 1dt\)

\(=\frac{t^3}{3}+2\frac{t^2}{2}-t+C\)

\(=\frac{t^3}{3}+t^2-t+C\)

\(\text{undo substitution }t=\ln x\)

\(\Rightarrow\int\frac{\ln^2x+2\ln x-1}{x}dx=\frac{\ln^3x}{3}+\ln^2x-\ln x+C\)

\(\text{this is the required answer}\)