** Final Answer

**

** Step-by-step Solution **

Problem to solve:

** Specify 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 function times a constant ($-1$) is equal to the constant times 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 function times a constant ($3$) is equal to the constant times the integral of the function

The integral of a function times a constant ($4$) is equal to the constant times 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

Rearrange the equation

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

The integral of a function times a constant ($2$) is equal to the constant times the integral of the function

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$

Any expression multiplied by $1$ is equal to itself

**

**

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

** Final Answer

**