Respuesta :
Check if the equation is exact, which happens for ODEs of the form
[tex]M(x,y)\,\mathrm dx+N(x,y)\,\mathrm dy=0[/tex]
if [tex]\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}[/tex].
We have
[tex]M(x,y)=x^2+y^2+x\implies\dfrac{\partial M}{\partial y}=2y[/tex]
[tex]N(x,y)=xy\implies\dfrac{\partial N}{\partial x}=y[/tex]
so the ODE is not quite exact, but we can find an integrating factor [tex]\mu(x,y)[/tex] so that
[tex]\mu(x,y)M(x,y)\,\mathrm dx+\mu(x,y)N(x,y)\,\mathrm dy=0[/tex]
is exact, which would require
[tex]\dfrac{\partial(\mu M)}{\partial y}=\dfrac{\partial(\mu N)}{\partial x}\implies \dfrac{\partial\mu}{\partial y}M+\mu\dfrac{\partial M}{\partial y}=\dfrac{\partial\mu}{\partial x}N+\mu\dfrac{\partial N}{\partial x}[/tex]
[tex]\implies\mu\left(\dfrac{\partial N}{\partial x}-\dfrac{\partial M}{\partial y}\right)=M\dfrac{\partial\mu}{\partial y}-N\dfrac{\partial\mu}{\partial x}[/tex]
Notice that
[tex]\dfrac{\partial N}{\partial x}-\dfrac{\partial M}{\partial y}=y-2y=-y[/tex]
is independent of x, and dividing this by [tex]N(x,y)=xy[/tex] gives an expression independent of y. If we assume [tex]\mu=\mu(x)[/tex] is a function of x alone, then [tex]\frac{\partial\mu}{\partial y}=0[/tex], and the partial differential equation above gives
[tex]-\mu y=-xy\dfrac{\mathrm d\mu}{\mathrm dx}[/tex]
which is separable and we can solve for [tex]\mu[/tex] easily.
[tex]-\mu=-x\dfrac{\mathrm d\mu}{\mathrm dx}[/tex]
[tex]\dfrac{\mathrm d\mu}\mu=\dfrac{\mathrm dx}x[/tex]
[tex]\ln|\mu|=\ln|x|[/tex]
[tex]\implies \mu=x[/tex]
So, multiply the original ODE by x on both sides:
[tex](x^3+xy^2+x^2)\,\mathrm dx+x^2y\,\mathrm dy=0[/tex]
Now
[tex]\dfrac{\partial(x^3+xy^2+x^2)}{\partial y}=2xy[/tex]
[tex]\dfrac{\partial(x^2y)}{\partial x}=2xy[/tex]
so the modified ODE is exact.
Now we look for a solution of the form [tex]F(x,y)=C[/tex], with differential
[tex]\mathrm dF=\dfrac{\partial F}{\partial x}\,\mathrm dx+\dfrac{\partial F}{\partial y}\,\mathrm dy=0[/tex]
The solution F satisfies
[tex]\dfrac{\partial F}{\partial x}=x^3+xy^2+x^2[/tex]
[tex]\dfrac{\partial F}{\partial y}=x^2y[/tex]
Integrating both sides of the first equation with respect to x gives
[tex]F(x,y)=\dfrac{x^4}4+\dfrac{x^2y^2}2+\dfrac{x^3}3+f(y)[/tex]
Differentiating both sides with respect to y gives
[tex]\dfrac{\partial F}{\partial y}=x^2y+\dfrac{\mathrm df}{\mathrm dy}=x^2y[/tex]
[tex]\implies\dfrac{\mathrm df}{\mathrm dy}=0\implies f(y)=C[/tex]
So the solution to the ODE is
[tex]F(x,y)=C\iff \dfrac{x^4}4+\dfrac{x^2y^2}2+\dfrac{x^3}3+C=C[/tex]
[tex]\implies\boxed{\dfrac{x^4}4+\dfrac{x^2y^2}2+\dfrac{x^3}3=C}[/tex]