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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0456383, 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 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])

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 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]

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.0176336, 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

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 12, normalized size = 1.1 \begin{align*}{\frac{\ln \left ( a+b\sec \left ( x \right ) \right ) }{b}} \end{align*}

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.960017, size = 15, normalized size = 1.36 \begin{align*} \frac{\log \left (b \sec \left (x\right ) + a\right )}{b} \end{align*}

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

________________________________________________________________________________________

Fricas [A]  time = 2.48189, size = 51, normalized size = 4.64 \begin{align*} \frac{\log \left (a \cos \left (x\right ) + b\right ) - \log \left (-\cos \left (x\right )\right )}{b} \end{align*}

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

________________________________________________________________________________________

Sympy [A]  time = 0.572914, size = 14, normalized size = 1.27 \begin{align*} \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} \end{align*}

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

________________________________________________________________________________________

Giac [A]  time = 1.10937, size = 30, normalized size = 2.73 \begin{align*} \frac{\log \left ({\left | a \cos \left (x\right ) + b \right |}\right )}{b} - \frac{\log \left ({\left | \cos \left (x\right ) \right |}\right )}{b} \end{align*}

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