3.71 \(\int (d+c d x) (a+b \tanh ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=112 \[ \frac {d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {2 b d \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c}+a b d x+\frac {b^2 d \log \left (1-c^2 x^2\right )}{2 c}-\frac {b^2 d \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c}+b^2 d x \tanh ^{-1}(c x) \]

[Out]

a*b*d*x+b^2*d*x*arctanh(c*x)+1/2*d*(c*x+1)^2*(a+b*arctanh(c*x))^2/c-2*b*d*(a+b*arctanh(c*x))*ln(2/(-c*x+1))/c+
1/2*b^2*d*ln(-c^2*x^2+1)/c-b^2*d*polylog(2,1-2/(-c*x+1))/c

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {5928, 5910, 260, 1586, 5918, 2402, 2315} \[ -\frac {b^2 d \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{c}+\frac {d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {2 b d \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c}+a b d x+\frac {b^2 d \log \left (1-c^2 x^2\right )}{2 c}+b^2 d x \tanh ^{-1}(c x) \]

Antiderivative was successfully verified.

[In]

Int[(d + c*d*x)*(a + b*ArcTanh[c*x])^2,x]

[Out]

a*b*d*x + b^2*d*x*ArcTanh[c*x] + (d*(1 + c*x)^2*(a + b*ArcTanh[c*x])^2)/(2*c) - (2*b*d*(a + b*ArcTanh[c*x])*Lo
g[2/(1 - c*x)])/c + (b^2*d*Log[1 - c^2*x^2])/(2*c) - (b^2*d*PolyLog[2, 1 - 2/(1 - c*x)])/c

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 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 5910

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x])^p, x] - Dist[b*c*p, In
t[(x*(a + b*ArcTanh[c*x])^(p - 1))/(1 - c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 5918

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])^p*
Log[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTanh[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 - c^2
*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 5928

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(
a + b*ArcTanh[c*x])^p)/(e*(q + 1)), x] - Dist[(b*c*p)/(e*(q + 1)), Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^(p
 - 1), (d + e*x)^(q + 1)/(1 - c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] &
& NeQ[q, -1]

Rubi steps

\begin {align*} \int (d+c d x) \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {b \int \left (-d^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2 \left (d^2+c d^2 x\right ) \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2}\right ) \, dx}{d}\\ &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {(2 b) \int \frac {\left (d^2+c d^2 x\right ) \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx}{d}+(b d) \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx\\ &=a b d x+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {(2 b) \int \frac {a+b \tanh ^{-1}(c x)}{\frac {1}{d^2}-\frac {c x}{d^2}} \, dx}{d}+\left (b^2 d\right ) \int \tanh ^{-1}(c x) \, dx\\ &=a b d x+b^2 d x \tanh ^{-1}(c x)+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c}+\left (2 b^2 d\right ) \int \frac {\log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx-\left (b^2 c d\right ) \int \frac {x}{1-c^2 x^2} \, dx\\ &=a b d x+b^2 d x \tanh ^{-1}(c x)+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c}+\frac {b^2 d \log \left (1-c^2 x^2\right )}{2 c}-\frac {\left (2 b^2 d\right ) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-c x}\right )}{c}\\ &=a b d x+b^2 d x \tanh ^{-1}(c x)+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c}-\frac {2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c}+\frac {b^2 d \log \left (1-c^2 x^2\right )}{2 c}-\frac {b^2 d \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.32, size = 156, normalized size = 1.39 \[ \frac {d \left (a^2 c^2 x^2+2 a^2 c x+2 a b \log \left (1-c^2 x^2\right )+2 a b c x+a b \log (1-c x)-a b \log (c x+1)+2 b \tanh ^{-1}(c x) \left (c x (a c x+2 a+b)-2 b \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )\right )+b^2 \log \left (1-c^2 x^2\right )+b^2 \left (c^2 x^2+2 c x-3\right ) \tanh ^{-1}(c x)^2+2 b^2 \text {Li}_2\left (-e^{-2 \tanh ^{-1}(c x)}\right )\right )}{2 c} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(d + c*d*x)*(a + b*ArcTanh[c*x])^2,x]

