Integrand size = 26, antiderivative size = 101 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\frac {2 i \sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d} \] Output:
2*I*2^(1/2)*a^(3/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/ d-2*I*a*(a+I*a*tan(d*x+c))^(1/2)/d-2/5*I*(a+I*a*tan(d*x+c))^(5/2)/a/d
Time = 0.38 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.94 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\frac {10 i \sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )+2 a \sqrt {a+i a \tan (c+d x)} \left (-6 i+2 \tan (c+d x)+i \tan ^2(c+d x)\right )}{5 d} \] Input:
Integrate[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]
Output:
((10*I)*Sqrt[2]*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a ])] + 2*a*Sqrt[a + I*a*Tan[c + d*x]]*(-6*I + 2*Tan[c + d*x] + I*Tan[c + d* x]^2))/(5*d)
Time = 0.43 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 4026, 25, 3042, 3959, 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 \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^2 (a+i a \tan (c+d x))^{3/2}dx\) |
\(\Big \downarrow \) 4026 |
\(\displaystyle \int -(i \tan (c+d x) a+a)^{3/2}dx-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int (i \tan (c+d x) a+a)^{3/2}dx-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\int (i \tan (c+d x) a+a)^{3/2}dx-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}\) |
\(\Big \downarrow \) 3959 |
\(\displaystyle -2 a \int \sqrt {i \tan (c+d x) a+a}dx-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -2 a \int \sqrt {i \tan (c+d x) a+a}dx-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}\) |
\(\Big \downarrow \) 3961 |
\(\displaystyle \frac {4 i a^2 \int \frac {1}{a-i a \tan (c+d x)}d\sqrt {i \tan (c+d x) a+a}}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {2 i \sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}\) |
Input:
Int[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]
Output:
((2*I)*Sqrt[2]*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a] )])/d - ((2*I)*a*Sqrt[a + I*a*Tan[c + d*x]])/d - (((2*I)/5)*(a + I*a*Tan[c + d*x])^(5/2))/(a*d)
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[b*((a + b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[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] && GtQ[n , 1]
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]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[d^2*((a + b*Tan[e + f*x])^(m + 1)/(b*f*( m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e + f* x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && !LeQ [m, -1] && !(EqQ[m, 2] && EqQ[a, 0])
Time = 1.40 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.75
method | result | size |
derivativedivides | \(\frac {2 i \left (-\frac {\left (a +i a \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-a^{2} \sqrt {a +i a \tan \left (d x +c \right )}+a^{\frac {5}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d a}\) | \(76\) |
default | \(\frac {2 i \left (-\frac {\left (a +i a \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-a^{2} \sqrt {a +i a \tan \left (d x +c \right )}+a^{\frac {5}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d a}\) | \(76\) |
Input:
int((a+I*a*tan(d*x+c))^(3/2)*tan(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
2*I/d/a*(-1/5*(a+I*a*tan(d*x+c))^(5/2)-a^2*(a+I*a*tan(d*x+c))^(1/2)+a^(5/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. 315 vs. \(2 (74) = 148\).
Time = 0.09 (sec) , antiderivative size = 315, normalized size of antiderivative = 3.12 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {5 \, \sqrt {2} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {a^{3}}{d^{2}}} \log \left (\frac {4 \, {\left (a^{2} e^{\left (i \, d x + i \, c\right )} + {\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}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a}\right ) - 5 \, \sqrt {2} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {a^{3}}{d^{2}}} \log \left (\frac {4 \, {\left (a^{2} e^{\left (i \, d x + i \, c\right )} + {\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}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a}\right ) + 2 \, \sqrt {2} {\left (9 i \, a e^{\left (5 i \, d x + 5 i \, c\right )} + 10 i \, a e^{\left (3 i \, d x + 3 i \, c\right )} + 5 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}}}{5 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:
integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="fricas")
Output:
-1/5*(5*sqrt(2)*(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)*sqrt (-a^3/d^2)*log(4*(a^2*e^(I*d*x + I*c) + (I*d*e^(2*I*d*x + 2*I*c) + I*d)*sq rt(-a^3/d^2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a) - 5*sq rt(2)*(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)*sqrt(-a^3/d^2) *log(4*(a^2*e^(I*d*x + I*c) + (-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)))*e^(-I*d*x - I*c)/a) + 2*sqrt(2)*(9* I*a*e^(5*I*d*x + 5*I*c) + 10*I*a*e^(3*I*d*x + 3*I*c) + 5*I*a*e^(I*d*x + I* c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))/(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I *d*x + 2*I*c) + d)
\[ \int \tan ^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}} \tan ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(tan(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)*tan(c + d*x)**2, x)
Time = 0.13 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.01 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {i \, {\left (5 \, \sqrt {2} a^{\frac {9}{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 ) + 2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} a^{2} + 10 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{4}\right )}}{5 \, a^{3} d} \] Input:
integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="maxima")
Output:
-1/5*I*(5*sqrt(2)*a^(9/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))) + 2*(I*a*tan(d*x + c) + a)^(5/2)*a^2 + 10*sqrt(I*a*tan(d*x + c) + a)*a^4)/(a^3*d)
Exception generated. \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(tan(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 TypeError: Bad Argument TypeError: Bad Argument TypeDone
Time = 0.32 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.83 \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx=-\frac {\frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}\,2{}\mathrm {i}}{5}-\sqrt {2}\,{\left (-a\right )}^{5/2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,2{}\mathrm {i}}{a\,d}-\frac {a\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,2{}\mathrm {i}}{d} \] Input:
int(tan(c + d*x)^2*(a + a*tan(c + d*x)*1i)^(3/2),x)
Output:
- (((a + a*tan(c + d*x)*1i)^(5/2)*2i)/5 - 2^(1/2)*(-a)^(5/2)*atan((2^(1/2) *(a + a*tan(c + d*x)*1i)^(1/2))/(2*(-a)^(1/2)))*2i)/(a*d) - (a*(a + a*tan( c + d*x)*1i)^(1/2)*2i)/d
\[ \int \tan ^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}\, \tan \left (d x +c \right )^{3}d x \right ) i +\int \sqrt {\tan \left (d x +c \right ) i +1}\, \tan \left (d x +c \right )^{2}d x \right ) \] Input:
int(tan(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)*tan(c + d*x)**3,x)*i + int(sqrt(ta n(c + d*x)*i + 1)*tan(c + d*x)**2,x))