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

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

[Out]

x-cos(x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3161, 2638} \[ x-\cos (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x - Cos[x]

Rule 2638

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

Rule 3161

Int[cos[(d_.) + (e_.)*(x_)]^(n_.)*((a_.) + (b_.)*sec[(d_.) + (e_.)*(x_)] + (c_.)*tan[(d_.) + (e_.)*(x_)])^(n_.
), x_Symbol] :> Int[(b + a*Cos[d + e*x] + c*Sin[d + e*x])^n, x] /; FreeQ[{a, b, c, d, e}, x] && IntegerQ[n]

Rubi steps

\begin {align*} \int \cos (x) (\sec (x)+\tan (x)) \, dx &=\int (1+\sin (x)) \, dx\\ &=x+\int \sin (x) \, dx\\ &=x-\cos (x)\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

x - Cos[x]

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 6, normalized size = 1.00 \[ x - \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - cos(x)

________________________________________________________________________________________

giac [B]  time = 0.13, size = 14, normalized size = 2.33 \[ x - \frac {2}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.08, size = 7, normalized size = 1.17 \[ x -\cos \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-cos(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - cos(x)

________________________________________________________________________________________

mupad [B]  time = 2.95, size = 6, normalized size = 1.00 \[ x-\cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - cos(x)

________________________________________________________________________________________

sympy [A]  time = 1.13, size = 3, normalized size = 0.50 \[ x - \cos {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - cos(x)

________________________________________________________________________________________