Optimal. Leaf size=162 \[ \frac {(e+f x)^2 \coth ^{-1}(\tan (a+b x))}{2 f}+\frac {i (e+f x)^2 \text {ArcTan}\left (e^{2 i (a+b x)}\right )}{2 f}-\frac {i (e+f x) \text {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i (e+f x) \text {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b}+\frac {f \text {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )}{8 b^2}-\frac {f \text {PolyLog}\left (3,i e^{2 i (a+b x)}\right )}{8 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {6387, 4266,
2611, 2320, 6724} \begin {gather*} \frac {i (e+f x)^2 \text {ArcTan}\left (e^{2 i (a+b x)}\right )}{2 f}+\frac {f \text {Li}_3\left (-i e^{2 i (a+b x)}\right )}{8 b^2}-\frac {f \text {Li}_3\left (i e^{2 i (a+b x)}\right )}{8 b^2}-\frac {i (e+f x) \text {Li}_2\left (-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i (e+f x) \text {Li}_2\left (i e^{2 i (a+b x)}\right )}{4 b}+\frac {(e+f x)^2 \coth ^{-1}(\tan (a+b x))}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2320
Rule 2611
Rule 4266
Rule 6387
Rule 6724
Rubi steps
\begin {align*} \int (e+f x) \coth ^{-1}(\tan (a+b x)) \, dx &=\frac {(e+f x)^2 \coth ^{-1}(\tan (a+b x))}{2 f}-\frac {b \int (e+f x)^2 \sec (2 a+2 b x) \, dx}{2 f}\\ &=\frac {(e+f x)^2 \coth ^{-1}(\tan (a+b x))}{2 f}+\frac {i (e+f x)^2 \tan ^{-1}\left (e^{2 i (a+b x)}\right )}{2 f}+\frac {1}{2} \int (e+f x) \log \left (1-i e^{i (2 a+2 b x)}\right ) \, dx-\frac {1}{2} \int (e+f x) \log \left (1+i e^{i (2 a+2 b x)}\right ) \, dx\\ &=\frac {(e+f x)^2 \coth ^{-1}(\tan (a+b x))}{2 f}+\frac {i (e+f x)^2 \tan ^{-1}\left (e^{2 i (a+b x)}\right )}{2 f}-\frac {i (e+f x) \text {Li}_2\left (-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i (e+f x) \text {Li}_2\left (i e^{2 i (a+b x)}\right )}{4 b}+\frac {(i f) \int \text {Li}_2\left (-i e^{i (2 a+2 b x)}\right ) \, dx}{4 b}-\frac {(i f) \int \text {Li}_2\left (i e^{i (2 a+2 b x)}\right ) \, dx}{4 b}\\ &=\frac {(e+f x)^2 \coth ^{-1}(\tan (a+b x))}{2 f}+\frac {i (e+f x)^2 \tan ^{-1}\left (e^{2 i (a+b x)}\right )}{2 f}-\frac {i (e+f x) \text {Li}_2\left (-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i (e+f x) \text {Li}_2\left (i e^{2 i (a+b x)}\right )}{4 b}+\frac {f \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{8 b^2}-\frac {f \text {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{8 b^2}\\ &=\frac {(e+f x)^2 \coth ^{-1}(\tan (a+b x))}{2 f}+\frac {i (e+f x)^2 \tan ^{-1}\left (e^{2 i (a+b x)}\right )}{2 f}-\frac {i (e+f x) \text {Li}_2\left (-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i (e+f x) \text {Li}_2\left (i e^{2 i (a+b x)}\right )}{4 b}+\frac {f \text {Li}_3\left (-i e^{2 i (a+b x)}\right )}{8 b^2}-\frac {f \text {Li}_3\left (i e^{2 i (a+b x)}\right )}{8 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 295, normalized size = 1.82 \begin {gather*} e x \coth ^{-1}(\tan (a+b x))+\frac {1}{2} f x^2 \coth ^{-1}(\tan (a+b x))-\frac {e \left ((-4 a+\pi -4 b x) \left (\log \left (1-i e^{-2 i (a+b x)}\right )-\log \left (1+i e^{-2 i (a+b x)}\right )\right )-(-4 a+\pi ) \log \left (\cot \left (a+\frac {\pi }{4}+b x\right )\right )+2 i \left (\text {PolyLog}\left (2,-i e^{-2 i (a+b x)}\right )-\text {PolyLog}\left (2,i e^{-2 i (a+b x)}\right )\right )\right )}{8 b}+\frac {f \left (4 i b^2 x^2 \text {ArcTan}(\cos (2 (a+b x))+i \sin (2 (a+b x)))+2 i b x \text {PolyLog}(2,i \cos (2 (a+b x))-\sin (2 (a+b x)))-2 i b x \text {PolyLog}(2,-i \cos (2 (a+b x))+\sin (2 (a+b x)))-\text {PolyLog}(3,i \cos (2 (a+b x))-\sin (2 (a+b x)))+\text {PolyLog}(3,-i \cos (2 (a+b x))+\sin (2 (a+b x)))\right )}{8 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.35, size = 2543, normalized size = 15.70
method | result | size |
risch | \(\text {Expression too large to display}\) | \(2543\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 947 vs. \(2 (134) = 268\).
time = 0.43, size = 947, normalized size = 5.85 \begin {gather*} -\frac {2 \, {\left (-i \, b f x - i \, b \cosh \left (1\right ) - i \, b \sinh \left (1\right )\right )} {\rm Li}_2\left (-\frac {\left (i + 1\right ) \, \tan \left (b x + a\right )^{2} + 2 \, \tan \left (b x + a\right ) - i + 1}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \, {\left (-i \, b f x - i \, b \cosh \left (1\right ) - i \, b \sinh \left (1\right )\right )} {\rm Li}_2\left (-\frac {\left (i + 1\right ) \, \tan \left (b x + a\right )^{2} - 2 \, \tan \left (b x + a\right ) - i + 1}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \, {\left (i \, b f x + i \, b \cosh \left (1\right ) + i \, b \sinh \left (1\right )\right )} {\rm Li}_2\left (-\frac {-\left (i - 1\right ) \, \tan \left (b x + a\right )^{2} + 2 \, \tan \left (b x + a\right ) + i + 1}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \, {\left (i \, b f x + i \, b \cosh \left (1\right ) + i \, b \sinh \left (1\right )\right )} {\rm Li}_2\left (-\frac {-\left (i - 1\right ) \, \tan \left (b x + a\right )^{2} - 2 \, \tan \left (b x + a\right ) + i + 1}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \, {\left (b^{2} f x^{2} - a^{2} f + 2 \, {\left (b^{2} x + a b\right )} \cosh \left (1\right ) + 2 \, {\left (b^{2} x + a b\right )} \sinh \left (1\right )\right )} \log \left (\frac {\left (i + 1\right ) \, \tan \left (b x + a\right )^{2} + 2 \, \tan \left (b x + a\right ) - i + 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (a^{2} f - 2 \, a b \cosh \left (1\right ) - 2 \, a b \sinh \left (1\right )\right )} \log \left (\frac {\left (i + 1\right ) \, \tan \left (b x + a\right )^{2} + 2 i \, \tan \left (b x + a\right ) + i - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) - 2 \, {\left (a^{2} f - 2 \, a b \cosh \left (1\right ) - 2 \, a b \sinh \left (1\right )\right )} \log \left (\frac {\left (i + 1\right ) \, \tan \left (b x + a\right )^{2} - 2 i \, \tan \left (b x + a\right ) + i - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) - 2 \, {\left (b^{2} f x^{2} - a^{2} f + 2 \, {\left (b^{2} x + a b\right )} \cosh \left (1\right ) + 2 \, {\left (b^{2} x + a b\right )} \sinh \left (1\right )\right )} \log \left (\frac {\left (i + 1\right ) \, \tan \left (b x + a\right )^{2} - 2 \, \tan \left (b x + a\right ) - i + 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (b^{2} f x^{2} - a^{2} f + 2 \, {\left (b^{2} x + a b\right )} \cosh \left (1\right ) + 2 \, {\left (b^{2} x + a b\right )} \sinh \left (1\right )\right )} \log \left (\frac {-\left (i - 1\right ) \, \tan \left (b x + a\right )^{2} + 2 \, \tan \left (b x + a\right ) + i + 1}{\tan \left (b x + a\right )^{2} + 1}\right ) - 2 \, {\left (b^{2} f x^{2} - a^{2} f + 2 \, {\left (b^{2} x + a b\right )} \cosh \left (1\right ) + 2 \, {\left (b^{2} x + a b\right )} \sinh \left (1\right )\right )} \log \left (\frac {-\left (i - 1\right ) \, \tan \left (b x + a\right )^{2} - 2 \, \tan \left (b x + a\right ) + i + 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (a^{2} f - 2 \, a b \cosh \left (1\right ) - 2 \, a b \sinh \left (1\right )\right )} \log \left (\frac {\left (i - 1\right ) \, \tan \left (b x + a\right )^{2} + 2 i \, \tan \left (b x + a\right ) + i + 1}{\tan \left (b x + a\right )^{2} + 1}\right ) - 2 \, {\left (a^{2} f - 2 \, a b \cosh \left (1\right ) - 2 \, a b \sinh \left (1\right )\right )} \log \left (\frac {\left (i - 1\right ) \, \tan \left (b x + a\right )^{2} - 2 i \, \tan \left (b x + a\right ) + i + 1}{\tan \left (b x + a\right )^{2} + 1}\right ) - 4 \, {\left (b^{2} f x^{2} + 2 \, b^{2} x \cosh \left (1\right ) + 2 \, b^{2} x \sinh \left (1\right )\right )} \log \left (\frac {\tan \left (b x + a\right ) + 1}{\tan \left (b x + a\right ) - 1}\right ) - f {\rm polylog}\left (3, \frac {i \, \tan \left (b x + a\right )^{2} + 2 \, \tan \left (b x + a\right ) - i}{\tan \left (b x + a\right )^{2} + 1}\right ) + f {\rm polylog}\left (3, \frac {i \, \tan \left (b x + a\right )^{2} - 2 \, \tan \left (b x + a\right ) - i}{\tan \left (b x + a\right )^{2} + 1}\right ) - f {\rm polylog}\left (3, \frac {-i \, \tan \left (b x + a\right )^{2} + 2 \, \tan \left (b x + a\right ) + i}{\tan \left (b x + a\right )^{2} + 1}\right ) + f {\rm polylog}\left (3, \frac {-i \, \tan \left (b x + a\right )^{2} - 2 \, \tan \left (b x + a\right ) + i}{\tan \left (b x + a\right )^{2} + 1}\right )}{16 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (e + f x\right ) \operatorname {acoth}{\left (\tan {\left (a + b x \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \mathrm {acoth}\left (\mathrm {tan}\left (a+b\,x\right )\right )\,\left (e+f\,x\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________