21.2 Problem number 67

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

Optimal antiderivative \[ -\frac {\left (a B -\left (A c -a C \right ) x \right ) \left (e x +d \right )}{6 a c \left (c \,x^{2}+a \right )^{3}}+\frac {-2 a \left (2 A c +a C \right ) e +c \left (5 A c d +B a e +a C d \right ) x}{24 a^{2} c^{2} \left (c \,x^{2}+a \right )^{2}}+\frac {\left (5 A c d +B a e +a C d \right ) x}{16 a^{3} c \left (c \,x^{2}+a \right )}+\frac {\left (5 A c d +B a e +a C d \right ) \arctan \! \left (\frac {x \sqrt {c}}{\sqrt {a}}\right )}{16 a^{\frac {7}{2}} c^{\frac {3}{2}}} \]

command

integrate((e*x+d)*(C*x**2+B*x+A)/(c*x**2+a)**4,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ - \frac {\sqrt {- \frac {1}{a^{7} c^{3}}} \left (5 A c d + B a e + C a d\right ) \log {\left (- a^{4} c \sqrt {- \frac {1}{a^{7} c^{3}}} + x \right )}}{32} + \frac {\sqrt {- \frac {1}{a^{7} c^{3}}} \left (5 A c d + B a e + C a d\right ) \log {\left (a^{4} c \sqrt {- \frac {1}{a^{7} c^{3}}} + x \right )}}{32} + \frac {- 8 A a^{3} c e - 8 B a^{3} c d - 4 C a^{4} e - 12 C a^{3} c e x^{2} + x^{5} \left (15 A c^{4} d + 3 B a c^{3} e + 3 C a c^{3} d\right ) + x^{3} \left (40 A a c^{3} d + 8 B a^{2} c^{2} e + 8 C a^{2} c^{2} d\right ) + x \left (33 A a^{2} c^{2} d - 3 B a^{3} c e - 3 C a^{3} c d\right )}{48 a^{6} c^{2} + 144 a^{5} c^{3} x^{2} + 144 a^{4} c^{4} x^{4} + 48 a^{3} c^{5} x^{6}} \]