## Final Answer

## Step-by-step Solution

Problem to solve:

Choose the solving method

Rewrite the differential equation in the standard form $M(x,y)dx+N(x,y)dy=0$

The differential equation $2\left(y+1\right)dy-\left(3x^2+4x+2\right)dx=0$ is exact, since it is written in the standard form $M(x,y)dx+N(x,y)dy=0$, where $M(x,y)$ and $N(x,y)$ are the partial derivatives of a two-variable function $f(x,y)$ and they satisfy the test for exactness: $\displaystyle\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$. In other words, their second partial derivatives are equal. The general solution of the differential equation is of the form $f(x,y)=C$

Find the derivative of $M(x,y)$ with respect to $y$

The derivative of the constant function ($-\left(3x^2+4x+2\right)$) is equal to zero

Find the derivative of $N(x,y)$ with respect to $x$

The derivative of the constant function ($2\left(y+1\right)$) is equal to zero

Using the test for exactness, we check that the differential equation is exact

The integral of a constant by a function is equal to the constant multiplied by the integral of the function

Expand the integral $\int\left(3x^2+4x+2\right)dx$ into $3$ integrals using the sum rule for integrals, to then solve each integral separately

The integral of a constant is equal to the constant times the integral's variable

The integral of a constant by a function is equal to the constant multiplied by the integral of the function

The integral of a constant by a function is equal to the constant multiplied by the integral of the function

Apply the power rule for integration, $\displaystyle\int x^n dx=\frac{x^{n+1}}{n+1}$, where $n$ represents a number or constant function, such as $2$

Applying the power rule for integration, $\displaystyle\int x^n dx=\frac{x^{n+1}}{n+1}$, where $n$ represents a number or constant function, in this case $n=1$

Since $y$ is treated as a constant, we add a function of $y$ as constant of integration

Integrate $M(x,y)$ with respect to $x$ to get

The derivative of the constant function ($-x^{3}-2x^2-2x$) is equal to zero

The derivative of $g(y)$ is $g'(y)$

Now take the partial derivative of $-x^{3}-2x^2-2x$ with respect to $y$ to get

Simplify and isolate $g'(y)$

$x+0=x$, where $x$ is any expression

Eliminate the $2$ from the left, multiplying both sides of the equation by the inverse of $2$

Rearrange the equation

Eliminate the $\frac{1}{2}$ from the left, multiplying both sides of the equation by the inverse of $\frac{1}{2}$

Solve the product $2\left(y+1\right)$

Set $2\left(y+1\right)$ and $0+g'(y)$ equal to each other and isolate $g'(y)$

Integrate both sides with respect to $y$

Expand the integral $\int\left(2y+2\right)dy$ into $2$ integrals using the sum rule for integrals, to then solve each integral separately

The integral of a constant is equal to the constant times the integral's variable

Applying the power rule for integration, $\displaystyle\int x^n dx=\frac{x^{n+1}}{n+1}$, where $n$ represents a number or constant function, in this case $n=1$

Find $g(y)$ integrating both sides

We have found our $f(x,y)$ and it equals

Then, the solution to the differential equation is

Group the terms of the equation

Factor the polynomial $y^2+2y$. Add and subtract $\left(\frac{b}{2}\right)^2$, replacing $b$ by it's value $2$

Now, we can factor $y^2+2x+1$ as a squared binomial of the form $\left(x+\frac{b}{2}\right)^2$

We need to isolate the dependent variable $y$, we can do that by subtracting $-1$ from both sides of the equation

We can combine and rename $1+C_0$ as other constant of integration

Removing the variable's exponent

We need to isolate the dependent variable $y$, we can do that by subtracting $1$ from both sides of the equation

As in the equation we have the sign $\pm$, this produces two identical equations that differ in the sign of the term $\sqrt{2x^2+C_0+x^{3}+2x}$. We write and solve both equations, one taking the positive sign, and the other taking the negative sign

Find the explicit solution to the differential equation