3.80 \(\int \sec (x) (1-\sin (x)) \, dx\)

Optimal. Leaf size=5 \[ \log (\sin (x)+1) \]

[Out]

ln(1+sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2667, 31} \[ \log (\sin (x)+1) \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]*(1 - Sin[x]),x]

[Out]

Log[1 + Sin[x]]

Rule 31

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

Rule 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.01, size = 36, normalized size = 7.20 \[ \log (\cos (x))-\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]*(1 - Sin[x]),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 5, normalized size = 1.00 \[ \log \left (\sin \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x) + 1)

________________________________________________________________________________________

giac [A]  time = 0.91, size = 5, normalized size = 1.00 \[ \log \left (\sin \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x) + 1)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 6, normalized size = 1.20 \[ \ln \left (\sin \relax (x )+1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-sin(x)+1)/cos(x),x)

[Out]

ln(sin(x)+1)

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 5, normalized size = 1.00 \[ \log \left (\sin \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x) + 1)

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 5, normalized size = 1.00 \[ \ln \left (\sin \relax (x)+1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(sin(x) - 1)/cos(x),x)

[Out]

log(sin(x) + 1)

________________________________________________________________________________________

sympy [B]  time = 0.33, size = 19, normalized size = 3.80 \[ 2 \log {\left (\tan {\left (\frac {x}{2} \right )} + 1 \right )} - \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-sin(x))/cos(x),x)

[Out]

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

________________________________________________________________________________________