62.5 Problem number 78

\[ \int \frac {(a+b \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx \]

Optimal antiderivative \[ -\frac {\left (a^{2} \left (c^{2} C -2 B c d -C \,d^{2}-A \left (c^{2}-d^{2}\right )\right )-b^{2} \left (c^{2} C -2 B c d -C \,d^{2}-A \left (c^{2}-d^{2}\right )\right )-2 a b \left (2 c \left (A -C \right ) d -B \left (c^{2}-d^{2}\right )\right )\right ) x}{\left (c^{2}+d^{2}\right )^{2}}+\frac {\left (2 a b \left (c^{2} C -2 B c d -C \,d^{2}-A \left (c^{2}-d^{2}\right )\right )+a^{2} \left (2 c \left (A -C \right ) d -B \left (c^{2}-d^{2}\right )\right )-b^{2} \left (2 c \left (A -C \right ) d -B \left (c^{2}-d^{2}\right )\right )\right ) \ln \left (\cos \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{2} f}-\frac {\left (-a d +b c \right ) \left (b \left (2 A \,d^{4}-B \,c^{3} d -3 B c \,d^{3}+2 c^{4} C +4 c^{2} C \,d^{2}\right )+a \,d^{2} \left (2 c \left (A -C \right ) d -B \left (c^{2}-d^{2}\right )\right )\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{3} \left (c^{2}+d^{2}\right )^{2} f}+\frac {b^{2} \left (2 c^{2} C -B c d +\left (A +C \right ) d^{2}\right ) \tan \left (f x +e \right )}{d^{2} \left (c^{2}+d^{2}\right ) f}-\frac {\left (A \,d^{2}-B c d +c^{2} C \right ) \left (a +b \tan \left (f x +e \right )\right )^{2}}{d \left (c^{2}+d^{2}\right ) f \left (c +d \tan \left (f x +e \right )\right )} \]

command

integrate((a+b*tan(f*x+e))**2*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(c+d*tan(f*x+e))**2,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} \]_____________________________________________________