Integrand size = 11, antiderivative size = 54 \[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=\frac {\log (1-\cos (x))}{2 (a+b)}+\frac {\log (1+\cos (x))}{2 (a-b)}-\frac {a \log (a+b \cos (x))}{a^2-b^2} \] Output:
ln(1-cos(x))/(2*a+2*b)+ln(1+cos(x))/(2*a-2*b)-a*ln(a+b*cos(x))/(a^2-b^2)
Time = 0.10 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.93 \[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=\frac {\log \left (\cos \left (\frac {x}{2}\right )\right )}{a-b}-\frac {a \log (a+b \cos (x))}{a^2-b^2}+\frac {\log \left (\sin \left (\frac {x}{2}\right )\right )}{a+b} \] Input:
Integrate[Cot[x]/(a + b*Cos[x]),x]
Output:
Log[Cos[x/2]]/(a - b) - (a*Log[a + b*Cos[x]])/(a^2 - b^2) + Log[Sin[x/2]]/ (a + b)
Time = 0.26 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.09, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.727, Rules used = {3042, 25, 3200, 587, 16, 452, 219, 240}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot (x)}{a+b \cos (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\tan \left (x-\frac {\pi }{2}\right )}{a-b \sin \left (x-\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\tan \left (x-\frac {\pi }{2}\right )}{a-b \sin \left (x-\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle -\int \frac {b \cos (x)}{(a+b \cos (x)) \left (b^2-b^2 \cos ^2(x)\right )}d(b \cos (x))\) |
\(\Big \downarrow \) 587 |
\(\displaystyle \frac {\int \frac {b^2-a b \cos (x)}{b^2-b^2 \cos ^2(x)}d(b \cos (x))}{a^2-b^2}-\frac {a \int \frac {1}{a+b \cos (x)}d(b \cos (x))}{a^2-b^2}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \frac {\int \frac {b^2-a b \cos (x)}{b^2-b^2 \cos ^2(x)}d(b \cos (x))}{a^2-b^2}-\frac {a \log (a+b \cos (x))}{a^2-b^2}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle \frac {b^2 \int \frac {1}{b^2-b^2 \cos ^2(x)}d(b \cos (x))-a \int \frac {b \cos (x)}{b^2-b^2 \cos ^2(x)}d(b \cos (x))}{a^2-b^2}-\frac {a \log (a+b \cos (x))}{a^2-b^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {b \text {arctanh}(\cos (x))-a \int \frac {b \cos (x)}{b^2-b^2 \cos ^2(x)}d(b \cos (x))}{a^2-b^2}-\frac {a \log (a+b \cos (x))}{a^2-b^2}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle \frac {\frac {1}{2} a \log \left (b^2-b^2 \cos ^2(x)\right )+b \text {arctanh}(\cos (x))}{a^2-b^2}-\frac {a \log (a+b \cos (x))}{a^2-b^2}\) |
Input:
Int[Cot[x]/(a + b*Cos[x]),x]
Output:
-((a*Log[a + b*Cos[x]])/(a^2 - b^2)) + (b*ArcTanh[Cos[x]] + (a*Log[b^2 - b ^2*Cos[x]^2])/2)/(a^2 - b^2)
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[(x_.)/(((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[(- c)*(d/(b*c^2 + a*d^2)) Int[1/(c + d*x), x], x] + Simp[1/(b*c^2 + a*d^2) Int[(a*d + b*c*x)/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c ^2 + a*d^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[(x^p*(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] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 0.55 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00
method | result | size |
default | \(\frac {\ln \left (\cos \left (x \right )+1\right )}{2 a -2 b}+\frac {\ln \left (-1+\cos \left (x \right )\right )}{2 a +2 b}-\frac {a \ln \left (a +b \cos \left (x \right )\right )}{\left (a +b \right ) \left (a -b \right )}\) | \(54\) |
risch | \(-\frac {i x}{a -b}-\frac {i x}{a +b}+\frac {2 i x a}{a^{2}-b^{2}}+\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{a -b}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{a +b}-\frac {a \ln \left ({\mathrm e}^{2 i x}+\frac {2 a \,{\mathrm e}^{i x}}{b}+1\right )}{a^{2}-b^{2}}\) | \(101\) |
Input:
int(cot(x)/(a+b*cos(x)),x,method=_RETURNVERBOSE)
Output:
ln(cos(x)+1)/(2*a-2*b)+1/(2*a+2*b)*ln(-1+cos(x))-a/(a+b)/(a-b)*ln(a+b*cos( x))
Time = 0.09 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.98 \[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=-\frac {2 \, a \log \left (-b \cos \left (x\right ) - a\right ) - {\left (a + b\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - {\left (a - b\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{2 \, {\left (a^{2} - b^{2}\right )}} \] Input:
integrate(cot(x)/(a+b*cos(x)),x, algorithm="fricas")
Output:
-1/2*(2*a*log(-b*cos(x) - a) - (a + b)*log(1/2*cos(x) + 1/2) - (a - b)*log (-1/2*cos(x) + 1/2))/(a^2 - b^2)
\[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=\int \frac {\cot {\left (x \right )}}{a + b \cos {\left (x \right )}}\, dx \] Input:
integrate(cot(x)/(a+b*cos(x)),x)
Output:
Integral(cot(x)/(a + b*cos(x)), x)
Time = 0.03 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.89 \[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=-\frac {a \log \left (b \cos \left (x\right ) + a\right )}{a^{2} - b^{2}} + \frac {\log \left (\cos \left (x\right ) + 1\right )}{2 \, {\left (a - b\right )}} + \frac {\log \left (\cos \left (x\right ) - 1\right )}{2 \, {\left (a + b\right )}} \] Input:
integrate(cot(x)/(a+b*cos(x)),x, algorithm="maxima")
Output:
-a*log(b*cos(x) + a)/(a^2 - b^2) + 1/2*log(cos(x) + 1)/(a - b) + 1/2*log(c os(x) - 1)/(a + b)
Time = 0.35 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00 \[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=-\frac {a b \log \left ({\left | b \cos \left (x\right ) + a \right |}\right )}{a^{2} b - b^{3}} + \frac {\log \left (\cos \left (x\right ) + 1\right )}{2 \, {\left (a - b\right )}} + \frac {\log \left (-\cos \left (x\right ) + 1\right )}{2 \, {\left (a + b\right )}} \] Input:
integrate(cot(x)/(a+b*cos(x)),x, algorithm="giac")
Output:
-a*b*log(abs(b*cos(x) + a))/(a^2*b - b^3) + 1/2*log(cos(x) + 1)/(a - b) + 1/2*log(-cos(x) + 1)/(a + b)
Time = 41.71 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.87 \[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{a+b}-\frac {a\,\ln \left (a+b+a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\right )}{a^2-b^2} \] Input:
int(cot(x)/(a + b*cos(x)),x)
Output:
log(tan(x/2))/(a + b) - (a*log(a + b + a*tan(x/2)^2 - b*tan(x/2)^2))/(a^2 - b^2)
Time = 0.16 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.96 \[ \int \frac {\cot (x)}{a+b \cos (x)} \, dx=\frac {-\mathrm {log}\left (\tan \left (\frac {x}{2}\right )^{2} a -\tan \left (\frac {x}{2}\right )^{2} b +a +b \right ) a +\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) a -\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) b}{a^{2}-b^{2}} \] Input:
int(cot(x)/(a+b*cos(x)),x)
Output:
( - log(tan(x/2)**2*a - tan(x/2)**2*b + a + b)*a + log(tan(x/2))*a - log(t an(x/2))*b)/(a**2 - b**2)