\[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx \]
Optimal antiderivative \[ -\frac {b \left (a +b \right )}{4 a^{3} f \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {a +2 b}{2 a^{3} f \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}+\frac {\ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 a^{3} f} \]
command
integrate(tan(f*x+e)**3/(a+b*sec(f*x+e)**2)**3,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {output too large to display} \]
Sympy 1.8 under Python 3.8.8 output \[ \text {Timed out} \]_____________________________________________________