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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3159, 2668, 31} \[ \frac {\log (a+b \sin (x))}{b} \]

Antiderivative was successfully verified.

[In]

Int[(a*Sec[x] + b*Tan[x])^(-1),x]

[Out]

Log[a + b*Sin[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 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 3159

Int[((a_.) + (b_.)*sec[(d_.) + (e_.)*(x_)] + (c_.)*tan[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Int[Cos[d + e*x
]/(b + a*Cos[d + e*x] + c*Sin[d + e*x]), x] /; FreeQ[{a, b, c, d, e}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 11, normalized size = 1.00 \[ \frac {\log (a+b \sin (x))}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[(a*Sec[x] + b*Tan[x])^(-1),x]

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.50, size = 50, normalized size = 4.55 \[ \frac {\log \left (a + \frac {2 \, b \sin \relax (x)}{\cos \relax (x) + 1} + \frac {a \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right )}{b} - \frac {\log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.79, size = 55, normalized size = 5.00 \[ \frac {2\,\mathrm {atanh}\left (\frac {b\,\left (2\,a^3\,\sin \relax (x)+\frac {5\,a^2\,b}{2}-b^3-\frac {a^2\,b\,\cos \left (2\,x\right )}{2}\right )}{{\left (2\,a^2+\sin \relax (x)\,a\,b-b^2\right )}^2}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*atanh((b*(2*a^3*sin(x) + (5*a^2*b)/2 - b^3 - (a^2*b*cos(2*x))/2))/(2*a^2 - b^2 + a*b*sin(x))^2))/b

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 32, normalized size = 2.91 \[ \begin {cases} \frac {\log {\left (\frac {a \sec {\relax (x )}}{b} + \tan {\relax (x )} \right )}}{b} - \frac {\log {\left (\tan ^{2}{\relax (x )} + 1 \right )}}{2 b} & \text {for}\: b \neq 0 \\\frac {\tan {\relax (x )}}{a \sec {\relax (x )}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((log(a*sec(x)/b + tan(x))/b - log(tan(x)**2 + 1)/(2*b), Ne(b, 0)), (tan(x)/(a*sec(x)), True))

________________________________________________________________________________________