\(\int \frac {\sin (x)}{a-b \cos (x)} \, dx\) [11]

   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 = 12, antiderivative size = 12 \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\frac {\log (a-b \cos (x))}{b} \]

[Out]

ln(a-b*cos(x))/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2747, 31} \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\frac {\log (a-b \cos (x))}{b} \]

[In]

Int[Sin[x]/(a - b*Cos[x]),x]

[Out]

Log[a - b*Cos[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 2747

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]

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\frac {\log (a-b \cos (x))}{b} \]

[In]

Integrate[Sin[x]/(a - b*Cos[x]),x]

[Out]

Log[a - b*Cos[x]]/b

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {\ln \left (a -b \cos \left (x \right )\right )}{b}\) \(13\)
default \(\frac {\ln \left (a -b \cos \left (x \right )\right )}{b}\) \(13\)
parallelrisch \(\frac {-\ln \left (\frac {1}{\cos \left (x \right )+1}\right )+\ln \left (\frac {a -b \cos \left (x \right )}{\cos \left (x \right )+1}\right )}{b}\) \(30\)
risch \(-\frac {i x}{b}+\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {2 a \,{\mathrm e}^{i x}}{b}+1\right )}{b}\) \(32\)
norman \(\frac {\ln \left (a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+a -b \right )}{b}-\frac {\ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}{b}\) \(42\)

[In]

int(sin(x)/(a-b*cos(x)),x,method=_RETURNVERBOSE)

[Out]

ln(a-b*cos(x))/b

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\frac {\log \left (-b \cos \left (x\right ) + a\right )}{b} \]

[In]

integrate(sin(x)/(a-b*cos(x)),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.25 \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\begin {cases} \frac {\log {\left (- \frac {a}{b} + \cos {\left (x \right )} \right )}}{b} & \text {for}\: b \neq 0 \\- \frac {\cos {\left (x \right )}}{a} & \text {otherwise} \end {cases} \]

[In]

integrate(sin(x)/(a-b*cos(x)),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\frac {\log \left (b \cos \left (x\right ) - a\right )}{b} \]

[In]

integrate(sin(x)/(a-b*cos(x)),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.17 \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\frac {\log \left ({\left | b \cos \left (x\right ) - a \right |}\right )}{b} \]

[In]

integrate(sin(x)/(a-b*cos(x)),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \frac {\sin (x)}{a-b \cos (x)} \, dx=\frac {\ln \left (b\,\cos \left (x\right )-a\right )}{b} \]

[In]

int(sin(x)/(a - b*cos(x)),x)

[Out]

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