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

Optimal. Leaf size=97 \[ \frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{2 f}+\frac {b (d e-c f) \log \left ((c+d x)^2+1\right )}{2 d^2}+\frac {b (-c f+d e+f) (d e-(c+1) f) \tan ^{-1}(c+d x)}{2 d^2 f}+\frac {b f x}{2 d} \]

[Out]

1/2*b*f*x/d+1/2*(f*x+e)^2*(a+b*arccot(d*x+c))/f+1/2*b*(-c*f+d*e+f)*(d*e-(1+c)*f)*arctan(d*x+c)/d^2/f+1/2*b*(-c
*f+d*e)*ln(1+(d*x+c)^2)/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {5048, 4863, 702, 635, 203, 260} \[ \frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{2 f}+\frac {b (d e-c f) \log \left ((c+d x)^2+1\right )}{2 d^2}+\frac {b (-c f+d e+f) (d e-(c+1) f) \tan ^{-1}(c+d x)}{2 d^2 f}+\frac {b f x}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(b*f*x)/(2*d) + ((e + f*x)^2*(a + b*ArcCot[c + d*x]))/(2*f) + (b*(d*e + f - c*f)*(d*e - (1 + c)*f)*ArcTan[c +
d*x])/(2*d^2*f) + (b*(d*e - c*f)*Log[1 + (c + d*x)^2])/(2*d^2)

Rule 203

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

Rule 260

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 635

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 702

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 4863

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 5048

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) \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 ) \left (a+b \cot ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{2 f}+\frac {b \operatorname {Subst}\left (\int \frac {\left (\frac {d e-c f}{d}+\frac {f x}{d}\right )^2}{1+x^2} \, dx,x,c+d x\right )}{2 f}\\ &=\frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{2 f}+\frac {b \operatorname {Subst}\left (\int \left (\frac {f^2}{d^2}+\frac {(d e-f-c f) (d e+f-c f)+2 f (d e-c f) x}{d^2 \left (1+x^2\right )}\right ) \, dx,x,c+d x\right )}{2 f}\\ &=\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{2 f}+\frac {b \operatorname {Subst}\left (\int \frac {(d e-f-c f) (d e+f-c f)+2 f (d e-c f) x}{1+x^2} \, dx,x,c+d x\right )}{2 d^2 f}\\ &=\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{2 f}+\frac {(b (d e-c f)) \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,c+d x\right )}{d^2}+\frac {(b (d e+f-c f) (d e-(1+c) f)) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,c+d x\right )}{2 d^2 f}\\ &=\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{2 f}+\frac {b (d e+f-c f) (d e-(1+c) f) \tan ^{-1}(c+d x)}{2 d^2 f}+\frac {b (d e-c f) \log \left (1+(c+d x)^2\right )}{2 d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.09, size = 163, normalized size = 1.68 \[ a e x+\frac {1}{2} a f x^2+\frac {b e \left (\log \left (c^2+2 c d x+d^2 x^2+1\right )-2 c \tan ^{-1}(c+d x)\right )}{2 d}+\frac {b f \left (\frac {1}{2} d \left (\frac {c+d x}{d}-\frac {c}{d}\right )^2 \cot ^{-1}(c+d x)+\frac {1}{2} d \left (-\frac {i (-c+i)^2 \log (-c-d x+i)}{2 d^2}+\frac {i (c+i)^2 \log (c+d x+i)}{2 d^2}+\frac {x}{d}\right )\right )}{d}+b e x \cot ^{-1}(c+d x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

a*e*x + (a*f*x^2)/2 + b*e*x*ArcCot[c + d*x] + (b*f*((d*(-(c/d) + (c + d*x)/d)^2*ArcCot[c + d*x])/2 + (d*(x/d -
 ((I/2)*(I - c)^2*Log[I - c - d*x])/d^2 + ((I/2)*(I + c)^2*Log[I + c + d*x])/d^2))/2))/d + (b*e*(-2*c*ArcTan[c
 + d*x] + Log[1 + c^2 + 2*c*d*x + d^2*x^2]))/(2*d)

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 110, normalized size = 1.13 \[ \frac {a d^{2} f x^{2} + {\left (2 \, a d^{2} e + b d f\right )} x + {\left (b d^{2} f x^{2} + 2 \, b d^{2} e x\right )} \operatorname {arccot}\left (d x + c\right ) - {\left (2 \, b c d e - {\left (b c^{2} - b\right )} f\right )} \arctan \left (d x + c\right ) + {\left (b d e - b c f\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{2 \, d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(a*d^2*f*x^2 + (2*a*d^2*e + b*d*f)*x + (b*d^2*f*x^2 + 2*b*d^2*e*x)*arccot(d*x + c) - (2*b*c*d*e - (b*c^2 -
 b)*f)*arctan(d*x + c) + (b*d*e - b*c*f)*log(d^2*x^2 + 2*c*d*x + c^2 + 1))/d^2

________________________________________________________________________________________

giac [B]  time = 0.34, size = 452, normalized size = 4.66 \[ \frac {4 \, b c f \arctan \left (\frac {1}{d x + c}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{3} - 4 \, b d \arctan \left (\frac {1}{d x + c}\right ) e \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{3} + b f \arctan \left (\frac {1}{d x + c}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{4} + 4 \, b c f \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2} - 4 \, b d e \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2} + 4 \, a c f \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{3} - 4 \, a d e \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{3} + a f \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{4} - 4 \, b c f \arctan \left (\frac {1}{d x + c}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right ) + 4 \, b d \arctan \left (\frac {1}{d x + c}\right ) e \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right ) + 2 \, b f \arctan \left (\frac {1}{d x + c}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2} - 2 \, b f \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{3} - 4 \, a c f \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right ) + 4 \, a d e \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right ) + 2 \, a f \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2} + b f \arctan \left (\frac {1}{d x + c}\right ) + 2 \, b f \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right ) + a f}{8 \, d^{2} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{d x + c}\right )\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*(4*b*c*f*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^3 - 4*b*d*arctan(1/(d*x + c))*e*tan(1/2*arctan(1
/(d*x + c)))^3 + b*f*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^4 + 4*b*c*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))
)^2 - 4*b*d*e*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)))^2 + 4*a*c*f*tan(1/2*arctan(1/(d*x + c)))^3 - 4*a*d*e*tan(1/2*arcta
n(1/(d*x + c)))^3 + a*f*tan(1/2*arctan(1/(d*x + c)))^4 - 4*b*c*f*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c
))) + 4*b*d*arctan(1/(d*x + c))*e*tan(1/2*arctan(1/(d*x + c))) + 2*b*f*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d
*x + c)))^2 - 2*b*f*tan(1/2*arctan(1/(d*x + c)))^3 - 4*a*c*f*tan(1/2*arctan(1/(d*x + c))) + 4*a*d*e*tan(1/2*ar
ctan(1/(d*x + c))) + 2*a*f*tan(1/2*arctan(1/(d*x + c)))^2 + b*f*arctan(1/(d*x + c)) + 2*b*f*tan(1/2*arctan(1/(
d*x + c))) + a*f)/(d^2*tan(1/2*arctan(1/(d*x + c)))^2)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 146, normalized size = 1.51 \[ \frac {a \,x^{2} f}{2}-\frac {a f \,c^{2}}{2 d^{2}}+a e x +\frac {a c e}{d}+\frac {b \,\mathrm {arccot}\left (d x +c \right ) f \,x^{2}}{2}-\frac {b \,\mathrm {arccot}\left (d x +c \right ) f \,c^{2}}{2 d^{2}}+\mathrm {arccot}\left (d x +c \right ) x b e +\frac {\mathrm {arccot}\left (d x +c \right ) b c e}{d}+\frac {b f x}{2 d}+\frac {b c f}{2 d^{2}}-\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) c f}{2 d^{2}}+\frac {b \ln \left (1+\left (d x +c \right )^{2}\right ) e}{2 d}-\frac {b f \arctan \left (d x +c \right )}{2 d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*(a+b*arccot(d*x+c)),x)

