The differential equation \( x \sin^2 \left( \frac{y}{x} \right) \, dx + x \, dy = 0 \) is provided. This equation can be rewritten as \( \sin^2 \left( \frac{y}{x} \right) \, dx + \, dy = 0 \). To solve this by separating variables, we first divide by \( x \), yielding \( \sin^2 \left( \frac{y}{x} \right) \, dx = -dy \). Integrating both sides, we get \( \int \sin^2 \left( \frac{y}{x} \right) \, dx = \int -dy \). The solution is obtained through substitution and simplification using standard integration methods. The particular solution, satisfying the initial condition \( y = \frac{\pi}{4} \) at \( x = 1 \), is the result of this integration.