Optimal. Leaf size=47 \[ \frac {\left (a+b x^n\right ) \tanh ^{-1}\left (a+b x^n\right )}{b n}+\frac {\log \left (1-\left (a+b x^n\right )^2\right )}{2 b n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6847, 6238,
6021, 266} \begin {gather*} \frac {\log \left (1-\left (a+b x^n\right )^2\right )}{2 b n}+\frac {\left (a+b x^n\right ) \tanh ^{-1}\left (a+b x^n\right )}{b n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 6021
Rule 6238
Rule 6847
Rubi steps
\begin {align*} \int x^{-1+n} \tanh ^{-1}\left (a+b x^n\right ) \, dx &=\frac {\text {Subst}\left (\int \tanh ^{-1}(a+b x) \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \tanh ^{-1}(x) \, dx,x,a+b x^n\right )}{b n}\\ &=\frac {\left (a+b x^n\right ) \tanh ^{-1}\left (a+b x^n\right )}{b n}-\frac {\text {Subst}\left (\int \frac {x}{1-x^2} \, dx,x,a+b x^n\right )}{b n}\\ &=\frac {\left (a+b x^n\right ) \tanh ^{-1}\left (a+b x^n\right )}{b n}+\frac {\log \left (1-\left (a+b x^n\right )^2\right )}{2 b n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 42, normalized size = 0.89 \begin {gather*} \frac {2 \left (a+b x^n\right ) \tanh ^{-1}\left (a+b x^n\right )+\log \left (1-\left (a+b x^n\right )^2\right )}{2 b n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(120\) vs.
\(2(45)=90\).
time = 0.05, size = 121, normalized size = 2.57
method | result | size |
risch | \(\frac {x^{n} \ln \left (a +b \,x^{n}+1\right )}{2 n}-\frac {x^{n} \ln \left (1-a -b \,x^{n}\right )}{2 n}-\frac {\ln \left (x^{n}+\frac {-1+a}{b}\right ) a}{2 b n}+\frac {\ln \left (x^{n}+\frac {1+a}{b}\right ) a}{2 b n}+\frac {\ln \left (x^{n}+\frac {-1+a}{b}\right )}{2 b n}+\frac {\ln \left (x^{n}+\frac {1+a}{b}\right )}{2 b n}\) | \(121\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 40, normalized size = 0.85 \begin {gather*} \frac {2 \, {\left (b x^{n} + a\right )} \operatorname {artanh}\left (b x^{n} + a\right ) + \log \left (-{\left (b x^{n} + a\right )}^{2} + 1\right )}{2 \, b n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 109 vs.
\(2 (45) = 90\).
time = 0.35, size = 109, normalized size = 2.32 \begin {gather*} \frac {{\left (a + 1\right )} \log \left (b \cosh \left (n \log \left (x\right )\right ) + b \sinh \left (n \log \left (x\right )\right ) + a + 1\right ) - {\left (a - 1\right )} \log \left (b \cosh \left (n \log \left (x\right )\right ) + b \sinh \left (n \log \left (x\right )\right ) + a - 1\right ) + {\left (b \cosh \left (n \log \left (x\right )\right ) + b \sinh \left (n \log \left (x\right )\right )\right )} \log \left (-\frac {b \cosh \left (n \log \left (x\right )\right ) + b \sinh \left (n \log \left (x\right )\right ) + a + 1}{b \cosh \left (n \log \left (x\right )\right ) + b \sinh \left (n \log \left (x\right )\right ) + a - 1}\right )}{2 \, b n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 124 vs.
\(2 (45) = 90\).
time = 0.40, size = 124, normalized size = 2.64 \begin {gather*} \frac {{\left ({\left (a + 1\right )} b - {\left (a - 1\right )} b\right )} {\left (\frac {\log \left (\frac {{\left | -b x^{n} - a - 1 \right |}}{{\left | b x^{n} + a - 1 \right |}}\right )}{b^{2}} - \frac {\log \left ({\left | -\frac {b x^{n} + a + 1}{b x^{n} + a - 1} + 1 \right |}\right )}{b^{2}} + \frac {\log \left (-\frac {b x^{n} + a + 1}{b x^{n} + a - 1}\right )}{b^{2} {\left (\frac {b x^{n} + a + 1}{b x^{n} + a - 1} - 1\right )}}\right )}}{2 \, n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.47, size = 56, normalized size = 1.19 \begin {gather*} \frac {x^n\,\mathrm {atanh}\left (a+b\,x^n\right )}{n}-\frac {\ln \left (a+b\,x^n-1\right )\,\left (a-1\right )}{2\,b\,n}+\frac {\ln \left (a+b\,x^n+1\right )\,\left (a+1\right )}{2\,b\,n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________