Integrand size = 17, antiderivative size = 71 \[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=-\frac {i \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}+\frac {i}{d \sqrt {a+i a \tan (c+d x)}} \] Output:
-1/2*I*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))*2^(1/2)/a^(1/ 2)/d+I/d/(a+I*a*tan(d*x+c))^(1/2)
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.05 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.68 \[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {i \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\frac {1}{2} (1+i \tan (c+d x))\right )}{d \sqrt {a+i a \tan (c+d x)}} \] Input:
Integrate[1/Sqrt[a + I*a*Tan[c + d*x]],x]
Output:
(I*Hypergeometric2F1[-1/2, 1, 1/2, (1 + I*Tan[c + d*x])/2])/(d*Sqrt[a + I* a*Tan[c + d*x]])
Time = 0.28 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3042, 3960, 3042, 3961, 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 {1}{\sqrt {a+i a \tan (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sqrt {a+i a \tan (c+d x)}}dx\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {\int \sqrt {i \tan (c+d x) a+a}dx}{2 a}+\frac {i}{d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sqrt {i \tan (c+d x) a+a}dx}{2 a}+\frac {i}{d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3961 |
\(\displaystyle \frac {i}{d \sqrt {a+i a \tan (c+d x)}}-\frac {i \int \frac {1}{a-i a \tan (c+d x)}d\sqrt {i \tan (c+d x) a+a}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {i}{d \sqrt {a+i a \tan (c+d x)}}-\frac {i \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}\) |
Input:
Int[1/Sqrt[a + I*a*Tan[c + d*x]],x]
Output:
((-I)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/(Sqrt[2]*Sqrt [a]*d) + I/(d*Sqrt[a + I*a*Tan[c + d*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[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a*((a + b*Tan[c + d*x])^n/(2*b*d*n)), x] + Simp[1/(2*a) Int[(a + b*Tan[c + d*x])^ (n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, 0]
Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*(b/d) Subst[Int[1/(2*a - x^2), x], x, Sqrt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a , b, c, d}, x] && EqQ[a^2 + b^2, 0]
Time = 1.38 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.83
method | result | size |
derivativedivides | \(\frac {2 i a \left (\frac {1}{2 a \sqrt {a +i a \tan \left (d x +c \right )}}-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{4 a^{\frac {3}{2}}}\right )}{d}\) | \(59\) |
default | \(\frac {2 i a \left (\frac {1}{2 a \sqrt {a +i a \tan \left (d x +c \right )}}-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{4 a^{\frac {3}{2}}}\right )}{d}\) | \(59\) |
Input:
int(1/(a+I*a*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
2*I/d*a*(1/2/a/(a+I*a*tan(d*x+c))^(1/2)-1/4/a^(3/2)*2^(1/2)*arctanh(1/2*(a +I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (52) = 104\).
Time = 0.08 (sec) , antiderivative size = 238, normalized size of antiderivative = 3.35 \[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {{\left (-i \, \sqrt {2} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (4 \, {\left ({\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} + a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + i \, \sqrt {2} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (-4 \, {\left ({\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} - a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - 2 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-i \, e^{\left (2 i \, d x + 2 i \, c\right )} - i\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, a d} \] Input:
integrate(1/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="fricas")
Output:
1/4*(-I*sqrt(2)*a*d*sqrt(1/(a*d^2))*e^(I*d*x + I*c)*log(4*((a*d*e^(2*I*d*x + 2*I*c) + a*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(1/(a*d^2)) + a*e^( I*d*x + I*c))*e^(-I*d*x - I*c)) + I*sqrt(2)*a*d*sqrt(1/(a*d^2))*e^(I*d*x + I*c)*log(-4*((a*d*e^(2*I*d*x + 2*I*c) + a*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(1/(a*d^2)) - a*e^(I*d*x + I*c))*e^(-I*d*x - I*c)) - 2*sqrt(2)*s qrt(a/(e^(2*I*d*x + 2*I*c) + 1))*(-I*e^(2*I*d*x + 2*I*c) - I))*e^(-I*d*x - I*c)/(a*d)
\[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {1}{\sqrt {i a \tan {\left (c + d x \right )} + a}}\, dx \] Input:
integrate(1/(a+I*a*tan(d*x+c))**(1/2),x)
Output:
Integral(1/sqrt(I*a*tan(c + d*x) + a), x)
Time = 0.11 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.14 \[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {i \, {\left (\sqrt {2} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + \frac {4 \, a}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\right )}}{4 \, a d} \] Input:
integrate(1/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="maxima")
Output:
1/4*I*(sqrt(2)*sqrt(a)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a)) /(sqrt(2)*sqrt(a) + sqrt(I*a*tan(d*x + c) + a))) + 4*a/sqrt(I*a*tan(d*x + c) + a))/(a*d)
Exception generated. \[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(1/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument TypeError: Bad Argument TypeDone
Time = 1.00 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.85 \[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {1{}\mathrm {i}}{d\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}+\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{2\,\sqrt {-a}\,d} \] Input:
int(1/(a + a*tan(c + d*x)*1i)^(1/2),x)
Output:
1i/(d*(a + a*tan(c + d*x)*1i)^(1/2)) + (2^(1/2)*atan((2^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(2*(-a)^(1/2)))*1i)/(2*(-a)^(1/2)*d)
\[ \int \frac {1}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {2 \sqrt {a}\, i \left (-\sqrt {\tan \left (d x +c \right ) i +1}-2 \left (\int \frac {\sqrt {\tan \left (d x +c \right ) i +1}\, \tan \left (d x +c \right )}{\tan \left (d x +c \right )^{2}+1}d x \right ) \tan \left (d x +c \right )^{2} d -2 \left (\int \frac {\sqrt {\tan \left (d x +c \right ) i +1}\, \tan \left (d x +c \right )}{\tan \left (d x +c \right )^{2}+1}d x \right ) d \right )}{a d \left (\tan \left (d x +c \right )^{2}+1\right )} \] Input:
int(1/(a+I*a*tan(d*x+c))^(1/2),x)
Output:
(2*sqrt(a)*i*( - sqrt(tan(c + d*x)*i + 1) - 2*int((sqrt(tan(c + d*x)*i + 1 )*tan(c + d*x))/(tan(c + d*x)**2 + 1),x)*tan(c + d*x)**2*d - 2*int((sqrt(t an(c + d*x)*i + 1)*tan(c + d*x))/(tan(c + d*x)**2 + 1),x)*d))/(a*d*(tan(c + d*x)**2 + 1))