Optimal. Leaf size=10 \[ -\tanh ^{-1}(\sin (x))+x \sec (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3842, 3855}
\begin {gather*} x \sec (x)-\tanh ^{-1}(\sin (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3842
Rule 3855
Rubi steps
\begin {align*} \int x \sec (x) \tan (x) \, dx &=x \sec (x)-\int \sec (x) \, dx\\ &=-\tanh ^{-1}(\sin (x))+x \sec (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(37\) vs. \(2(10)=20\).
time = 0.01, size = 37, normalized size = 3.70 \begin {gather*} \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )+x \sec (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 16, normalized size = 1.60
method | result | size |
default | \(\frac {x}{\cos \left (x \right )}-\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )\) | \(16\) |
risch | \(\frac {2 x \,{\mathrm e}^{i x}}{{\mathrm e}^{2 i x}+1}+\ln \left ({\mathrm e}^{i x}-i\right )-\ln \left ({\mathrm e}^{i x}+i\right )\) | \(39\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 121 vs.
\(2 (10) = 20\).
time = 2.37, size = 121, normalized size = 12.10 \begin {gather*} \frac {4 \, x \cos \left (2 \, x\right ) \cos \left (x\right ) + 4 \, x \sin \left (2 \, x\right ) \sin \left (x\right ) + 4 \, x \cos \left (x\right ) - {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) + {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right )}{2 \, {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\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. 29 vs.
\(2 (10) = 20\).
time = 0.96, size = 29, normalized size = 2.90 \begin {gather*} -\frac {\cos \left (x\right ) \log \left (\sin \left (x\right ) + 1\right ) - \cos \left (x\right ) \log \left (-\sin \left (x\right ) + 1\right ) - 2 \, x}{2 \, \cos \left (x\right )} \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 x \tan {\left (x \right )} \sec {\left (x \right )}\, dx \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. 150 vs.
\(2 (10) = 20\).
time = 1.63, size = 150, normalized size = 15.00 \begin {gather*} -\frac {2 \, x \tan \left (\frac {1}{2} \, x\right )^{2} + \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{2} - \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, x - \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) + \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right )}{2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 19, normalized size = 1.90 \begin {gather*} \frac {x}{\cos \left (x\right )}+\mathrm {atan}\left (\cos \left (x\right )+\sin \left (x\right )\,1{}\mathrm {i}\right )\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________