Given differential equation is
dydx−2x1+x2y=x2+2
Comparing it with the linear differential equation of the form
dydx+Py=Q, we have
P=−2x1+x2 and Q=x2+2
Integrating factor I.F.=e∫P dx
=exp(∫−2x1+x2dx)
=e−log(1+x2) [∵∫f′(x)f(x) dx=log(f(x))]⇒ I.F.=elog11+x2=11+x2 [∵elogx=x]
Hence, the solution of the given differential equation is
y×I.F.=∫(Q×I.F.)dx⇒y×11+x2=∫x2+21+x2 dx⇒y1+x2=∫(1+x21+x2+11+x2)dx⇒y1+x2=∫(1+11+x2)dx⇒y1+x2=x+tan−1x+C⇒y=(1+x2)(x+tan−1x+C)
which is the required general solution of the given differential equation.