Integrand size = 24, antiderivative size = 47 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=\frac {2 \sqrt [4]{-1} a \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}+\frac {2 i a}{d \sqrt {\cot (c+d x)}} \] Output:
2*(-1)^(1/4)*a*arctanh((-1)^(3/4)*cot(d*x+c)^(1/2))/d+2*I*a/d/cot(d*x+c)^( 1/2)
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.16 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.77 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=\frac {2 i a \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-i \cot (c+d x)\right )}{d \sqrt {\cot (c+d x)}} \] Input:
Integrate[(a + I*a*Tan[c + d*x])/Sqrt[Cot[c + d*x]],x]
Output:
((2*I)*a*Hypergeometric2F1[-1/2, 1, 1/2, (-I)*Cot[c + d*x]])/(d*Sqrt[Cot[c + d*x]])
Time = 0.40 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {3042, 4156, 3042, 4012, 3042, 4016, 221}
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 {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}}dx\) |
\(\Big \downarrow \) 4156 |
\(\displaystyle \int \frac {a \cot (c+d x)+i a}{\cot ^{\frac {3}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {-a \tan \left (c+d x+\frac {\pi }{2}\right )+i a}{\left (-\tan \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \int \frac {a-i a \cot (c+d x)}{\sqrt {\cot (c+d x)}}dx+\frac {2 i a}{d \sqrt {\cot (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {i \tan \left (c+d x+\frac {\pi }{2}\right ) a+a}{\sqrt {-\tan \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 i a}{d \sqrt {\cot (c+d x)}}\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle \frac {2 a^2 \int \frac {1}{-i \cot (c+d x) a-a}d\sqrt {\cot (c+d x)}}{d}+\frac {2 i a}{d \sqrt {\cot (c+d x)}}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {2 \sqrt [4]{-1} a \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}+\frac {2 i a}{d \sqrt {\cot (c+d x)}}\) |
Input:
Int[(a + I*a*Tan[c + d*x])/Sqrt[Cot[c + d*x]],x]
Output:
(2*(-1)^(1/4)*a*ArcTanh[(-1)^(3/4)*Sqrt[Cot[c + d*x]]])/d + ((2*I)*a)/(d*S qrt[Cot[c + d*x]])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ (f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x] )^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 ]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2*(c^2/f) Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b *Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]
Int[(cot[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p) Int[(d*Cot[e + f*x])^(m - n*p )*(b + a*Cot[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && !IntegerQ[m] && IntegersQ[n, p]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (38 ) = 76\).
Time = 0.37 (sec) , antiderivative size = 190, normalized size of antiderivative = 4.04
method | result | size |
derivativedivides | \(-\frac {a \left (\frac {\sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{4}-\frac {i \sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{4}-\frac {2 i}{\sqrt {\cot \left (d x +c \right )}}\right )}{d}\) | \(190\) |
default | \(-\frac {a \left (\frac {\sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{4}-\frac {i \sqrt {2}\, \left (\ln \left (\frac {\cot \left (d x +c \right )-\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}{\cot \left (d x +c \right )+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {\cot \left (d x +c \right )}\right )\right )}{4}-\frac {2 i}{\sqrt {\cot \left (d x +c \right )}}\right )}{d}\) | \(190\) |
Input:
int((a+I*a*tan(d*x+c))/cot(d*x+c)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/d*a*(1/4*2^(1/2)*(ln((cot(d*x+c)+2^(1/2)*cot(d*x+c)^(1/2)+1)/(cot(d*x+c )-2^(1/2)*cot(d*x+c)^(1/2)+1))+2*arctan(1+2^(1/2)*cot(d*x+c)^(1/2))+2*arct an(-1+2^(1/2)*cot(d*x+c)^(1/2)))-1/4*I*2^(1/2)*(ln((cot(d*x+c)-2^(1/2)*cot (d*x+c)^(1/2)+1)/(cot(d*x+c)+2^(1/2)*cot(d*x+c)^(1/2)+1))+2*arctan(1+2^(1/ 2)*cot(d*x+c)^(1/2))+2*arctan(-1+2^(1/2)*cot(d*x+c)^(1/2)))-2*I/cot(d*x+c) ^(1/2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 278 vs. \(2 (37) = 74\).
Time = 0.08 (sec) , antiderivative size = 278, normalized size of antiderivative = 5.91 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=-\frac {{\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {4 i \, a^{2}}{d^{2}}} \log \left (\frac {{\left ({\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {4 i \, a^{2}}{d^{2}}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} + 2 i \, a e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right ) - {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {4 i \, a^{2}}{d^{2}}} \log \left (-\frac {{\left ({\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {4 i \, a^{2}}{d^{2}}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} - 2 i \, a e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right ) - 8 \, {\left (a e^{\left (2 i \, d x + 2 i \, c\right )} - a\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}}{4 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:
integrate((a+I*a*tan(d*x+c))/cot(d*x+c)^(1/2),x, algorithm="fricas")
Output:
-1/4*((d*e^(2*I*d*x + 2*I*c) + d)*sqrt(4*I*a^2/d^2)*log(((d*e^(2*I*d*x + 2 *I*c) - d)*sqrt(4*I*a^2/d^2)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)) + 2*I*a*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)/a) - (d*e ^(2*I*d*x + 2*I*c) + d)*sqrt(4*I*a^2/d^2)*log(-((d*e^(2*I*d*x + 2*I*c) - d )*sqrt(4*I*a^2/d^2)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)) - 2*I*a*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)/a) - 8*(a*e^(2*I*d *x + 2*I*c) - a)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1 )))/(d*e^(2*I*d*x + 2*I*c) + d)
\[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=i a \left (\int \left (- \frac {i}{\sqrt {\cot {\left (c + d x \right )}}}\right )\, dx + \int \frac {\tan {\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\, dx\right ) \] Input:
integrate((a+I*a*tan(d*x+c))/cot(d*x+c)**(1/2),x)
Output:
I*a*(Integral(-I/sqrt(cot(c + d*x)), x) + Integral(tan(c + d*x)/sqrt(cot(c + d*x)), x))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (37) = 74\).
Time = 0.22 (sec) , antiderivative size = 127, normalized size of antiderivative = 2.70 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=-\frac {{\left (-\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (i + 1\right ) \, \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) - \left (i + 1\right ) \, \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} a - 8 i \, a \sqrt {\tan \left (d x + c\right )}}{4 \, d} \] Input:
integrate((a+I*a*tan(d*x+c))/cot(d*x+c)^(1/2),x, algorithm="maxima")
Output:
-1/4*((-(2*I - 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2/sqrt(tan(d*x + c )))) - (2*I - 2)*sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(2) - 2/sqrt(tan(d*x + c )))) + (I + 1)*sqrt(2)*log(sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) + 1 ) - (I + 1)*sqrt(2)*log(-sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) + 1)) *a - 8*I*a*sqrt(tan(d*x + c)))/d
Time = 0.14 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.77 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=-\frac {i \, {\left (\left (i + 1\right ) \, \sqrt {2} \arctan \left (-\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {\tan \left (d x + c\right )}\right ) - 2 \, \sqrt {\tan \left (d x + c\right )}\right )} a}{d} \] Input:
integrate((a+I*a*tan(d*x+c))/cot(d*x+c)^(1/2),x, algorithm="giac")
Output:
-I*((I + 1)*sqrt(2)*arctan(-(1/2*I - 1/2)*sqrt(2)*sqrt(tan(d*x + c))) - 2* sqrt(tan(d*x + c)))*a/d
Time = 2.99 (sec) , antiderivative size = 102, normalized size of antiderivative = 2.17 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=\frac {a\,2{}\mathrm {i}}{d\,\sqrt {\mathrm {cot}\left (c+d\,x\right )}}-\frac {{\left (-1\right )}^{1/4}\,a\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}}\right )}{d}+\frac {{\left (-1\right )}^{1/4}\,a\,\mathrm {atan}\left ({\left (-1\right )}^{1/4}\,\sqrt {\mathrm {cot}\left (c+d\,x\right )}\right )\,1{}\mathrm {i}}{d}-\frac {{\left (-1\right )}^{1/4}\,a\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}}\right )}{d}+\frac {{\left (-1\right )}^{1/4}\,a\,\mathrm {atanh}\left ({\left (-1\right )}^{1/4}\,\sqrt {\mathrm {cot}\left (c+d\,x\right )}\right )\,1{}\mathrm {i}}{d} \] Input:
int((a + a*tan(c + d*x)*1i)/cot(c + d*x)^(1/2),x)
Output:
(a*2i)/(d*cot(c + d*x)^(1/2)) - ((-1)^(1/4)*a*atan((-1)^(1/4)/cot(c + d*x) ^(1/2)))/d + ((-1)^(1/4)*a*atan((-1)^(1/4)*cot(c + d*x)^(1/2))*1i)/d - ((- 1)^(1/4)*a*atanh((-1)^(1/4)/cot(c + d*x)^(1/2)))/d + ((-1)^(1/4)*a*atanh(( -1)^(1/4)*cot(c + d*x)^(1/2))*1i)/d
\[ \int \frac {a+i a \tan (c+d x)}{\sqrt {\cot (c+d x)}} \, dx=a \left (\int \frac {\sqrt {\cot \left (d x +c \right )}}{\cot \left (d x +c \right )}d x +\left (\int \frac {\sqrt {\cot \left (d x +c \right )}\, \tan \left (d x +c \right )}{\cot \left (d x +c \right )}d x \right ) i \right ) \] Input:
int((a+I*a*tan(d*x+c))/cot(d*x+c)^(1/2),x)
Output:
a*(int(sqrt(cot(c + d*x))/cot(c + d*x),x) + int((sqrt(cot(c + d*x))*tan(c + d*x))/cot(c + d*x),x)*i)