3.727 \(\int \frac{\sec (x) \tan (x)}{\sec (x)+\sec ^2(x)} \, dx\)

Optimal. Leaf size=7 \[ -\log (\cos (x)+1) \]

[Out]

-Log[1 + Cos[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.031622, antiderivative size = 7, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4339, 31} \[ -\log (\cos (x)+1) \]

Antiderivative was successfully verified.

[In]

Int[(Sec[x]*Tan[x])/(Sec[x] + Sec[x]^2),x]

[Out]

-Log[1 + Cos[x]]

Rule 4339

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, -Dist[(b*
c)^(-1), Subst[Int[SubstFor[1/x, Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[
c*(a + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Tan] || EqQ[F, tan])

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{\sec (x) \tan (x)}{\sec (x)+\sec ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,\cos (x)\right )\\ &=-\log (1+\cos (x))\\ \end{align*}

Mathematica [A]  time = 0.0055143, size = 9, normalized size = 1.29 \[ -2 \log \left (\cos \left (\frac{x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[x]*Tan[x])/(Sec[x] + Sec[x]^2),x]

[Out]

-2*Log[Cos[x/2]]

________________________________________________________________________________________

Maple [A]  time = 0.028, size = 12, normalized size = 1.7 \begin{align*} \ln \left ( \sec \left ( x \right ) \right ) -\ln \left ( 1+\sec \left ( x \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)*tan(x)/(sec(x)+sec(x)^2),x)

[Out]

ln(sec(x))-ln(1+sec(x))

________________________________________________________________________________________

Maxima [A]  time = 0.954864, size = 9, normalized size = 1.29 \begin{align*} -\log \left (\cos \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*tan(x)/(sec(x)+sec(x)^2),x, algorithm="maxima")

[Out]

-log(cos(x) + 1)

________________________________________________________________________________________

Fricas [A]  time = 2.41407, size = 32, normalized size = 4.57 \begin{align*} -\log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*tan(x)/(sec(x)+sec(x)^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.256751, size = 15, normalized size = 2.14 \begin{align*} \frac{\log{\left (\tan ^{2}{\left (x \right )} + 1 \right )}}{2} - \log{\left (\sec{\left (x \right )} + 1 \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*tan(x)/(sec(x)+sec(x)**2),x)

[Out]

log(tan(x)**2 + 1)/2 - log(sec(x) + 1)

________________________________________________________________________________________

Giac [A]  time = 1.0896, size = 9, normalized size = 1.29 \begin{align*} -\log \left (\cos \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*tan(x)/(sec(x)+sec(x)^2),x, algorithm="giac")

[Out]

-log(cos(x) + 1)