[Out]

1/2*a*x^2*f-1/2/d^2*a*f*c^2+a*e*x+1/d*a*c*e+1/2*b*arccot(d*x+c)*f*x^2-1/2/d^2*b*arccot(d*x+c)*f*c^2+arccot(d*x
+c)*x*b*e+1/d*arccot(d*x+c)*b*c*e+1/2*b*f*x/d+1/2/d^2*b*c*f-1/2/d^2*b*ln(1+(d*x+c)^2)*c*f+1/2/d*b*ln(1+(d*x+c)
^2)*e-1/2/d^2*b*f*arctan(d*x+c)

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 113, normalized size = 1.16 \[ \frac {1}{2} \, a f x^{2} + \frac {1}{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 + a e 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}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.45, size = 136, normalized size = 1.40 \[ a\,e\,x+\frac {a\,f\,x^2}{2}+\frac {b\,e\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d}+\frac {b\,f\,\mathrm {acot}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,f\,x^2\,\mathrm {acot}\left (c+d\,x\right )}{2}+\frac {b\,f\,x}{2\,d}+b\,e\,x\,\mathrm {acot}\left (c+d\,x\right )-\frac {b\,c^2\,f\,\mathrm {acot}\left (c+d\,x\right )}{2\,d^2}-\frac {b\,c\,f\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d^2}+\frac {b\,c\,e\,\mathrm {acot}\left (c+d\,x\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a*e*x + (a*f*x^2)/2 + (b*e*log(c^2 + d^2*x^2 + 2*c*d*x + 1))/(2*d) + (b*f*acot(c + d*x))/(2*d^2) + (b*f*x^2*ac
ot(c + d*x))/2 + (b*f*x)/(2*d) + b*e*x*acot(c + d*x) - (b*c^2*f*acot(c + d*x))/(2*d^2) - (b*c*f*log(c^2 + d^2*
x^2 + 2*c*d*x + 1))/(2*d^2) + (b*c*e*acot(c + d*x))/d

________________________________________________________________________________________

sympy [A]  time = 4.76, size = 177, normalized size = 1.82 \[ \begin {cases} a e x + \frac {a f x^{2}}{2} - \frac {b c^{2} f \operatorname {acot}{\left (c + d x \right )}}{2 d^{2}} + \frac {b c e \operatorname {acot}{\left (c + d x \right )}}{d} - \frac {b c f \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{2}} - \frac {i b c f \operatorname {acot}{\left (c + d x \right )}}{d^{2}} + b e x \operatorname {acot}{\left (c + d x \right )} + \frac {b f x^{2} \operatorname {acot}{\left (c + d x \right )}}{2} + \frac {b e \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d} + \frac {i b e \operatorname {acot}{\left (c + d x \right )}}{d} + \frac {b f x}{2 d} + \frac {b f \operatorname {acot}{\left (c + d x \right )}}{2 d^{2}} & \text {for}\: d \neq 0 \\\left (a + b \operatorname {acot}{\relax (c )}\right ) \left (e x + \frac {f x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________