[Out]

(d*(2*a^2*c*x + 2*a*b*c*x + a^2*c^2*x^2 + b^2*(-3 + 2*c*x + c^2*x^2)*ArcTanh[c*x]^2 + 2*b*ArcTanh[c*x]*(c*x*(2
*a + b + a*c*x) - 2*b*Log[1 + E^(-2*ArcTanh[c*x])]) + a*b*Log[1 - c*x] - a*b*Log[1 + c*x] + 2*a*b*Log[1 - c^2*
x^2] + b^2*Log[1 - c^2*x^2] + 2*b^2*PolyLog[2, -E^(-2*ArcTanh[c*x])]))/(2*c)

________________________________________________________________________________________

fricas [F]  time = 0.45, size = 0, normalized size = 0.00 \[ {\rm integral}\left (a^{2} c d x + a^{2} d + {\left (b^{2} c d x + b^{2} d\right )} \operatorname {artanh}\left (c x\right )^{2} + 2 \, {\left (a b c d x + a b d\right )} \operatorname {artanh}\left (c x\right ), x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x))^2,x, algorithm="fricas")

[Out]

integral(a^2*c*d*x + a^2*d + (b^2*c*d*x + b^2*d)*arctanh(c*x)^2 + 2*(a*b*c*d*x + a*b*d)*arctanh(c*x), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (c d x + d\right )} {\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x))^2,x, algorithm="giac")

[Out]

integrate((c*d*x + d)*(b*arctanh(c*x) + a)^2, x)

________________________________________________________________________________________

maple [B]  time = 0.06, size = 296, normalized size = 2.64 \[ \frac {c \,a^{2} d \,x^{2}}{2}+a^{2} d x +\frac {c d \,b^{2} \arctanh \left (c x \right )^{2} x^{2}}{2}+d \,b^{2} \arctanh \left (c x \right )^{2} x +b^{2} d x \arctanh \left (c x \right )+\frac {3 d \,b^{2} \arctanh \left (c x \right ) \ln \left (c x -1\right )}{2 c}+\frac {d \,b^{2} \arctanh \left (c x \right ) \ln \left (c x +1\right )}{2 c}-\frac {b^{2} \ln \left (c x +1\right )^{2} d}{8 c}+\frac {d \,b^{2} \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (c x +1\right )}{4 c}-\frac {d \,b^{2} \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (\frac {1}{2}+\frac {c x}{2}\right )}{4 c}-\frac {d \,b^{2} \dilog \left (\frac {1}{2}+\frac {c x}{2}\right )}{c}+\frac {d \,b^{2} \ln \left (c x -1\right )}{2 c}+\frac {d \,b^{2} \ln \left (c x +1\right )}{2 c}+\frac {3 d \,b^{2} \ln \left (c x -1\right )^{2}}{8 c}-\frac {3 d \,b^{2} \ln \left (c x -1\right ) \ln \left (\frac {1}{2}+\frac {c x}{2}\right )}{4 c}+c d a b \arctanh \left (c x \right ) x^{2}+2 d a b \arctanh \left (c x \right ) x +a b d x +\frac {3 d a b \ln \left (c x -1\right )}{2 c}+\frac {d a b \ln \left (c x +1\right )}{2 c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*d*x+d)*(a+b*arctanh(c*x))^2,x)

[Out]

