3.2.4 \(\int (e+f x) (a+b \coth ^{-1}(c+d x)) \, dx\) [104]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {6247, 6064, 716, 647, 31} \begin {gather*} \frac {(e+f x)^2 \left (a+b \coth ^{-1}(c+d x)\right )}{2 f}+\frac {b (-c f+d e+f)^2 \log (-c-d x+1)}{4 d^2 f}-\frac {b (d e-(c+1) f)^2 \log (c+d x+1)}{4 d^2 f}+\frac {b f x}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 31

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

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-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 6064

Int[((a_.) + ArcCoth[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b
*ArcCoth[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 6247

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 138, normalized size = 1.42 \begin {gather*} a e x+\frac {b f x}{2 d}+\frac {1}{2} a f x^2+b e x \coth ^{-1}(c+d x)+\frac {1}{2} b f x^2 \coth ^{-1}(c+d x)+\frac {b \left (1-2 c+c^2\right ) f \log (1-c-d x)}{4 d^2}+\frac {b \left (-1-2 c-c^2\right ) f \log (1+c+d x)}{4 d^2}+\frac {b e (-((-1+c) \log (1-c-d x))+(1+c) \log (1+c+d x))}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(184\) vs. \(2(89)=178\).
time = 0.10, size = 185, normalized size = 1.91

method result size
derivativedivides \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \,\mathrm {arccoth}\left (d x +c \right ) f c \left (d x +c \right )}{d}+b \,\mathrm {arccoth}\left (d x +c \right ) e \left (d x +c \right )+\frac {b \,\mathrm {arccoth}\left (d x +c \right ) f \left (d x +c \right )^{2}}{2 d}+\frac {b f \left (d x +c \right )}{2 d}-\frac {b \ln \left (d x +c -1\right ) f c}{2 d}+\frac {b \ln \left (d x +c -1\right ) e}{2}+\frac {b \ln \left (d x +c -1\right ) f}{4 d}-\frac {b \ln \left (d x +c +1\right ) f c}{2 d}+\frac {b \ln \left (d x +c +1\right ) e}{2}-\frac {b \ln \left (d x +c +1\right ) f}{4 d}}{d}\) \(185\)
default \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \,\mathrm {arccoth}\left (d x +c \right ) f c \left (d x +c \right )}{d}+b \,\mathrm {arccoth}\left (d x +c \right ) e \left (d x +c \right )+\frac {b \,\mathrm {arccoth}\left (d x +c \right ) f \left (d x +c \right )^{2}}{2 d}+\frac {b f \left (d x +c \right )}{2 d}-\frac {b \ln \left (d x +c -1\right ) f c}{2 d}+\frac {b \ln \left (d x +c -1\right ) e}{2}+\frac {b \ln \left (d x +c -1\right ) f}{4 d}-\frac {b \ln \left (d x +c +1\right ) f c}{2 d}+\frac {b \ln \left (d x +c +1\right ) e}{2}-\frac {b \ln \left (d x +c +1\right ) f}{4 d}}{d}\) \(185\)
risch \(\frac {b x \left (f x +2 e \right ) \ln \left (d x +c +1\right )}{4}-\frac {b f \,x^{2} \ln \left (d x +c -1\right )}{4}-\frac {b e x \ln \left (d x +c -1\right )}{2}+\frac {a f \,x^{2}}{2}-\frac {\ln \left (d x +c +1\right ) b \,c^{2} f}{4 d^{2}}+\frac {\ln \left (d x +c +1\right ) b c e}{2 d}+\frac {\ln \left (-d x -c +1\right ) b \,c^{2} f}{4 d^{2}}-\frac {\ln \left (-d x -c +1\right ) b c e}{2 d}+a e x -\frac {\ln \left (d x +c +1\right ) b c f}{2 d^{2}}+\frac {\ln \left (d x +c +1\right ) b e}{2 d}-\frac {\ln \left (-d x -c +1\right ) b c f}{2 d^{2}}+\frac {\ln \left (-d x -c +1\right ) b e}{2 d}+\frac {b f x}{2 d}-\frac {\ln \left (d x +c +1\right ) b f}{4 d^{2}}+\frac {\ln \left (-d x -c +1\right ) b f}{4 d^{2}}\) \(230\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 111, normalized size = 1.14 \begin {gather*} \frac {1}{2} \, a f x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {arcoth}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} b f + a x e + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {arcoth}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} b e}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*a*f*x^2 + 1/4*(2*x^2*arccoth(d*x + c) + d*(2*x/d^2 - (c^2 + 2*c + 1)*log(d*x + c + 1)/d^3 + (c^2 - 2*c + 1
)*log(d*x + c - 1)/d^3))*b*f + a*x*e + 1/2*(2*(d*x + c)*arccoth(d*x + c) + log(-(d*x + c)^2 + 1))*b*e/d

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 176, normalized size = 1.81 \begin {gather*} \frac {2 \, a d^{2} f x^{2} + 4 \, a d^{2} x \cosh \left (1\right ) + 4 \, a d^{2} x \sinh \left (1\right ) + 2 \, b d f x + {\left (2 \, {\left (b c + b\right )} d \cosh \left (1\right ) + 2 \, {\left (b c + b\right )} d \sinh \left (1\right ) - {\left (b c^{2} + 2 \, b c + b\right )} f\right )} \log \left (d x + c + 1\right ) - {\left (2 \, {\left (b c - b\right )} d \cosh \left (1\right ) + 2 \, {\left (b c - b\right )} d \sinh \left (1\right ) - {\left (b c^{2} - 2 \, b c + b\right )} f\right )} \log \left (d x + c - 1\right ) + {\left (b d^{2} f x^{2} + 2 \, b d^{2} x \cosh \left (1\right ) + 2 \, b d^{2} x \sinh \left (1\right )\right )} \log \left (\frac {d x + c + 1}{d x + c - 1}\right )}{4 \, d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(2*a*d^2*f*x^2 + 4*a*d^2*x*cosh(1) + 4*a*d^2*x*sinh(1) + 2*b*d*f*x + (2*(b*c + b)*d*cosh(1) + 2*(b*c + b)*
d*sinh(1) - (b*c^2 + 2*b*c + b)*f)*log(d*x + c + 1) - (2*(b*c - b)*d*cosh(1) + 2*(b*c - b)*d*sinh(1) - (b*c^2
- 2*b*c + b)*f)*log(d*x + c - 1) + (b*d^2*f*x^2 + 2*b*d^2*x*cosh(1) + 2*b*d^2*x*sinh(1))*log((d*x + c + 1)/(d*
x + c - 1)))/d^2

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (82) = 164\).
time = 0.80, size = 173, normalized size = 1.78 \begin {gather*} \begin {cases} a e x + \frac {a f x^{2}}{2} - \frac {b c^{2} f \operatorname {acoth}{\left (c + d x \right )}}{2 d^{2}} + \frac {b c e \operatorname {acoth}{\left (c + d x \right )}}{d} - \frac {b c f \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d^{2}} + \frac {b c f \operatorname {acoth}{\left (c + d x \right )}}{d^{2}} + b e x \operatorname {acoth}{\left (c + d x \right )} + \frac {b f x^{2} \operatorname {acoth}{\left (c + d x \right )}}{2} + \frac {b e \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d} - \frac {b e \operatorname {acoth}{\left (c + d x \right )}}{d} + \frac {b f x}{2 d} - \frac {b f \operatorname {acoth}{\left (c + d x \right )}}{2 d^{2}} & \text {for}\: d \neq 0 \\\left (a + b \operatorname {acoth}{\left (c \right )}\right ) \left (e x + \frac {f x^{2}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 338 vs. \(2 (89) = 178\).
time = 0.42, size = 338, normalized size = 3.48 \begin {gather*} \frac {1}{2} \, {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )} {\left (\frac {{\left (\frac {{\left (d x + c + 1\right )} b d e}{d x + c - 1} - b d e - \frac {{\left (d x + c + 1\right )} b c f}{d x + c - 1} + b c f + \frac {{\left (d x + c + 1\right )} b f}{d x + c - 1}\right )} \log \left (\frac {d x + c + 1}{d x + c - 1}\right )}{\frac {{\left (d x + c + 1\right )}^{2} d^{3}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{3}}{d x + c - 1} + d^{3}} + \frac {\frac {2 \, {\left (d x + c + 1\right )} a d e}{d x + c - 1} - 2 \, a d e - \frac {2 \, {\left (d x + c + 1\right )} a c f}{d x + c - 1} + 2 \, a c f + \frac {2 \, {\left (d x + c + 1\right )} a f}{d x + c - 1} + \frac {{\left (d x + c + 1\right )} b f}{d x + c - 1} - b f}{\frac {{\left (d x + c + 1\right )}^{2} d^{3}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{3}}{d x + c - 1} + d^{3}} - \frac {{\left (b d e - b c f\right )} \log \left (\frac {d x + c + 1}{d x + c - 1} - 1\right )}{d^{3}} + \frac {{\left (b d e - b c f\right )} \log \left (\frac {d x + c + 1}{d x + c - 1}\right )}{d^{3}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 2.40, size = 136, normalized size = 1.40 \begin {gather*} 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 {acoth}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,f\,x^2\,\mathrm {acoth}\left (c+d\,x\right )}{2}+\frac {b\,f\,x}{2\,d}+b\,e\,x\,\mathrm {acoth}\left (c+d\,x\right )-\frac {b\,c^2\,f\,\mathrm {acoth}\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 {acoth}\left (c+d\,x\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e + f*x)*(a + b*acoth(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*acoth(c + d*x))/(2*d^2) + (b*f*x^2*a
coth(c + d*x))/2 + (b*f*x)/(2*d) + b*e*x*acoth(c + d*x) - (b*c^2*f*acoth(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*acoth(c + d*x))/d

________________________________________________________________________________________