Integrand size = 17, antiderivative size = 31 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\cot (x)}{\sqrt {a \csc ^2(x)}}-\frac {\text {arctanh}(\cos (x)) \csc (x)}{\sqrt {a \csc ^2(x)}} \] Output:
cot(x)/(a*csc(x)^2)^(1/2)-arctanh(cos(x))*csc(x)/(a*csc(x)^2)^(1/2)
Time = 0.08 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.03 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\csc (x) \left (\cos (x)-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )\right )}{\sqrt {a \csc ^2(x)}} \] Input:
Integrate[Cot[x]^2/Sqrt[a + a*Cot[x]^2],x]
Output:
(Csc[x]*(Cos[x] - Log[Cos[x/2]] + Log[Sin[x/2]]))/Sqrt[a*Csc[x]^2]
Time = 0.36 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.71, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {3042, 4140, 3042, 4613, 3042, 25, 3072, 262, 219}
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 ^2(x)}{\sqrt {a \cot ^2(x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan \left (x+\frac {\pi }{2}\right )^2}{\sqrt {a \tan \left (x+\frac {\pi }{2}\right )^2+a}}dx\) |
\(\Big \downarrow \) 4140 |
\(\displaystyle \int \frac {\cot ^2(x)}{\sqrt {a \csc ^2(x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan \left (x+\frac {\pi }{2}\right )^2}{\sqrt {a \sec \left (x+\frac {\pi }{2}\right )^2}}dx\) |
\(\Big \downarrow \) 4613 |
\(\displaystyle \frac {\csc (x) \int \cos (x) \cot (x)dx}{\sqrt {a \csc ^2(x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\csc (x) \int -\sin \left (x+\frac {\pi }{2}\right ) \tan \left (x+\frac {\pi }{2}\right )dx}{\sqrt {a \csc ^2(x)}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\csc (x) \int \sin \left (x+\frac {\pi }{2}\right ) \tan \left (x+\frac {\pi }{2}\right )dx}{\sqrt {a \csc ^2(x)}}\) |
\(\Big \downarrow \) 3072 |
\(\displaystyle -\frac {\csc (x) \int \frac {\cos ^2(x)}{1-\cos ^2(x)}d\cos (x)}{\sqrt {a \csc ^2(x)}}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle -\frac {\csc (x) \left (\int \frac {1}{1-\cos ^2(x)}d\cos (x)-\cos (x)\right )}{\sqrt {a \csc ^2(x)}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\csc (x) (\text {arctanh}(\cos (x))-\cos (x))}{\sqrt {a \csc ^2(x)}}\) |
Input:
Int[Cot[x]^2/Sqrt[a + a*Cot[x]^2],x]
Output:
-(((ArcTanh[Cos[x]] - Cos[x])*Csc[x])/Sqrt[a*Csc[x]^2])
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[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_ Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ (ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)], x ]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]
Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[A ctivateTrig[u*(a*sec[e + f*x]^2)^p], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ [a, b]
Int[(u_.)*((b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Simp[(b*ff^n)^IntPart[p]*((b*Sec[e + f*x]^ n)^FracPart[p]/(Sec[e + f*x]/ff)^(n*FracPart[p])) Int[ActivateTrig[u]*(Se c[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] && !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] || MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) / ; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]])
Time = 0.11 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.23
method | result | size |
derivativedivides | \(-\frac {\ln \left (\sqrt {a}\, \cot \left (x \right )+\sqrt {a +a \cot \left (x \right )^{2}}\right )}{\sqrt {a}}+\frac {\cot \left (x \right )}{\sqrt {a +a \cot \left (x \right )^{2}}}\) | \(38\) |
default | \(-\frac {\ln \left (\sqrt {a}\, \cot \left (x \right )+\sqrt {a +a \cot \left (x \right )^{2}}\right )}{\sqrt {a}}+\frac {\cot \left (x \right )}{\sqrt {a +a \cot \left (x \right )^{2}}}\) | \(38\) |
risch | \(\frac {i {\mathrm e}^{2 i x}}{2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}+\frac {i}{2 \left ({\mathrm e}^{2 i x}-1\right ) \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}}-\frac {i {\mathrm e}^{i x} \ln \left ({\mathrm e}^{i x}+1\right )}{\sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}+\frac {i {\mathrm e}^{i x} \ln \left ({\mathrm e}^{i x}-1\right )}{\sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}\) | \(157\) |
Input:
int(cot(x)^2/(a+a*cot(x)^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
-ln(a^(1/2)*cot(x)+(a+a*cot(x)^2)^(1/2))/a^(1/2)+cot(x)/(a+a*cot(x)^2)^(1/ 2)
Leaf count of result is larger than twice the leaf count of optimal. 77 vs. \(2 (27) = 54\).
Time = 0.09 (sec) , antiderivative size = 77, normalized size of antiderivative = 2.48 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\sqrt {2} \sqrt {-\frac {a}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) + \sqrt {a} \log \left (\frac {2 \, \sqrt {2} \sqrt {a} \sqrt {-\frac {a}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) - a \cos \left (2 \, x\right ) - 3 \, a}{\cos \left (2 \, x\right ) - 1}\right )}{2 \, a} \] Input:
integrate(cot(x)^2/(a+a*cot(x)^2)^(1/2),x, algorithm="fricas")
Output:
1/2*(sqrt(2)*sqrt(-a/(cos(2*x) - 1))*sin(2*x) + sqrt(a)*log((2*sqrt(2)*sqr t(a)*sqrt(-a/(cos(2*x) - 1))*sin(2*x) - a*cos(2*x) - 3*a)/(cos(2*x) - 1))) /a
\[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\int \frac {\cot ^{2}{\left (x \right )}}{\sqrt {a \left (\cot ^{2}{\left (x \right )} + 1\right )}}\, dx \] Input:
integrate(cot(x)**2/(a+a*cot(x)**2)**(1/2),x)
Output:
Integral(cot(x)**2/sqrt(a*(cot(x)**2 + 1)), x)
Time = 0.16 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.87 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=-\frac {\sqrt {-a} {\left (\arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - \arctan \left (\sin \left (x\right ), \cos \left (x\right ) - 1\right )\right )}}{a} \] Input:
integrate(cot(x)^2/(a+a*cot(x)^2)^(1/2),x, algorithm="maxima")
Output:
-sqrt(-a)*(arctan2(sin(x), cos(x) + 1) - arctan2(sin(x), cos(x) - 1))/a
Time = 0.17 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.58 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {1}{2} \, \sqrt {a} {\left (\frac {2 \, \cos \left (x\right )}{a \mathrm {sgn}\left (\sin \left (x\right )\right )} - \frac {\log \left (\cos \left (x\right ) + 1\right )}{a \mathrm {sgn}\left (\sin \left (x\right )\right )} + \frac {\log \left (-\cos \left (x\right ) + 1\right )}{a \mathrm {sgn}\left (\sin \left (x\right )\right )}\right )} \] Input:
integrate(cot(x)^2/(a+a*cot(x)^2)^(1/2),x, algorithm="giac")
Output:
1/2*sqrt(a)*(2*cos(x)/(a*sgn(sin(x))) - log(cos(x) + 1)/(a*sgn(sin(x))) + log(-cos(x) + 1)/(a*sgn(sin(x))))
Timed out. \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\int \frac {{\mathrm {cot}\left (x\right )}^2}{\sqrt {a\,{\mathrm {cot}\left (x\right )}^2+a}} \,d x \] Input:
int(cot(x)^2/(a + a*cot(x)^2)^(1/2),x)
Output:
int(cot(x)^2/(a + a*cot(x)^2)^(1/2), x)
\[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\sqrt {a}\, \left (\int \frac {\sqrt {\cot \left (x \right )^{2}+1}\, \cot \left (x \right )^{2}}{\cot \left (x \right )^{2}+1}d x \right )}{a} \] Input:
int(cot(x)^2/(a+a*cot(x)^2)^(1/2),x)
Output:
(sqrt(a)*int((sqrt(cot(x)**2 + 1)*cot(x)**2)/(cot(x)**2 + 1),x))/a