Question:easy

Find the general solution of \( \frac{dy}{dx} = \frac{2+y}{x-2} \).

Show Hint

Separate variables: \( \frac{dy}{y+2} = \frac{dx}{x-2} \). Integrate to get \( y + 2 = C(x-2) \).
Updated On: Nov 23, 2026
Show Solution

Solution and Explanation

Step 1: Spot the type.
The right side is a ratio of a function of $y$ over a function of $x$, so the equation can be separated.

Step 2: Rearrange.
Multiply both sides by $dx$ and divide by $(2+y)$:
\[ \frac{1}{2+y}\, dy = \frac{1}{x-2}\, dx. \]

Step 3: Integrate.
The integral of $\dfrac{1}{u}$ is $\ln|u|$, so we get
\[ \ln|2+y| = \ln|x-2| + k, \]
where $k$ is an arbitrary constant.

Step 4: Take the exponential.
Writing $e^{k} = C$ (a constant, which can take either sign after dropping the modulus), we have
\[ 2 + y = C(x-2), \quad \text{that is,} \quad y = C(x-2) - 2. \]

Step 5: Quick check.
Differentiating $y = C(x-2) - 2$ gives $\dfrac{dy}{dx} = C$. Also $\dfrac{2+y}{x-2} = \dfrac{C(x-2)}{x-2} = C$, so the equation holds.

Final Answer:
\[ \boxed{y = C(x-2) - 2} \]
Was this answer helpful?
0