1/2*c*a^2*d*x^2+a^2*d*x+1/2*c*d*b^2*arctanh(c*x)^2*x^2+d*b^2*arctanh(c*x)^2*x+b^2*d*x*arctanh(c*x)+3/2/c*d*b^2
*arctanh(c*x)*ln(c*x-1)+1/2/c*d*b^2*arctanh(c*x)*ln(c*x+1)-1/8/c*b^2*ln(c*x+1)^2*d+1/4/c*d*b^2*ln(-1/2*c*x+1/2
)*ln(c*x+1)-1/4/c*d*b^2*ln(-1/2*c*x+1/2)*ln(1/2+1/2*c*x)-1/c*d*b^2*dilog(1/2+1/2*c*x)+1/2/c*d*b^2*ln(c*x-1)+1/
2/c*d*b^2*ln(c*x+1)+3/8/c*d*b^2*ln(c*x-1)^2-3/4/c*d*b^2*ln(c*x-1)*ln(1/2+1/2*c*x)+c*d*a*b*arctanh(c*x)*x^2+2*d
*a*b*arctanh(c*x)*x+a*b*d*x+3/2/c*d*a*b*ln(c*x-1)+1/2/c*d*a*b*ln(c*x+1)

________________________________________________________________________________________

maxima [B]  time = 0.56, size = 290, normalized size = 2.59 \[ \frac {1}{2} \, a^{2} c d x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} a b c d + a^{2} d x + \frac {{\left (2 \, c x \operatorname {artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} a b d}{c} + \frac {{\left (\log \left (c x + 1\right ) \log \left (-\frac {1}{2} \, c x + \frac {1}{2}\right ) + {\rm Li}_2\left (\frac {1}{2} \, c x + \frac {1}{2}\right )\right )} b^{2} d}{c} + \frac {b^{2} d \log \left (c x + 1\right )}{2 \, c} + \frac {b^{2} d \log \left (c x - 1\right )}{2 \, c} + \frac {4 \, b^{2} c d x \log \left (c x + 1\right ) + {\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x + b^{2} d\right )} \log \left (c x + 1\right )^{2} + {\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x - 3 \, b^{2} d\right )} \log \left (-c x + 1\right )^{2} - 2 \, {\left (2 \, b^{2} c d x + {\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x + b^{2} d\right )} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )}{8 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x))^2,x, algorithm="maxima")

[Out]

1/2*a^2*c*d*x^2 + 1/2*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3))*a*b*c*d + a^2*d
*x + (2*c*x*arctanh(c*x) + log(-c^2*x^2 + 1))*a*b*d/c + (log(c*x + 1)*log(-1/2*c*x + 1/2) + dilog(1/2*c*x + 1/
2))*b^2*d/c + 1/2*b^2*d*log(c*x + 1)/c + 1/2*b^2*d*log(c*x - 1)/c + 1/8*(4*b^2*c*d*x*log(c*x + 1) + (b^2*c^2*d
*x^2 + 2*b^2*c*d*x + b^2*d)*log(c*x + 1)^2 + (b^2*c^2*d*x^2 + 2*b^2*c*d*x - 3*b^2*d)*log(-c*x + 1)^2 - 2*(2*b^
2*c*d*x + (b^2*c^2*d*x^2 + 2*b^2*c*d*x + b^2*d)*log(c*x + 1))*log(-c*x + 1))/c

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2\,\left (d+c\,d\,x\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))^2*(d + c*d*x),x)

[Out]

int((a + b*atanh(c*x))^2*(d + c*d*x), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ d \left (\int a^{2}\, dx + \int b^{2} \operatorname {atanh}^{2}{\left (c x \right )}\, dx + \int 2 a b \operatorname {atanh}{\left (c x \right )}\, dx + \int a^{2} c x\, dx + \int b^{2} c x \operatorname {atanh}^{2}{\left (c x \right )}\, dx + \int 2 a b c x \operatorname {atanh}{\left (c x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*atanh(c*x))**2,x)

[Out]

d*(Integral(a**2, x) + Integral(b**2*atanh(c*x)**2, x) + Integral(2*a*b*atanh(c*x), x) + Integral(a**2*c*x, x)
 + Integral(b**2*c*x*atanh(c*x)**2, x) + Integral(2*a*b*c*x*atanh(c*x), x))

________________________________________________________________________________________