Step 1: Given differential equation.
We start with the given equation:
\[
( \sin y \cos^2 y - x \sec^2 y ) dy = (\tan y) dx
\]
Step 2: Separating the variables.
Rewriting the equation:
\[
\frac{dy}{dx} = \frac{\tan y}{\sin y \cos^2 y - x \sec^2 y}
\]
Rearranging terms to make it integrable:
\[
\int (\sin y \cos^2 y - x \sec^2 y) dy = \int \tan y \, dx
\]
Step 3: Integrating both sides.
Integrating LHS:
\[
\int \sin y \cos^2 y \, dy - \int x \sec^2 y \, dy
\]
The first integral simplifies to:
\[
\frac{\cos^3 y}{3}
\]
The second integral simplifies to:
\[
x \tan y
\]
Thus, we get:
\[
3x \tan y + \cos^3 y = c
\]