Step 1: Rearrange the equation to separate variables.
Rearrange the equation to separate the variables \( x \) and \( y \):
\[
(2 + y) \, dy = (x - 1) \, dx.
\]
Step 2: Integrate both sides.
Now, integrate both sides:
\[
\int (2 + y) \, dy = \int (x - 1) \, dx.
\]
On the left-hand side, the integral of \( 2 + y \) is:
\[
\int (2 + y) \, dy = 2y + \frac{y^2}{2}.
\]
On the right-hand side, the integral of \( x - 1 \) is:
\[
\int (x - 1) \, dx = \frac{x^2}{2} - x.
\]
Step 3: Include the constant of integration.
Equating the results of the integrals and adding the constant of integration \( C \) on the right-hand side:
\[
2y + \frac{y^2}{2} = \frac{x^2}{2} - x + C.
\]
Conclusion:
The general solution is:
\[
2y + \frac{y^2}{2} = \frac{x^2}{2} - x + C.
\]
Solve the differential equation \[ (x + y) \, dy + (x - y) \, dx = 0, \quad \text{if} \quad y = 1 \text{ when } x = 1. \]
Find the particular solution of the differential equation: \[ \frac{dy}{dx} + y \cot x = 4x \csc x \text{(} x \neq 0 \text{)}. \] Given that \( y = 0 \) \(\text{ when}\) \( x = \frac{\pi}{2} \).