\[ \int \frac {\left (a+b x+c x^2\right )^4}{(d+e x)^4} \, dx \]
Optimal antiderivative \[ \frac {\left (35 c^{4} d^{4}+b^{4} e^{4}-4 b^{2} c \,e^{3} \left (-3 a e +4 b d \right )-40 c^{3} d^{2} e \left (-a e +2 b d \right )+6 c^{2} e^{2} \left (a^{2} e^{2}-8 a b d e +10 b^{2} d^{2}\right )\right ) x}{e^{8}}-\frac {2 c \left (5 c^{3} d^{3}-b^{3} e^{3}-2 c^{2} d e \left (-2 a e +5 b d \right )+3 b c \,e^{2} \left (-a e +2 b d \right )\right ) x^{2}}{e^{7}}+\frac {2 c^{2} \left (5 c^{2} d^{2}+3 b^{2} e^{2}-2 c e \left (-a e +4 b d \right )\right ) x^{3}}{3 e^{6}}-\frac {c^{3} \left (-b e +c d \right ) x^{4}}{e^{5}}+\frac {c^{4} x^{5}}{5 e^{4}}-\frac {\left (a \,e^{2}-b d e +c \,d^{2}\right )^{4}}{3 e^{9} \left (e x +d \right )^{3}}+\frac {2 \left (-b e +2 c d \right ) \left (a \,e^{2}-b d e +c \,d^{2}\right )^{3}}{e^{9} \left (e x +d \right )^{2}}-\frac {2 \left (a \,e^{2}-b d e +c \,d^{2}\right )^{2} \left (14 c^{2} d^{2}+3 b^{2} e^{2}-2 c e \left (-a e +7 b d \right )\right )}{e^{9} \left (e x +d \right )}-\frac {4 \left (-b e +2 c d \right ) \left (a \,e^{2}-b d e +c \,d^{2}\right ) \left (7 c^{2} d^{2}+b^{2} e^{2}-c e \left (-3 a e +7 b d \right )\right ) \ln \! \left (e x +d \right )}{e^{9}} \]
command
integrate((c*x**2+b*x+a)**4/(e*x+d)**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 {c^{4} x^{5}}{5 e^{4}} + x^{4} \left (\frac {b c^{3}}{e^{4}} - \frac {c^{4} d}{e^{5}}\right ) + x^{3} \left (\frac {4 a c^{3}}{3 e^{4}} + \frac {2 b^{2} c^{2}}{e^{4}} - \frac {16 b c^{3} d}{3 e^{5}} + \frac {10 c^{4} d^{2}}{3 e^{6}}\right ) + x^{2} \left (\frac {6 a b c^{2}}{e^{4}} - \frac {8 a c^{3} d}{e^{5}} + \frac {2 b^{3} c}{e^{4}} - \frac {12 b^{2} c^{2} d}{e^{5}} + \frac {20 b c^{3} d^{2}}{e^{6}} - \frac {10 c^{4} d^{3}}{e^{7}}\right ) + x \left (\frac {6 a^{2} c^{2}}{e^{4}} + \frac {12 a b^{2} c}{e^{4}} - \frac {48 a b c^{2} d}{e^{5}} + \frac {40 a c^{3} d^{2}}{e^{6}} + \frac {b^{4}}{e^{4}} - \frac {16 b^{3} c d}{e^{5}} + \frac {60 b^{2} c^{2} d^{2}}{e^{6}} - \frac {80 b c^{3} d^{3}}{e^{7}} + \frac {35 c^{4} d^{4}}{e^{8}}\right ) + \frac {- a^{4} e^{8} - 2 a^{3} b d e^{7} - 4 a^{3} c d^{2} e^{6} - 6 a^{2} b^{2} d^{2} e^{6} + 66 a^{2} b c d^{3} e^{5} - 78 a^{2} c^{2} d^{4} e^{4} + 22 a b^{3} d^{3} e^{5} - 156 a b^{2} c d^{4} e^{4} + 282 a b c^{2} d^{5} e^{3} - 148 a c^{3} d^{6} e^{2} - 13 b^{4} d^{4} e^{4} + 94 b^{3} c d^{5} e^{3} - 222 b^{2} c^{2} d^{6} e^{2} + 214 b c^{3} d^{7} e - 73 c^{4} d^{8} + x^{2} \left (- 12 a^{3} c e^{8} - 18 a^{2} b^{2} e^{8} + 108 a^{2} b c d e^{7} - 108 a^{2} c^{2} d^{2} e^{6} + 36 a b^{3} d e^{7} - 216 a b^{2} c d^{2} e^{6} + 360 a b c^{2} d^{3} e^{5} - 180 a c^{3} d^{4} e^{4} - 18 b^{4} d^{2} e^{6} + 120 b^{3} c d^{3} e^{5} - 270 b^{2} c^{2} d^{4} e^{4} + 252 b c^{3} d^{5} e^{3} - 84 c^{4} d^{6} e^{2}\right ) + x \left (- 6 a^{3} b e^{8} - 12 a^{3} c d e^{7} - 18 a^{2} b^{2} d e^{7} + 162 a^{2} b c d^{2} e^{6} - 180 a^{2} c^{2} d^{3} e^{5} + 54 a b^{3} d^{2} e^{6} - 360 a b^{2} c d^{3} e^{5} + 630 a b c^{2} d^{4} e^{4} - 324 a c^{3} d^{5} e^{3} - 30 b^{4} d^{3} e^{5} + 210 b^{3} c d^{4} e^{4} - 486 b^{2} c^{2} d^{5} e^{3} + 462 b c^{3} d^{6} e^{2} - 156 c^{4} d^{7} e\right )}{3 d^{3} e^{9} + 9 d^{2} e^{10} x + 9 d e^{11} x^{2} + 3 e^{12} x^{3}} + \frac {4 \left (b e - 2 c d\right ) \left (a e^{2} - b d e + c d^{2}\right ) \left (3 a c e^{2} + b^{2} e^{2} - 7 b c d e + 7 c^{2} d^{2}\right ) \log {\left (d + e x \right )}}{e^{9}} \]