3.707 \(\int (1+\cos ^2(x)) \sec ^2(x) \, dx\)

Optimal. Leaf size=4 \[ x+\tan (x) \]

[Out]

x+tan(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 4, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3012, 8} \[ x+\tan (x) \]

Antiderivative was successfully verified.

[In]

Int[(1 + Cos[x]^2)*Sec[x]^2,x]

[Out]

x + Tan[x]

Rule 8

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

Rule 3012

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
+ f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 4, normalized size = 1.00 \[ x+\tan (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + Cos[x]^2)*Sec[x]^2,x]

[Out]

x + Tan[x]

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 12, normalized size = 3.00 \[ \frac {x \cos \relax (x) + \sin \relax (x)}{\cos \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)^2)*sec(x)^2,x, algorithm="fricas")

[Out]

(x*cos(x) + sin(x))/cos(x)

________________________________________________________________________________________

giac [B]  time = 0.19, size = 15, normalized size = 3.75 \[ -\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor + x + \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)^2)*sec(x)^2,x, algorithm="giac")

[Out]

-pi*floor(x/pi + 1/2) + x + tan(x)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 5, normalized size = 1.25 \[ x +\tan \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+cos(x)^2)*sec(x)^2,x)

[Out]

x+tan(x)

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 4, normalized size = 1.00 \[ x + \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)^2)*sec(x)^2,x, algorithm="maxima")

[Out]

x + tan(x)

________________________________________________________________________________________

mupad [B]  time = 2.88, size = 4, normalized size = 1.00 \[ x+\mathrm {tan}\relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(x)^2 + 1)/cos(x)^2,x)

[Out]

x + tan(x)

________________________________________________________________________________________

sympy [A]  time = 5.38, size = 3, normalized size = 0.75 \[ x + \tan {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)**2)*sec(x)**2,x)

[Out]

x + tan(x)

________________________________________________________________________________________