The given differential equation is \( x^3 \sin y \frac{dy}{dx} = 2 \).
We can rewrite this as \( \sin y \frac{dy}{dx} = \frac{2}{x^3} \).
Separating the variables, we get \( \sin y dy = \frac{2}{x^3} dx \).
Integrating both sides:
$$ \int \sin y dy = \int \frac{2}{x^3} dx $$
$$ -\cos y = 2 \int x^{-3} dx $$
$$ -\cos y = 2 \frac{x^{-2}}{-2} + C $$
$$ -\cos y = -\frac{1}{x^2} + C $$
$$ \cos y = \frac{1}{x^2} - C $$
We are given that \( \lim_{x \to \infty} y(x) = \frac{\pi}{2} \).
Taking the limit as \( x \to \infty \) on both sides of the solution:
$$ \lim_{x \to \infty} \cos y = \lim_{x \to \infty} \left( \frac{1}{x^2} - C \right) $$
$$ \cos \left( \lim_{x \to \infty} y(x) \right) = 0 - C $$
$$ \cos \left( \frac{\pi}{2} \right) = -C $$
$$ 0 = -C \implies C = 0 $$
Substituting \( C = 0 \) back into the solution, we get:
$$ \cos y = \frac{1}{x^2} - 0 $$
$$ \cos y = \frac{1}{x^2} $$