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

Optimal. Leaf size=233 \[ \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 ) \text {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} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.28, 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 = {5156, 4973, 716, 649, 209, 266} \begin {gather*} \frac {(e+f x)^4 \left (a+b \cot ^{-1}(c+d x)\right )}{4 f}+\frac {b \text {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 )}{4 d^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 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} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(e + f*x)^3*(a + b*ArcCot[c + d*x]),x]

[Out]

(b*f*(6*d^2*e^2 - 12*c*d*e*f - (1 - 6*c^2)*f^2)*x)/(4*d^3) + (b*f^2*(d*e - c*f)*(c + d*x)^2)/(2*d^4) + (b*f^3*
(c + d*x)^3)/(12*d^4) + ((e + f*x)^4*(a + b*ArcCot[c + d*x]))/(4*f) + (b*(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])/(4*d^4*f) + (b*(d*e - c*f)*(d*
e + f - c*f)*(d*e - (1 + c)*f)*Log[1 + (c + d*x)^2])/(2*d^4)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 649

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[(-a)*c]

Rule 716

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 4973

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] + Dist[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 5156

Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[I
nt[((d*e - c*f)/d + f*(x/d))^m*(a + b*ArcCot[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x]
&& IGtQ[p, 0]

Rubi steps

\begin {align*} \int (e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right ) \, dx &=\frac {\text {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 \text {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 \text {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 \text {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)) \text {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 ) \text {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] Result contains complex when optimal does not.
time = 0.20, size = 157, normalized size = 0.67 \begin {gather*} \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} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(e + f*x)^3*(a + b*ArcCot[c + d*x]),x]

[Out]

((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)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(726\) vs. \(2(221)=442\).
time = 0.57, size = 727, normalized size = 3.12 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)^3*(a+b*arccot(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/2*b*ln(1+(d*x+c)^2)*e^3-b/d^3*f^3*arccot(d*x+c)*c^3*(d*x+c)-3*b/d^2*f^2*c*e*(d*x+c)+3*b/d^2*f^2*arctan(
d*x+c)*c*e+3/2*b/d^2*f^2*ln(1+(d*x+c)^2)*c^2*e-3/2*b/d*f*ln(1+(d*x+c)^2)*c*e^2-3*b/d*f*arccot(d*x+c)*c*e^2*(d*
x+c)-3*b/d^2*f^2*arccot(d*x+c)*c*e*(d*x+c)^2+3*b/d^2*f^2*arccot(d*x+c)*c^2*e*(d*x+c)-b/d^2*f^2*arctan(d*x+c)*c
^3*e+3/2*b/d*f*arctan(d*x+c)*c^2*e^2+3/2*b/d*f*arccot(d*x+c)*c^2*e^2+3/2*b/d*f*arccot(d*x+c)*e^2*(d*x+c)^2+b/d
^2*f^2*arccot(d*x+c)*e*(d*x+c)^3-b/d^2*f^2*arccot(d*x+c)*c^3*e-b/d^3*f^3*arccot(d*x+c)*c*(d*x+c)^3+3/2*b/d^3*f
^3*arccot(d*x+c)*c^2*(d*x+c)^2-b*arctan(d*x+c)*c*e^3-b*arccot(d*x+c)*c*e^3+b*arccot(d*x+c)*e^3*(d*x+c)+1/4*b*d
/f*arccot(d*x+c)*e^4+1/4*b/d^3*f^3*arccot(d*x+c)*c^4+1/4*b/d^3*f^3*arccot(d*x+c)*(d*x+c)^4+1/4*b/d^3*f^3*arcta
n(d*x+c)*c^4+1/4*b*d/f*arctan(d*x+c)*e^4-1/2*b/d^3*f^3*c*(d*x+c)^2+3/2*b/d*f*e^2*(d*x+c)+1/2*b/d^2*f^2*e*(d*x+
c)^2-1/2*b/d^2*f^2*ln(1+(d*x+c)^2)*e-3/2*b/d*f*arctan(d*x+c)*e^2-1/2*b/d^3*f^3*ln(1+(d*x+c)^2)*c^3+1/2*b/d^3*f
^3*ln(1+(d*x+c)^2)*c-3/2*b/d^3*f^3*arctan(d*x+c)*c^2+3/2*b/d^3*f^3*c^2*(d*x+c)+1/4*(c*f-d*e-f*(d*x+c))^4*a/d^3
/f+1/12*b/d^3*f^3*(d*x+c)^3-1/4*b/d^3*f^3*(d*x+c)+1/4*b/d^3*f^3*arctan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.47, size = 339, normalized size = 1.45 \begin {gather*} \frac {1}{4} \, a f^{3} x^{4} + a f^{2} x^{3} e + \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} + \frac {3}{2} \, a f x^{2} e^{2} + \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 f^{2} e + \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 f e^{2} + a x e^{3} + \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*(a+b*arccot(d*x+c)),x, algorithm="maxima")

[Out]

1/4*a*f^3*x^4 + a*f^2*x^3*e + 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 + 3/
2*a*f*x^2*e^2 + 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*f^2*e + 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*f*e^2 + a*x*e^3 + 1/2*(2*(d*x + c)
*arccot(d*x + c) + log((d*x + c)^2 + 1))*b*e^3/d

________________________________________________________________________________________

Fricas [A]
time = 3.68, size = 325, normalized size = 1.39 \begin {gather*} \frac {3 \, a d^{4} f^{3} x^{4} + b d^{3} f^{3} x^{3} - 3 \, b c d^{2} f^{3} x^{2} + 12 \, a d^{4} x e^{3} + 3 \, {\left (3 \, b c^{2} - b\right )} d f^{3} x + 3 \, {\left (b d^{4} f^{3} x^{4} + 4 \, b d^{4} f^{2} x^{3} e + 6 \, b d^{4} f x^{2} e^{2} + 4 \, b d^{4} x e^{3}\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} f e^{2} + 4 \, {\left (b c^{3} - 3 \, b c\right )} d f^{2} e - {\left (b c^{4} - 6 \, b c^{2} + b\right )} f^{3}\right )} \arctan \left (d x + c\right ) + 18 \, {\left (a d^{4} f x^{2} + b d^{3} f x\right )} e^{2} + 6 \, {\left (2 \, a d^{4} f^{2} x^{3} + b d^{3} f^{2} x^{2} - 4 \, b c d^{2} f^{2} x\right )} e - 6 \, {\left (3 \, b c d^{2} f e^{2} - b d^{3} e^{3} - {\left (3 \, b c^{2} - b\right )} d f^{2} e + {\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}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*(a+b*arccot(d*x+c)),x, algorithm="fricas")

[Out]

1/12*(3*a*d^4*f^3*x^4 + b*d^3*f^3*x^3 - 3*b*c*d^2*f^3*x^2 + 12*a*d^4*x*e^3 + 3*(3*b*c^2 - b)*d*f^3*x + 3*(b*d^
4*f^3*x^4 + 4*b*d^4*f^2*x^3*e + 6*b*d^4*f*x^2*e^2 + 4*b*d^4*x*e^3)*arccot(d*x + c) - 3*(4*b*c*d^3*e^3 - 6*(b*c
^2 - b)*d^2*f*e^2 + 4*(b*c^3 - 3*b*c)*d*f^2*e - (b*c^4 - 6*b*c^2 + b)*f^3)*arctan(d*x + c) + 18*(a*d^4*f*x^2 +
 b*d^3*f*x)*e^2 + 6*(2*a*d^4*f^2*x^3 + b*d^3*f^2*x^2 - 4*b*c*d^2*f^2*x)*e - 6*(3*b*c*d^2*f*e^2 - b*d^3*e^3 - (
3*b*c^2 - b)*d*f^2*e + (b*c^3 - b*c)*f^3)*log(d^2*x^2 + 2*c*d*x + c^2 + 1))/d^4

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 12.36, size = 654, normalized size = 2.81 \begin {gather*} \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}{\left (c \right )}\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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)**3*(a+b*acot(d*x+c)),x)

[Out]

Piecewise((a*e**3*x + 3*a*e**2*f*x**2/2 + a*e*f**2*x**3 + a*f**3*x**4/4 - b*c**4*f**3*acot(c + d*x)/(4*d**4) +
 b*c**3*e*f**2*acot(c + d*x)/d**3 - b*c**3*f**3*log(c/d + x - I/d)/d**4 - I*b*c**3*f**3*acot(c + d*x)/d**4 - 3
*b*c**2*e**2*f*acot(c + d*x)/(2*d**2) + 3*b*c**2*e*f**2*log(c/d + x - I/d)/d**3 + 3*I*b*c**2*e*f**2*acot(c + d
*x)/d**3 + 3*b*c**2*f**3*x/(4*d**3) + 3*b*c**2*f**3*acot(c + d*x)/(2*d**4) + b*c*e**3*acot(c + d*x)/d - 3*b*c*
e**2*f*log(c/d + x - I/d)/d**2 - 3*I*b*c*e**2*f*acot(c + d*x)/d**2 - 2*b*c*e*f**2*x/d**2 - b*c*f**3*x**2/(4*d*
*2) - 3*b*c*e*f**2*acot(c + d*x)/d**3 + b*c*f**3*log(c/d + x - I/d)/d**4 + I*b*c*f**3*acot(c + d*x)/d**4 + b*e
**3*x*acot(c + d*x) + 3*b*e**2*f*x**2*acot(c + d*x)/2 + b*e*f**2*x**3*acot(c + d*x) + b*f**3*x**4*acot(c + d*x
)/4 + b*e**3*log(c/d + x - I/d)/d + I*b*e**3*acot(c + d*x)/d + 3*b*e**2*f*x/(2*d) + b*e*f**2*x**2/(2*d) + b*f*
*3*x**3/(12*d) + 3*b*e**2*f*acot(c + d*x)/(2*d**2) - b*e*f**2*log(c/d + x - I/d)/d**3 - I*b*e*f**2*acot(c + d*
x)/d**3 - b*f**3*x/(4*d**3) - b*f**3*acot(c + d*x)/(4*d**4), Ne(d, 0)), ((a + b*acot(c))*(e**3*x + 3*e**2*f*x*
*2/2 + e*f**2*x**3 + f**3*x**4/4), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 2265 vs. \(2 (216) = 432\).
time = 1.65, size = 2265, normalized size = 9.72 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*(a+b*arccot(d*x+c)),x, algorithm="giac")

[Out]

-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*arcta
n(1/(d*x + c)))^6 + 144*b*c*d*e*f^2*arctan(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*arctan(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*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*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*arcta
n(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/(t
an(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*t
an(1/2*arctan(1/(d*x + c)))^5 - 96*a*c^3*f^3*tan(1/2*arctan(1/(d*x + c)))^5 - 72*a*d^2*e^2*f*tan(1/2*arctan(1/
(d*x + c)))^6 + 144*a*c*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^6 - 72*a*c^2*f^3*tan(1/2*arctan(1/(d*x + c)))^6 +
 24*a*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^7 - 24*a*c*f^3*tan(1/2*arctan(1/(d*x + c)))^7 - 3*a*f^3*tan(1/2*arc
tan(1/(d*x + c)))^8 - 96*b*d^3*e^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^3 + 288*b*c*d^2*e^2*f*arct
an(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^3 - 288*b*c^2*d*e*f^2*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x +
 c)))^3 + 96*b*c^3*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^3 - 144*b*d^2*e^2*f*arctan(1/(d*x + c)
)*tan(1/2*arctan(1/(d*x + c)))^4 + 288*b*c*d*e*f^2*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^4 - 144*b*
c^2*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^4 + 144*b*d^2*e^2*f*tan(1/2*arctan(1/(d*x + c)))^5 -
288*b*c*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^5 + 144*b*c^2*f^3*tan(1/2*arctan(1/(d*x + c)))^5 - 72*b*d*e*f^2*a
rctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^5 + 72*b*c*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c))
)^5 - 24*b*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^6 + 24*b*c*f^3*tan(1/2*arctan(1/(d*x + c)))^6 + 12*b*f^3*arcta
n(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^6 + 2*b*f^3*tan(1/2*arctan(1/(d*x + c)))^7 - 96*a*d^3*e^3*tan(1/2*
arctan(1/(d*x + c)))^3 + 288*a*c*d^2*e^2*f*tan(1/2*arctan(1/(d*x + c)))^3 - 288*a*c^2*d*e*f^2*tan(1/2*arctan(1
/(d*x + c)))^3 + 96*a*c^3*f^3*tan(1/2*arctan(1/(d*x + c)))^3 - 144*a*d^2*e^2*f*tan(1/2*arctan(1/(d*x + c)))^4
+ 288*a*c*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^4 - 144*a*c^2*f^3*tan(1/2*arctan(1/(d*x + c)))^4 - 96*b*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*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 - 72*a*d*e*f^2*tan(1/2*arctan(1/
(d*x + c)))^5 + 72*a*c*f^3*tan(1/2*arctan(1/(d*x + c)))^5 + 12*a*f^3*tan(1/2*arctan(1/(d*x + c)))^6 - 72*b*d^2
*e^2*f*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^2 + 144*b*c*d*e*f^2*arctan(1/(d*x + c))*tan(1/2*arctan
(1/(d*x + c)))^2 - 72*b*c^2*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^2 - 144*b*d^2*e^2*f*tan(1/2*a
rctan(1/(d*x + c)))^3 + 288*b*c*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^3 - 144*b*c^2*f^3*tan(1/2*arctan(1/(d*x +
 c)))^3 + 72*b*d*e*f^2*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^3 - 72*b*c*f^3*arctan(1/(d*x + c))*tan
(1/2*arctan(1/(d*x + c)))^3 - 48*b*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^4 + 48*b*c*f^3*tan(1/2*arctan(1/(d*x +
 c)))^4 + 30*b*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^4 - 30*b*f^3*tan(1/2*arctan(1/(d*x + c)))^
5 - 72*a*d^2*e^2*f*tan(1/2*arctan(1/(d*x + c)))^2 + 144*a*c*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^2 - 72*a*c^2*
f^3*tan(1/2*arctan(1/(d*x + c)))^2 + 72*a*d*e*f^2*tan(1/2*arctan(1/(d*x + c)))^3 - 72*a*c*f^3*tan(1/2*arctan(1
/(d*x + c)))^3 + 30*a*f^3*tan(1/2*arctan(1/(d*x + c)))^4 - 24*b*d*e*f^2*arctan(1/(d*x + c))*tan(1/2*arctan(1/(
d*x + c))) + 24*b*c*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c))) - 24*b*d*e*f^2*tan(1/2*arctan(1/(d*x
+ c)))^2 + 24*b*c*f^3*tan(1/2*arctan(1/(d*x + c)))^2 + 12*b*f^3*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)
))^2 + 30*b*f^3*tan(1/2*arctan(1/(d*x + c)))^3 - 24*a*d*e*f^2*tan(1/2*arctan(1/(d*x + c))) + 24*a*c*f^3*tan(1/
2*arctan(1/(d*x + c))) + 12*a*f^3*tan(1/2*arctan(1/(d*x + c)))^2 - 3*b*f^3*arctan(1/(d*x + c)) - 2*b*f^3*tan(1
/2*arctan(1/(d*x + c))) - 3*a*f^3)/(d^4*tan(1/2...

________________________________________________________________________________________

Mupad [B]
time = 1.19, size = 783, normalized size = 3.36 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e + f*x)^3*(a + b*acot(c + d*x)),x)

[Out]

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)

________________________________________________________________________________________