Optimal. Leaf size=138 \[ \frac{d x^2 \left (a+\frac{b}{x}\right )^{m+1} (6 a c-b d (2-m))}{6 a^2}-\frac{b \left (a+\frac{b}{x}\right )^{m+1} \left (6 a^2 c^2-6 a b c d (1-m)+b^2 d^2 \left (m^2-3 m+2\right )\right ) \, _2F_1\left (2,m+1;m+2;\frac{b}{a x}+1\right )}{6 a^4 (m+1)}+\frac{d^2 x^3 \left (a+\frac{b}{x}\right )^{m+1}}{3 a} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.28323, antiderivative size = 138, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.294 \[ \frac{d x^2 \left (a+\frac{b}{x}\right )^{m+1} (6 a c-b d (2-m))}{6 a^2}-\frac{b \left (a+\frac{b}{x}\right )^{m+1} \left (6 a^2 c^2-6 a b c d (1-m)+b^2 d^2 \left (m^2-3 m+2\right )\right ) \, _2F_1\left (2,m+1;m+2;\frac{b}{a x}+1\right )}{6 a^4 (m+1)}+\frac{d^2 x^3 \left (a+\frac{b}{x}\right )^{m+1}}{3 a} \]
Antiderivative was successfully verified.
[In] Int[(a + b/x)^m*(c + d*x)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 12.7217, size = 105, normalized size = 0.76 \[ \frac{d^{2} x^{3} \left (a + \frac{b}{x}\right )^{m + 1}}{3 a} + \frac{d x^{2} \left (a + \frac{b}{x}\right )^{m + 1} \left (6 a c - b d \left (- m + 2\right )\right )}{6 a^{2}} - \frac{b \left (a + \frac{b}{x}\right )^{m + 1} \left (6 a^{2} c^{2} - b d \left (- m + 1\right ) \left (6 a c - b d \left (- m + 2\right )\right )\right ){{}_{2}F_{1}\left (\begin{matrix} 2, m + 1 \\ m + 2 \end{matrix}\middle |{1 + \frac{b}{a x}} \right )}}{6 a^{4} \left (m + 1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((a+b/x)**m*(d*x+c)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.131228, size = 134, normalized size = 0.97 \[ -\frac{x \left (a+\frac{b}{x}\right )^m \left (\frac{a x}{b}+1\right )^{-m} \left (c^2 \left (m^2-5 m+6\right ) \, _2F_1\left (1-m,-m;2-m;-\frac{a x}{b}\right )+d (m-1) x \left (2 c (m-3) \, _2F_1\left (2-m,-m;3-m;-\frac{a x}{b}\right )+d (m-2) x \, _2F_1\left (3-m,-m;4-m;-\frac{a x}{b}\right )\right )\right )}{(m-3) (m-2) (m-1)} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b/x)^m*(c + d*x)^2,x]
[Out]
_______________________________________________________________________________________
Maple [F] time = 0.048, size = 0, normalized size = 0. \[ \int \left ( a+{\frac{b}{x}} \right ) ^{m} \left ( dx+c \right ) ^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((a+b/x)^m*(d*x+c)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (d x + c\right )}^{2}{\left (a + \frac{b}{x}\right )}^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((d*x + c)^2*(a + b/x)^m,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \[{\rm integral}\left ({\left (d^{2} x^{2} + 2 \, c d x + c^{2}\right )} \left (\frac{a x + b}{x}\right )^{m}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((d*x + c)^2*(a + b/x)^m,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 16.921, size = 121, normalized size = 0.88 \[ \frac{b^{m} c^{2} x x^{- m} \Gamma \left (- m + 1\right ){{}_{2}F_{1}\left (\begin{matrix} - m, - m + 1 \\ - m + 2 \end{matrix}\middle |{\frac{a x e^{i \pi }}{b}} \right )}}{\Gamma \left (- m + 2\right )} + \frac{2 b^{m} c d x^{2} x^{- m} \Gamma \left (- m + 2\right ){{}_{2}F_{1}\left (\begin{matrix} - m, - m + 2 \\ - m + 3 \end{matrix}\middle |{\frac{a x e^{i \pi }}{b}} \right )}}{\Gamma \left (- m + 3\right )} + \frac{b^{m} d^{2} x^{3} x^{- m} \Gamma \left (- m + 3\right ){{}_{2}F_{1}\left (\begin{matrix} - m, - m + 3 \\ - m + 4 \end{matrix}\middle |{\frac{a x e^{i \pi }}{b}} \right )}}{\Gamma \left (- m + 4\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a+b/x)**m*(d*x+c)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (d x + c\right )}^{2}{\left (a + \frac{b}{x}\right )}^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((d*x + c)^2*(a + b/x)^m,x, algorithm="giac")
[Out]