3.816 \(\int \cos (x) (\sec ^3(x)+\tan (x)) \, dx\)

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

[Out]

-cos(x)+tan(x)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4401, 3767, 8, 2638} \[ \tan (x)-\cos (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Cos[x] + Tan[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2638

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

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 4401

Int[u_, x_Symbol] :> With[{v = ExpandTrig[u, x]}, Int[v, x] /; SumQ[v]] /;  !InertTrigFreeQ[u]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 7, normalized size = 1.00 \[ \tan (x)-\cos (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Cos[x] + Tan[x]

________________________________________________________________________________________

fricas [B]  time = 0.74, size = 15, normalized size = 2.14 \[ -\frac {\cos \relax (x)^{2} - \sin \relax (x)}{\cos \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(sec(x)^3+tan(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.14, size = 30, normalized size = 4.29 \[ -\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{3} + \tan \left (\frac {1}{2} \, x\right )^{2} + \tan \left (\frac {1}{2} \, x\right ) - 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{4} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(sec(x)^3+tan(x)),x, algorithm="giac")

[Out]

-2*(tan(1/2*x)^3 + tan(1/2*x)^2 + tan(1/2*x) - 1)/(tan(1/2*x)^4 - 1)

________________________________________________________________________________________

maple [A]  time = 0.10, size = 8, normalized size = 1.14 \[ -\cos \relax (x )+\tan \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)*(sec(x)^3+tan(x)),x)

[Out]

-cos(x)+tan(x)

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 7, normalized size = 1.00 \[ -\cos \relax (x) + \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(sec(x)^3+tan(x)),x, algorithm="maxima")

[Out]

-cos(x) + tan(x)

________________________________________________________________________________________

mupad [B]  time = 2.97, size = 12, normalized size = 1.71 \[ \frac {\sin \relax (x)}{\cos \relax (x)}-\cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sin(x)/cos(x) - cos(x)

________________________________________________________________________________________

sympy [A]  time = 4.81, size = 8, normalized size = 1.14 \[ \frac {\sin {\relax (x )}}{\cos {\relax (x )}} - \cos {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*(sec(x)**3+tan(x)),x)

[Out]

sin(x)/cos(x) - cos(x)

________________________________________________________________________________________