Optimal. Leaf size=45 \[ -\frac{\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n}-\frac{\tanh \left (a+b \log \left (c x^n\right )\right )}{b n}+\log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0394355, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {3473, 8} \[ -\frac{\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n}-\frac{\tanh \left (a+b \log \left (c x^n\right )\right )}{b n}+\log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \frac{\tanh ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=\frac{\operatorname{Subst}\left (\int \tanh ^4(a+b x) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\frac{\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n}+\frac{\operatorname{Subst}\left (\int \tanh ^2(a+b x) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\frac{\tanh \left (a+b \log \left (c x^n\right )\right )}{b n}-\frac{\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n}+\frac{\operatorname{Subst}\left (\int 1 \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\log (x)-\frac{\tanh \left (a+b \log \left (c x^n\right )\right )}{b n}-\frac{\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n}\\ \end{align*}
Mathematica [A] time = 0.102834, size = 62, normalized size = 1.38 \[ -\frac{\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n}+\frac{\tanh ^{-1}\left (\tanh \left (a+b \log \left (c x^n\right )\right )\right )}{b n}-\frac{\tanh \left (a+b \log \left (c x^n\right )\right )}{b n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 86, normalized size = 1.9 \begin{align*} -{\frac{ \left ( \tanh \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \right ) ^{3}}{3\,bn}}-{\frac{\tanh \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) }{bn}}-{\frac{\ln \left ( \tanh \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) -1 \right ) }{2\,bn}}+{\frac{\ln \left ( \tanh \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) +1 \right ) }{2\,bn}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.53108, size = 667, normalized size = 14.82 \begin{align*} \frac{18 \, c^{4 \, b} e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 27 \, c^{2 \, b} e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + 11}{12 \,{\left (b c^{6 \, b} n e^{\left (6 \, b \log \left (x^{n}\right ) + 6 \, a\right )} + 3 \, b c^{4 \, b} n e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 3 \, b c^{2 \, b} n e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + b n\right )}} + \frac{6 \, c^{4 \, b} e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 15 \, c^{2 \, b} e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + 11}{12 \,{\left (b c^{6 \, b} n e^{\left (6 \, b \log \left (x^{n}\right ) + 6 \, a\right )} + 3 \, b c^{4 \, b} n e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 3 \, b c^{2 \, b} n e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + b n\right )}} + \frac{2 \,{\left (3 \, c^{4 \, b} e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 3 \, c^{2 \, b} e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + 1\right )}}{3 \,{\left (b c^{6 \, b} n e^{\left (6 \, b \log \left (x^{n}\right ) + 6 \, a\right )} + 3 \, b c^{4 \, b} n e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 3 \, b c^{2 \, b} n e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + b n\right )}} - \frac{3 \, c^{2 \, b} e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + 1}{2 \,{\left (b c^{6 \, b} n e^{\left (6 \, b \log \left (x^{n}\right ) + 6 \, a\right )} + 3 \, b c^{4 \, b} n e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 3 \, b c^{2 \, b} n e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + b n\right )}} + \frac{2}{3 \,{\left (b c^{6 \, b} n e^{\left (6 \, b \log \left (x^{n}\right ) + 6 \, a\right )} + 3 \, b c^{4 \, b} n e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 3 \, b c^{2 \, b} n e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + b n\right )}} + \log \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.00437, size = 630, normalized size = 14. \begin{align*} \frac{{\left (3 \, b n \log \left (x\right ) + 4\right )} \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{3} + 3 \,{\left (3 \, b n \log \left (x\right ) + 4\right )} \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} - 12 \, \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - 4 \, \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{3} + 3 \,{\left (3 \, b n \log \left (x\right ) + 4\right )} \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{3 \,{\left (b n \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{3} + 3 \, b n \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + 3 \, b n \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 28.8841, size = 71, normalized size = 1.58 \begin{align*} \begin{cases} \log{\left (x \right )} \tanh ^{4}{\left (a \right )} & \text{for}\: b = 0 \wedge n = 0 \\\log{\left (x \right )} \tanh ^{4}{\left (a + b \log{\left (c \right )} \right )} & \text{for}\: n = 0 \\\log{\left (x \right )} \tanh ^{4}{\left (a \right )} & \text{for}\: b = 0 \\\log{\left (x \right )} - \frac{\tanh ^{3}{\left (a + b n \log{\left (x \right )} + b \log{\left (c \right )} \right )}}{3 b n} - \frac{\tanh{\left (a + b n \log{\left (x \right )} + b \log{\left (c \right )} \right )}}{b n} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.3631, size = 90, normalized size = 2. \begin{align*} \frac{4 \,{\left (3 \, c^{4 \, b} x^{4 \, b n} e^{\left (4 \, a\right )} + 3 \, c^{2 \, b} x^{2 \, b n} e^{\left (2 \, a\right )} + 2\right )}}{3 \,{\left (c^{2 \, b} x^{2 \, b n} e^{\left (2 \, a\right )} + 1\right )}^{3} b n} + \log \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]