Question:

Solve the differential equation \[ \frac{dy}{dx} + y \cot x = 2x + x^2 \cot x \quad \text{where} \quad x \neq 0. \] 

Show Hint

When solving linear first-order differential equations, use the integrating factor method and simplify each step as you go.
Updated On: Mar 1, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Rewrite the equation as a linear first-order differential equation: \[ \frac{dy}{dx} + p(x) y = q(x), \] where \( p(x) = \cot x \) and \( q(x) = 2x + x^2 \cot x \). 

Step 2: Use the integrating factor method to solve the equation. The integrating factor is given by: \[ \mu(x) = e^{\int p(x) dx} = e^{\int \cot x \, dx} = e^{\ln|\sin x|} = |\sin x|. \] 

Step 3: Multiply both sides of the differential equation by the integrating factor \( |\sin x| \): \[ |\sin x| \frac{dy}{dx} + |\sin x| y \cot x = (2x + x^2 \cot x) |\sin x|. \] 

Step 4: The left-hand side is now the derivative of \( y \sin x \), so we have: \[ \frac{d}{dx} \left( y \sin x \right) = 2x \sin x + x^2 \sin x \cot x. \] 

Step 5: Integrate both sides of the equation: \[ \int \frac{d}{dx} \left( y \sin x \right) \, dx = \int \left( 2x \sin x + x^2 \sin x \cot x \right) \, dx. \] The integration of the left-hand side is straightforward: \[ y \sin x = \int \left( 2x \sin x + x^2 \sin x \cot x \right) dx. \] 

Step 6: Solve the integrals on the right-hand side and simplify. After integrating, substitute back to find \( y(x) \).

Was this answer helpful?
0
0