Optimal. Leaf size=7 \[ -\cos (x)+\sec (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 1, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4321}
\begin {gather*} \sec (x)-\cos (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 4321
Rubi steps
\begin {align*} \int (\cos (x)+\sec (x)) \tan (x) \, dx &=\int \left (1+\cos ^2(x)\right ) \sec (x) \tan (x) \, dx\\ &=-\text {Subst}\left (\int \left (1+\frac {1}{x^2}\right ) \, dx,x,\cos (x)\right )\\ &=-\cos (x)+\sec (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 7, normalized size = 1.00 \begin {gather*} -\cos (x)+\sec (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 10, normalized size = 1.43
method | result | size |
derivativedivides | \(-\cos \left (x \right )+\frac {1}{\cos \left (x \right )}\) | \(10\) |
default | \(-\cos \left (x \right )+\frac {1}{\cos \left (x \right )}\) | \(10\) |
risch | \(-\frac {{\mathrm e}^{i x}}{2}-\frac {{\mathrm e}^{-i x}}{2}+\frac {2 \,{\mathrm e}^{i x}}{{\mathrm e}^{2 i x}+1}\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.58, size = 9, normalized size = 1.29 \begin {gather*} \frac {1}{\cos \left (x\right )} - \cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.89, size = 12, normalized size = 1.71 \begin {gather*} -\frac {\cos \left (x\right )^{2} - 1}{\cos \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.81, size = 7, normalized size = 1.00 \begin {gather*} - \cos {\left (x \right )} + \frac {1}{\cos {\left (x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.36, size = 9, normalized size = 1.29 \begin {gather*} \frac {1}{\cos \left (x\right )} - \cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.39, size = 9, normalized size = 1.29 \begin {gather*} \frac {1}{\cos \left (x\right )}-\cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________