<s>[INST] Cauchy's Problem Question $x(x^2+1)dy-(3x^2+1)ydx= x(x^2+1)^2dx,\ \ y(1)=2$ I want to solve the following equation
$$x(x^2+1)dy-(3x^2+1)ydx= x(x^2+1)^2dx,\ \ y(1)=2$$
what I chose to do is to order the equation to $()dy+()dx=0$ then to find integrating factor. so what I did :
$$(x^2+x)dy=(x(x^2+1)^2+(3x^2+1)y)dx$$
$$(x^2+x)dy=(x(x^4+2x^2+1)+(3x^2y+y))dx$$
$$(x^2+x)dy=(x^5+2x^3+x+3x^2y+y)dx$$
$$(x^2+x)dy+(-x^5-2x^3-x-3x^2y-y)dx$$
set $Q(x,y)=x^2+x,\ \ P(x,y)=-x^5-2x^3-x-3x^2y-y$
$\frac{dQ}{dx}\neq \frac{dP}{dy}$ so I need to find integration factor.
$$\frac{\frac{dP}{dy}-\frac{dQ}{dx}}{Q}=\frac{-3x^2-2x-2}{x^2+x}$$

this is the right way? I need some advice how to continue, thanks.
 [/INST] Use the quotient rule; first, divide by $x^2 (x^2+1)^2 dx$:
$$\frac{x (x^2+1) y'-(3 x^2+1) y}{x^2 (x^2+1)^2} = \frac{1}{x}$$
The LHS may be rewritten:
$$\frac{d}{dx} \frac{y}{x (x^2+1)} = \frac{1}{x}$$
Integrate both sides with respect to $x$:
$$\frac{y}{x (x^2+1)} = \log{x} + C$$
where $C$ is an integration constant.  Using $y(1)=2$ implies that $C=1$.  Therefore
$$y(x) = x (x^2+1) (1+\log{x})$$
</s>