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

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

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

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

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 8.73 (sec) , antiderivative size = 1151, normalized size of antiderivative = 3.61 \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x (d+e x)} \, dx =\text {Too large to display} \] Input:

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

Output:

(a^2*Log[x])/d - (a^2*Log[d + e*x])/d + (a*b*((-I)*c*d*Pi*ArcTanh[c*x] - 2 
*c*d*ArcTanh[(c*d)/e]*ArcTanh[c*x] + c*d*ArcTanh[c*x]^2 - e*ArcTanh[c*x]^2 
 + (Sqrt[1 - (c^2*d^2)/e^2]*e*ArcTanh[c*x]^2)/E^ArcTanh[(c*d)/e] + 2*c*d*A 
rcTanh[c*x]*Log[1 - E^(-2*ArcTanh[c*x])] + I*c*d*Pi*Log[1 + E^(2*ArcTanh[c 
*x])] - 2*c*d*ArcTanh[(c*d)/e]*Log[1 - E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c 
*x]))] - 2*c*d*ArcTanh[c*x]*Log[1 - E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x] 
))] + (I/2)*c*d*Pi*Log[1 - c^2*x^2] + 2*c*d*ArcTanh[(c*d)/e]*Log[I*Sinh[Ar 
cTanh[(c*d)/e] + ArcTanh[c*x]]] - c*d*PolyLog[2, E^(-2*ArcTanh[c*x])] + c* 
d*PolyLog[2, E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x]))]))/(c*d^2) + (b^2*(I 
*c*d*Pi^3 - 8*c*d*ArcTanh[c*x]^3 - 8*e*ArcTanh[c*x]^3 + 24*c*d*ArcTanh[c*x 
]^2*Log[1 - E^(2*ArcTanh[c*x])] + 24*c*d*ArcTanh[c*x]*PolyLog[2, E^(2*ArcT 
anh[c*x])] - 12*c*d*PolyLog[3, E^(2*ArcTanh[c*x])] - (24*(c*d - e)*(c*d + 
e)*(-6*c*d*ArcTanh[c*x]^3 + 2*e*ArcTanh[c*x]^3 - (4*Sqrt[1 - (c^2*d^2)/e^2 
]*e*ArcTanh[c*x]^3)/E^ArcTanh[(c*d)/e] - (6*I)*c*d*Pi*ArcTanh[c*x]*Log[(E^ 
(-ArcTanh[c*x]) + E^ArcTanh[c*x])/2] - 6*c*d*ArcTanh[c*x]^2*Log[1 - (Sqrt[ 
c*d + e]*E^ArcTanh[c*x])/Sqrt[-(c*d) + e]] - 6*c*d*ArcTanh[c*x]^2*Log[1 + 
(Sqrt[c*d + e]*E^ArcTanh[c*x])/Sqrt[-(c*d) + e]] + 6*c*d*ArcTanh[c*x]^2*Lo 
g[1 - E^(ArcTanh[(c*d)/e] + ArcTanh[c*x])] + 6*c*d*ArcTanh[c*x]^2*Log[1 + 
E^(ArcTanh[(c*d)/e] + ArcTanh[c*x])] + 6*c*d*ArcTanh[c*x]^2*Log[1 - E^(2*( 
ArcTanh[(c*d)/e] + ArcTanh[c*x]))] + 12*c*d*ArcTanh[(c*d)/e]*ArcTanh[c*...
 

Rubi [A] (verified)

Time = 0.77 (sec) , antiderivative size = 319, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, 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 {(a+b \text {arctanh}(c x))^2}{x (d+e x)} \, dx\)

\(\Big \downarrow \) 6502

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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 [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 2.33 (sec) , antiderivative size = 1679, normalized size of antiderivative = 5.26

method result size
parts \(\text {Expression too large to display}\) \(1679\)
derivativedivides \(\text {Expression too large to display}\) \(1689\)
default \(\text {Expression too large to display}\) \(1689\)

Input:

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

Output:

a^2/d*ln(x)-a^2/d*ln(e*x+d)+b^2*(arctanh(c*x)^2/d*ln(c*x)-arctanh(c*x)^2/d 
*ln(c*e*x+c*d)-2*c*(-1/2/d/c*arctanh(c*x)^2*ln(d*c*(1+(c*x+1)^2/(-c^2*x^2+ 
1))+e*((c*x+1)^2/(-c^2*x^2+1)-1))-1/4*I*Pi*(csgn(I/(1-(c*x+1)^2/(c^2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(c*x)^2*ln(1-(c*x+1)/(-c^2*x^2+1)^(1/2))-1/d/c*arctanh(c*x)*polylog(2,(c* 
x+1)/(-c^2*x^2+1)^(1/2))+1/d/c*polylog(3,(c*x+1)/(-c^2*x^2+1)^(1/2))-1/2/d 
/c*arctanh(c*x)^2*ln(1+(c*x+1)/(-c^2*x^2+1)^(1/2))-1/d/c*arctanh(c*x)*p...
 

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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