Question:medium

Solve the differential equation: \((1+x^2)\,dy+2xy\,dx=\cot x\,dx\).

Show Hint

Convert to linear form dy/dx + Py = Q, find IF = 1+x^2, and integrate cot x.
Updated On: Sep 23, 2026
Show Solution

Solution and Explanation

Step 1: Recognize the left side as an exact product derivative in disguise:
Notice $d\big[y(1+x^2)\big]=(1+x^2)\,dy+2xy\,dx$ exactly matches the left side of the given equation — this is the product rule for $y\cdot(1+x^2)$.

Step 2: Rewrite the whole equation using this observation:
$d\big[y(1+x^2)\big]=\cot x\,dx$.

Step 3: Integrate both sides directly:
$y(1+x^2)=\int\cot x\,dx=\ln|\sin x|+C$.

Final Answer:
\[ \boxed{y=\dfrac{\ln|\sin x|+C}{1+x^2}} \]
Was this answer helpful?
0