Optimal. Leaf size=12 \[ a \tanh ^{-1}(\sin (x))-b \log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0074644, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {3770, 3475} \[ a \tanh ^{-1}(\sin (x))-b \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3475
Rubi steps
\begin{align*} \int (a \sec (x)+b \tan (x)) \, dx &=a \int \sec (x) \, dx+b \int \tan (x) \, dx\\ &=a \tanh ^{-1}(\sin (x))-b \log (\cos (x))\\ \end{align*}
Mathematica [B] time = 0.0053123, size = 42, normalized size = 3.5 \[ -a \log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )+a \log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )-b \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.002, size = 16, normalized size = 1.3 \begin{align*} a\ln \left ( \sec \left ( x \right ) +\tan \left ( x \right ) \right ) -b\ln \left ( \cos \left ( x \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00249, size = 19, normalized size = 1.58 \begin{align*} a \log \left (\sec \left (x\right ) + \tan \left (x\right )\right ) + b \log \left (\sec \left (x\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.23704, size = 81, normalized size = 6.75 \begin{align*} \frac{1}{2} \,{\left (a - b\right )} \log \left (\sin \left (x\right ) + 1\right ) - \frac{1}{2} \,{\left (a + b\right )} \log \left (-\sin \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.107771, size = 24, normalized size = 2. \begin{align*} a \left (- \frac{\log{\left (\sin{\left (x \right )} - 1 \right )}}{2} + \frac{\log{\left (\sin{\left (x \right )} + 1 \right )}}{2}\right ) - b \log{\left (\cos{\left (x \right )} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.14809, size = 46, normalized size = 3.83 \begin{align*} \frac{1}{4} \, a{\left (\log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) + 2 \right |}\right ) - \log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) - 2 \right |}\right )\right )} - b \log \left ({\left | \cos \left (x\right ) \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]