Question:

Solve the differential equation \[ (x - y) \frac{dy}{dx} = x + 2y. \]

Show Hint

For solving first-order differential equations, try substitution to simplify the equation. If substitution doesn't directly solve the problem, consider methods like separation of variables or integrating factors.
Updated On: Mar 1, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Rearrange the given equation: \[ (x - y) \frac{dy}{dx} = x + 2y. \] Divide both sides by \( (x - y) \): \[ \frac{dy}{dx} = \frac{x + 2y}{x - y}. \] At this point, we cannot directly separate the variables. We proceed by using substitution to simplify the equation. 

Step 2: Use the substitution \( u = x - y \). This implies: \[ du = dx - dy \quad \text{or equivalently} \quad \frac{du}{dx} = 1 - \frac{dy}{dx}. \] Now, rewrite the differential equation in terms of \( u \). 

Step 3: Express \( y \) in terms of \( u \) and \( x \): \[ y = x - u. \] Substitute \( y = x - u \) into the equation \( \frac{dy}{dx} = \frac{x + 2y}{x - y} \): \[ \frac{dy}{dx} = \frac{x + 2(x - u)}{u} = \frac{x + 2x - 2u}{u} = \frac{3x - 2u}{u}. \] 

Step 4: Now we have a simpler equation: \[ \frac{dy}{dx} = \frac{3x - 2u}{u}. \] Using the relation \( \frac{du}{dx} = 1 - \frac{dy}{dx} \), we substitute into the expression: \[ \frac{du}{dx} = 1 - \frac{3x - 2u}{u}. \] Simplify this to: \[ \frac{du}{dx} = 1 - \frac{3x}{u} + 2. \] Combine terms: \[ \frac{du}{dx} = 3 - \frac{3x}{u}. \] 

Step 5: Multiply both sides by \( u \) to eliminate the fraction: \[ u \frac{du}{dx} = 3u - 3x. \] Now, we can proceed with solving this equation by separating the variables. 

Step 6: Further steps would involve solving the equation using appropriate methods such as separation of variables or integrating factors. The explicit solution for \( y \) can be obtained once this equation is solved. 

Was this answer helpful?
0
0