Integrand size = 28, antiderivative size = 140 \[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=-\frac {4 (-1)^{3/4} a^2 d^{5/2} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f} \] Output:
-4*(-1)^(3/4)*a^2*d^(5/2)*arctan((-1)^(3/4)*(d*tan(f*x+e))^(1/2)/d^(1/2))/ f-4*I*a^2*d^2*(d*tan(f*x+e))^(1/2)/f+4/3*a^2*d*(d*tan(f*x+e))^(3/2)/f+4/5* I*a^2*(d*tan(f*x+e))^(5/2)/f-2/7*a^2*(d*tan(f*x+e))^(7/2)/d/f
Time = 0.70 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.73 \[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=\frac {2 a^2 d^2 \left ((105+105 i) \sqrt {2} \sqrt {d} \text {arctanh}\left (\frac {(1+i) \sqrt {d \tan (e+f x)}}{\sqrt {2} \sqrt {d}}\right )+\sqrt {d \tan (e+f x)} \left (-210 i+70 \tan (e+f x)+42 i \tan ^2(e+f x)-15 \tan ^3(e+f x)\right )\right )}{105 f} \] Input:
Integrate[(d*Tan[e + f*x])^(5/2)*(a + I*a*Tan[e + f*x])^2,x]
Output:
(2*a^2*d^2*((105 + 105*I)*Sqrt[2]*Sqrt[d]*ArcTanh[((1 + I)*Sqrt[d*Tan[e + f*x]])/(Sqrt[2]*Sqrt[d])] + Sqrt[d*Tan[e + f*x]]*(-210*I + 70*Tan[e + f*x] + (42*I)*Tan[e + f*x]^2 - 15*Tan[e + f*x]^3)))/(105*f)
Time = 0.75 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.393, Rules used = {3042, 4026, 3042, 4011, 3042, 4011, 3042, 4011, 3042, 4016, 218}
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 (a+i a \tan (e+f x))^2 (d \tan (e+f x))^{5/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x))^2 (d \tan (e+f x))^{5/2}dx\) |
\(\Big \downarrow \) 4026 |
\(\displaystyle -\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\int (d \tan (e+f x))^{5/2} \left (2 i \tan (e+f x) a^2+2 a^2\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\int (d \tan (e+f x))^{5/2} \left (2 i \tan (e+f x) a^2+2 a^2\right )dx\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int (d \tan (e+f x))^{3/2} \left (2 a^2 d \tan (e+f x)-2 i a^2 d\right )dx-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (d \tan (e+f x))^{3/2} \left (2 a^2 d \tan (e+f x)-2 i a^2 d\right )dx-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \sqrt {d \tan (e+f x)} \left (-2 a^2 d^2-2 i a^2 \tan (e+f x) d^2\right )dx-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {d \tan (e+f x)} \left (-2 a^2 d^2-2 i a^2 \tan (e+f x) d^2\right )dx-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \frac {2 i a^2 d^3-2 a^2 d^3 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}dx-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {2 i a^2 d^3-2 a^2 d^3 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}dx-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle -\frac {8 a^4 d^6 \int \frac {1}{2 i a^2 d^4+2 a^2 \tan (e+f x) d^4}d\sqrt {d \tan (e+f x)}}{f}-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {4 (-1)^{3/4} a^2 d^{5/2} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}\) |
Input:
Int[(d*Tan[e + f*x])^(5/2)*(a + I*a*Tan[e + f*x])^2,x]
Output:
(-4*(-1)^(3/4)*a^2*d^(5/2)*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d ]])/f - ((4*I)*a^2*d^2*Sqrt[d*Tan[e + f*x]])/f + (4*a^2*d*(d*Tan[e + f*x]) ^(3/2))/(3*f) + (((4*I)/5)*a^2*(d*Tan[e + f*x])^(5/2))/f - (2*a^2*(d*Tan[e + f*x])^(7/2))/(7*d*f)
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2*(c^2/f) Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b *Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^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])
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 341 vs. \(2 (114 ) = 228\).
Time = 1.50 (sec) , antiderivative size = 342, normalized size of antiderivative = 2.44
method | result | size |
derivativedivides | \(\frac {2 a^{2} \left (-\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+\frac {2 i d \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+\frac {2 d^{2} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-2 i d^{3} \sqrt {d \tan \left (f x +e \right )}+2 d^{4} \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f d}\) | \(342\) |
default | \(\frac {2 a^{2} \left (-\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+\frac {2 i d \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+\frac {2 d^{2} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-2 i d^{3} \sqrt {d \tan \left (f x +e \right )}+2 d^{4} \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f d}\) | \(342\) |
parts | \(\frac {2 a^{2} d \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-\frac {d^{2} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )}{f}+\frac {2 i a^{2} \left (\frac {2 \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-2 d^{2} \sqrt {d \tan \left (f x +e \right )}+\frac {d^{2} \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4}\right )}{f}-\frac {2 a^{2} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}-\frac {d^{2} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+\frac {d^{4} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )}{f d}\) | \(502\) |
Input:
int((d*tan(f*x+e))^(5/2)*(a+I*a*tan(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
2/f*a^2/d*(-1/7*(d*tan(f*x+e))^(7/2)+2/5*I*d*(d*tan(f*x+e))^(5/2)+2/3*d^2* (d*tan(f*x+e))^(3/2)-2*I*d^3*(d*tan(f*x+e))^(1/2)+2*d^4*(1/8*I/d*(d^2)^(1/ 4)*2^(1/2)*(ln((d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2 )^(1/2))/(d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2 )))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-2*arctan(-2^(1/2) /(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1))-1/8/(d^2)^(1/4)*2^(1/2)*(ln((d*tan(f *x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*x+e)+ (d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+2*arctan(2^(1/2)/(d ^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x +e))^(1/2)+1))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 436 vs. \(2 (112) = 224\).
Time = 0.10 (sec) , antiderivative size = 436, normalized size of antiderivative = 3.11 \[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=-\frac {105 \, \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-4 i \, a^{2} d^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (i \, f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2} d^{2}}\right ) - 105 \, \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-4 i \, a^{2} d^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (-i \, f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2} d^{2}}\right ) + 8 \, {\left (337 i \, a^{2} d^{2} e^{\left (6 i \, f x + 6 i \, e\right )} + 613 i \, a^{2} d^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 563 i \, a^{2} d^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 167 i \, a^{2} d^{2}\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{420 \, {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \] Input:
integrate((d*tan(f*x+e))^(5/2)*(a+I*a*tan(f*x+e))^2,x, algorithm="fricas")
Output:
-1/420*(105*sqrt(16*I*a^4*d^5/f^2)*(f*e^(6*I*f*x + 6*I*e) + 3*f*e^(4*I*f*x + 4*I*e) + 3*f*e^(2*I*f*x + 2*I*e) + f)*log(1/2*(-4*I*a^2*d^3*e^(2*I*f*x + 2*I*e) + sqrt(16*I*a^4*d^5/f^2)*(I*f*e^(2*I*f*x + 2*I*e) + I*f)*sqrt((-I *d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-2*I*f*x - 2* I*e)/(a^2*d^2)) - 105*sqrt(16*I*a^4*d^5/f^2)*(f*e^(6*I*f*x + 6*I*e) + 3*f* e^(4*I*f*x + 4*I*e) + 3*f*e^(2*I*f*x + 2*I*e) + f)*log(1/2*(-4*I*a^2*d^3*e ^(2*I*f*x + 2*I*e) + sqrt(16*I*a^4*d^5/f^2)*(-I*f*e^(2*I*f*x + 2*I*e) - I* f)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-2 *I*f*x - 2*I*e)/(a^2*d^2)) + 8*(337*I*a^2*d^2*e^(6*I*f*x + 6*I*e) + 613*I* a^2*d^2*e^(4*I*f*x + 4*I*e) + 563*I*a^2*d^2*e^(2*I*f*x + 2*I*e) + 167*I*a^ 2*d^2)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))/( f*e^(6*I*f*x + 6*I*e) + 3*f*e^(4*I*f*x + 4*I*e) + 3*f*e^(2*I*f*x + 2*I*e) + f)
\[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=- a^{2} \left (\int \left (- \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}}\right )\, dx + \int \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \tan ^{2}{\left (e + f x \right )}\, dx + \int \left (- 2 i \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \tan {\left (e + f x \right )}\right )\, dx\right ) \] Input:
integrate((d*tan(f*x+e))**(5/2)*(a+I*a*tan(f*x+e))**2,x)
Output:
-a**2*(Integral(-(d*tan(e + f*x))**(5/2), x) + Integral((d*tan(e + f*x))** (5/2)*tan(e + f*x)**2, x) + Integral(-2*I*(d*tan(e + f*x))**(5/2)*tan(e + f*x), x))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 232 vs. \(2 (112) = 224\).
Time = 0.12 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.66 \[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=-\frac {105 \, a^{2} d^{4} {\left (-\frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} + \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} + 60 \, \left (d \tan \left (f x + e\right )\right )^{\frac {7}{2}} a^{2} - 168 i \, \left (d \tan \left (f x + e\right )\right )^{\frac {5}{2}} a^{2} d - 280 \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a^{2} d^{2} + 840 i \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{3}}{210 \, d f} \] Input:
integrate((d*tan(f*x+e))^(5/2)*(a+I*a*tan(f*x+e))^2,x, algorithm="maxima")
Output:
-1/210*(105*a^2*d^4*(-(2*I - 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(d ) + 2*sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d) - (2*I - 2)*sqrt(2)*arctan(-1 /2*sqrt(2)*(sqrt(2)*sqrt(d) - 2*sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d) - ( I + 1)*sqrt(2)*log(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d) + d)/sqrt(d) + (I + 1)*sqrt(2)*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d) + d)/sqrt(d)) + 60*(d*tan(f*x + e))^(7/2)*a^2 - 168*I*(d*tan (f*x + e))^(5/2)*a^2*d - 280*(d*tan(f*x + e))^(3/2)*a^2*d^2 + 840*I*sqrt(d *tan(f*x + e))*a^2*d^3)/(d*f)
Time = 0.27 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.07 \[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=-\frac {2 \, {\left (\frac {210 \, \sqrt {2} d^{\frac {5}{2}} \arctan \left (\frac {2 \, \sqrt {d \tan \left (f x + e\right )} {\left | d \right |}}{i \, \sqrt {2} d^{\frac {3}{2}} + \sqrt {2} \sqrt {d} {\left | d \right |}}\right )}{\frac {i \, d}{{\left | d \right |}} + 1} + \frac {15 \, \sqrt {d \tan \left (f x + e\right )} d^{9} \tan \left (f x + e\right )^{3} - 42 i \, \sqrt {d \tan \left (f x + e\right )} d^{9} \tan \left (f x + e\right )^{2} - 70 \, \sqrt {d \tan \left (f x + e\right )} d^{9} \tan \left (f x + e\right ) + 210 i \, \sqrt {d \tan \left (f x + e\right )} d^{9}}{d^{7}}\right )} a^{2}}{105 \, f} \] Input:
integrate((d*tan(f*x+e))^(5/2)*(a+I*a*tan(f*x+e))^2,x, algorithm="giac")
Output:
-2/105*(210*sqrt(2)*d^(5/2)*arctan(2*sqrt(d*tan(f*x + e))*abs(d)/(I*sqrt(2 )*d^(3/2) + sqrt(2)*sqrt(d)*abs(d)))/(I*d/abs(d) + 1) + (15*sqrt(d*tan(f*x + e))*d^9*tan(f*x + e)^3 - 42*I*sqrt(d*tan(f*x + e))*d^9*tan(f*x + e)^2 - 70*sqrt(d*tan(f*x + e))*d^9*tan(f*x + e) + 210*I*sqrt(d*tan(f*x + e))*d^9 )/d^7)*a^2/f
Time = 1.55 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.82 \[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=\frac {a^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}\,4{}\mathrm {i}}{5\,f}-\frac {a^2\,d^2\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,4{}\mathrm {i}}{f}-\frac {2\,a^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{7/2}}{7\,d\,f}+\frac {4\,a^2\,d\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{3\,f}-\frac {\sqrt {4{}\mathrm {i}}\,a^2\,d^{5/2}\,\mathrm {atan}\left (\frac {\sqrt {4{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}}{2\,\sqrt {d}}\right )\,2{}\mathrm {i}}{f} \] Input:
int((d*tan(e + f*x))^(5/2)*(a + a*tan(e + f*x)*1i)^2,x)
Output:
(a^2*(d*tan(e + f*x))^(5/2)*4i)/(5*f) - (a^2*d^2*(d*tan(e + f*x))^(1/2)*4i )/f - (2*a^2*(d*tan(e + f*x))^(7/2))/(7*d*f) + (4*a^2*d*(d*tan(e + f*x))^( 3/2))/(3*f) - (4i^(1/2)*a^2*d^(5/2)*atan((4i^(1/2)*(d*tan(e + f*x))^(1/2)* 1i)/(2*d^(1/2)))*2i)/f
\[ \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx=\frac {\sqrt {d}\, a^{2} d^{2} \left (4 \sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{2} i -20 \sqrt {\tan \left (f x +e \right )}\, i +10 \left (\int \frac {\sqrt {\tan \left (f x +e \right )}}{\tan \left (f x +e \right )}d x \right ) f i -5 \left (\int \sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{4}d x \right ) f +5 \left (\int \sqrt {\tan \left (f x +e \right )}\, \tan \left (f x +e \right )^{2}d x \right ) f \right )}{5 f} \] Input:
int((d*tan(f*x+e))^(5/2)*(a+I*a*tan(f*x+e))^2,x)
Output:
(sqrt(d)*a**2*d**2*(4*sqrt(tan(e + f*x))*tan(e + f*x)**2*i - 20*sqrt(tan(e + f*x))*i + 10*int(sqrt(tan(e + f*x))/tan(e + f*x),x)*f*i - 5*int(sqrt(ta n(e + f*x))*tan(e + f*x)**4,x)*f + 5*int(sqrt(tan(e + f*x))*tan(e + f*x)** 2,x)*f))/(5*f)