3.2.29 \(\int (e+f x)^3 (a+b \cot ^{-1}(c+d x)) \, dx\) [129]

3.2.29.1 Optimal result
3.2.29.2 Mathematica [C] (verified)
3.2.29.3 Rubi [A] (verified)
3.2.29.4 Maple [B] (verified)
3.2.29.5 Fricas [A] (verification not implemented)
3.2.29.6 Sympy [F(-1)]
3.2.29.7 Maxima [A] (verification not implemented)
3.2.29.8 Giac [B] (verification not implemented)
3.2.29.9 Mupad [B] (verification not implemented)

3.2.29.1 Optimal result

Integrand size = 18, antiderivative size = 233 \[ \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx=\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 ) \arctan (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} \]

output
1/4*b*f*(6*d^2*e^2-12*c*d*e*f-(-6*c^2+1)*f^2)*x/d^3+1/2*b*f^2*(-c*f+d*e)*( 
d*x+c)^2/d^4+1/12*b*f^3*(d*x+c)^3/d^4+1/4*(f*x+e)^4*(a+b*arccot(d*x+c))/f+ 
1/4*b*(d^4*e^4-4*c*d^3*e^3*f-6*(-c^2+1)*d^2*e^2*f^2+4*c*(-c^2+3)*d*e*f^3+( 
c^4-6*c^2+1)*f^4)*arctan(d*x+c)/d^4/f+1/2*b*(-c*f+d*e)*(-c*f+d*e+f)*(d*e-( 
1+c)*f)*ln(1+(d*x+c)^2)/d^4
 
3.2.29.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.20 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.67 \[ \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx=\frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )+\frac {b \left (6 d f^2 \left (6 d^2 e^2-12 c d e f+\left (-1+6 c^2\right ) f^2\right ) x+12 f^3 (d e-c f) (c+d x)^2+2 f^4 (c+d x)^3-3 i (d e-(-i+c) f)^4 \log (i-c-d x)+3 i (d e-(i+c) f)^4 \log (i+c+d x)\right )}{6 d^4}}{4 f} \]

input
Integrate[(e + f*x)^3*(a + b*ArcCot[c + d*x]),x]
 
output
((e + f*x)^4*(a + b*ArcCot[c + d*x]) + (b*(6*d*f^2*(6*d^2*e^2 - 12*c*d*e*f 
 + (-1 + 6*c^2)*f^2)*x + 12*f^3*(d*e - c*f)*(c + d*x)^2 + 2*f^4*(c + d*x)^ 
3 - (3*I)*(d*e - (-I + c)*f)^4*Log[I - c - d*x] + (3*I)*(d*e - (I + c)*f)^ 
4*Log[I + c + d*x]))/(6*d^4))/(4*f)
 
3.2.29.3 Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 230, normalized size of antiderivative = 0.99, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {5571, 27, 5388, 478, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx\)

\(\Big \downarrow \) 5571

\(\displaystyle \frac {\int \frac {\left (d \left (e-\frac {c f}{d}\right )+f (c+d x)\right )^3 \left (a+b \cot ^{-1}(c+d x)\right )}{d^3}d(c+d x)}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int (d e-c f+f (c+d x))^3 \left (a+b \cot ^{-1}(c+d x)\right )d(c+d x)}{d^4}\)

\(\Big \downarrow \) 5388

\(\displaystyle \frac {\frac {b \int \frac {(d e-c f+f (c+d x))^4}{(c+d x)^2+1}d(c+d x)}{4 f}+\frac {(f (c+d x)-c f+d e)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}}{d^4}\)

\(\Big \downarrow \) 478

