3.7 \(\int \frac {(d+c d x) (a+b \tanh ^{-1}(c x))}{x^3} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {37, 5936, 12, 77} \[ -\frac {d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}+b c^2 d \log (x)-b c^2 d \log (1-c x)-\frac {b c d}{2 x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 5936

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u =
IntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTanh[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 - c^2*
x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q,
 0]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 76, normalized size = 1.36 \[ -\frac {d \left (4 a c x+2 a-4 b c^2 x^2 \log (x)+3 b c^2 x^2 \log (1-c x)+b c^2 x^2 \log (c x+1)+2 b c x+2 (2 b c x+b) \tanh ^{-1}(c x)\right )}{4 x^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 89, normalized size = 1.59 \[ -\frac {b c^{2} d x^{2} \log \left (c x + 1\right ) + 3 \, b c^{2} d x^{2} \log \left (c x - 1\right ) - 4 \, b c^{2} d x^{2} \log \relax (x) + 2 \, {\left (2 \, a + b\right )} c d x + 2 \, a d + {\left (2 \, b c d x + b d\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{4 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.20, size = 192, normalized size = 3.43 \[ {\left (b c d \log \left (-\frac {c x + 1}{c x - 1} - 1\right ) - b c d \log \left (-\frac {c x + 1}{c x - 1}\right ) + \frac {{\left (\frac {2 \, {\left (c x + 1\right )} b c d}{c x - 1} + b c d\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{2}}{{\left (c x - 1\right )}^{2}} + \frac {2 \, {\left (c x + 1\right )}}{c x - 1} + 1} + \frac {\frac {4 \, {\left (c x + 1\right )} a c d}{c x - 1} + 2 \, a c d + \frac {{\left (c x + 1\right )} b c d}{c x - 1} + b c d}{\frac {{\left (c x + 1\right )}^{2}}{{\left (c x - 1\right )}^{2}} + \frac {2 \, {\left (c x + 1\right )}}{c x - 1} + 1}\right )} c \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 84, normalized size = 1.50 \[ -\frac {c d a}{x}-\frac {d a}{2 x^{2}}-\frac {c d b \arctanh \left (c x \right )}{x}-\frac {d b \arctanh \left (c x \right )}{2 x^{2}}+c^{2} d b \ln \left (c x \right )-\frac {b c d}{2 x}-\frac {3 c^{2} d b \ln \left (c x -1\right )}{4}-\frac {c^{2} d b \ln \left (c x +1\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 89, normalized size = 1.59 \[ -\frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} - 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \operatorname {artanh}\left (c x\right )}{x}\right )} b c d + \frac {1}{4} \, {\left ({\left (c \log \left (c x + 1\right ) - c \log \left (c x - 1\right ) - \frac {2}{x}\right )} c - \frac {2 \, \operatorname {artanh}\left (c x\right )}{x^{2}}\right )} b d - \frac {a c d}{x} - \frac {a d}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.90, size = 75, normalized size = 1.34 \[ \frac {d\,\left (b\,c^2\,\mathrm {atanh}\left (c\,x\right )-b\,c^2\,\ln \left (c^2\,x^2-1\right )+2\,b\,c^2\,\ln \relax (x)\right )}{2}-\frac {\frac {d\,\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}{2}+\frac {d\,x\,\left (2\,a\,c+b\,c+2\,b\,c\,\mathrm {atanh}\left (c\,x\right )\right )}{2}}{x^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 1.08, size = 95, normalized size = 1.70 \[ \begin {cases} - \frac {a c d}{x} - \frac {a d}{2 x^{2}} + b c^{2} d \log {\relax (x )} - b c^{2} d \log {\left (x - \frac {1}{c} \right )} - \frac {b c^{2} d \operatorname {atanh}{\left (c x \right )}}{2} - \frac {b c d \operatorname {atanh}{\left (c x \right )}}{x} - \frac {b c d}{2 x} - \frac {b d \operatorname {atanh}{\left (c x \right )}}{2 x^{2}} & \text {for}\: c \neq 0 \\- \frac {a d}{2 x^{2}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((-a*c*d/x - a*d/(2*x**2) + b*c**2*d*log(x) - b*c**2*d*log(x - 1/c) - b*c**2*d*atanh(c*x)/2 - b*c*d*a
tanh(c*x)/x - b*c*d/(2*x) - b*d*atanh(c*x)/(2*x**2), Ne(c, 0)), (-a*d/(2*x**2), True))

________________________________________________________________________________________