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

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 7, normalized size of antiderivative = 1.00, 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.00, size = 7, normalized size = 1.00 \[ \sec (x)-\cos (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Cos[x] + Sec[x]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int (\cos (x)+\sec (x)) \tan (x) \, dx \]

Verification is Not applicable to the result.

[In]

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

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.03, size = 12, normalized size = 1.71 \[ -\frac {\cos \relax (x)^{2} - 1}{\cos \relax (x)} \]

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)

________________________________________________________________________________________

giac [A]  time = 0.97, size = 9, normalized size = 1.29 \[ \frac {1}{\cos \relax (x)} - \cos \relax (x) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 10, normalized size = 1.43




method result size



derivativedivides \(-\cos \relax (x )+\frac {1}{\cos \relax (x )}\) \(10\)
default \(-\cos \relax (x )+\frac {1}{\cos \relax (x )}\) \(10\)
risch \(-\frac {{\mathrm e}^{i x}}{2}-\frac {{\mathrm e}^{-i x}}{2}+\frac {2 \,{\mathrm e}^{i x}}{1+{\mathrm e}^{2 i x}}\) \(32\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1/cos(x)+cos(x))*tan(x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 9, normalized size = 1.29 \[ \frac {1}{\cos \relax (x)} - \cos \relax (x) \]

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)

________________________________________________________________________________________

mupad [B]  time = 0.39, size = 9, normalized size = 1.29 \[ \frac {1}{\cos \relax (x)}-\cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/cos(x) - cos(x)

________________________________________________________________________________________

sympy [A]  time = 1.73, size = 7, normalized size = 1.00 \[ - \cos {\relax (x )} + \frac {1}{\cos {\relax (x )}} \]

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)

________________________________________________________________________________________