3.724 \(\int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 20, normalized size of antiderivative = 1.82, number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {4339, 36, 29, 31} \[ \frac {\log (a \cos (x)+b)}{b}-\frac {\log (\cos (x))}{b} \]

Antiderivative was successfully verified.

[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 4339

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*} \int \frac {\sec (x) \tan (x)}{a+b \sec (x)} \, dx &=-\operatorname {Subst}\left (\int \frac {1}{x (b+a x)} \, dx,x,\cos (x)\right )\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\cos (x)\right )}{b}+\frac {a \operatorname {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]  time = 0.02, size = 20, normalized size = 1.82 \[ \frac {\log (a \cos (x)+b)}{b}-\frac {\log (\cos (x))}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 19, normalized size = 1.73 \[ \frac {\log \left (a \cos \relax (x) + b\right ) - \log \left (-\cos \relax (x)\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 22, normalized size = 2.00 \[ \frac {\log \left ({\left | a \cos \relax (x) + b \right |}\right )}{b} - \frac {\log \left ({\left | \cos \relax (x) \right |}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.25, size = 48, normalized size = 4.36 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

sympy [A]  time = 0.46, size = 14, normalized size = 1.27 \[ \begin {cases} \frac {\log {\left (\frac {a}{b} + \sec {\relax (x )} \right )}}{b} & \text {for}\: b \neq 0 \\\frac {\sec {\relax (x )}}{a} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________