3.81 \(\int \sec (x) \, dx\)

Optimal. Leaf size=3 \[ \tanh ^{-1}(\sin (x)) \]

[Out]

ArcTanh[Sin[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0025583, antiderivative size = 3, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 2, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3770} \[ \tanh ^{-1}(\sin (x)) \]

Antiderivative was successfully verified.

[In]

Int[Sec[x],x]

[Out]

ArcTanh[Sin[x]]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \sec (x) \, dx &=\tanh ^{-1}(\sin (x))\\ \end{align*}

Mathematica [B]  time = 0.0029171, size = 33, normalized size = 11. \[ \log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x],x]

[Out]

-Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]]

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 7, normalized size = 2.3 \begin{align*} \ln \left ( \sec \left ( x \right ) +\tan \left ( x \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/cos(x),x)

[Out]

ln(sec(x)+tan(x))

________________________________________________________________________________________

Maxima [B]  time = 0.941983, size = 20, normalized size = 6.67 \begin{align*} \frac{1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac{1}{2} \, \log \left (\sin \left (x\right ) - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(x),x, algorithm="maxima")

[Out]

1/2*log(sin(x) + 1) - 1/2*log(sin(x) - 1)

________________________________________________________________________________________

Fricas [B]  time = 2.09825, size = 59, normalized size = 19.67 \begin{align*} \frac{1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac{1}{2} \, \log \left (-\sin \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(x),x, algorithm="fricas")

[Out]

1/2*log(sin(x) + 1) - 1/2*log(-sin(x) + 1)

________________________________________________________________________________________

Sympy [B]  time = 0.097763, size = 15, normalized size = 5. \begin{align*} - \frac{\log{\left (\sin{\left (x \right )} - 1 \right )}}{2} + \frac{\log{\left (\sin{\left (x \right )} + 1 \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(x),x)

[Out]

-log(sin(x) - 1)/2 + log(sin(x) + 1)/2

________________________________________________________________________________________

Giac [B]  time = 1.08769, size = 23, normalized size = 7.67 \begin{align*} \frac{1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac{1}{2} \, \log \left (-\sin \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(x),x, algorithm="giac")

[Out]

1/2*log(sin(x) + 1) - 1/2*log(-sin(x) + 1)