Optimal. Leaf size=14 \[ \log (x)-\frac {1}{2} \tanh (a+2 \log (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3554, 8}
\begin {gather*} \log (x)-\frac {1}{2} \tanh (a+2 \log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rubi steps
\begin {align*} \int \frac {\tanh ^2(a+2 \log (x))}{x} \, dx &=\text {Subst}\left (\int \tanh ^2(a+2 x) \, dx,x,\log (x)\right )\\ &=-\frac {1}{2} \tanh (a+2 \log (x))+\text {Subst}(\int 1 \, dx,x,\log (x))\\ &=\log (x)-\frac {1}{2} \tanh (a+2 \log (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 24, normalized size = 1.71 \begin {gather*} \frac {1}{2} \tanh ^{-1}(\tanh (a+2 \log (x)))-\frac {1}{2} \tanh (a+2 \log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(34\) vs.
\(2(12)=24\).
time = 0.71, size = 35, normalized size = 2.50
method | result | size |
risch | \(\frac {1}{1+{\mathrm e}^{2 a} x^{4}}+\ln \left (x \right )\) | \(16\) |
derivativedivides | \(-\frac {\tanh \left (a +2 \ln \left (x \right )\right )}{2}-\frac {\ln \left (\tanh \left (a +2 \ln \left (x \right )\right )-1\right )}{4}+\frac {\ln \left (\tanh \left (a +2 \ln \left (x \right )\right )+1\right )}{4}\) | \(35\) |
default | \(-\frac {\tanh \left (a +2 \ln \left (x \right )\right )}{2}-\frac {\ln \left (\tanh \left (a +2 \ln \left (x \right )\right )-1\right )}{4}+\frac {\ln \left (\tanh \left (a +2 \ln \left (x \right )\right )+1\right )}{4}\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 21, normalized size = 1.50 \begin {gather*} \frac {1}{2} \, a - \frac {1}{e^{\left (-2 \, a - 4 \, \log \left (x\right )\right )} + 1} + \log \left (x\right ) \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. 28 vs.
\(2 (12) = 24\).
time = 0.33, size = 28, normalized size = 2.00 \begin {gather*} \frac {{\left (x^{4} e^{\left (2 \, a\right )} + 1\right )} \log \left (x\right ) + 1}{x^{4} e^{\left (2 \, a\right )} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.12, size = 12, normalized size = 0.86 \begin {gather*} \log {\left (x \right )} - \frac {\tanh {\left (a + 2 \log {\left (x \right )} \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 19, normalized size = 1.36 \begin {gather*} \frac {1}{x^{4} e^{\left (2 \, a\right )} + 1} + \frac {1}{4} \, \log \left (x^{4}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.06, size = 28, normalized size = 2.00 \begin {gather*} \ln \left (x\right )-\frac {x^4\,{\mathrm {e}}^{2\,a}-1}{2\,\left ({\mathrm {e}}^{2\,a}\,x^4+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________