62.2 Problem number 68

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

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

command

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