4.1 Problem number 810

\[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^2} \, dx \]

Optimal antiderivative \[ \frac {c \left (g x +f \right )^{1+n}}{e g \left (1+n \right )}-\frac {\left (c \,d^{2}-a e \right ) g \left (g x +f \right )^{1+n} \hypergeom \! \left (\left [2, 1+n \right ], \left [2+n \right ], \frac {e \left (g x +f \right )}{-d g +e f}\right )}{e \left (-d g +e f \right )^{2} \left (1+n \right )} \]

command

Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^2,x]

Mathematica 13.1 output

\[ \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^2} \, dx \]

Mathematica 12.3 output

\[ \frac {(f+g x)^{n+1} \left (g^2 \left (a e-c d^2\right ) \, _2F_1\left (2,n+1;n+2;\frac {e (f+g x)}{e f-d g}\right )+c (e f-d g)^2\right )}{e g (n+1) (e f-d g)^2} \]