\(\displaystyle \frac {\frac {b \int \left ((c+d x)^2 f^4+4 (d e-c f) (c+d x) f^3+\left (6 d^2 e^2-12 c d f e-\left (1-6 c^2\right ) f^2\right ) f^2+\frac {d^4 e^4-4 c d^3 f e^3-6 \left (1-c^2\right ) d^2 f^2 e^2+4 c \left (3-c^2\right ) d f^3 e+\left (c^4-6 c^2+1\right ) f^4+4 f (d e-c f) (d e-c f-f) (d e-c f+f) (c+d x)}{(c+d x)^2+1}\right )d(c+d x)}{4 f}+\frac {(f (c+d x)-c f+d e)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}}{d^4}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {(f (c+d x)-c f+d e)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b \left (\arctan (c+d x) \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 )+f^2 (c+d x) \left (-\left (1-6 c^2\right ) f^2-12 c d e f+6 d^2 e^2\right )+2 f^3 (c+d x)^2 (d e-c f)+2 f (d e-c f) (-c f+d e+f) (d e-(c+1) f) \log \left ((c+d x)^2+1\right )+\frac {1}{3} f^4 (c+d x)^3\right )}{4 f}}{d^4}\)

input
Int[(e + f*x)^3*(a + b*ArcCot[c + d*x]),x]
 
output
(((d*e - c*f + f*(c + d*x))^4*(a + b*ArcCot[c + d*x]))/(4*f) + (b*(f^2*(6* 
d^2*e^2 - 12*c*d*e*f - (1 - 6*c^2)*f^2)*(c + d*x) + 2*f^3*(d*e - c*f)*(c + 
 d*x)^2 + (f^4*(c + d*x)^3)/3 + (d^4*e^4 - 4*c*d^3*e^3*f - 6*(1 - c^2)*d^2 
*e^2*f^2 + 4*c*(3 - c^2)*d*e*f^3 + (1 - 6*c^2 + c^4)*f^4)*ArcTan[c + d*x] 
+ 2*f*(d*e - c*f)*(d*e + f - c*f)*(d*e - (1 + c)*f)*Log[1 + (c + d*x)^2])) 
/(4*f))/d^4
 

