3.634 \(\int (\cos (x)+\sec (x)) \tan (x) \, dx\)

Optimal. Leaf size=7 \[ \sec (x)-\cos (x) \]

[Out]

-Cos[x] + Sec[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0465842, antiderivative size = 7, normalized size of antiderivative = 1., 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 = {4236} \[ \sec (x)-\cos (x) \]

Antiderivative was successfully verified.

[In]

Int[(Cos[x] + Sec[x])*Tan[x],x]

[Out]

-Cos[x] + Sec[x]

Rule 4236

Int[(u_)*((A_.) + cos[(a_.) + (b_.)*(x_)]*(B_.) + (C_.)*sec[(a_.) + (b_.)*(x_)]), x_Symbol] :> Int[(ActivateTr
ig[u]*(C + A*Cos[a + b*x] + B*Cos[a + b*x]^2))/Cos[a + b*x], x] /; FreeQ[{a, b, A, B, C}, x]

Rubi steps

\begin{align*} \int (\cos (x)+\sec (x)) \tan (x) \, dx &=\int \left (1+\cos ^2(x)\right ) \sec (x) \tan (x) \, dx\\ &=-\operatorname{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.0040395, size = 7, normalized size = 1. \[ \sec (x)-\cos (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[x] + Sec[x])*Tan[x],x]

[Out]

-Cos[x] + Sec[x]

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 10, normalized size = 1.4 \begin{align*} \left ( \cos \left ( x \right ) \right ) ^{-1}-\cos \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1/cos(x)+cos(x))*tan(x),x)

[Out]

1/cos(x)-cos(x)

________________________________________________________________________________________

Maxima [A]  time = 0.937552, size = 12, normalized size = 1.71 \begin{align*} \frac{1}{\cos \left (x\right )} - \cos \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/cos(x) - cos(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(cos(x)^2 - 1)/cos(x)

________________________________________________________________________________________

Sympy [A]  time = 2.42084, size = 7, normalized size = 1. \begin{align*} - \cos{\left (x \right )} + \frac{1}{\cos{\left (x \right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1/cos(x)+cos(x))*tan(x),x)

[Out]

-cos(x) + 1/cos(x)

________________________________________________________________________________________

Giac [A]  time = 1.06459, size = 12, normalized size = 1.71 \begin{align*} \frac{1}{\cos \left (x\right )} - \cos \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/cos(x) - cos(x)