Integrand size = 26, antiderivative size = 97 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {i a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{2 \sqrt {2} d}-\frac {i a^3 \sqrt {a+i a \tan (c+d x)}}{2 d \left (a^2-i a^2 \tan (c+d x)\right )} \] Output:
-1/4*I*a^(3/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))*2^(1/ 2)/d-1/2*I*a^3*(a+I*a*tan(d*x+c))^(1/2)/d/(a^2-I*a^2*tan(d*x+c))
Time = 0.15 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.95 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\frac {\sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right ) (1-i \tan (c+d x))+2 a \sqrt {a+i a \tan (c+d x)}}{4 d (i+\tan (c+d x))} \] Input:
Integrate[Cos[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]
Output:
(Sqrt[2]*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])]*(1 - I*Tan[c + d*x]) + 2*a*Sqrt[a + I*a*Tan[c + d*x]])/(4*d*(I + Tan[c + d*x] ))
Time = 0.26 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.87, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3042, 3968, 52, 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 \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^{3/2}}{\sec (c+d x)^2}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^3 \int \frac {1}{(a-i a \tan (c+d x))^2 \sqrt {i \tan (c+d x) a+a}}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 52 |
\(\displaystyle -\frac {i a^3 \left (\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))}{4 a}+\frac {\sqrt {a+i a \tan (c+d x)}}{2 a (a-i a \tan (c+d x))}\right )}{d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {i a^3 \left (\frac {\int \frac {1}{a^2 \tan ^2(c+d x)+2 a}d\sqrt {i \tan (c+d x) a+a}}{2 a}+\frac {\sqrt {a+i a \tan (c+d x)}}{2 a (a-i a \tan (c+d x))}\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {i a^3 \left (\frac {i \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2}}\right )}{2 \sqrt {2} a^{3/2}}+\frac {\sqrt {a+i a \tan (c+d x)}}{2 a (a-i a \tan (c+d x))}\right )}{d}\) |
Input:
Int[Cos[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]
Output:
((-I)*a^3*(((I/2)*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[2]])/(Sqrt[2]*a^(3/2) ) + Sqrt[a + I*a*Tan[c + d*x]]/(2*a*(a - I*a*Tan[c + d*x]))))/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] :> 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. 395 vs. \(2 (77 ) = 154\).
Time = 4.71 (sec) , antiderivative size = 396, normalized size of antiderivative = 4.08
method | result | size |
default | \(-\frac {\left (\left (\cos \left (d x +c \right )+1\right ) \sin \left (d x +c \right ) \operatorname {arctanh}\left (\frac {\left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ) \sqrt {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 ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+i \operatorname {arctanh}\left (\frac {\left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ) \sqrt {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 ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \left (\cos \left (d x +c \right )^{2}+\cos \left (d x +c \right )\right )+i \left (\cos \left (d x +c \right )+1\right ) \sin \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}}{2}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+\cos \left (d x +c \right ) \left (-\cos \left (d x +c \right )-1\right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}}{2}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+i \cos \left (d x +c \right ) \sin \left (d x +c \right )+\cos \left (d x +c \right ) \left (\cos \left (d x +c \right )+1\right )\right ) \cos \left (d x +c \right ) \left (-\tan \left (d x +c \right )+i\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a}{2 d \left (1+\cos \left (d x +c \right )+i \sin \left (d x +c \right )\right )}\) | \(396\) |
Input:
int(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x,method=_RETURNVERBOSE)
Output:
-1/2/d*((cos(d*x+c)+1)*sin(d*x+c)*arctanh(1/(cot(d*x+c)^2-2*cot(d*x+c)*csc (d*x+c)+csc(d*x+c)^2-1)^(1/2)*(csc(d*x+c)-cot(d*x+c))*2^(1/2))*(-cos(d*x+c )/(cos(d*x+c)+1))^(1/2)+I*arctanh(1/(cot(d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+ csc(d*x+c)^2-1)^(1/2)*(csc(d*x+c)-cot(d*x+c))*2^(1/2))*(-cos(d*x+c)/(cos(d *x+c)+1))^(1/2)*(cos(d*x+c)^2+cos(d*x+c))+I*(cos(d*x+c)+1)*sin(d*x+c)*arct an(1/2*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2))*(-cos(d*x+c)/(cos(d*x +c)+1))^(1/2)+cos(d*x+c)*(-cos(d*x+c)-1)*arctan(1/2*(-2*cos(d*x+c)/(cos(d* x+c)+1))^(1/2)*2^(1/2))*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)+I*sin(d*x+c)*co s(d*x+c)+cos(d*x+c)*(cos(d*x+c)+1))*cos(d*x+c)*(-tan(d*x+c)+I)*(a*(1+I*tan (d*x+c)))^(1/2)*a/(1+cos(d*x+c)+I*sin(d*x+c))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (72) = 144\).
Time = 0.08 (sec) , antiderivative size = 244, normalized size of antiderivative = 2.52 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {\sqrt {\frac {1}{2}} \sqrt {-\frac {a^{3}}{d^{2}}} d \log \left (-\frac {4 \, {\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^{3}}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - a^{2} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{a}\right ) - \sqrt {\frac {1}{2}} \sqrt {-\frac {a^{3}}{d^{2}}} d \log \left (-\frac {4 \, {\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^{3}}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - a^{2} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{a}\right ) - \sqrt {2} {\left (-i \, a e^{\left (3 i \, d x + 3 i \, c\right )} - i \, a e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{4 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="fricas")
Output:
-1/4*(sqrt(1/2)*sqrt(-a^3/d^2)*d*log(-4*(sqrt(2)*sqrt(1/2)*(I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt(-a^3/d^2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)) - a^2*e^ (I*d*x + I*c))*e^(-I*d*x - I*c)/a) - sqrt(1/2)*sqrt(-a^3/d^2)*d*log(-4*(sq rt(2)*sqrt(1/2)*(-I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt(-a^3/d^2)*sqrt(a/(e^ (2*I*d*x + 2*I*c) + 1)) - a^2*e^(I*d*x + I*c))*e^(-I*d*x - I*c)/a) - sqrt( 2)*(-I*a*e^(3*I*d*x + 3*I*c) - I*a*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2 *I*c) + 1)))/d
\[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}} \cos ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**2*(a+I*a*tan(d*x+c))**(3/2),x)
Output:
Integral((I*a*(tan(c + d*x) - I))**(3/2)*cos(c + d*x)**2, x)
Time = 0.14 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.01 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\frac {i \, {\left (\sqrt {2} a^{\frac {5}{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 ) + \frac {16 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{3}}{4 i \, a \tan \left (d x + c\right ) - 4 \, a}\right )}}{8 \, a d} \] Input:
integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="maxima")
Output:
1/8*I*(sqrt(2)*a^(5/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))) + 16*sqrt(I*a*tan(d*x + c ) + a)*a^3/(4*I*a*tan(d*x + c) - 4*a))/(a*d)
Exception generated. \[ \int \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 \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\int {\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 \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\sqrt {a}\, a \left (\left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )^{2} \tan \left (d x +c \right )d x \right ) i +\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )^{2}d x \right ) \] Input:
int(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x)
Output:
sqrt(a)*a*(int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)**2*tan(c + d*x),x)*i + int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)**2,x))