Question:medium

Find the particular solution of the differential equation

\(xy\dfrac{dy}{dx} = (x+2)(y+2)\), given that \(y(1) = -1\).

Show Hint

Separate as y/(y+2) dy = (x+2)/x dx, integrate, and use y(1) = -1 to get the constant C = -2.
Updated On: Oct 22, 2026
Show Solution

Solution and Explanation

Step 1: Rearrange the equation:
The equation is $xy\frac{dy}{dx} = (x+2)(y+2)$. It is of the variables separable type.
Move all $y$ terms to the left and all $x$ terms to the right.
\[ \frac{y\,dy}{y+2} = \frac{(x+2)\,dx}{x} \]

Step 2: Integrate the left side:
Let $t = y + 2$, so $y = t - 2$ and $dy = dt$.
\[ \int \frac{t-2}{t}\,dt = t - 2\log|t| = y + 2 - 2\log|y+2| \]

Step 3: Integrate the right side:
\[ \int \left(1 + \frac{2}{x}\right)dx = x + 2\log|x| \]
Equate the two sides and absorb the extra 2 into the constant $C$.
\[ y - 2\log|y+2| = x + 2\log|x| + C \]

Step 4: Find the constant:
At $x = 1$ we have $y = -1$, so $y + 2 = 1$ and both logarithms vanish.
The equation gives $-1 = 1 + C$, so $C = -2$.

Step 5: Combine the logarithms:
Move the terms and join the logarithms using $\log a + \log b = \log ab$.
\[ y - x + 2 = 2\log|y+2| + 2\log|x| = 2\log|x(y+2)| \]
Check: at $x = 1$, $y = -1$ the left side is $-1 - 1 + 2 = 0$ and the right side is $2\log 1 = 0$.

Final Answer:
The particular solution is below. \[ \boxed{y - x + 2 = 2\log|x(y+2)|} \]
Was this answer helpful?
0