\(\int \sec ^2(a+b x) \, dx\) [117]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 10 \[ \int \sec ^2(a+b x) \, dx=\frac {\tan (a+b x)}{b} \]

[Out]

tan(b*x+a)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3852, 8} \[ \int \sec ^2(a+b x) \, dx=\frac {\tan (a+b x)}{b} \]

[In]

Int[Sec[a + b*x]^2,x]

[Out]

Tan[a + b*x]/b

Rule 8

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

Rule 3852

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]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}(\int 1 \, dx,x,-\tan (a+b x))}{b} \\ & = \frac {\tan (a+b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \sec ^2(a+b x) \, dx=\frac {\tan (a+b x)}{b} \]

[In]

Integrate[Sec[a + b*x]^2,x]

[Out]

Tan[a + b*x]/b

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.10

method result size
derivativedivides \(\frac {\tan \left (b x +a \right )}{b}\) \(11\)
default \(\frac {\tan \left (b x +a \right )}{b}\) \(11\)
risch \(\frac {2 i}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}\) \(20\)
norman \(-\frac {2 \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}\) \(30\)
parallelrisch \(-\frac {2 \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}\) \(30\)

[In]

int(1/cos(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

tan(b*x+a)/b

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.80 \[ \int \sec ^2(a+b x) \, dx=\frac {\sin \left (b x + a\right )}{b \cos \left (b x + a\right )} \]

[In]

integrate(1/cos(b*x+a)^2,x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (7) = 14\).

Time = 0.62 (sec) , antiderivative size = 58, normalized size of antiderivative = 5.80 \[ \int \sec ^2(a+b x) \, dx=\begin {cases} \tilde {\infty } x & \text {for}\: \left (a = - \frac {\pi }{2} \vee a = - b x - \frac {\pi }{2}\right ) \wedge \left (a = - b x - \frac {\pi }{2} \vee b = 0\right ) \\\frac {x}{\cos ^{2}{\left (a \right )}} & \text {for}\: b = 0 \\- \frac {2 \tan {\left (\frac {a}{2} + \frac {b x}{2} \right )}}{b \tan ^{2}{\left (\frac {a}{2} + \frac {b x}{2} \right )} - b} & \text {otherwise} \end {cases} \]

[In]

integrate(1/cos(b*x+a)**2,x)

[Out]

Piecewise((zoo*x, (Eq(b, 0) | Eq(a, -b*x - pi/2)) & (Eq(a, -pi/2) | Eq(a, -b*x - pi/2))), (x/cos(a)**2, Eq(b,
0)), (-2*tan(a/2 + b*x/2)/(b*tan(a/2 + b*x/2)**2 - b), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \sec ^2(a+b x) \, dx=\frac {\tan \left (b x + a\right )}{b} \]

[In]

integrate(1/cos(b*x+a)^2,x, algorithm="maxima")

[Out]

tan(b*x + a)/b

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \sec ^2(a+b x) \, dx=\frac {\tan \left (b x + a\right )}{b} \]

[In]

integrate(1/cos(b*x+a)^2,x, algorithm="giac")

[Out]

tan(b*x + a)/b

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \sec ^2(a+b x) \, dx=\frac {\mathrm {tan}\left (a+b\,x\right )}{b} \]

[In]

int(1/cos(a + b*x)^2,x)

[Out]

tan(a + b*x)/b