Integrand size = 21, antiderivative size = 106 \[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{d}-\frac {\sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{d}-\frac {\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{d} \] Output:
2*a^(1/2)*arctanh((a+b*sec(d*x+c))^(1/2)/a^(1/2))/d-(a-b)^(1/2)*arctanh((a +b*sec(d*x+c))^(1/2)/(a-b)^(1/2))/d-(a+b)^(1/2)*arctanh((a+b*sec(d*x+c))^( 1/2)/(a+b)^(1/2))/d
Time = 0.18 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.94 \[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=-\frac {-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )+\sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )+\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{d} \] Input:
Integrate[Cot[c + d*x]*Sqrt[a + b*Sec[c + d*x]],x]
Output:
-((-2*Sqrt[a]*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a]] + Sqrt[a - b]*ArcT anh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a - b]] + Sqrt[a + b]*ArcTanh[Sqrt[a + b *Sec[c + d*x]]/Sqrt[a + b]])/d)
Time = 0.37 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.11, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 25, 4373, 561, 1610, 2009}
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 \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\sqrt {a+b \csc \left (c+d x+\frac {\pi }{2}\right )}}{\cot \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\sqrt {a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )}}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )}dx\) |
\(\Big \downarrow \) 4373 |
\(\displaystyle -\frac {b^2 \int \frac {\cos (c+d x) \sqrt {a+b \sec (c+d x)}}{b \left (b^2-b^2 \sec ^2(c+d x)\right )}d(b \sec (c+d x))}{d}\) |
\(\Big \downarrow \) 561 |
\(\displaystyle -\frac {2 b^2 \int \frac {b^2 \sec ^2(c+d x)}{\left (a-b^2 \sec ^2(c+d x)\right ) \left (b^4 \sec ^4(c+d x)-2 a b^2 \sec ^2(c+d x)+a^2-b^2\right )}d\sqrt {a+b \sec (c+d x)}}{d}\) |
\(\Big \downarrow \) 1610 |
\(\displaystyle -\frac {2 b^2 \int \left (-\frac {a}{b^2 \left (a-b^2 \sec ^2(c+d x)\right )}+\frac {a+b}{2 b^2 \left (-b^2 \sec ^2(c+d x)+a+b\right )}+\frac {b-a}{2 b^2 \left (b^2 \sec ^2(c+d x)-a+b\right )}\right )d\sqrt {a+b \sec (c+d x)}}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 b^2 \left (-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{b^2}+\frac {\sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a-b}}\right )}{2 b^2}+\frac {\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )}{2 b^2}\right )}{d}\) |
Input:
Int[Cot[c + d*x]*Sqrt[a + b*Sec[c + d*x]],x]
Output:
(-2*b^2*(-((Sqrt[a]*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a]])/b^2) + (Sqr t[a - b]*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a - b]])/(2*b^2) + (Sqrt[a + b]*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a + b]])/(2*b^2)))/d
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbo l] :> With[{k = Denominator[n]}, Simp[k/d Subst[Int[x^(k*(n + 1) - 1)*(-c /d + x^k/d)^m*Simp[(b*c^2 + a*d^2)/d^2 - 2*b*c*(x^k/d^2) + b*(x^(2*k)/d^2), x]^p, x], x, (c + d*x)^(1/k)], x]] /; FreeQ[{a, b, c, d, m, p}, x] && Frac tionQ[n] && IntegerQ[p] && IntegerQ[m]
Int[(((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.))/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Int[ExpandIntegrand[(f*x)^m*((d + e*x^2)^q/(a + b*x^2 + c*x^4)), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b^2 - 4 *a*c, 0] && IntegerQ[q] && IntegerQ[m]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1)) Subst[Int[(b^2 - x^ 2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(543\) vs. \(2(88)=176\).
Time = 0.76 (sec) , antiderivative size = 544, normalized size of antiderivative = 5.13
method | result | size |
default | \(\frac {\left (2 \sqrt {a}\, \ln \left (4 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, \sqrt {a}\, \cos \left (d x +c \right )+4 \sqrt {a}\, \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}+4 a \cos \left (d x +c \right )+2 b \right ) \sqrt {a -b}-\sqrt {a +b}\, \ln \left (-\frac {2 \left (2 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, \sqrt {a +b}\, \cos \left (d x +c \right )+2 \sqrt {a +b}\, \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}+2 a \cos \left (d x +c \right )+b \cos \left (d x +c \right )+b \right )}{-1+\cos \left (d x +c \right )}\right ) \sqrt {a -b}+a \ln \left (\frac {2 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, \sqrt {a -b}\, \cos \left (d x +c \right )+2 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, \sqrt {a -b}-2 a \cos \left (d x +c \right )+b \cos \left (d x +c \right )-b}{\sqrt {a -b}\, \left (1+\cos \left (d x +c \right )\right )}\right )-\ln \left (\frac {2 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, \sqrt {a -b}\, \cos \left (d x +c \right )+2 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, \sqrt {a -b}-2 a \cos \left (d x +c \right )+b \cos \left (d x +c \right )-b}{\sqrt {a -b}\, \left (1+\cos \left (d x +c \right )\right )}\right ) b \right ) \sqrt {a +b \sec \left (d x +c \right )}\, \cos \left (d x +c \right )}{2 d \sqrt {a -b}\, \left (1+\cos \left (d x +c \right )\right ) \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}}\) | \(544\) |
Input:
int(cot(d*x+c)*(a+b*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
1/2/d/(a-b)^(1/2)*(2*a^(1/2)*ln(4*((b+a*cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+ c))^2)^(1/2)*a^(1/2)*cos(d*x+c)+4*a^(1/2)*((b+a*cos(d*x+c))*cos(d*x+c)/(1+ cos(d*x+c))^2)^(1/2)+4*a*cos(d*x+c)+2*b)*(a-b)^(1/2)-(a+b)^(1/2)*ln(-2*(2* ((b+a*cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*(a+b)^(1/2)*cos(d*x+c )+2*(a+b)^(1/2)*((b+a*cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)+2*a*c os(d*x+c)+b*cos(d*x+c)+b)/(-1+cos(d*x+c)))*(a-b)^(1/2)+a*ln(1/(a-b)^(1/2)* (2*((b+a*cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*(a-b)^(1/2)*cos(d* x+c)+2*((b+a*cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*(a-b)^(1/2)-2* a*cos(d*x+c)+b*cos(d*x+c)-b)/(1+cos(d*x+c)))-ln(1/(a-b)^(1/2)*(2*((b+a*cos (d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*(a-b)^(1/2)*cos(d*x+c)+2*((b+a *cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*(a-b)^(1/2)-2*a*cos(d*x+c) +b*cos(d*x+c)-b)/(1+cos(d*x+c)))*b)*(a+b*sec(d*x+c))^(1/2)*cos(d*x+c)/(1+c os(d*x+c))/((b+a*cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)
Leaf count of result is larger than twice the leaf count of optimal. 190 vs. \(2 (88) = 176\).
Time = 0.42 (sec) , antiderivative size = 2132, normalized size of antiderivative = 20.11 \[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\text {Too large to display} \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))^(1/2),x, algorithm="fricas")
Output:
[1/4*(2*sqrt(a)*log(-8*a^2*cos(d*x + c)^2 - 8*a*b*cos(d*x + c) - b^2 - 4*( 2*a*cos(d*x + c)^2 + b*cos(d*x + c))*sqrt(a)*sqrt((a*cos(d*x + c) + b)/cos (d*x + c))) + sqrt(a - b)*log(-((8*a^2 - 8*a*b + b^2)*cos(d*x + c)^2 + b^2 - 4*((2*a - b)*cos(d*x + c)^2 + b*cos(d*x + c))*sqrt(a - b)*sqrt((a*cos(d *x + c) + b)/cos(d*x + c)) + 2*(4*a*b - 3*b^2)*cos(d*x + c))/(cos(d*x + c) ^2 + 2*cos(d*x + c) + 1)) + sqrt(a + b)*log(-((8*a^2 + 8*a*b + b^2)*cos(d* x + c)^2 + b^2 - 4*((2*a + b)*cos(d*x + c)^2 + b*cos(d*x + c))*sqrt(a + b) *sqrt((a*cos(d*x + c) + b)/cos(d*x + c)) + 2*(4*a*b + 3*b^2)*cos(d*x + c)) /(cos(d*x + c)^2 - 2*cos(d*x + c) + 1)))/d, 1/4*(2*sqrt(-a - b)*arctan(2*s qrt(-a - b)*sqrt((a*cos(d*x + c) + b)/cos(d*x + c))*cos(d*x + c)/((2*a + b )*cos(d*x + c) + b)) + 2*sqrt(a)*log(-8*a^2*cos(d*x + c)^2 - 8*a*b*cos(d*x + c) - b^2 - 4*(2*a*cos(d*x + c)^2 + b*cos(d*x + c))*sqrt(a)*sqrt((a*cos( d*x + c) + b)/cos(d*x + c))) + sqrt(a - b)*log(-((8*a^2 - 8*a*b + b^2)*cos (d*x + c)^2 + b^2 - 4*((2*a - b)*cos(d*x + c)^2 + b*cos(d*x + c))*sqrt(a - b)*sqrt((a*cos(d*x + c) + b)/cos(d*x + c)) + 2*(4*a*b - 3*b^2)*cos(d*x + c))/(cos(d*x + c)^2 + 2*cos(d*x + c) + 1)))/d, -1/4*(2*sqrt(-a + b)*arctan (-2*sqrt(-a + b)*sqrt((a*cos(d*x + c) + b)/cos(d*x + c))*cos(d*x + c)/((2* a - b)*cos(d*x + c) + b)) - 2*sqrt(a)*log(-8*a^2*cos(d*x + c)^2 - 8*a*b*co s(d*x + c) - b^2 - 4*(2*a*cos(d*x + c)^2 + b*cos(d*x + c))*sqrt(a)*sqrt((a *cos(d*x + c) + b)/cos(d*x + c))) - sqrt(a + b)*log(-((8*a^2 + 8*a*b + ...
\[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int \sqrt {a + b \sec {\left (c + d x \right )}} \cot {\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))**(1/2),x)
Output:
Integral(sqrt(a + b*sec(c + d*x))*cot(c + d*x), x)
\[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int { \sqrt {b \sec \left (d x + c\right ) + a} \cot \left (d x + c\right ) \,d x } \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))^(1/2),x, algorithm="maxima")
Output:
integrate(sqrt(b*sec(d*x + c) + a)*cot(d*x + c), x)
Leaf count of result is larger than twice the leaf count of optimal. 293 vs. \(2 (88) = 176\).
Time = 0.40 (sec) , antiderivative size = 293, normalized size of antiderivative = 2.76 \[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=-\frac {{\left (\frac {4 \, a \arctan \left (-\frac {\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b} + \sqrt {a - b}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {2 \, {\left (a + b\right )} \arctan \left (-\frac {\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}}{\sqrt {-a - b}}\right )}{\sqrt {-a - b}} + \sqrt {a - b} \log \left ({\left | -{\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )} {\left (a - b\right )} + \sqrt {a - b} a \right |}\right )\right )} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{2 \, d} \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))^(1/2),x, algorithm="giac")
Output:
-1/2*(4*a*arctan(-1/2*(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2 *d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b) + sqrt(a - b))/sqrt(-a))/sqrt(-a) - 2*(a + b)*arctan(-(sqrt(a - b)* tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1 /2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b))/sqrt(-a - b))/sqrt(-a - b) + sqrt(a - b)*log(abs(-(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/ 2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a + b))*(a - b) + sqrt(a - b)*a)))*sgn(cos(d*x + c))/d
Timed out. \[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int \mathrm {cot}\left (c+d\,x\right )\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}} \,d x \] Input:
int(cot(c + d*x)*(a + b/cos(c + d*x))^(1/2),x)
Output:
int(cot(c + d*x)*(a + b/cos(c + d*x))^(1/2), x)
\[ \int \cot (c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int \sqrt {\sec \left (d x +c \right ) b +a}\, \cot \left (d x +c \right )d x \] Input:
int(cot(d*x+c)*(a+b*sec(d*x+c))^(1/2),x)
Output:
int(sqrt(sec(c + d*x)*b + a)*cot(c + d*x),x)