\( \mathrm{I}=\int\displaystyle(\log x)^2dx \) is equal to: (Consider \( \log_e x=\log x \))
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → \( x\,(\log x)^2-2x\log x+2x+\mathrm{C} \), where \( c \) is an arbitrary constant
Integrating by parts, with \( (\log x)^2 \) as the first function and 1 as the second:
\( \displaystyle \int(\log x)^2\cdot 1\,dx=(\log x)^2\cdot x-\int 2\log x\cdot\frac{1}{x}\cdot x\,dx \)
\( \displaystyle =x(\log x)^2-2\int\log x\,dx \)
Again by parts,
\( \displaystyle \int\log x\,dx=x\log x-\int\frac{1}{x}\cdot x\,dx \)
\( \displaystyle =x\log x-x \)
So
\( \displaystyle \mathrm{I}=x(\log x)^2-2(x\log x-x)+\mathrm{C} \)
\( \displaystyle =x(\log x)^2-2x\log x+2x+\mathrm{C} \)
Shortcut: Differentiate Option (3): \( (\log x)^2+x\cdot\frac{2\log x}{x}-2\log x-2+2=(\log x)^2 \). It returns the integrand.
Why the other options are incorrect
Option (1) \( x\,(\log x)^2+2x\log x+2x+\mathrm{C} \), where \( c \) is an arbitrary constant — Incorrect. The middle term has the wrong sign; differentiating gives \( (\log x)^2+4\log x+4 \), not \( (\log x)^2 \).
Option (2) \( x\,\log x+2x\log x+2x+\mathrm{C} \), where \( c \) is an arbitrary constant — Incorrect. The first term should be \( x(\log x)^2 \), not x log x.
Option (4) \( x\,(\log x)^2-2x\log x-2x+\mathrm{C} \), where \( c \) is an arbitrary constant — Incorrect. The last term has the wrong sign: \( -2\int\log x\,dx=-2x\log x+2x \).