Integrand size = 26, antiderivative size = 179 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=-\frac {7 i \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{16 \sqrt {2} a^{3/2} d}+\frac {7 i a}{20 d (a+i a \tan (c+d x))^{5/2}}+\frac {7 i}{24 d (a+i a \tan (c+d x))^{3/2}}+\frac {7 i}{16 a d \sqrt {a+i a \tan (c+d x)}}-\frac {i a^3}{2 d (a+i a \tan (c+d x))^{5/2} \left (a^2-i a^2 \tan (c+d x)\right )} \] Output:
-7/32*I*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))*2^(1/2)/a^(3 /2)/d+7/20*I*a/d/(a+I*a*tan(d*x+c))^(5/2)+7/24*I/d/(a+I*a*tan(d*x+c))^(3/2 )+7/16*I/a/d/(a+I*a*tan(d*x+c))^(1/2)-1/2*I*a^3/d/(a+I*a*tan(d*x+c))^(5/2) /(a^2-I*a^2*tan(d*x+c))
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.18 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.28 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=\frac {i a \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},2,-\frac {3}{2},\frac {1}{2} (1+i \tan (c+d x))\right )}{10 d (a+i a \tan (c+d x))^{5/2}} \] Input:
Integrate[Cos[c + d*x]^2/(a + I*a*Tan[c + d*x])^(3/2),x]
Output:
((I/10)*a*Hypergeometric2F1[-5/2, 2, -3/2, (1 + I*Tan[c + d*x])/2])/(d*(a + I*a*Tan[c + d*x])^(5/2))
Time = 0.32 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.98, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 3968, 52, 61, 61, 61, 73, 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 ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^2 (a+i a \tan (c+d x))^{3/2}}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^3 \int \frac {1}{(a-i a \tan (c+d x))^2 (i \tan (c+d x) a+a)^{7/2}}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 52 |
\(\displaystyle -\frac {i a^3 \left (\frac {7 \int \frac {1}{(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^{7/2}}d(i a \tan (c+d x))}{4 a}+\frac {1}{2 a (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{5/2}}\right )}{d}\) |
\(\Big \downarrow \) 61 |
\(\displaystyle -\frac {i a^3 \left (\frac {7 \left (\frac {\int \frac {1}{(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^{5/2}}d(i a \tan (c+d x))}{2 a}-\frac {1}{5 a (a+i a \tan (c+d x))^{5/2}}\right )}{4 a}+\frac {1}{2 a (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{5/2}}\right )}{d}\) |
\(\Big \downarrow \) 61 |
\(\displaystyle -\frac {i a^3 \left (\frac {7 \left (\frac {\frac {\int \frac {1}{(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^{3/2}}d(i a \tan (c+d x))}{2 a}-\frac {1}{3 a (a+i a \tan (c+d x))^{3/2}}}{2 a}-\frac {1}{5 a (a+i a \tan (c+d x))^{5/2}}\right )}{4 a}+\frac {1}{2 a (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{5/2}}\right )}{d}\) |
\(\Big \downarrow \) 61 |
\(\displaystyle -\frac {i a^3 \left (\frac {7 \left (\frac {\frac {\frac {\int \frac {1}{(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}d(i a \tan (c+d x))}{2 a}-\frac {1}{a \sqrt {a+i a \tan (c+d x)}}}{2 a}-\frac {1}{3 a (a+i a \tan (c+d x))^{3/2}}}{2 a}-\frac {1}{5 a (a+i a \tan (c+d x))^{5/2}}\right )}{4 a}+\frac {1}{2 a (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{5/2}}\right )}{d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {i a^3 \left (\frac {7 \left (\frac {\frac {\frac {\int \frac {1}{a^2 \tan ^2(c+d x)+2 a}d\sqrt {i \tan (c+d x) a+a}}{a}-\frac {1}{a \sqrt {a+i a \tan (c+d x)}}}{2 a}-\frac {1}{3 a (a+i a \tan (c+d x))^{3/2}}}{2 a}-\frac {1}{5 a (a+i a \tan (c+d x))^{5/2}}\right )}{4 a}+\frac {1}{2 a (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{5/2}}\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {i a^3 \left (\frac {7 \left (\frac {\frac {\frac {i \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2}}\right )}{\sqrt {2} a^{3/2}}-\frac {1}{a \sqrt {a+i a \tan (c+d x)}}}{2 a}-\frac {1}{3 a (a+i a \tan (c+d x))^{3/2}}}{2 a}-\frac {1}{5 a (a+i a \tan (c+d x))^{5/2}}\right )}{4 a}+\frac {1}{2 a (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{5/2}}\right )}{d}\) |
Input:
Int[Cos[c + d*x]^2/(a + I*a*Tan[c + d*x])^(3/2),x]
Output:
((-I)*a^3*(1/(2*a*(a - I*a*Tan[c + d*x])*(a + I*a*Tan[c + d*x])^(5/2)) + ( 7*(-1/5*1/(a*(a + I*a*Tan[c + d*x])^(5/2)) + (-1/3*1/(a*(a + I*a*Tan[c + d *x])^(3/2)) + ((I*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[2]])/(Sqrt[2]*a^(3/2) ) - 1/(a*Sqrt[a + I*a*Tan[c + d*x]]))/(2*a))/(2*a)))/(4*a)))/d
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((b*c - a*d)*(m + 1))), x] - Simp[d*(( m + n + 2)/((b*c - a*d)*(m + 1))) Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && ILtQ[m, -1] && FractionQ[n] && LtQ[n, 0]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((b*c - a*d)*(m + 1))), x] - Simp[d*(( m + n + 2)/((b*c - a*d)*(m + 1))) Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && LtQ[m, -1] && !(LtQ[n, -1] && (EqQ[a, 0 ] || (NeQ[c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && IntLinearQ[a, b, c, d , m, n, x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, 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[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[1/(a^(m - 2)*b*f) Subst[Int[(a - x)^(m/2 - 1)*(a + x )^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 377 vs. \(2 (141 ) = 282\).
Time = 9.46 (sec) , antiderivative size = 378, normalized size of antiderivative = 2.11
method | result | size |
default | \(\frac {\operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )+i\right )}{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 (-210 \sin \left (d x +c \right )-105 \tan \left (d x +c \right )\right )+i \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )+i\right )}{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 (210 \cos \left (d x +c \right )+105-105 \sec \left (d x +c \right )\right )-105 i \tan \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}-105 \sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}+i \sin \left (d x +c \right ) \left (168 \cos \left (d x +c \right )^{2}+168 \cos \left (d x +c \right )-210\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+\left (72 \cos \left (d x +c \right )^{3}+72 \cos \left (d x +c \right )^{2}-350 \cos \left (d x +c \right )-140\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}{480 d \left (\cos \left (d x +c \right )+1\right ) \left (-\tan \left (d x +c \right )+i\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, a \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}}\) | \(378\) |
Input:
int(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^(3/2),x,method=_RETURNVERBOSE)
Output:
1/480/d/(cos(d*x+c)+1)/(-tan(d*x+c)+I)/(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)/ a/(a*(1+I*tan(d*x+c)))^(1/2)*(arctanh(1/2*2^(1/2)*(cot(d*x+c)-csc(d*x+c)+I )/(cot(d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+csc(d*x+c)^2-1)^(1/2))*(-210*sin(d *x+c)-105*tan(d*x+c))+I*arctanh(1/2*2^(1/2)*(cot(d*x+c)-csc(d*x+c)+I)/(cot (d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+csc(d*x+c)^2-1)^(1/2))*(210*cos(d*x+c)+1 05-105*sec(d*x+c))-105*I*tan(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2 ^(1/2)-105*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2)+I*sin(d*x+c)*(168* cos(d*x+c)^2+168*cos(d*x+c)-210)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)+(72*co s(d*x+c)^3+72*cos(d*x+c)^2-350*cos(d*x+c)-140)*(-cos(d*x+c)/(cos(d*x+c)+1) )^(1/2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 294 vs. \(2 (130) = 260\).
Time = 0.09 (sec) , antiderivative size = 294, normalized size of antiderivative = 1.64 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=\frac {{\left (-105 i \, \sqrt {\frac {1}{2}} a^{2} d \sqrt {\frac {1}{a^{3} d^{2}}} e^{\left (5 i \, d x + 5 i \, c\right )} \log \left (4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{3} d^{2}}} + a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 105 i \, \sqrt {\frac {1}{2}} a^{2} d \sqrt {\frac {1}{a^{3} d^{2}}} e^{\left (5 i \, d x + 5 i \, c\right )} \log \left (-4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{3} d^{2}}} - a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-15 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 101 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 148 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 38 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 6 i\right )}\right )} e^{\left (-5 i \, d x - 5 i \, c\right )}}{480 \, a^{2} d} \] Input:
integrate(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^(3/2),x, algorithm="fricas")
Output:
1/480*(-105*I*sqrt(1/2)*a^2*d*sqrt(1/(a^3*d^2))*e^(5*I*d*x + 5*I*c)*log(4* (sqrt(2)*sqrt(1/2)*(a^2*d*e^(2*I*d*x + 2*I*c) + a^2*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(1/(a^3*d^2)) + a*e^(I*d*x + I*c))*e^(-I*d*x - I*c)) + 105*I*sqrt(1/2)*a^2*d*sqrt(1/(a^3*d^2))*e^(5*I*d*x + 5*I*c)*log(-4*(sqrt(2 )*sqrt(1/2)*(a^2*d*e^(2*I*d*x + 2*I*c) + a^2*d)*sqrt(a/(e^(2*I*d*x + 2*I*c ) + 1))*sqrt(1/(a^3*d^2)) - a*e^(I*d*x + I*c))*e^(-I*d*x - I*c)) + sqrt(2) *sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*(-15*I*e^(8*I*d*x + 8*I*c) + 101*I*e^(6 *I*d*x + 6*I*c) + 148*I*e^(4*I*d*x + 4*I*c) + 38*I*e^(2*I*d*x + 2*I*c) + 6 *I))*e^(-5*I*d*x - 5*I*c)/(a^2*d)
\[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=\int \frac {\cos ^{2}{\left (c + d x \right )}}{\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}}}\, dx \] Input:
integrate(cos(d*x+c)**2/(a+I*a*tan(d*x+c))**(3/2),x)
Output:
Integral(cos(c + d*x)**2/(I*a*(tan(c + d*x) - I))**(3/2), x)
Time = 0.13 (sec) , antiderivative size = 153, normalized size of antiderivative = 0.85 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=\frac {i \, {\left (\frac {105 \, \sqrt {2} \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 )}{\sqrt {a}} + \frac {4 \, {\left (105 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} - 140 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} a - 56 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{2} - 48 \, a^{3}\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {7}{2}} - 2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} a}\right )}}{960 \, a d} \] Input:
integrate(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^(3/2),x, algorithm="maxima")
Output:
1/960*I*(105*sqrt(2)*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)))/sqrt(a) + 4*(105*(I*a*tan(d *x + c) + a)^3 - 140*(I*a*tan(d*x + c) + a)^2*a - 56*(I*a*tan(d*x + c) + a )*a^2 - 48*a^3)/((I*a*tan(d*x + c) + a)^(7/2) - 2*(I*a*tan(d*x + c) + a)^( 5/2)*a))/(a*d)
Exception generated. \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^(3/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 ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^2}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}} \,d x \] Input:
int(cos(c + d*x)^2/(a + a*tan(c + d*x)*1i)^(3/2),x)
Output:
int(cos(c + d*x)^2/(a + a*tan(c + d*x)*1i)^(3/2), x)
\[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx=\frac {\int \frac {\cos \left (d x +c \right )^{2}}{\sqrt {\tan \left (d x +c \right ) i +1}\, \tan \left (d x +c \right ) i +\sqrt {\tan \left (d x +c \right ) i +1}}d x}{\sqrt {a}\, a} \] Input:
int(cos(d*x+c)^2/(a+I*a*tan(d*x+c))^(3/2),x)
Output:
int(cos(c + d*x)**2/(sqrt(tan(c + d*x)*i + 1)*tan(c + d*x)*i + sqrt(tan(c + d*x)*i + 1)),x)/(sqrt(a)*a)