3.5.51 \(\int e^{\tanh ^{-1}(a x)} (c-\frac {c}{a x}) \, dx\) [451]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6266, 6263, 272, 52, 65, 214} \begin {gather*} \frac {c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a}-\frac {c \sqrt {1-a^2 x^2}}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^ArcTanh[a*x]*(c - c/(a*x)),x]

[Out]

-((c*Sqrt[1 - a^2*x^2])/a) + (c*ArcTanh[Sqrt[1 - a^2*x^2]])/a

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 6263

Int[E^(ArcTanh[(a_.)*(x_)]*(n_.))*((c_) + (d_.)*(x_))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[c^n,
 Int[(e + f*x)^m*(c + d*x)^(p - n)*(1 - a^2*x^2)^(n/2), x], x] /; FreeQ[{a, c, d, e, f, m, p}, x] && EqQ[a*c +
 d, 0] && IntegerQ[(n - 1)/2] && (IntegerQ[p] || EqQ[p, n/2] || EqQ[p - n/2 - 1, 0]) && IntegerQ[2*p]

Rule 6266

Int[E^(ArcTanh[(a_.)*(x_)]*(n_.))*(u_.)*((c_) + (d_.)/(x_))^(p_.), x_Symbol] :> Dist[d^p, Int[u*(1 + c*(x/d))^
p*(E^(n*ArcTanh[a*x])/x^p), x], x] /; FreeQ[{a, c, d, n}, x] && EqQ[c^2 - a^2*d^2, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int e^{\tanh ^{-1}(a x)} \left (c-\frac {c}{a x}\right ) \, dx &=-\frac {c \int \frac {e^{\tanh ^{-1}(a x)} (1-a x)}{x} \, dx}{a}\\ &=-\frac {c \int \frac {\sqrt {1-a^2 x^2}}{x} \, dx}{a}\\ &=-\frac {c \text {Subst}\left (\int \frac {\sqrt {1-a^2 x}}{x} \, dx,x,x^2\right )}{2 a}\\ &=-\frac {c \sqrt {1-a^2 x^2}}{a}-\frac {c \text {Subst}\left (\int \frac {1}{x \sqrt {1-a^2 x}} \, dx,x,x^2\right )}{2 a}\\ &=-\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \text {Subst}\left (\int \frac {1}{\frac {1}{a^2}-\frac {x^2}{a^2}} \, dx,x,\sqrt {1-a^2 x^2}\right )}{a^3}\\ &=-\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 42, normalized size = 1.02 \begin {gather*} -\frac {c \left (\sqrt {1-a^2 x^2}+\log (x)-\log \left (1+\sqrt {1-a^2 x^2}\right )\right )}{a} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[E^ArcTanh[a*x]*(c - c/(a*x)),x]

[Out]

-((c*(Sqrt[1 - a^2*x^2] + Log[x] - Log[1 + Sqrt[1 - a^2*x^2]]))/a)

________________________________________________________________________________________

Maple [A]
time = 0.46, size = 34, normalized size = 0.83

method result size
default \(\frac {c \left (-\sqrt {-a^{2} x^{2}+1}+\arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right )\right )}{a}\) \(34\)
meijerg \(-\frac {c \left (-2 \sqrt {\pi }+2 \sqrt {\pi }\, \sqrt {-a^{2} x^{2}+1}\right )}{2 a \sqrt {\pi }}-\frac {c \left (-2 \sqrt {\pi }\, \ln \left (\frac {1}{2}+\frac {\sqrt {-a^{2} x^{2}+1}}{2}\right )+\left (-2 \ln \left (2\right )+2 \ln \left (x \right )+\ln \left (-a^{2}\right )\right ) \sqrt {\pi }\right )}{2 \sqrt {\pi }\, a}\) \(85\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x+1)/(-a^2*x^2+1)^(1/2)*(c-c/a/x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.25, size = 50, normalized size = 1.22 \begin {gather*} \frac {c \log \left (\frac {2 \, \sqrt {-a^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right )}{a} - \frac {\sqrt {-a^{2} x^{2} + 1} c}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(-a^2*x^2+1)^(1/2)*(c-c/a/x),x, algorithm="maxima")

[Out]

c*log(2*sqrt(-a^2*x^2 + 1)/abs(x) + 2/abs(x))/a - sqrt(-a^2*x^2 + 1)*c/a

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 41, normalized size = 1.00 \begin {gather*} -\frac {c \log \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{x}\right ) + \sqrt {-a^{2} x^{2} + 1} c}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(-a^2*x^2+1)^(1/2)*(c-c/a/x),x, algorithm="fricas")

[Out]

-(c*log((sqrt(-a^2*x^2 + 1) - 1)/x) + sqrt(-a^2*x^2 + 1)*c)/a

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (31) = 62\).
time = 8.74, size = 65, normalized size = 1.59 \begin {gather*} \begin {cases} \frac {- c \sqrt {- a^{2} x^{2} + 1} - \frac {c \log {\left (-1 + \frac {1}{\sqrt {- a^{2} x^{2} + 1}} \right )}}{2} + \frac {c \log {\left (1 + \frac {1}{\sqrt {- a^{2} x^{2} + 1}} \right )}}{2}}{a} & \text {for}\: a \neq 0 \\c x + \tilde {\infty } c \log {\left (x \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(-a**2*x**2+1)**(1/2)*(c-c/a/x),x)

[Out]

Piecewise(((-c*sqrt(-a**2*x**2 + 1) - c*log(-1 + 1/sqrt(-a**2*x**2 + 1))/2 + c*log(1 + 1/sqrt(-a**2*x**2 + 1))
/2)/a, Ne(a, 0)), (c*x + zoo*c*log(x), True))

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 58, normalized size = 1.41 \begin {gather*} \frac {c \log \left (\sqrt {-a^{2} x^{2} + 1} + 1\right ) - c \log \left (-\sqrt {-a^{2} x^{2} + 1} + 1\right ) - 2 \, \sqrt {-a^{2} x^{2} + 1} c}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(-a^2*x^2+1)^(1/2)*(c-c/a/x),x, algorithm="giac")

[Out]

1/2*(c*log(sqrt(-a^2*x^2 + 1) + 1) - c*log(-sqrt(-a^2*x^2 + 1) + 1) - 2*sqrt(-a^2*x^2 + 1)*c)/a

________________________________________________________________________________________

Mupad [B]
time = 0.82, size = 37, normalized size = 0.90 \begin {gather*} \frac {c\,\mathrm {atanh}\left (\sqrt {1-a^2\,x^2}\right )}{a}-\frac {c\,\sqrt {1-a^2\,x^2}}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((c - c/(a*x))*(a*x + 1))/(1 - a^2*x^2)^(1/2),x)

[Out]

(c*atanh((1 - a^2*x^2)^(1/2)))/a - (c*(1 - a^2*x^2)^(1/2))/a

________________________________________________________________________________________