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

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

Optimal result

Integrand size = 16, antiderivative size = 93 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=-\frac {a+b \text {arctanh}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}+\frac {b c \log (1+c x)}{2 (c d-e) e}-\frac {b c \log (d+e x)}{c^2 d^2-e^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.10 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=-\frac {a}{e (d+e x)}-\frac {b \text {arctanh}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}-\frac {b c \log (1+c x)}{2 e (-c d+e)}-\frac {b c \log (d+e x)}{c^2 d^2-e^2} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.96, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {6478, 477, 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)}{(d+e x)^2} \, dx\)

\(\Big \downarrow \) 6478

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

\(\Big \downarrow \) 477

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 477
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
a^p   Int[ExpandIntegrand[(c + d*x)^n*(1 - Rt[-b/a, 2]*x)^p*(1 + Rt[-b/a, 2 
]*x)^p, x], x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IntegerQ[n] & 
& NiceSqrtQ[-b/a] &&  !FractionalPowerFactorQ[Rt[-b/a, 2]]
 

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

rule 6478
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol 
] :> Simp[(d + e*x)^(q + 1)*((a + b*ArcTanh[c*x])/(e*(q + 1))), x] - Simp[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]
 
Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.23

method result size
parts \(-\frac {a}{\left (e x +d \right ) e}+\frac {b \left (-\frac {c^{2} \operatorname {arctanh}\left (c x \right )}{\left (c e x +c d \right ) e}+\frac {c^{2} \left (-\frac {e \ln \left (c e x +c d \right )}{\left (c d +e \right ) \left (c d -e \right )}-\frac {\ln \left (c x -1\right )}{2 c d +2 e}+\frac {\ln \left (c x +1\right )}{2 c d -2 e}\right )}{e}\right )}{c}\) \(114\)
derivativedivides \(\frac {-\frac {a \,c^{2}}{\left (c e x +c d \right ) e}+b \,c^{2} \left (-\frac {\operatorname {arctanh}\left (c x \right )}{\left (c e x +c d \right ) e}+\frac {-\frac {e \ln \left (c e x +c d \right )}{\left (c d +e \right ) \left (c d -e \right )}-\frac {\ln \left (c x -1\right )}{2 c d +2 e}+\frac {\ln \left (c x +1\right )}{2 c d -2 e}}{e}\right )}{c}\) \(118\)
default \(\frac {-\frac {a \,c^{2}}{\left (c e x +c d \right ) e}+b \,c^{2} \left (-\frac {\operatorname {arctanh}\left (c x \right )}{\left (c e x +c d \right ) e}+\frac {-\frac {e \ln \left (c e x +c d \right )}{\left (c d +e \right ) \left (c d -e \right )}-\frac {\ln \left (c x -1\right )}{2 c d +2 e}+\frac {\ln \left (c x +1\right )}{2 c d -2 e}}{e}\right )}{c}\) \(118\)
parallelrisch \(\frac {\ln \left (c x -1\right ) b c \,d^{2}-\ln \left (e x +d \right ) b c \,d^{2}+x a \,c^{2} d^{2}+\operatorname {arctanh}\left (c x \right ) b c \,d^{2}+\operatorname {arctanh}\left (c x \right ) b d e -x a \,e^{2}+\ln \left (c x -1\right ) x b c d e -\ln \left (e x +d \right ) x b c d e +x \,\operatorname {arctanh}\left (c x \right ) b c d e +x \,\operatorname {arctanh}\left (c x \right ) b \,c^{2} d^{2}}{\left (c^{2} d^{2}-e^{2}\right ) \left (e x +d \right ) d}\) \(135\)
risch \(-\frac {b \ln \left (c x +1\right )}{2 e \left (e x +d \right )}+\frac {\ln \left (-c x -1\right ) b \,c^{2} d e x -\ln \left (c x -1\right ) b \,c^{2} d e x +\ln \left (-c x -1\right ) b \,c^{2} d^{2}+\ln \left (-c x -1\right ) b c \,e^{2} x -2 \ln \left (-e x -d \right ) b c \,e^{2} x -\ln \left (c x -1\right ) b \,c^{2} d^{2}+\ln \left (c x -1\right ) b c \,e^{2} x +b \,c^{2} d^{2} \ln \left (-c x +1\right )+\ln \left (-c x -1\right ) b c d e -2 \ln \left (-e x -d \right ) b c d e +\ln \left (c x -1\right ) b c d e -2 a \,c^{2} d^{2}-b \,e^{2} \ln \left (-c x +1\right )+2 e^{2} a}{2 \left (c d +e \right ) \left (c d -e \right ) \left (e x +d \right ) e}\) \(235\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (89) = 178\).

