\(\int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx\) [15]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [B] (verification not implemented)
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 20, antiderivative size = 61 \[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=\frac {d^2 \left (-1+c^2 x^2\right ) (a+b \text {arctanh}(c x))}{x}+(2 a+b) c d^2 \log (x)-b c d^2 \operatorname {PolyLog}(2,-c x)+b c d^2 \operatorname {PolyLog}(2,c x) \] Output:

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.20 \[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=\frac {d^2 \left (-a+a c^2 x^2-b \text {arctanh}(c x)+b c^2 x^2 \text {arctanh}(c x)+2 a c x \log (x)+b c x \log (c x)-b c x \operatorname {PolyLog}(2,-c x)+b c x \operatorname {PolyLog}(2,c x)\right )}{x} \] Input:

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

Output:

(d^2*(-a + a*c^2*x^2 - b*ArcTanh[c*x] + b*c^2*x^2*ArcTanh[c*x] + 2*a*c*x*L 
og[x] + b*c*x*Log[c*x] - b*c*x*PolyLog[2, -(c*x)] + b*c*x*PolyLog[2, c*x]) 
)/x
 

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.31, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {6502, 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 \frac {(c d x+d)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx\)

\(\Big \downarrow \) 6502

\(\displaystyle \int \left (c^2 d^2 (a+b \text {arctanh}(c x))+\frac {d^2 (a+b \text {arctanh}(c x))}{x^2}+\frac {2 c d^2 (a+b \text {arctanh}(c x))}{x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {d^2 (a+b \text {arctanh}(c x))}{x}+a c^2 d^2 x+2 a c d^2 \log (x)+b c^2 d^2 x \text {arctanh}(c x)-b c d^2 \operatorname {PolyLog}(2,-c x)+b c d^2 \operatorname {PolyLog}(2,c x)+b c d^2 \log (x)\)

Input:

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

Output:

a*c^2*d^2*x + b*c^2*d^2*x*ArcTanh[c*x] - (d^2*(a + b*ArcTanh[c*x]))/x + 2* 
a*c*d^2*Log[x] + b*c*d^2*Log[x] - b*c*d^2*PolyLog[2, -(c*x)] + b*c*d^2*Pol 
yLog[2, c*x]
 

Defintions of rubi rules used

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

rule 6502
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e 
_.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^p, ( 
f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] 
 && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
Maple [A] (verified)

Time = 0.29 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.46

method result size
parts \(d^{2} a \left (c^{2} x +2 c \ln \left (x \right )-\frac {1}{x}\right )+d^{2} b c \left (\operatorname {arctanh}\left (c x \right ) c x +2 \,\operatorname {arctanh}\left (c x \right ) \ln \left (c x \right )-\frac {\operatorname {arctanh}\left (c x \right )}{c x}+\ln \left (c x \right )-\operatorname {dilog}\left (c x \right )-\operatorname {dilog}\left (c x +1\right )-\ln \left (c x \right ) \ln \left (c x +1\right )\right )\) \(89\)
derivativedivides \(c \left (d^{2} a \left (c x +2 \ln \left (c x \right )-\frac {1}{c x}\right )+d^{2} b \left (\operatorname {arctanh}\left (c x \right ) c x +2 \,\operatorname {arctanh}\left (c x \right ) \ln \left (c x \right )-\frac {\operatorname {arctanh}\left (c x \right )}{c x}+\ln \left (c x \right )-\operatorname {dilog}\left (c x \right )-\operatorname {dilog}\left (c x +1\right )-\ln \left (c x \right ) \ln \left (c x +1\right )\right )\right )\) \(92\)
default \(c \left (d^{2} a \left (c x +2 \ln \left (c x \right )-\frac {1}{c x}\right )+d^{2} b \left (\operatorname {arctanh}\left (c x \right ) c x +2 \,\operatorname {arctanh}\left (c x \right ) \ln \left (c x \right )-\frac {\operatorname {arctanh}\left (c x \right )}{c x}+\ln \left (c x \right )-\operatorname {dilog}\left (c x \right )-\operatorname {dilog}\left (c x +1\right )-\ln \left (c x \right ) \ln \left (c x +1\right )\right )\right )\) \(92\)
risch \(x a \,c^{2} d^{2}-c \,d^{2} a +2 c \,d^{2} a \ln \left (-c x \right )-\frac {d^{2} a}{x}-\frac {c^{2} d^{2} b \ln \left (-c x +1\right ) x}{2}-b c \,d^{2}+c \,d^{2} b \operatorname {dilog}\left (-c x +1\right )+\frac {c \,d^{2} b \ln \left (-c x \right )}{2}+\frac {d^{2} b \ln \left (-c x +1\right )}{2 x}+\frac {b \,c^{2} d^{2} \ln \left (c x +1\right ) x}{2}-b c \,d^{2} \operatorname {dilog}\left (c x +1\right )+\frac {b c \,d^{2} \ln \left (c x \right )}{2}-\frac {b \,d^{2} \ln \left (c x +1\right )}{2 x}\) \(159\)

Input:

int((c*d*x+d)^2*(a+b*arctanh(c*x))/x^2,x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [F]

\[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=\int { \frac {{\left (c d x + d\right )}^{2} {\left (b \operatorname {artanh}\left (c x\right ) + a\right )}}{x^{2}} \,d x } \] Input:

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

Output:

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

Sympy [F]

\[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=d^{2} \left (\int a c^{2}\, dx + \int \frac {a}{x^{2}}\, dx + \int \frac {2 a c}{x}\, dx + \int b c^{2} \operatorname {atanh}{\left (c x \right )}\, dx + \int \frac {b \operatorname {atanh}{\left (c x \right )}}{x^{2}}\, dx + \int \frac {2 b c \operatorname {atanh}{\left (c x \right )}}{x}\, dx\right ) \] Input:

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

Output:

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

Maxima [F]

\[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=\int { \frac {{\left (c d x + d\right )}^{2} {\left (b \operatorname {artanh}\left (c x\right ) + a\right )}}{x^{2}} \,d x } \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 410 vs. \(2 (59) = 118\).

Time = 0.97 (sec) , antiderivative size = 410, normalized size of antiderivative = 6.72 \[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=\frac {1}{6} \, {\left (\frac {6 \, a d^{2}}{\frac {{\left (c x + 1\right )} c^{2}}{c x - 1} + c^{2}} + \frac {5 \, b d^{2} \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{2}} + \frac {3 \, b d^{2} \log \left (-\frac {c x + 1}{c x - 1} - 1\right )}{c^{2}} + {\left (\frac {3 \, b d^{2}}{\frac {{\left (c x + 1\right )} c^{2}}{c x - 1} + c^{2}} - \frac {\frac {3 \, {\left (c x + 1\right )}^{2} b d^{2}}{{\left (c x - 1\right )}^{2}} - \frac {12 \, {\left (c x + 1\right )} b d^{2}}{c x - 1} + 5 \, b d^{2}}{\frac {{\left (c x + 1\right )}^{3} c^{2}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{2}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{2}}{c x - 1} - c^{2}}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right ) - \frac {8 \, b d^{2} \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{2}} - \frac {2 \, {\left (\frac {3 \, {\left (c x + 1\right )}^{2} a d^{2}}{{\left (c x - 1\right )}^{2}} - \frac {12 \, {\left (c x + 1\right )} a d^{2}}{c x - 1} + 5 \, a d^{2} - \frac {{\left (c x + 1\right )}^{2} b d^{2}}{{\left (c x - 1\right )}^{2}} + \frac {{\left (c x + 1\right )} b d^{2}}{c x - 1}\right )}}{\frac {{\left (c x + 1\right )}^{3} c^{2}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{2}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{2}}{c x - 1} - c^{2}}\right )} c^{2} \] Input:

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

Output:

1/6*(6*a*d^2/((c*x + 1)*c^2/(c*x - 1) + c^2) + 5*b*d^2*log(-(c*x + 1)/(c*x 
 - 1) + 1)/c^2 + 3*b*d^2*log(-(c*x + 1)/(c*x - 1) - 1)/c^2 + (3*b*d^2/((c* 
x + 1)*c^2/(c*x - 1) + c^2) - (3*(c*x + 1)^2*b*d^2/(c*x - 1)^2 - 12*(c*x + 
 1)*b*d^2/(c*x - 1) + 5*b*d^2)/((c*x + 1)^3*c^2/(c*x - 1)^3 - 3*(c*x + 1)^ 
2*c^2/(c*x - 1)^2 + 3*(c*x + 1)*c^2/(c*x - 1) - c^2))*log(-(c*x + 1)/(c*x 
- 1)) - 8*b*d^2*log(-(c*x + 1)/(c*x - 1))/c^2 - 2*(3*(c*x + 1)^2*a*d^2/(c* 
x - 1)^2 - 12*(c*x + 1)*a*d^2/(c*x - 1) + 5*a*d^2 - (c*x + 1)^2*b*d^2/(c*x 
 - 1)^2 + (c*x + 1)*b*d^2/(c*x - 1))/((c*x + 1)^3*c^2/(c*x - 1)^3 - 3*(c*x 
 + 1)^2*c^2/(c*x - 1)^2 + 3*(c*x + 1)*c^2/(c*x - 1) - c^2))*c^2
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=\int \frac {\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )\,{\left (d+c\,d\,x\right )}^2}{x^2} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \frac {(d+c d x)^2 (a+b \text {arctanh}(c x))}{x^2} \, dx=\frac {d^{2} \left (\mathit {atanh} \left (c x \right ) b \,c^{2} x^{2}-\mathit {atanh} \left (c x \right ) b +2 \left (\int \frac {\mathit {atanh} \left (c x \right )}{x}d x \right ) b c x +2 \,\mathrm {log}\left (x \right ) a c x +\mathrm {log}\left (x \right ) b c x +a \,c^{2} x^{2}-a \right )}{x} \] Input:

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

Output:

(d**2*(atanh(c*x)*b*c**2*x**2 - atanh(c*x)*b + 2*int(atanh(c*x)/x,x)*b*c*x 
 + 2*log(x)*a*c*x + log(x)*b*c*x + a*c**2*x**2 - a))/x