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

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 = 412 \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x^2 (d+e x)} \, dx=\frac {c (a+b \text {arctanh}(c x))^2}{d}-\frac {(a+b \text {arctanh}(c x))^2}{d x}-\frac {2 e (a+b \text {arctanh}(c x))^2 \text {arctanh}\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {e (a+b \text {arctanh}(c x))^2 \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e (a+b \text {arctanh}(c x))^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {2 b c (a+b \text {arctanh}(c x)) \log \left (2-\frac {2}{1+c x}\right )}{d}+\frac {b e (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{d^2}-\frac {b e (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1-c x}\right )}{d^2}+\frac {b e (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+c x}\right )}{d^2}-\frac {b^2 c \operatorname {PolyLog}\left (2,-1+\frac {2}{1+c x}\right )}{d}-\frac {b e (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^2}-\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \operatorname {PolyLog}\left (3,-1+\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2} \] Output:

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

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

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

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

Output:

-(a^2/(d*x)) - (a^2*e*Log[x])/d^2 + (a^2*e*Log[d + e*x])/d^2 + (a*b*(I*c*d 
*e*Pi*ArcTanh[c*x] - (2*c*d^2*ArcTanh[c*x])/x + 2*c*d*e*ArcTanh[(c*d)/e]*A 
rcTanh[c*x] - c*d*e*ArcTanh[c*x]^2 + e^2*ArcTanh[c*x]^2 - (Sqrt[1 - (c^2*d 
^2)/e^2]*e^2*ArcTanh[c*x]^2)/E^ArcTanh[(c*d)/e] - 2*c*d*e*ArcTanh[c*x]*Log 
[1 - E^(-2*ArcTanh[c*x])] - I*c*d*e*Pi*Log[1 + E^(2*ArcTanh[c*x])] + 2*c*d 
*e*ArcTanh[(c*d)/e]*Log[1 - E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x]))] + 2* 
c*d*e*ArcTanh[c*x]*Log[1 - E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x]))] + 2*c 
^2*d^2*Log[(c*x)/Sqrt[1 - c^2*x^2]] - (I/2)*c*d*e*Pi*Log[1 - c^2*x^2] - 2* 
c*d*e*ArcTanh[(c*d)/e]*Log[I*Sinh[ArcTanh[(c*d)/e] + ArcTanh[c*x]]] + c*d* 
e*PolyLog[2, E^(-2*ArcTanh[c*x])] - c*d*e*PolyLog[2, E^(-2*(ArcTanh[(c*d)/ 
e] + ArcTanh[c*x]))]))/(c*d^3) + (b^2*((-I)*c*d*e*Pi^3 + 24*c^2*d^2*ArcTan 
h[c*x]^2 - (24*c*d^2*ArcTanh[c*x]^2)/x + 8*c*d*e*ArcTanh[c*x]^3 + 8*e^2*Ar 
cTanh[c*x]^3 + 48*c^2*d^2*ArcTanh[c*x]*Log[1 - E^(-2*ArcTanh[c*x])] - 24*c 
*d*e*ArcTanh[c*x]^2*Log[1 - E^(2*ArcTanh[c*x])] - 24*c^2*d^2*PolyLog[2, E^ 
(-2*ArcTanh[c*x])] - 24*c*d*e*ArcTanh[c*x]*PolyLog[2, E^(2*ArcTanh[c*x])] 
+ 12*c*d*e*PolyLog[3, E^(2*ArcTanh[c*x])]))/(24*c*d^3) + (b^2*(c*d - e)*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]^...
 

Rubi [A] (verified)

Time = 0.99 (sec) , antiderivative size = 412, 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^2 (d+e x)} \, dx\)

\(\Big \downarrow \) 6502

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b e \operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))}{d^2}-\frac {b e \operatorname {PolyLog}\left (2,\frac {2}{1-c x}-1\right ) (a+b \text {arctanh}(c x))}{d^2}+\frac {b e \operatorname {PolyLog}\left (2,1-\frac {2}{c x+1}\right ) (a+b \text {arctanh}(c x))}{d^2}-\frac {b e (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^2}-\frac {2 e \text {arctanh}\left (1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))^2}{d^2}-\frac {e \log \left (\frac {2}{c x+1}\right ) (a+b \text {arctanh}(c x))^2}{d^2}+\frac {e (a+b \text {arctanh}(c x))^2 \log \left (\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{d^2}+\frac {c (a+b \text {arctanh}(c x))^2}{d}-\frac {(a+b \text {arctanh}(c x))^2}{d x}+\frac {2 b c \log \left (2-\frac {2}{c x+1}\right ) (a+b \text {arctanh}(c x))}{d}-\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \operatorname {PolyLog}\left (3,\frac {2}{1-c x}-1\right )}{2 d^2}+\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2}{c x+1}\right )}{2 d^2}-\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{2 d^2}-\frac {b^2 c \operatorname {PolyLog}\left (2,\frac {2}{c x+1}-1\right )}{d}\)

Input:

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

Output:

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

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 = 7.72 (sec) , antiderivative size = 16456, normalized size of antiderivative = 39.94

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

Input:

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

Output:

result too large to display
 

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {(a+b \text {arctanh}(c x))^2}{x^2 (d+e x)} \, dx=\frac {-2 \left (\int \frac {\mathit {atanh} \left (c x \right )}{c^{2} e \,x^{5}+c^{2} d \,x^{4}-e \,x^{3}-d \,x^{2}}d x \right ) a b \,d^{2} x +2 \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} x -\left (\int \frac {\mathit {atanh} \left (c x \right )^{2}}{c^{2} e \,x^{5}+c^{2} d \,x^{4}-e \,x^{3}-d \,x^{2}}d x \right ) b^{2} d^{2} x +\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} x +\mathrm {log}\left (e x +d \right ) a^{2} e x -\mathrm {log}\left (x \right ) a^{2} e x -a^{2} d}{d^{2} x} \] Input:

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

Output:

( - 2*int(atanh(c*x)/(c**2*d*x**4 + c**2*e*x**5 - d*x**2 - e*x**3),x)*a*b* 
d**2*x + 2*int(atanh(c*x)/(c**2*d*x**2 + c**2*e*x**3 - d - e*x),x)*a*b*c** 
2*d**2*x - int(atanh(c*x)**2/(c**2*d*x**4 + c**2*e*x**5 - d*x**2 - e*x**3) 
,x)*b**2*d**2*x + 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*x + log(d + e*x)*a**2*e*x - log(x)*a**2*e*x - a**2*d)/(d 
**2*x)