Time = 0.10 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.96 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=-\frac {2 \, a c^{2} d^{2} - 2 \, a e^{2} - {\left (b c^{2} d^{2} + b c d e + {\left (b c^{2} d e + b c e^{2}\right )} x\right )} \log \left (c x + 1\right ) + {\left (b c^{2} d^{2} - b c d e + {\left (b c^{2} d e - b c e^{2}\right )} x\right )} \log \left (c x - 1\right ) + 2 \, {\left (b c e^{2} x + b c d e\right )} \log \left (e x + d\right ) + {\left (b c^{2} d^{2} - b e^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{2 \, {\left (c^{2} d^{3} e - d e^{3} + {\left (c^{2} d^{2} e^{2} - e^{4}\right )} x\right )}} \] Input:

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

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 663 vs. \(2 (73) = 146\).

Time = 1.42 (sec) , antiderivative size = 663, normalized size of antiderivative = 7.13 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=\begin {cases} \frac {a x}{d^{2}} & \text {for}\: c = 0 \wedge e = 0 \\- \frac {a}{d e + e^{2} x} & \text {for}\: c = 0 \\\frac {a x + b x \operatorname {atanh}{\left (c x \right )} + \frac {b \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b \operatorname {atanh}{\left (c x \right )}}{c}}{d^{2}} & \text {for}\: e = 0 \\- \frac {2 a d}{2 d^{2} e + 2 d e^{2} x} + \frac {b d \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} + \frac {b d}{2 d^{2} e + 2 d e^{2} x} - \frac {b e x \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} & \text {for}\: c = - \frac {e}{d} \\- \frac {2 a d}{2 d^{2} e + 2 d e^{2} x} - \frac {b d \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} - \frac {b d}{2 d^{2} e + 2 d e^{2} x} + \frac {b e x \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} & \text {for}\: c = \frac {e}{d} \\- \frac {a c^{2} d^{2}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {a e^{2}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c^{2} d e x \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c d e \log {\left (x - \frac {1}{c} \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} - \frac {b c d e \log {\left (\frac {d}{e} + x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c d e \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c e^{2} x \log {\left (x - \frac {1}{c} \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} - \frac {b c e^{2} x \log {\left (\frac {d}{e} + x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c e^{2} x \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b e^{2} \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((a*x/d**2, Eq(c, 0) & Eq(e, 0)), (-a/(d*e + e**2*x), Eq(c, 0)), 
((a*x + b*x*atanh(c*x) + b*log(x - 1/c)/c + b*atanh(c*x)/c)/d**2, Eq(e, 0) 
), (-2*a*d/(2*d**2*e + 2*d*e**2*x) + b*d*atanh(e*x/d)/(2*d**2*e + 2*d*e**2 
*x) + b*d/(2*d**2*e + 2*d*e**2*x) - b*e*x*atanh(e*x/d)/(2*d**2*e + 2*d*e** 
2*x), Eq(c, -e/d)), (-2*a*d/(2*d**2*e + 2*d*e**2*x) - b*d*atanh(e*x/d)/(2* 
d**2*e + 2*d*e**2*x) - b*d/(2*d**2*e + 2*d*e**2*x) + b*e*x*atanh(e*x/d)/(2 
*d**2*e + 2*d*e**2*x), Eq(c, e/d)), (-a*c**2*d**2/(c**2*d**3*e + c**2*d**2 
*e**2*x - d*e**3 - e**4*x) + a*e**2/(c**2*d**3*e + c**2*d**2*e**2*x - d*e* 
*3 - e**4*x) + b*c**2*d*e*x*atanh(c*x)/(c**2*d**3*e + c**2*d**2*e**2*x - d 
*e**3 - e**4*x) + b*c*d*e*log(x - 1/c)/(c**2*d**3*e + c**2*d**2*e**2*x - d 
*e**3 - e**4*x) - b*c*d*e*log(d/e + x)/(c**2*d**3*e + c**2*d**2*e**2*x - d 
*e**3 - e**4*x) + b*c*d*e*atanh(c*x)/(c**2*d**3*e + c**2*d**2*e**2*x - d*e 
**3 - e**4*x) + b*c*e**2*x*log(x - 1/c)/(c**2*d**3*e + c**2*d**2*e**2*x - 
d*e**3 - e**4*x) - b*c*e**2*x*log(d/e + x)/(c**2*d**3*e + c**2*d**2*e**2*x 
 - d*e**3 - e**4*x) + b*c*e**2*x*atanh(c*x)/(c**2*d**3*e + c**2*d**2*e**2* 
x - d*e**3 - e**4*x) + b*e**2*atanh(c*x)/(c**2*d**3*e + c**2*d**2*e**2*x - 
 d*e**3 - e**4*x), True))
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.06 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=\frac {1}{2} \, {\left (c {\left (\frac {\log \left (c x + 1\right )}{c d e - e^{2}} - \frac {\log \left (c x - 1\right )}{c d e + e^{2}} - \frac {2 \, \log \left (e x + d\right )}{c^{2} d^{2} - e^{2}}\right )} - \frac {2 \, \operatorname {artanh}\left (c x\right )}{e^{2} x + d e}\right )} b - \frac {a}{e^{2} x + d e} \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 243 vs. \(2 (89) = 178\).

Time = 0.12 (sec) , antiderivative size = 243, normalized size of antiderivative = 2.61 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=-c {\left (\frac {b \log \left (\frac {{\left (c x + 1\right )} c d}{c x - 1} - c d + \frac {{\left (c x + 1\right )} e}{c x - 1} + e\right )}{c^{2} d^{2} - e^{2}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )} c^{2} d^{2}}{c x - 1} - c^{2} d^{2} + \frac {2 \, {\left (c x + 1\right )} c d e}{c x - 1} + \frac {{\left (c x + 1\right )} e^{2}}{c x - 1} + e^{2}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{2} d^{2} - e^{2}} - \frac {2 \, a}{\frac {{\left (c x + 1\right )} c^{2} d^{2}}{c x - 1} - c^{2} d^{2} + \frac {2 \, {\left (c x + 1\right )} c d e}{c x - 1} + \frac {{\left (c x + 1\right )} e^{2}}{c x - 1} + e^{2}}\right )} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 6.17 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.24 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=-\frac {d^2\,\left (\frac {b\,c\,\ln \left (c^2\,x^2-1\right )}{2}-b\,c\,\ln \left (d+e\,x\right )+a\,c^2\,x+b\,c^2\,x\,\mathrm {atanh}\left (c\,x\right )\right )+d\,e\,\left (b\,\mathrm {atanh}\left (c\,x\right )-b\,c\,x\,\ln \left (d+e\,x\right )+\frac {b\,c\,x\,\ln \left (c^2\,x^2-1\right )}{2}\right )-a\,e^2\,x}{d\,\left (e^2-c^2\,d^2\right )\,\left (d+e\,x\right )} \] Input:

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

Output:

-(d^2*((b*c*log(c^2*x^2 - 1))/2 - b*c*log(d + e*x) + a*c^2*x + b*c^2*x*ata 
nh(c*x)) + d*e*(b*atanh(c*x) - b*c*x*log(d + e*x) + (b*c*x*log(c^2*x^2 - 1 
))/2) - a*e^2*x)/(d*(e^2 - c^2*d^2)*(d + e*x))
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 223, normalized size of antiderivative = 2.40 \[ \int \frac {a+b \text {arctanh}(c x)}{(d+e x)^2} \, dx=\frac {2 \mathit {atanh} \left (c x \right ) b \,c^{2} d^{2} x -2 \mathit {atanh} \left (c x \right ) b \,e^{2} x +\mathrm {log}\left (c^{2} x -c \right ) b c \,d^{2}+\mathrm {log}\left (c^{2} x -c \right ) b c d e x -\mathrm {log}\left (c^{2} x -c \right ) b d e -\mathrm {log}\left (c^{2} x -c \right ) b \,e^{2} x +\mathrm {log}\left (c^{2} x +c \right ) b c \,d^{2}+\mathrm {log}\left (c^{2} x +c \right ) b c d e x +\mathrm {log}\left (c^{2} x +c \right ) b d e +\mathrm {log}\left (c^{2} x +c \right ) b \,e^{2} x -2 \,\mathrm {log}\left (e x +d \right ) b c \,d^{2}-2 \,\mathrm {log}\left (e x +d \right ) b c d e x +2 a \,c^{2} d^{2} x -2 a \,e^{2} x}{2 d \left (c^{2} d^{2} e x +c^{2} d^{3}-e^{3} x -d \,e^{2}\right )} \] Input:

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

Output:

(2*atanh(c*x)*b*c**2*d**2*x - 2*atanh(c*x)*b*e**2*x + log(c**2*x - c)*b*c* 
d**2 + log(c**2*x - c)*b*c*d*e*x - log(c**2*x - c)*b*d*e - log(c**2*x - c) 
*b*e**2*x + log(c**2*x + c)*b*c*d**2 + log(c**2*x + c)*b*c*d*e*x + log(c** 
2*x + c)*b*d*e + log(c**2*x + c)*b*e**2*x - 2*log(d + e*x)*b*c*d**2 - 2*lo 
g(d + e*x)*b*c*d*e*x + 2*a*c**2*d**2*x - 2*a*e**2*x)/(2*d*(c**2*d**3 + c** 
2*d**2*e*x - d*e**2 - e**3*x))