Optimal. Leaf size=233 \[ \frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b f x \left (-\left (1-6 c^2\right ) f^2-12 c d e f+6 d^2 e^2\right )}{4 d^3}+\frac {b \left (-6 \left (1-c^2\right ) d^2 e^2 f^2+4 c \left (3-c^2\right ) d e f^3+\left (c^4-6 c^2+1\right ) f^4-4 c d^3 e^3 f+d^4 e^4\right ) \tan ^{-1}(c+d x)}{4 d^4 f}+\frac {b f^2 (c+d x)^2 (d e-c f)}{2 d^4}+\frac {b (d e-c f) (-c f+d e+f) (d e-(c+1) f) \log \left ((c+d x)^2+1\right )}{2 d^4}+\frac {b f^3 (c+d x)^3}{12 d^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.36, antiderivative size = 233, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5048, 4863, 702, 635, 203, 260} \[ \frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b f x \left (-\left (1-6 c^2\right ) f^2-12 c d e f+6 d^2 e^2\right )}{4 d^3}+\frac {b \left (-6 \left (1-c^2\right ) d^2 e^2 f^2+4 c \left (3-c^2\right ) d e f^3+\left (c^4-6 c^2+1\right ) f^4-4 c d^3 e^3 f+d^4 e^4\right ) \tan ^{-1}(c+d x)}{4 d^4 f}+\frac {b f^2 (c+d x)^2 (d e-c f)}{2 d^4}+\frac {b (d e-c f) (-c f+d e+f) (d e-(c+1) f) \log \left ((c+d x)^2+1\right )}{2 d^4}+\frac {b f^3 (c+d x)^3}{12 d^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 260
Rule 635
Rule 702
Rule 4863
Rule 5048
Rubi steps
\begin {align*} \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx &=\frac {\operatorname {Subst}\left (\int \left (\frac {d e-c f}{d}+\frac {f x}{d}\right )^3 \left (a+b \cot ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b \operatorname {Subst}\left (\int \frac {\left (\frac {d e-c f}{d}+\frac {f x}{d}\right )^4}{1+x^2} \, dx,x,c+d x\right )}{4 f}\\ &=\frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b \operatorname {Subst}\left (\int \left (\frac {f^2 \left (6 d^2 e^2-12 c d e f-\left (1-6 c^2\right ) f^2\right )}{d^4}+\frac {4 f^3 (d e-c f) x}{d^4}+\frac {f^4 x^2}{d^4}+\frac {d^4 e^4-4 c d^3 e^3 f-6 \left (1-c^2\right ) d^2 e^2 f^2+4 c \left (3-c^2\right ) d e f^3+\left (1-6 c^2+c^4\right ) f^4+4 f (d e-c f) (d e-f-c f) (d e+f-c f) x}{d^4 \left (1+x^2\right )}\right ) \, dx,x,c+d x\right )}{4 f}\\ &=\frac {b f \left (6 d^2 e^2-12 c d e f-\left (1-6 c^2\right ) f^2\right ) x}{4 d^3}+\frac {b f^2 (d e-c f) (c+d x)^2}{2 d^4}+\frac {b f^3 (c+d x)^3}{12 d^4}+\frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b \operatorname {Subst}\left (\int \frac {d^4 e^4-4 c d^3 e^3 f-6 \left (1-c^2\right ) d^2 e^2 f^2+4 c \left (3-c^2\right ) d e f^3+\left (1-6 c^2+c^4\right ) f^4+4 f (d e-c f) (d e-f-c f) (d e+f-c f) x}{1+x^2} \, dx,x,c+d x\right )}{4 d^4 f}\\ &=\frac {b f \left (6 d^2 e^2-12 c d e f-\left (1-6 c^2\right ) f^2\right ) x}{4 d^3}+\frac {b f^2 (d e-c f) (c+d x)^2}{2 d^4}+\frac {b f^3 (c+d x)^3}{12 d^4}+\frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {(b (d e-c f) (d e+f-c f) (d e-(1+c) f)) \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,c+d x\right )}{d^4}+\frac {\left (b \left (d^4 e^4-4 c d^3 e^3 f-6 \left (1-c^2\right ) d^2 e^2 f^2+4 c \left (3-c^2\right ) d e f^3+\left (1-6 c^2+c^4\right ) f^4\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,c+d x\right )}{4 d^4 f}\\ &=\frac {b f \left (6 d^2 e^2-12 c d e f-\left (1-6 c^2\right ) f^2\right ) x}{4 d^3}+\frac {b f^2 (d e-c f) (c+d x)^2}{2 d^4}+\frac {b f^3 (c+d x)^3}{12 d^4}+\frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b \left (d^4 e^4-4 c d^3 e^3 f-6 \left (1-c^2\right ) d^2 e^2 f^2+4 c \left (3-c^2\right ) d e f^3+\left (1-6 c^2+c^4\right ) f^4\right ) \tan ^{-1}(c+d x)}{4 d^4 f}+\frac {b (d e-c f) (d e+f-c f) (d e-(1+c) f) \log \left (1+(c+d x)^2\right )}{2 d^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.29, size = 157, normalized size = 0.67 \[ \frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )+\frac {b \left (6 d f^2 x \left (\left (6 c^2-1\right ) f^2-12 c d e f+6 d^2 e^2\right )+12 f^3 (c+d x)^2 (d e-c f)-3 i (d e-(c-i) f)^4 \log (-c-d x+i)+3 i (d e-(c+i) f)^4 \log (c+d x+i)+2 f^4 (c+d x)^3\right )}{6 d^4}}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.94, size = 325, normalized size = 1.39 \[ \frac {3 \, a d^{4} f^{3} x^{4} + {\left (12 \, a d^{4} e f^{2} + b d^{3} f^{3}\right )} x^{3} + 3 \, {\left (6 \, a d^{4} e^{2} f + 2 \, b d^{3} e f^{2} - b c d^{2} f^{3}\right )} x^{2} + 3 \, {\left (4 \, a d^{4} e^{3} + 6 \, b d^{3} e^{2} f - 8 \, b c d^{2} e f^{2} + {\left (3 \, b c^{2} - b\right )} d f^{3}\right )} x + 3 \, {\left (b d^{4} f^{3} x^{4} + 4 \, b d^{4} e f^{2} x^{3} + 6 \, b d^{4} e^{2} f x^{2} + 4 \, b d^{4} e^{3} x\right )} \operatorname {arccot}\left (d x + c\right ) - 3 \, {\left (4 \, b c d^{3} e^{3} - 6 \, {\left (b c^{2} - b\right )} d^{2} e^{2} f + 4 \, {\left (b c^{3} - 3 \, b c\right )} d e f^{2} - {\left (b c^{4} - 6 \, b c^{2} + b\right )} f^{3}\right )} \arctan \left (d x + c\right ) + 6 \, {\left (b d^{3} e^{3} - 3 \, b c d^{2} e^{2} f + {\left (3 \, b c^{2} - b\right )} d e f^{2} - {\left (b c^{3} - b c\right )} f^{3}\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{12 \, d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.76, size = 2272, normalized size = 9.75 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.05, size = 526, normalized size = 2.26 \[ -\frac {3 b f \ln \left (1+\left (d x +c \right )^{2}\right ) c \,e^{2}}{2 d^{2}}-\frac {b \,f^{2} \arctan \left (d x +c \right ) c^{3} e}{d^{3}}+\frac {3 b f \arctan \left (d x +c \right ) c^{2} e^{2}}{2 d^{2}}+\frac {3 b \,f^{2} \ln \left (1+\left (d x +c \right )^{2}\right ) c^{2} e}{2 d^{3}}+\frac {3 b \,f^{2} \arctan \left (d x +c \right ) c e}{d^{3}}-\frac {2 b \,f^{2} c e x}{d^{2}}+\frac {b \,f^{3} \arctan \left (d x +c \right )}{4 d^{4}}+\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) e^{3}}{2 d}+\frac {3 a f \,x^{2} e^{2}}{2}+a \,f^{2} x^{3} e +\frac {b \,f^{3} x^{3}}{12 d}-\frac {b \,f^{3} x}{4 d^{3}}+\frac {b \,f^{3} \mathrm {arccot}\left (d x +c \right ) x^{4}}{4}+\mathrm {arccot}\left (d x +c \right ) x b \,e^{3}+\frac {b \,\mathrm {arccot}\left (d x +c \right ) e^{4}}{4 f}+\frac {b \arctan \left (d x +c \right ) e^{4}}{4 f}-\frac {b \,f^{3} x^{2} c}{4 d^{2}}+\frac {b \,f^{2} e \,x^{2}}{2 d}+\frac {3 b \,f^{3} c^{2} x}{4 d^{3}}+\frac {3 b f \,e^{2} x}{2 d}+\frac {b \,f^{3} \ln \left (1+\left (d x +c \right )^{2}\right ) c}{2 d^{4}}-\frac {b \arctan \left (d x +c \right ) c \,e^{3}}{d}-\frac {b \,f^{2} \ln \left (1+\left (d x +c \right )^{2}\right ) e}{2 d^{3}}-\frac {3 b \,f^{3} \arctan \left (d x +c \right ) c^{2}}{2 d^{4}}+\frac {3 b f c \,e^{2}}{2 d^{2}}-\frac {5 b \,f^{2} c^{2} e}{2 d^{3}}+b \,f^{2} \mathrm {arccot}\left (d x +c \right ) e \,x^{3}+\frac {b \,f^{3} \arctan \left (d x +c \right ) c^{4}}{4 d^{4}}-\frac {3 b f \arctan \left (d x +c \right ) e^{2}}{2 d^{2}}-\frac {b \,f^{3} \ln \left (1+\left (d x +c \right )^{2}\right ) c^{3}}{2 d^{4}}+\frac {a \,e^{4}}{4 f}-\frac {b \,f^{3} c}{4 d^{4}}+\frac {13 b \,f^{3} c^{3}}{12 d^{4}}+\frac {3 b f \,\mathrm {arccot}\left (d x +c \right ) e^{2} x^{2}}{2}+\frac {a \,f^{3} x^{4}}{4}+a x \,e^{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 341, normalized size = 1.46 \[ \frac {1}{4} \, a f^{3} x^{4} + a e f^{2} x^{3} + \frac {3}{2} \, a e^{2} f x^{2} + \frac {3}{2} \, {\left (x^{2} \operatorname {arccot}\left (d x + c\right ) + d {\left (\frac {x}{d^{2}} + \frac {{\left (c^{2} - 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{3}} - \frac {c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} b e^{2} f + \frac {1}{2} \, {\left (2 \, x^{3} \operatorname {arccot}\left (d x + c\right ) + d {\left (\frac {d x^{2} - 4 \, c x}{d^{3}} - \frac {2 \, {\left (c^{3} - 3 \, c\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{4}} + \frac {{\left (3 \, c^{2} - 1\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{4}}\right )}\right )} b e f^{2} + \frac {1}{12} \, {\left (3 \, x^{4} \operatorname {arccot}\left (d x + c\right ) + d {\left (\frac {d^{2} x^{3} - 3 \, c d x^{2} + 3 \, {\left (3 \, c^{2} - 1\right )} x}{d^{4}} + \frac {3 \, {\left (c^{4} - 6 \, c^{2} + 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{5}} - \frac {6 \, {\left (c^{3} - c\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{5}}\right )}\right )} b f^{3} + a e^{3} x + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {arccot}\left (d x + c\right ) + \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b e^{3}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.19, size = 783, normalized size = 3.36 \[ \mathrm {acot}\left (c+d\,x\right )\,\left (b\,e^3\,x+\frac {3\,b\,e^2\,f\,x^2}{2}+b\,e\,f^2\,x^3+\frac {b\,f^3\,x^4}{4}\right )+x\,\left (\frac {e\,\left (6\,a\,c^2\,f^2+12\,a\,c\,d\,e\,f+2\,a\,d^2\,e^2+3\,b\,d\,e\,f+6\,a\,f^2\right )}{2\,d^2}-\frac {\left (4\,c^2+4\right )\,\left (\frac {f^2\,\left (b\,f+8\,a\,c\,f+12\,a\,d\,e\right )}{4\,d}-\frac {2\,a\,c\,f^3}{d}\right )}{4\,d^2}+\frac {2\,c\,\left (\frac {2\,c\,\left (\frac {f^2\,\left (b\,f+8\,a\,c\,f+12\,a\,d\,e\right )}{4\,d}-\frac {2\,a\,c\,f^3}{d}\right )}{d}-\frac {4\,a\,c^2\,f^3+24\,a\,c\,d\,e\,f^2+12\,a\,d^2\,e^2\,f+4\,b\,d\,e\,f^2+4\,a\,f^3}{4\,d^2}+\frac {a\,f^3\,\left (4\,c^2+4\right )}{4\,d^2}\right )}{d}\right )-x^2\,\left (\frac {c\,\left (\frac {f^2\,\left (b\,f+8\,a\,c\,f+12\,a\,d\,e\right )}{4\,d}-\frac {2\,a\,c\,f^3}{d}\right )}{d}-\frac {4\,a\,c^2\,f^3+24\,a\,c\,d\,e\,f^2+12\,a\,d^2\,e^2\,f+4\,b\,d\,e\,f^2+4\,a\,f^3}{8\,d^2}+\frac {a\,f^3\,\left (4\,c^2+4\right )}{8\,d^2}\right )+x^3\,\left (\frac {f^2\,\left (b\,f+8\,a\,c\,f+12\,a\,d\,e\right )}{12\,d}-\frac {2\,a\,c\,f^3}{3\,d}\right )+\frac {a\,f^3\,x^4}{4}+\frac {\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )\,\left (-64\,b\,c^3\,d^4\,f^3+192\,b\,c^2\,d^5\,e\,f^2-192\,b\,c\,d^6\,e^2\,f+64\,b\,c\,d^4\,f^3+64\,b\,d^7\,e^3-64\,b\,d^5\,e\,f^2\right )}{128\,d^8}+\frac {b\,\mathrm {atan}\left (\frac {4\,d^3\,\left (\frac {c\,\left (c^4\,f^3-4\,c^3\,d\,e\,f^2+6\,c^2\,d^2\,e^2\,f-6\,c^2\,f^3-4\,c\,d^3\,e^3+12\,c\,d\,e\,f^2-6\,d^2\,e^2\,f+f^3\right )}{4\,d^3}+\frac {x\,\left (c^4\,f^3-4\,c^3\,d\,e\,f^2+6\,c^2\,d^2\,e^2\,f-6\,c^2\,f^3-4\,c\,d^3\,e^3+12\,c\,d\,e\,f^2-6\,d^2\,e^2\,f+f^3\right )}{4\,d^2}\right )}{c^4\,f^3-4\,c^3\,d\,e\,f^2+6\,c^2\,d^2\,e^2\,f-6\,c^2\,f^3-4\,c\,d^3\,e^3+12\,c\,d\,e\,f^2-6\,d^2\,e^2\,f+f^3}\right )\,\left (c^4\,f^3-4\,c^3\,d\,e\,f^2+6\,c^2\,d^2\,e^2\,f-6\,c^2\,f^3-4\,c\,d^3\,e^3+12\,c\,d\,e\,f^2-6\,d^2\,e^2\,f+f^3\right )}{4\,d^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 26.45, size = 654, normalized size = 2.81 \[ \begin {cases} a e^{3} x + \frac {3 a e^{2} f x^{2}}{2} + a e f^{2} x^{3} + \frac {a f^{3} x^{4}}{4} - \frac {b c^{4} f^{3} \operatorname {acot}{\left (c + d x \right )}}{4 d^{4}} + \frac {b c^{3} e f^{2} \operatorname {acot}{\left (c + d x \right )}}{d^{3}} - \frac {b c^{3} f^{3} \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{4}} - \frac {i b c^{3} f^{3} \operatorname {acot}{\left (c + d x \right )}}{d^{4}} - \frac {3 b c^{2} e^{2} f \operatorname {acot}{\left (c + d x \right )}}{2 d^{2}} + \frac {3 b c^{2} e f^{2} \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{3}} + \frac {3 i b c^{2} e f^{2} \operatorname {acot}{\left (c + d x \right )}}{d^{3}} + \frac {3 b c^{2} f^{3} x}{4 d^{3}} + \frac {3 b c^{2} f^{3} \operatorname {acot}{\left (c + d x \right )}}{2 d^{4}} + \frac {b c e^{3} \operatorname {acot}{\left (c + d x \right )}}{d} - \frac {3 b c e^{2} f \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{2}} - \frac {3 i b c e^{2} f \operatorname {acot}{\left (c + d x \right )}}{d^{2}} - \frac {2 b c e f^{2} x}{d^{2}} - \frac {b c f^{3} x^{2}}{4 d^{2}} - \frac {3 b c e f^{2} \operatorname {acot}{\left (c + d x \right )}}{d^{3}} + \frac {b c f^{3} \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{4}} + \frac {i b c f^{3} \operatorname {acot}{\left (c + d x \right )}}{d^{4}} + b e^{3} x \operatorname {acot}{\left (c + d x \right )} + \frac {3 b e^{2} f x^{2} \operatorname {acot}{\left (c + d x \right )}}{2} + b e f^{2} x^{3} \operatorname {acot}{\left (c + d x \right )} + \frac {b f^{3} x^{4} \operatorname {acot}{\left (c + d x \right )}}{4} + \frac {b e^{3} \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d} + \frac {i b e^{3} \operatorname {acot}{\left (c + d x \right )}}{d} + \frac {3 b e^{2} f x}{2 d} + \frac {b e f^{2} x^{2}}{2 d} + \frac {b f^{3} x^{3}}{12 d} + \frac {3 b e^{2} f \operatorname {acot}{\left (c + d x \right )}}{2 d^{2}} - \frac {b e f^{2} \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{3}} - \frac {i b e f^{2} \operatorname {acot}{\left (c + d x \right )}}{d^{3}} - \frac {b f^{3} x}{4 d^{3}} - \frac {b f^{3} \operatorname {acot}{\left (c + d x \right )}}{4 d^{4}} & \text {for}\: d \neq 0 \\\left (a + b \operatorname {acot}{\relax (c )}\right ) \left (e^{3} x + \frac {3 e^{2} f x^{2}}{2} + e f^{2} x^{3} + \frac {f^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________