3.690 \(\int \frac {\sec ^2(x)}{a+b \tan (x)} \, dx\)

Optimal. Leaf size=11 \[ \frac {\log (a+b \tan (x))}{b} \]

[Out]

ln(a+b*tan(x))/b

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3506, 31} \[ \frac {\log (a+b \tan (x))}{b} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^2/(a + b*Tan[x]),x]

[Out]

Log[a + b*Tan[x]]/b

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\sec ^2(x)}{a+b \tan (x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \tan (x)\right )}{b}\\ &=\frac {\log (a+b \tan (x))}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 20, normalized size = 1.82 \[ \frac {\log (a \cos (x)+b \sin (x))-\log (\cos (x))}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^2/(a + b*Tan[x]),x]

[Out]

(-Log[Cos[x]] + Log[a*Cos[x] + b*Sin[x]])/b

________________________________________________________________________________________

fricas [B]  time = 1.82, size = 40, normalized size = 3.64 \[ \frac {\log \left (2 \, a b \cos \relax (x) \sin \relax (x) + {\left (a^{2} - b^{2}\right )} \cos \relax (x)^{2} + b^{2}\right ) - \log \left (\cos \relax (x)^{2}\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(log(2*a*b*cos(x)*sin(x) + (a^2 - b^2)*cos(x)^2 + b^2) - log(cos(x)^2))/b

________________________________________________________________________________________

giac [A]  time = 0.12, size = 12, normalized size = 1.09 \[ \frac {\log \left ({\left | b \tan \relax (x) + a \right |}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(abs(b*tan(x) + a))/b

________________________________________________________________________________________

maple [A]  time = 0.07, size = 12, normalized size = 1.09 \[ \frac {\ln \left (a +b \tan \relax (x )\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^2/(a+b*tan(x)),x)

[Out]

ln(a+b*tan(x))/b

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 11, normalized size = 1.00 \[ \frac {\log \left (b \tan \relax (x) + a\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(b*tan(x) + a)/b

________________________________________________________________________________________

mupad [B]  time = 3.03, size = 11, normalized size = 1.00 \[ \frac {\ln \left (a+b\,\mathrm {tan}\relax (x)\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(a + b*tan(x))/b

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{2}{\relax (x )}}{a + b \tan {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**2/(a+b*tan(x)),x)

[Out]

Integral(sec(x)**2/(a + b*tan(x)), x)

________________________________________________________________________________________