\(\int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx\) [724]

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

Optimal result

Integrand size = 13, antiderivative size = 11 \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=\frac {\log (a+b \sec (x))}{b} \]

[Out]

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

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.82, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {4424, 36, 29, 31} \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=\frac {\log (a \cos (x)+b)}{b}-\frac {\log (\cos (x))}{b} \]

[In]

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

[Out]

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 4424

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, Dist[-(b*
c)^(-1), Subst[Int[SubstFor[1/x, Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[
c*(a + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Tan] || EqQ[F, tan])

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.82 \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=-\frac {\log (\cos (x))}{b}+\frac {\log (b+a \cos (x))}{b} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.35 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

method result size
derivativedivides \(\frac {\ln \left (a +b \sec \left (x \right )\right )}{b}\) \(12\)
default \(\frac {\ln \left (a +b \sec \left (x \right )\right )}{b}\) \(12\)
risch \(\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 b \,{\mathrm e}^{i x}}{a}+1\right )}{b}-\frac {\ln \left ({\mathrm e}^{2 i x}+1\right )}{b}\) \(38\)

[In]

int(sec(x)*tan(x)/(a+b*sec(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.73 \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=\frac {\log \left (a \cos \left (x\right ) + b\right ) - \log \left (-\cos \left (x\right )\right )}{b} \]

[In]

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

[Out]

(log(a*cos(x) + b) - log(-cos(x)))/b

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.27 \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=\begin {cases} \frac {\log {\left (\frac {a}{b} + \sec {\left (x \right )} \right )}}{b} & \text {for}\: b \neq 0 \\\frac {\sec {\left (x \right )}}{a} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((log(a/b + sec(x))/b, Ne(b, 0)), (sec(x)/a, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=\frac {\log \left (b \sec \left (x\right ) + a\right )}{b} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 2.00 \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=\frac {\log \left ({\left | a \cos \left (x\right ) + b \right |}\right )}{b} - \frac {\log \left ({\left | \cos \left (x\right ) \right |}\right )}{b} \]

[In]

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

[Out]

log(abs(a*cos(x) + b))/b - log(abs(cos(x)))/b

Mupad [B] (verification not implemented)

Time = 26.06 (sec) , antiderivative size = 48, normalized size of antiderivative = 4.36 \[ \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx=\frac {\mathrm {atan}\left (\frac {b\,{\sin \left (\frac {x}{2}\right )}^2}{a\,{\cos \left (\frac {x}{2}\right )}^2\,1{}\mathrm {i}+b\,{\cos \left (\frac {x}{2}\right )}^2\,1{}\mathrm {i}-a\,{\sin \left (\frac {x}{2}\right )}^2\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{b} \]

[In]

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

[Out]

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