The solution of the differential equation \( \displaystyle\frac{dy}{dx}=x^{2}+x+\frac{1}{x} \) is
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \( y=\displaystyle\frac{x^{3}}{3}+\frac{x^{2}}{2}+\log_{e}|x|+C \) : C is an arbitrary constant
The equation is in variables separable form, \( dy=\left(x^{2}+x+\frac{1}{x}\right)dx \). Integrating both sides:
\( \displaystyle y=\int\left(x^{2}+x+\frac{1}{x}\right)dx \)
\( \displaystyle =\frac{x^{3}}{3}+\frac{x^{2}}{2}+\log_{e}|x|+C \)
using \( \int x^{n}\,dx=\frac{x^{n+1}}{n+1} \) and \( \int\frac{1}{x}\,dx=\log_{e}|x| \).
Shortcut: Differentiate each option. Only Option (2) gives back \( x^{2}+x+\frac{1}{x} \); Option (4), for example, gives \( 3x^{2}+2x+\frac{1}{x} \).