General solution of the differential equation \( (1+x^2)\,dy+2xy\,dx=\cot x\,dx \) is:
(where C is an arbitrary constant)
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → \( y(1+x^2)=\log_e|\sin x|+c \)
The left side is an exact differential: by the product rule, \( d\left[y(1+x^2)\right]=(1+x^2)\,dy+2xy\,dx \). So the equation is
\( \displaystyle d\left[y(1+x^2)\right]=\cot x\,dx \)
Integrating both sides, with \( \int\cot x\,dx=\log_e|\sin x| \):
\( \displaystyle y(1+x^2)=\log_e|\sin x|+c \)
(The same result follows from the linear form \( \frac{dy}{dx}+\frac{2x}{1+x^2}\,y=\frac{\cot x}{1+x^2} \), whose integrating factor is \( 1+x^2 \).)
Why the other options are incorrect
Option (2) \( x(1+y^2)=\log_e|\sin x|+c \) — Incorrect. The factor \( 1+x^2 \) multiplies y, not x, and there is no \( y^2 \) in the equation.
Option (3) \( y(1+x^2)=\log_e|\cos x|+c \) — Incorrect. This uses \( \int\cot x\,dx=\log_e|\cos x| \); in fact \( \int\cot x\,dx=\log_e|\sin x| \), since the derivative of sin x is cos x.
Option (4) \( x(1+y^2)=\log_e|\cos x|+c \) — Incorrect. The left side should be \( y(1+x^2) \), and \( \int\cot x\,dx \) is \( \log_e|\sin x| \), not \( \log_e|\cos x| \).
NCERT (2026-27 edition):
Linear Differential Equations

