4.2 Problem number 811

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

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

command

Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^3,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)^3} \, dx \]

Mathematica 12.3 output

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