Multiply both sides by [tex]y[/tex] to get an exact equation.
[tex]\left(1 + \dfrac{x^3}y \sin^2(x)\right) \, dx + \dfrac1y \left(x + \dfrac1{\cos^2(2y)}\right) \, dy = 0[/tex]
[tex]\implies \underbrace{(y + x^3 \sin^2(x))}_{M(x,y)} \, dx + \underbrace{(x + \sec^2(2y))}_{N(x,y)} \, dy = 0[/tex]
This ODE is exact since [tex]\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}[/tex]. Then the solution is given by an implicit function
[tex]f(x,y) = C[/tex]
Taking differentials on both sides by the chain rule gives
[tex]\dfrac{\partial f}{\partial x} \, dx + \dfrac{\partial f}{\partial y} \, dy = 0[/tex]
so that we have the system of partial differential equations
[tex]\dfrac{\partial f}{\partial x} = M = y + x^3 \sin^2(x)[/tex]
[tex]\dfrac{\partial f}{\partial y} = N = x + \sec^2(2y)[/tex]
Integrate both sides of the first of these equations with respect to [tex]x[/tex] to recover [tex]f[/tex].
[tex]\displaystyle \int \frac{\partial f}{\partial x} \, dx = \int (y + x^3 \sin^2(x)) \, dx[/tex]
[tex]\implies f(x,y) = xy + g(x) + h(y)[/tex]
where [tex]g(x)[/tex] is the antiderivative of [tex]x^3\sin^2(x)[/tex] (and is easy enough to compute by parts).
Differentiating both sides with respect to [tex]y[/tex] gives
[tex]\dfrac{\partial f}{\partial y} = x + \dfrac{dh}{dy} = x + \sec^2(2y)[/tex]
[tex]\implies \dfrac{dh}{dy} = \sec^2(2y)[/tex]
[tex]\implies h(y) = \dfrac12 \tan(2y) + C[/tex]
Then the general solution to the ODE is
[tex]f(x,y) = \boxed{xy + g(x) + \dfrac12 \tan(2y) = C}[/tex]