\[ \int \frac {\sec ^2(x) \tan ^2(x)}{\left (2+\tan ^3(x)\right )^2} \, dx \]
Optimal antiderivative \[ -\frac {1}{3 \left (2+\tan ^{3}\left (x \right )\right )} \]
command
integrate(sec(x)**2*tan(x)**2/(2+tan(x)**3)**2,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ - \frac {1}{3 \left (\tan ^{3}{\left (x \right )} + 2\right )} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________