3.2.29.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 478
Int[((c_) + (d_.)*(x_))^(n_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[Expand 
Integrand[(c + d*x)^n/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ 
[n, 1]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5388
Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] 
 :> Simp[(d + e*x)^(q + 1)*((a + b*ArcCot[c*x])/(e*(q + 1))), x] + Simp[b*( 
c/(e*(q + 1)))   Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{a, b 
, c, d, e, q}, x] && NeQ[q, -1]
 

rule 5571
Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m 
_.), x_Symbol] :> Simp[1/d   Subst[Int[((d*e - c*f)/d + f*(x/d))^m*(a + b*A 
rcCot[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && I 
GtQ[p, 0]
 
3.2.29.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(495\) vs. \(2(221)=442\).

Time = 0.88 (sec) , antiderivative size = 496, normalized size of antiderivative = 2.13

method result size
parts \(\frac {a \left (f x +e \right )^{4}}{4 f}-\frac {f^{3} b c \,x^{2}}{4 d^{2}}+\frac {f^{2} b e \,x^{2}}{2 d}+\frac {3 f^{3} b \,c^{2} x}{4 d^{3}}+\frac {3 f b \,e^{2} x}{2 d}+\frac {b \,f^{3} \operatorname {arccot}\left (d x +c \right ) x^{4}}{4}+b \,\operatorname {arccot}\left (d x +c \right ) x \,e^{3}+\frac {b \,\operatorname {arccot}\left (d x +c \right ) e^{4}}{4 f}-\frac {3 f b \,e^{2} \arctan \left (d x +c \right )}{2 d^{2}}+\frac {f^{3} b \,c^{4} \arctan \left (d x +c \right )}{4 d^{4}}-\frac {3 f^{3} b \,c^{2} \arctan \left (d x +c \right )}{2 d^{4}}-\frac {b c \,e^{3} \arctan \left (d x +c \right )}{d}-\frac {b \,f^{3} c}{4 d^{4}}+\frac {13 b \,f^{3} c^{3}}{12 d^{4}}+\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) e^{3}}{2 d}+\frac {f^{3} b \arctan \left (d x +c \right )}{4 d^{4}}+\frac {f^{3} b \,x^{3}}{12 d}-\frac {f^{3} b x}{4 d^{3}}+\frac {b \,e^{4} \arctan \left (d x +c \right )}{4 f}+\frac {3 b \,f^{2} \ln \left (1+\left (d x +c \right )^{2}\right ) c^{2} e}{2 d^{3}}-\frac {b \,f^{3} \ln \left (1+\left (d x +c \right )^{2}\right ) c^{3}}{2 d^{4}}+\frac {3 b f \,\operatorname {arccot}\left (d x +c \right ) e^{2} x^{2}}{2}+b \,f^{2} \operatorname {arccot}\left (d x +c \right ) e \,x^{3}+\frac {b \,f^{3} \ln \left (1+\left (d x +c \right )^{2}\right ) c}{2 d^{4}}-\frac {b \,f^{2} \ln \left (1+\left (d x +c \right )^{2}\right ) e}{2 d^{3}}-\frac {2 f^{2} b c e x}{d^{2}}-\frac {f^{2} b \,c^{3} e \arctan \left (d x +c \right )}{d^{3}}+\frac {3 f b \,c^{2} e^{2} \arctan \left (d x +c \right )}{2 d^{2}}+\frac {3 f^{2} b c e \arctan \left (d x +c \right )}{d^{3}}-\frac {5 b \,f^{2} c^{2} e}{2 d^{3}}+\frac {3 b f c \,e^{2}}{2 d^{2}}-\frac {3 b f \ln \left (1+\left (d x +c \right )^{2}\right ) c \,e^{2}}{2 d^{2}}\) \(496\)
derivativedivides \(\frac {\frac {a \left (c f -d e -f \left (d x +c \right )\right )^{4}}{4 d^{3} f}-\frac {b \left (-\frac {f^{3} \operatorname {arccot}\left (d x +c \right ) c^{4}}{4}+f^{2} \operatorname {arccot}\left (d x +c \right ) c^{3} d e +f^{3} \operatorname {arccot}\left (d x +c \right ) c^{3} \left (d x +c \right )-\frac {3 f \,\operatorname {arccot}\left (d x +c \right ) c^{2} d^{2} e^{2}}{2}-3 f^{2} \operatorname {arccot}\left (d x +c \right ) c^{2} d e \left (d x +c \right )-\frac {3 f^{3} \operatorname {arccot}\left (d x +c \right ) c^{2} \left (d x +c \right )^{2}}{2}+\operatorname {arccot}\left (d x +c \right ) c \,d^{3} e^{3}+3 f \,\operatorname {arccot}\left (d x +c \right ) c \,d^{2} e^{2} \left (d x +c \right )+3 f^{2} \operatorname {arccot}\left (d x +c \right ) c d e \left (d x +c \right )^{2}+f^{3} \operatorname {arccot}\left (d x +c \right ) c \left (d x +c \right )^{3}-\frac {\operatorname {arccot}\left (d x +c \right ) d^{4} e^{4}}{4 f}-\operatorname {arccot}\left (d x +c \right ) d^{3} e^{3} \left (d x +c \right )-\frac {3 f \,\operatorname {arccot}\left (d x +c \right ) d^{2} e^{2} \left (d x +c \right )^{2}}{2}-f^{2} \operatorname {arccot}\left (d x +c \right ) d e \left (d x +c \right )^{3}-\frac {f^{3} \operatorname {arccot}\left (d x +c \right ) \left (d x +c \right )^{4}}{4}-\frac {6 c^{2} f^{4} \left (d x +c \right )-12 c d e \,f^{3} \left (d x +c \right )-2 c \,f^{4} \left (d x +c \right )^{2}+6 d^{2} e^{2} f^{2} \left (d x +c \right )+2 d e \,f^{3} \left (d x +c \right )^{2}+\frac {f^{4} \left (d x +c \right )^{3}}{3}-f^{4} \left (d x +c \right )+\frac {\left (-4 c^{3} f^{4}+12 c^{2} d e \,f^{3}-12 c \,d^{2} e^{2} f^{2}+4 f \,e^{3} d^{3}+4 c \,f^{4}-4 e \,f^{3} d \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{2}+\left (c^{4} f^{4}-4 c^{3} d e \,f^{3}+6 c^{2} d^{2} e^{2} f^{2}-4 c \,d^{3} e^{3} f +d^{4} e^{4}-6 c^{2} f^{4}+12 c d e \,f^{3}-6 d^{2} e^{2} f^{2}+f^{4}\right ) \arctan \left (d x +c \right )}{4 f}\right )}{d^{3}}}{d}\) \(565\)
default \(\frac {\frac {a \left (c f -d e -f \left (d x +c \right )\right )^{4}}{4 d^{3} f}-\frac {b \left (-\frac {f^{3} \operatorname {arccot}\left (d x +c \right ) c^{4}}{4}+f^{2} \operatorname {arccot}\left (d x +c \right ) c^{3} d e +f^{3} \operatorname {arccot}\left (d x +c \right ) c^{3} \left (d x +c \right )-\frac {3 f \,\operatorname {arccot}\left (d x +c \right ) c^{2} d^{2} e^{2}}{2}-3 f^{2} \operatorname {arccot}\left (d x +c \right ) c^{2} d e \left (d x +c \right )-\frac {3 f^{3} \operatorname {arccot}\left (d x +c \right ) c^{2} \left (d x +c \right )^{2}}{2}+\operatorname {arccot}\left (d x +c \right ) c \,d^{3} e^{3}+3 f \,\operatorname {arccot}\left (d x +c \right ) c \,d^{2} e^{2} \left (d x +c \right )+3 f^{2} \operatorname {arccot}\left (d x +c \right ) c d e \left (d x +c \right )^{2}+f^{3} \operatorname {arccot}\left (d x +c \right ) c \left (d x +c \right )^{3}-\frac {\operatorname {arccot}\left (d x +c \right ) d^{4} e^{4}}{4 f}-\operatorname {arccot}\left (d x +c \right ) d^{3} e^{3} \left (d x +c \right )-\frac {3 f \,\operatorname {arccot}\left (d x +c \right ) d^{2} e^{2} \left (d x +c \right )^{2}}{2}-f^{2} \operatorname {arccot}\left (d x +c \right ) d e \left (d x +c \right )^{3}-\frac {f^{3} \operatorname {arccot}\left (d x +c \right ) \left (d x +c \right )^{4}}{4}-\frac {6 c^{2} f^{4} \left (d x +c \right )-12 c d e \,f^{3} \left (d x +c \right )-2 c \,f^{4} \left (d x +c \right )^{2}+6 d^{2} e^{2} f^{2} \left (d x +c \right )+2 d e \,f^{3} \left (d x +c \right )^{2}+\frac {f^{4} \left (d x +c \right )^{3}}{3}-f^{4} \left (d x +c \right )+\frac {\left (-4 c^{3} f^{4}+12 c^{2} d e \,f^{3}-12 c \,d^{2} e^{2} f^{2}+4 f \,e^{3} d^{3}+4 c \,f^{4}-4 e \,f^{3} d \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{2}+\left (c^{4} f^{4}-4 c^{3} d e \,f^{3}+6 c^{2} d^{2} e^{2} f^{2}-4 c \,d^{3} e^{3} f +d^{4} e^{4}-6 c^{2} f^{4}+12 c d e \,f^{3}-6 d^{2} e^{2} f^{2}+f^{4}\right ) \arctan \left (d x +c \right )}{4 f}\right )}{d^{3}}}{d}\) \(565\)
parallelrisch \(-\frac {-42 b \,c^{2} d e \,f^{2}+24 a c \,d^{3} e^{3}+6 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b \,c^{3} f^{3}-6 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b \,d^{3} e^{3}-6 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b c \,f^{3}-3 x^{4} a \,d^{4} f^{3}-12 x a \,d^{4} e^{3}+3 x b d \,f^{3}+3 \,\operatorname {arccot}\left (d x +c \right ) b \,c^{4} f^{3}-18 \,\operatorname {arccot}\left (d x +c \right ) b \,c^{2} f^{3}+15 b \,c^{3} f^{3}-6 b \,d^{3} e \,f^{2} x^{2}-18 b \,d^{3} e^{2} f x +6 f^{2} e b d -9 b c \,f^{3}+18 a \,d^{2} e^{2} f +3 \,\operatorname {arccot}\left (d x +c \right ) b \,f^{3}-b \,d^{3} f^{3} x^{3}+36 b c \,d^{2} e^{2} f -12 x^{3} \operatorname {arccot}\left (d x +c \right ) b \,d^{4} e \,f^{2}-18 x^{2} \operatorname {arccot}\left (d x +c \right ) b \,d^{4} e^{2} f +24 x b c \,d^{2} e \,f^{2}-12 \,\operatorname {arccot}\left (d x +c \right ) b \,c^{3} d e \,f^{2}+36 \,\operatorname {arccot}\left (d x +c \right ) b c d e \,f^{2}+18 \,\operatorname {arccot}\left (d x +c \right ) b \,c^{2} d^{2} e^{2} f -18 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b \,c^{2} d e \,f^{2}+18 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b c \,d^{2} e^{2} f -18 x^{2} a \,d^{4} e^{2} f +6 \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b d e \,f^{2}-3 x^{4} \operatorname {arccot}\left (d x +c \right ) b \,d^{4} f^{3}-12 x \,\operatorname {arccot}\left (d x +c \right ) b \,d^{4} e^{3}-9 x b \,c^{2} d \,f^{3}-12 x^{3} a \,d^{4} e \,f^{2}-12 \,\operatorname {arccot}\left (d x +c \right ) b c \,d^{3} e^{3}-18 \,\operatorname {arccot}\left (d x +c \right ) b \,d^{2} e^{2} f +3 x^{2} b c \,d^{2} f^{3}+18 a \,c^{2} d^{2} e^{2} f}{12 d^{4}}\) \(574\)
risch \(\frac {x^{4} f^{3} a}{4}+x \,e^{3} a -\frac {f^{3} b c \,x^{2}}{4 d^{2}}+\frac {f^{2} b e \,x^{2}}{2 d}+\frac {3 f^{3} b \,c^{2} x}{4 d^{3}}+\frac {3 f b \,e^{2} x}{2 d}-\frac {3 f b \,e^{2} \arctan \left (d x +c \right )}{2 d^{2}}-\frac {f^{2} b e \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d^{3}}+\frac {f^{3} b c \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d^{4}}-\frac {f^{3} b \,c^{3} \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d^{4}}+\frac {f^{3} b \,c^{4} \arctan \left (d x +c \right )}{4 d^{4}}-\frac {3 f^{3} b \,c^{2} \arctan \left (d x +c \right )}{2 d^{4}}+\frac {x^{3} f^{2} e b \pi }{2}+\frac {3 x^{2} f \,e^{2} b \pi }{4}-\frac {b c \,e^{3} \arctan \left (d x +c \right )}{d}-\frac {i b \,e^{3} x \ln \left (1-i \left (d x +c \right )\right )}{2}-\frac {i f^{3} b \,x^{4} \ln \left (1-i \left (d x +c \right )\right )}{8}-\frac {i b \,e^{4} \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{16 f}+\frac {i \left (f x +e \right )^{4} b \ln \left (1+i \left (d x +c \right )\right )}{8 f}-\frac {3 i f b \,e^{2} x^{2} \ln \left (1-i \left (d x +c \right )\right )}{4}-\frac {i f^{2} b e \,x^{3} \ln \left (1-i \left (d x +c \right )\right )}{2}+x^{3} f^{2} e a +\frac {3 x^{2} f \,e^{2} a}{2}+\frac {f^{3} b \arctan \left (d x +c \right )}{4 d^{4}}+\frac {x^{4} f^{3} b \pi }{8}+\frac {x \,e^{3} b \pi }{2}+\frac {f^{3} b \,x^{3}}{12 d}-\frac {f^{3} b x}{4 d^{3}}+\frac {b \,e^{3} \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d}+\frac {b \,e^{4} \arctan \left (d x +c \right )}{8 f}-\frac {2 f^{2} b c e x}{d^{2}}-\frac {f^{2} b \,c^{3} e \arctan \left (d x +c \right )}{d^{3}}+\frac {3 f b \,c^{2} e^{2} \arctan \left (d x +c \right )}{2 d^{2}}+\frac {3 f^{2} b c e \arctan \left (d x +c \right )}{d^{3}}-\frac {3 f b c \,e^{2} \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d^{2}}+\frac {3 f^{2} b \,c^{2} e \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d^{3}}\) \(623\)

input
int((f*x+e)^3*(a+b*arccot(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/4*a*(f*x+e)^4/f-1/4/d^2*f^3*b*c*x^2+1/2/d*f^2*b*e*x^2+3/4/d^3*f^3*b*c^2* 
x+3/2/d*f*b*e^2*x+1/4*b*f^3*arccot(d*x+c)*x^4+b*arccot(d*x+c)*x*e^3+1/4*b/ 
f*arccot(d*x+c)*e^4-3/2/d^2*f*b*e^2*arctan(d*x+c)+1/4/d^4*f^3*b*c^4*arctan 
(d*x+c)-3/2/d^4*f^3*b*c^2*arctan(d*x+c)-1/d*b*c*e^3*arctan(d*x+c)-1/4*b/d^ 
4*f^3*c+13/12*b/d^4*f^3*c^3+1/2*b/d*ln(1+(d*x+c)^2)*e^3+1/4/d^4*f^3*b*arct 
an(d*x+c)+1/12/d*f^3*b*x^3-1/4/d^3*f^3*b*x+1/4/f*b*e^4*arctan(d*x+c)+3/2*b 
/d^3*f^2*ln(1+(d*x+c)^2)*c^2*e-1/2*b/d^4*f^3*ln(1+(d*x+c)^2)*c^3+3/2*b*f*a 
rccot(d*x+c)*e^2*x^2+b*f^2*arccot(d*x+c)*e*x^3+1/2*b/d^4*f^3*ln(1+(d*x+c)^ 
2)*c-1/2*b/d^3*f^2*ln(1+(d*x+c)^2)*e-2/d^2*f^2*b*c*e*x-1/d^3*f^2*b*c^3*e*a 
rctan(d*x+c)+3/2/d^2*f*b*c^2*e^2*arctan(d*x+c)+3/d^3*f^2*b*c*e*arctan(d*x+ 
c)-5/2*b/d^3*f^2*c^2*e+3/2*b/d^2*f*c*e^2-3/2*b/d^2*f*ln(1+(d*x+c)^2)*c*e^2
 
3.2.29.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 325, normalized size of antiderivative = 1.39 \[ \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx=\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}} \]

input
integrate((f*x+e)^3*(a+b*arccot(d*x+c)),x, algorithm="fricas")
 
output
1/12*(3*a*d^4*f^3*x^4 + (12*a*d^4*e*f^2 + b*d^3*f^3)*x^3 + 3*(6*a*d^4*e^2* 
f + 2*b*d^3*e*f^2 - b*c*d^2*f^3)*x^2 + 3*(4*a*d^4*e^3 + 6*b*d^3*e^2*f - 8* 
b*c*d^2*e*f^2 + (3*b*c^2 - b)*d*f^3)*x + 3*(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)*arccot(d*x + c) - 3*(4*b*c*d^3*e^ 
3 - 6*(b*c^2 - b)*d^2*e^2*f + 4*(b*c^3 - 3*b*c)*d*e*f^2 - (b*c^4 - 6*b*c^2 
 + b)*f^3)*arctan(d*x + c) + 6*(b*d^3*e^3 - 3*b*c*d^2*e^2*f + (3*b*c^2 - b 
)*d*e*f^2 - (b*c^3 - b*c)*f^3)*log(d^2*x^2 + 2*c*d*x + c^2 + 1))/d^4
 
3.2.29.6 Sympy [F(-1)]

Timed out. \[ \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx=\text {Timed out} \]

input
integrate((f*x+e)**3*(a+b*acot(d*x+c)),x)
 
output
Timed out
 
3.2.29.7 Maxima [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 341, normalized size of antiderivative = 1.46 \[ \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx=\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} \]

input
integrate((f*x+e)^3*(a+b*arccot(d*x+c)),x, algorithm="maxima")
 
output
1/4*a*f^3*x^4 + a*e*f^2*x^3 + 3/2*a*e^2*f*x^2 + 3/2*(x^2*arccot(d*x + c) + 
 d*(x/d^2 + (c^2 - 1)*arctan((d^2*x + c*d)/d)/d^3 - c*log(d^2*x^2 + 2*c*d* 
x + c^2 + 1)/d^3))*b*e^2*f + 1/2*(2*x^3*arccot(d*x + c) + d*((d*x^2 - 4*c* 
x)/d^3 - 2*(c^3 - 3*c)*arctan((d^2*x + c*d)/d)/d^4 + (3*c^2 - 1)*log(d^2*x 
^2 + 2*c*d*x + c^2 + 1)/d^4))*b*e*f^2 + 1/12*(3*x^4*arccot(d*x + c) + d*(( 
d^2*x^3 - 3*c*d*x^2 + 3*(3*c^2 - 1)*x)/d^4 + 3*(c^4 - 6*c^2 + 1)*arctan((d 
^2*x + c*d)/d)/d^5 - 6*(c^3 - c)*log(d^2*x^2 + 2*c*d*x + c^2 + 1)/d^5))*b* 
f^3 + a*e^3*x + 1/2*(2*(d*x + c)*arccot(d*x + c) + log((d*x + c)^2 + 1))*b 
*e^3/d
 
3.2.29.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2265 vs. \(2 (216) = 432\).

Time = 1.73 (sec) , antiderivative size = 2265, normalized size of antiderivative = 9.72 \[ \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx=\text {Too large to display} \]

input
integrate((f*x+e)^3*(a+b*arccot(d*x+c)),x, algorithm="giac")
 
output
-1/192*(96*b*d^3*e^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^5 - 
288*b*c*d^2*e^2*f*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^5 + 288 
*b*c^2*d*e*f^2*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^5 - 96*b*c 
^3*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^5 - 72*b*d^2*e^2*f 
*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^6 + 144*b*c*d*e*f^2*arct 
an(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^6 - 72*b*c^2*f^3*arctan(1/(d* 
x + c))*tan(1/2*arctan(1/(d*x + c)))^6 + 24*b*d*e*f^2*arctan(1/(d*x + c))* 
tan(1/2*arctan(1/(d*x + c)))^7 - 24*b*c*f^3*arctan(1/(d*x + c))*tan(1/2*ar 
ctan(1/(d*x + c)))^7 - 3*b*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + 
 c)))^8 + 96*b*d^3*e^3*log(16*tan(1/2*arctan(1/(d*x + c)))^2/(tan(1/2*arct 
an(1/(d*x + c)))^4 + 2*tan(1/2*arctan(1/(d*x + c)))^2 + 1))*tan(1/2*arctan 
(1/(d*x + c)))^4 - 288*b*c*d^2*e^2*f*log(16*tan(1/2*arctan(1/(d*x + c)))^2 
/(tan(1/2*arctan(1/(d*x + c)))^4 + 2*tan(1/2*arctan(1/(d*x + c)))^2 + 1))* 
tan(1/2*arctan(1/(d*x + c)))^4 + 288*b*c^2*d*e*f^2*log(16*tan(1/2*arctan(1 
/(d*x + c)))^2/(tan(1/2*arctan(1/(d*x + c)))^4 + 2*tan(1/2*arctan(1/(d*x + 
 c)))^2 + 1))*tan(1/2*arctan(1/(d*x + c)))^4 - 96*b*c^3*f^3*log(16*tan(1/2 
*arctan(1/(d*x + c)))^2/(tan(1/2*arctan(1/(d*x + c)))^4 + 2*tan(1/2*arctan 
(1/(d*x + c)))^2 + 1))*tan(1/2*arctan(1/(d*x + c)))^4 + 96*a*d^3*e^3*tan(1 
/2*arctan(1/(d*x + c)))^5 - 288*a*c*d^2*e^2*f*tan(1/2*arctan(1/(d*x + c))) 
^5 + 288*a*c^2*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^5 - 96*a*c^3*f^3*ta...
 
3.2.29.9 Mupad [B] (verification not implemented)

Time = 1.37 (sec) , antiderivative size = 783, normalized size of antiderivative = 3.36 \[ \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx=\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} \]

input
int((e + f*x)^3*(a + b*acot(c + d*x)),x)
 
output
acot(c + d*x)*((b*f^3*x^4)/4 + b*e^3*x + (3*b*e^2*f*x^2)/2 + b*e*f^2*x^3) 
+ x*((e*(6*a*f^2 + 6*a*c^2*f^2 + 2*a*d^2*e^2 + 3*b*d*e*f + 12*a*c*d*e*f))/ 
(2*d^2) - ((4*c^2 + 4)*((f^2*(b*f + 8*a*c*f + 12*a*d*e))/(4*d) - (2*a*c*f^ 
3)/d))/(4*d^2) + (2*c*((2*c*((f^2*(b*f + 8*a*c*f + 12*a*d*e))/(4*d) - (2*a 
*c*f^3)/d))/d - (4*a*f^3 + 4*a*c^2*f^3 + 4*b*d*e*f^2 + 12*a*d^2*e^2*f + 24 
*a*c*d*e*f^2)/(4*d^2) + (a*f^3*(4*c^2 + 4))/(4*d^2)))/d) - x^2*((c*((f^2*( 
b*f + 8*a*c*f + 12*a*d*e))/(4*d) - (2*a*c*f^3)/d))/d - (4*a*f^3 + 4*a*c^2* 
f^3 + 4*b*d*e*f^2 + 12*a*d^2*e^2*f + 24*a*c*d*e*f^2)/(8*d^2) + (a*f^3*(4*c 
^2 + 4))/(8*d^2)) + x^3*((f^2*(b*f + 8*a*c*f + 12*a*d*e))/(12*d) - (2*a*c* 
f^3)/(3*d)) + (a*f^3*x^4)/4 + (log(c^2 + d^2*x^2 + 2*c*d*x + 1)*(64*b*d^7* 
e^3 - 64*b*c^3*d^4*f^3 + 64*b*c*d^4*f^3 - 64*b*d^5*e*f^2 - 192*b*c*d^6*e^2 
*f + 192*b*c^2*d^5*e*f^2))/(128*d^8) + (b*atan((4*d^3*((c*(f^3 - 6*c^2*f^3 
 + c^4*f^3 - 4*c*d^3*e^3 - 6*d^2*e^2*f + 6*c^2*d^2*e^2*f + 12*c*d*e*f^2 - 
4*c^3*d*e*f^2))/(4*d^3) + (x*(f^3 - 6*c^2*f^3 + c^4*f^3 - 4*c*d^3*e^3 - 6* 
d^2*e^2*f + 6*c^2*d^2*e^2*f + 12*c*d*e*f^2 - 4*c^3*d*e*f^2))/(4*d^2)))/(f^ 
3 - 6*c^2*f^3 + c^4*f^3 - 4*c*d^3*e^3 - 6*d^2*e^2*f + 6*c^2*d^2*e^2*f + 12 
*c*d*e*f^2 - 4*c^3*d*e*f^2))*(f^3 - 6*c^2*f^3 + c^4*f^3 - 4*c*d^3*e^3 - 6* 
d^2*e^2*f + 6*c^2*d^2*e^2*f + 12*c*d*e*f^2 - 4*c^3*d*e*f^2))/(4*d^4)