Integrand size = 24, antiderivative size = 122 \[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {3 i \text {arctanh}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {2} \sqrt {a} d}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d} \] Output:
3/8*I*arctanh(1/2*a^(1/2)*sec(d*x+c)*2^(1/2)/(a+I*a*tan(d*x+c))^(1/2))*2^( 1/2)/a^(1/2)/d+1/2*I*cos(d*x+c)/d/(a+I*a*tan(d*x+c))^(1/2)-3/4*I*cos(d*x+c )*(a+I*a*tan(d*x+c))^(1/2)/a/d
Time = 0.57 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.79 \[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\sec (c+d x) \left (3 i \sqrt {1+e^{2 i (c+d x)}} \text {arctanh}\left (\sqrt {1+e^{2 i (c+d x)}}\right )-i (1+\cos (2 (c+d x))+3 i \sin (2 (c+d x)))\right )}{8 d \sqrt {a+i a \tan (c+d x)}} \] Input:
Integrate[Cos[c + d*x]/Sqrt[a + I*a*Tan[c + d*x]],x]
Output:
(Sec[c + d*x]*((3*I)*Sqrt[1 + E^((2*I)*(c + d*x))]*ArcTanh[Sqrt[1 + E^((2* I)*(c + d*x))]] - I*(1 + Cos[2*(c + d*x)] + (3*I)*Sin[2*(c + d*x)])))/(8*d *Sqrt[a + I*a*Tan[c + d*x]])
Time = 0.49 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.01, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {3042, 3983, 3042, 3971, 3042, 3970, 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 {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x) \sqrt {a+i a \tan (c+d x)}}dx\) |
\(\Big \downarrow \) 3983 |
\(\displaystyle \frac {3 \int \cos (c+d x) \sqrt {i \tan (c+d x) a+a}dx}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 \int \frac {\sqrt {i \tan (c+d x) a+a}}{\sec (c+d x)}dx}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3971 |
\(\displaystyle \frac {3 \left (\frac {1}{2} a \int \frac {\sec (c+d x)}{\sqrt {i \tan (c+d x) a+a}}dx-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 \left (\frac {1}{2} a \int \frac {\sec (c+d x)}{\sqrt {i \tan (c+d x) a+a}}dx-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 3970 |
\(\displaystyle \frac {3 \left (\frac {i a \int \frac {1}{2-\frac {a \sec ^2(c+d x)}{i \tan (c+d x) a+a}}d\frac {\sec (c+d x)}{\sqrt {i \tan (c+d x) a+a}}}{d}-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {3 \left (\frac {i \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {2} d}-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\) |
Input:
Int[Cos[c + d*x]/Sqrt[a + I*a*Tan[c + d*x]],x]
Output:
((I/2)*Cos[c + d*x])/(d*Sqrt[a + I*a*Tan[c + d*x]]) + (3*((I*Sqrt[a]*ArcTa nh[(Sqrt[a]*Sec[c + d*x])/(Sqrt[2]*Sqrt[a + I*a*Tan[c + d*x]])])/(Sqrt[2]* d) - (I*Cos[c + d*x]*Sqrt[a + I*a*Tan[c + d*x]])/d))/(4*a)
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[sec[(e_.) + (f_.)*(x_)]/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_S ymbol] :> Simp[-2*(a/(b*f)) Subst[Int[1/(2 - a*x^2), x], x, Sec[e + f*x]/ Sqrt[a + b*Tan[e + f*x]]], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 + b^2, 0 ]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/ (a*f*m)), x] + Simp[a/(2*d^2) Int[(d*Sec[e + f*x])^(m + 2)*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 + b^2, 0] && EqQ[m/2 + n, 0] && GtQ[n, 0]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[a*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/ (b*f*(m + 2*n))), x] + Simp[Simplify[m + n]/(a*(m + 2*n)) Int[(d*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x ] && EqQ[a^2 + b^2, 0] && LtQ[n, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2* n]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 321 vs. \(2 (97 ) = 194\).
Time = 9.28 (sec) , antiderivative size = 322, normalized size of antiderivative = 2.64
method | result | size |
default | \(-\frac {3 i \sin \left (d x +c \right ) \operatorname {arctanh}\left (\frac {\left (i-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ) \sqrt {2}}{2 \sqrt {\cot \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}}\right )+\left (3 \cos \left (d x +c \right )+3\right ) \operatorname {arctanh}\left (\frac {\left (i-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ) \sqrt {2}}{2 \sqrt {\cot \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}}\right )+3 i \cos \left (d x +c \right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-3 \sin \left (d x +c \right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+i \cos \left (d x +c \right ) \left (2 \cos \left (d x +c \right )-4\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-6 \sin \left (d x +c \right ) \cos \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}{8 d \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}}\) | \(322\) |
Input:
int(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/8/d*(3*I*sin(d*x+c)*arctanh(1/2/(cot(d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+c sc(d*x+c)^2-1)^(1/2)*(I-cot(d*x+c)+csc(d*x+c))*2^(1/2))+(3*cos(d*x+c)+3)*a rctanh(1/2/(cot(d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+csc(d*x+c)^2-1)^(1/2)*(I- cot(d*x+c)+csc(d*x+c))*2^(1/2))+3*I*cos(d*x+c)*2^(1/2)*(-2*cos(d*x+c)/(cos (d*x+c)+1))^(1/2)-3*sin(d*x+c)*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2 )+I*cos(d*x+c)*(2*cos(d*x+c)-4)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)-6*sin(d *x+c)*cos(d*x+c)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2))/(cos(d*x+c)+1)/(-cos( d*x+c)/(cos(d*x+c)+1))^(1/2)/(a*(1+I*tan(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. 245 vs. \(2 (91) = 182\).
Time = 0.09 (sec) , antiderivative size = 245, normalized size of antiderivative = 2.01 \[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {{\left (-3 i \, \sqrt {\frac {1}{2}} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (-\frac {3 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{2 \, d}\right ) + 3 i \, \sqrt {\frac {1}{2}} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (-\frac {3 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{2 \, d}\right ) + \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-2 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{8 \, a d} \] Input:
integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="fricas")
Output:
1/8*(-3*I*sqrt(1/2)*a*d*sqrt(1/(a*d^2))*e^(2*I*d*x + 2*I*c)*log(-3/2*(sqrt (2)*sqrt(1/2)*(I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(1/(a*d^2)) - I)*e^(-I*d*x - I*c)/d) + 3*I*sqrt(1/2)*a*d*sqrt(1/ (a*d^2))*e^(2*I*d*x + 2*I*c)*log(-3/2*(sqrt(2)*sqrt(1/2)*(-I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(1/(a*d^2)) - I)*e^( -I*d*x - I*c)/d) + sqrt(2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*(-2*I*e^(4*I* d*x + 4*I*c) - I*e^(2*I*d*x + 2*I*c) + I))*e^(-2*I*d*x - 2*I*c)/(a*d)
\[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {\cos {\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \] Input:
integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))**(1/2),x)
Output:
Integral(cos(c + d*x)/sqrt(I*a*(tan(c + d*x) - I)), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 837 vs. \(2 (91) = 182\).
Time = 0.25 (sec) , antiderivative size = 837, normalized size of antiderivative = 6.86 \[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="maxima")
Output:
-1/32*(4*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1 )^(1/4)*((-I*sqrt(2)*cos(2*d*x + 2*c) - sqrt(2)*sin(2*d*x + 2*c) + 2*I*sqr t(2))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + (sqrt(2)* cos(2*d*x + 2*c) - I*sqrt(2)*sin(2*d*x + 2*c) - 2*sqrt(2))*sin(1/2*arctan2 (sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))*sqrt(a) + 3*(2*sqrt(2)*arctan2( (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*s in(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c) ^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(si n(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 1) - 2*sqrt(2)*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arc tan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(2 *d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - 1) - I*sqrt(2)*log(sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2* c)^2 + 2*cos(2*d*x + 2*c) + 1)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + 2*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1) ) + 1) + I*sqrt(2)*log(sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*co s(2*d*x + 2*c) + 1)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) ...
Exception generated. \[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(cos(d*x+c)/(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
Timed out. \[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {\cos \left (c+d\,x\right )}{\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \] Input:
int(cos(c + d*x)/(a + a*tan(c + d*x)*1i)^(1/2),x)
Output:
int(cos(c + d*x)/(a + a*tan(c + d*x)*1i)^(1/2), x)
\[ \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\sqrt {a}\, \left (-\left (\int \frac {\sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right ) \tan \left (d x +c \right )}{\tan \left (d x +c \right )^{2}+1}d x \right ) i +\int \frac {\sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )}{\tan \left (d x +c \right )^{2}+1}d x \right )}{a} \] Input:
int(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x)
Output:
(sqrt(a)*( - int((sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)*tan(c + d*x))/(tan (c + d*x)**2 + 1),x)*i + int((sqrt(tan(c + d*x)*i + 1)*cos(c + d*x))/(tan( c + d*x)**2 + 1),x)))/a