Integrand size = 41, antiderivative size = 251 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=\frac {3 (7 A+3 i B) x}{128 a^2 c^5}-\frac {i A-B}{128 a^2 c^5 f (i-\tan (e+f x))^2}-\frac {3 A+2 i B}{64 a^2 c^5 f (i-\tan (e+f x))}+\frac {A-i B}{40 a^2 c^5 f (i+\tan (e+f x))^5}-\frac {3 i A+B}{64 a^2 c^5 f (i+\tan (e+f x))^4}-\frac {A}{16 a^2 c^5 f (i+\tan (e+f x))^3}+\frac {5 i A-B}{64 a^2 c^5 f (i+\tan (e+f x))^2}+\frac {5 (3 A+i B)}{128 a^2 c^5 f (i+\tan (e+f x))} \] Output:
3/128*(7*A+3*I*B)*x/a^2/c^5-1/128*(I*A-B)/a^2/c^5/f/(I-tan(f*x+e))^2-1/64* (3*A+2*I*B)/a^2/c^5/f/(I-tan(f*x+e))+1/40*(A-I*B)/a^2/c^5/f/(I+tan(f*x+e)) ^5-1/64*(3*I*A+B)/a^2/c^5/f/(I+tan(f*x+e))^4-1/16*A/a^2/c^5/f/(I+tan(f*x+e ))^3+1/64*(5*I*A-B)/a^2/c^5/f/(I+tan(f*x+e))^2+5/128*(3*A+I*B)/a^2/c^5/f/( I+tan(f*x+e))
Time = 5.43 (sec) , antiderivative size = 233, normalized size of antiderivative = 0.93 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=\frac {\sec ^6(e+f x) (-241 A+11 i B-8 (71 A+9 i B) \cos (2 (e+f x))+3 (33 A+37 i B) \cos (4 (e+f x))+6 A \cos (6 (e+f x))+14 i B \cos (6 (e+f x))+350 i A \sin (2 (e+f x))-150 B \sin (2 (e+f x))+60 (-7 i A+3 B) \arctan (\tan (e+f x)) \sec (e+f x) (\cos (3 (e+f x))-i \sin (3 (e+f x)))-161 i A \sin (4 (e+f x))+69 B \sin (4 (e+f x))-14 i A \sin (6 (e+f x))+6 B \sin (6 (e+f x)))}{2560 a^2 c^5 f (-i+\tan (e+f x))^2 (i+\tan (e+f x))^5} \] Input:
Integrate[(A + B*Tan[e + f*x])/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^5),x]
Output:
(Sec[e + f*x]^6*(-241*A + (11*I)*B - 8*(71*A + (9*I)*B)*Cos[2*(e + f*x)] + 3*(33*A + (37*I)*B)*Cos[4*(e + f*x)] + 6*A*Cos[6*(e + f*x)] + (14*I)*B*Co s[6*(e + f*x)] + (350*I)*A*Sin[2*(e + f*x)] - 150*B*Sin[2*(e + f*x)] + 60* ((-7*I)*A + 3*B)*ArcTan[Tan[e + f*x]]*Sec[e + f*x]*(Cos[3*(e + f*x)] - I*S in[3*(e + f*x)]) - (161*I)*A*Sin[4*(e + f*x)] + 69*B*Sin[4*(e + f*x)] - (1 4*I)*A*Sin[6*(e + f*x)] + 6*B*Sin[6*(e + f*x)]))/(2560*a^2*c^5*f*(-I + Tan [e + f*x])^2*(I + Tan[e + f*x])^5)
Time = 0.75 (sec) , antiderivative size = 198, normalized size of antiderivative = 0.79, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3042, 4071, 27, 86, 2009}
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 {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5}dx\) |
\(\Big \downarrow \) 4071 |
\(\displaystyle \frac {a c \int \frac {A+B \tan (e+f x)}{a^3 c^6 (1-i \tan (e+f x))^6 (i \tan (e+f x)+1)^3}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {A+B \tan (e+f x)}{(1-i \tan (e+f x))^6 (i \tan (e+f x)+1)^3}d\tan (e+f x)}{a^2 c^5 f}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {\int \left (\frac {3 A}{16 (\tan (e+f x)+i)^4}+\frac {3 (7 A+3 i B)}{128 \left (\tan ^2(e+f x)+1\right )}+\frac {-3 A-2 i B}{64 (\tan (e+f x)-i)^2}-\frac {5 (3 A+i B)}{128 (\tan (e+f x)+i)^2}+\frac {i (A+i B)}{64 (\tan (e+f x)-i)^3}+\frac {B-5 i A}{32 (\tan (e+f x)+i)^3}+\frac {3 i A+B}{16 (\tan (e+f x)+i)^5}+\frac {i B-A}{8 (\tan (e+f x)+i)^6}\right )d\tan (e+f x)}{a^2 c^5 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {3}{128} (7 A+3 i B) \arctan (\tan (e+f x))-\frac {3 A+2 i B}{64 (-\tan (e+f x)+i)}+\frac {5 (3 A+i B)}{128 (\tan (e+f x)+i)}-\frac {-B+i A}{128 (-\tan (e+f x)+i)^2}+\frac {-B+5 i A}{64 (\tan (e+f x)+i)^2}-\frac {B+3 i A}{64 (\tan (e+f x)+i)^4}+\frac {A-i B}{40 (\tan (e+f x)+i)^5}-\frac {A}{16 (\tan (e+f x)+i)^3}}{a^2 c^5 f}\) |
Input:
Int[(A + B*Tan[e + f*x])/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])^ 5),x]
Output:
((3*(7*A + (3*I)*B)*ArcTan[Tan[e + f*x]])/128 - (I*A - B)/(128*(I - Tan[e + f*x])^2) - (3*A + (2*I)*B)/(64*(I - Tan[e + f*x])) + (A - I*B)/(40*(I + Tan[e + f*x])^5) - ((3*I)*A + B)/(64*(I + Tan[e + f*x])^4) - A/(16*(I + Ta n[e + f*x])^3) + ((5*I)*A - B)/(64*(I + Tan[e + f*x])^2) + (5*(3*A + I*B)) /(128*(I + Tan[e + f*x])))/(a^2*c^5*f)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a*(c/f) Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x], x , Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]
Time = 0.66 (sec) , antiderivative size = 303, normalized size of antiderivative = 1.21
method | result | size |
risch | \(\frac {9 i x B}{128 a^{2} c^{5}}+\frac {21 x A}{128 a^{2} c^{5}}-\frac {{\mathrm e}^{10 i \left (f x +e \right )} B}{1280 a^{2} c^{5} f}-\frac {i {\mathrm e}^{10 i \left (f x +e \right )} A}{1280 a^{2} c^{5} f}-\frac {5 \,{\mathrm e}^{8 i \left (f x +e \right )} B}{1024 a^{2} c^{5} f}-\frac {7 i {\mathrm e}^{8 i \left (f x +e \right )} A}{1024 a^{2} c^{5} f}-\frac {3 \,{\mathrm e}^{6 i \left (f x +e \right )} B}{256 a^{2} c^{5} f}-\frac {7 i {\mathrm e}^{6 i \left (f x +e \right )} A}{256 a^{2} c^{5} f}-\frac {3 \cos \left (4 f x +4 e \right ) B}{256 a^{2} c^{5} f}-\frac {17 i \cos \left (4 f x +4 e \right ) A}{256 a^{2} c^{5} f}-\frac {i \sin \left (4 f x +4 e \right ) B}{128 a^{2} c^{5} f}+\frac {9 \sin \left (4 f x +4 e \right ) A}{128 a^{2} c^{5} f}-\frac {7 i A \cos \left (2 f x +2 e \right )}{64 a^{2} c^{5} f}+\frac {5 i \sin \left (2 f x +2 e \right ) B}{128 a^{2} c^{5} f}+\frac {21 \sin \left (2 f x +2 e \right ) A}{128 a^{2} c^{5} f}\) | \(303\) |
norman | \(\frac {\frac {3 \left (3 i B +7 A \right ) x}{128 a c}-\frac {11 i A +B}{40 a c f}+\frac {\left (-9 i B +107 A \right ) \tan \left (f x +e \right )}{128 a c f}+\frac {\left (3 i B +7 A \right ) \tan \left (f x +e \right )^{5}}{5 a c f}+\frac {7 \left (3 i B +7 A \right ) \tan \left (f x +e \right )^{7}}{64 a c f}+\frac {3 \left (3 i B +7 A \right ) \tan \left (f x +e \right )^{9}}{128 a c f}+\frac {15 \left (3 i B +7 A \right ) x \tan \left (f x +e \right )^{2}}{128 a c}+\frac {15 \left (3 i B +7 A \right ) x \tan \left (f x +e \right )^{4}}{64 a c}+\frac {15 \left (3 i B +7 A \right ) x \tan \left (f x +e \right )^{6}}{64 a c}+\frac {15 \left (3 i B +7 A \right ) x \tan \left (f x +e \right )^{8}}{128 a c}+\frac {3 \left (3 i B +7 A \right ) x \tan \left (f x +e \right )^{10}}{128 a c}+\frac {\left (43 i B +79 A \right ) \tan \left (f x +e \right )^{3}}{64 a c f}+\frac {\left (i A +3 B \right ) \tan \left (f x +e \right )^{2}}{8 a c f}}{a \,c^{4} \left (1+\tan \left (f x +e \right )^{2}\right )^{5}}\) | \(340\) |
derivativedivides | \(-\frac {A}{16 a^{2} c^{5} f \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {i B}{40 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{5}}+\frac {15 A}{128 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )}-\frac {i A}{128 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {B}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {5 i A}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {B}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {i B}{32 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )}+\frac {21 A \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{2} c^{5}}-\frac {3 i A}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {A}{40 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{5}}+\frac {5 i B}{128 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )}+\frac {9 i B \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{2} c^{5}}+\frac {3 A}{64 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )}+\frac {B}{128 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )^{2}}\) | \(346\) |
default | \(-\frac {A}{16 a^{2} c^{5} f \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {i B}{40 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{5}}+\frac {15 A}{128 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )}-\frac {i A}{128 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {B}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {5 i A}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {B}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {i B}{32 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )}+\frac {21 A \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{2} c^{5}}-\frac {3 i A}{64 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {A}{40 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )^{5}}+\frac {5 i B}{128 f \,a^{2} c^{5} \left (i+\tan \left (f x +e \right )\right )}+\frac {9 i B \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{2} c^{5}}+\frac {3 A}{64 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )}+\frac {B}{128 f \,a^{2} c^{5} \left (-i+\tan \left (f x +e \right )\right )^{2}}\) | \(346\) |
Input:
int((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^5,x,method=_R ETURNVERBOSE)
Output:
9/128*I*x/a^2/c^5*B+21/128*x/a^2/c^5*A-1/1280/a^2/c^5/f*exp(10*I*(f*x+e))* B-1/1280*I/a^2/c^5/f*exp(10*I*(f*x+e))*A-5/1024/a^2/c^5/f*exp(8*I*(f*x+e)) *B-7/1024*I/a^2/c^5/f*exp(8*I*(f*x+e))*A-3/256/a^2/c^5/f*exp(6*I*(f*x+e))* B-7/256*I/a^2/c^5/f*exp(6*I*(f*x+e))*A-3/256/a^2/c^5/f*cos(4*f*x+4*e)*B-17 /256*I/a^2/c^5/f*cos(4*f*x+4*e)*A-1/128*I/a^2/c^5/f*sin(4*f*x+4*e)*B+9/128 /a^2/c^5/f*sin(4*f*x+4*e)*A-7/64*I*A/a^2/c^5/f*cos(2*f*x+2*e)+5/128*I/a^2/ c^5/f*sin(2*f*x+2*e)*B+21/128/a^2/c^5/f*sin(2*f*x+2*e)*A
Time = 0.09 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.60 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=\frac {{\left (120 \, {\left (7 \, A + 3 i \, B\right )} f x e^{\left (4 i \, f x + 4 i \, e\right )} - 4 \, {\left (i \, A + B\right )} e^{\left (14 i \, f x + 14 i \, e\right )} - 5 \, {\left (7 i \, A + 5 \, B\right )} e^{\left (12 i \, f x + 12 i \, e\right )} - 20 \, {\left (7 i \, A + 3 \, B\right )} e^{\left (10 i \, f x + 10 i \, e\right )} - 50 \, {\left (7 i \, A + B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} - 100 \, {\left (7 i \, A - B\right )} e^{\left (6 i \, f x + 6 i \, e\right )} - 20 \, {\left (-7 i \, A + 5 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 10 i \, A - 10 \, B\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{5120 \, a^{2} c^{5} f} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^5,x, al gorithm="fricas")
Output:
1/5120*(120*(7*A + 3*I*B)*f*x*e^(4*I*f*x + 4*I*e) - 4*(I*A + B)*e^(14*I*f* x + 14*I*e) - 5*(7*I*A + 5*B)*e^(12*I*f*x + 12*I*e) - 20*(7*I*A + 3*B)*e^( 10*I*f*x + 10*I*e) - 50*(7*I*A + B)*e^(8*I*f*x + 8*I*e) - 100*(7*I*A - B)* e^(6*I*f*x + 6*I*e) - 20*(-7*I*A + 5*B)*e^(2*I*f*x + 2*I*e) + 10*I*A - 10* B)*e^(-4*I*f*x - 4*I*e)/(a^2*c^5*f)
Time = 0.57 (sec) , antiderivative size = 605, normalized size of antiderivative = 2.41 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=\begin {cases} \frac {\left (\left (11258999068426240 i A a^{12} c^{30} f^{6} e^{2 i e} - 11258999068426240 B a^{12} c^{30} f^{6} e^{2 i e}\right ) e^{- 4 i f x} + \left (157625986957967360 i A a^{12} c^{30} f^{6} e^{4 i e} - 112589990684262400 B a^{12} c^{30} f^{6} e^{4 i e}\right ) e^{- 2 i f x} + \left (- 788129934789836800 i A a^{12} c^{30} f^{6} e^{8 i e} + 112589990684262400 B a^{12} c^{30} f^{6} e^{8 i e}\right ) e^{2 i f x} + \left (- 394064967394918400 i A a^{12} c^{30} f^{6} e^{10 i e} - 56294995342131200 B a^{12} c^{30} f^{6} e^{10 i e}\right ) e^{4 i f x} + \left (- 157625986957967360 i A a^{12} c^{30} f^{6} e^{12 i e} - 67553994410557440 B a^{12} c^{30} f^{6} e^{12 i e}\right ) e^{6 i f x} + \left (- 39406496739491840 i A a^{12} c^{30} f^{6} e^{14 i e} - 28147497671065600 B a^{12} c^{30} f^{6} e^{14 i e}\right ) e^{8 i f x} + \left (- 4503599627370496 i A a^{12} c^{30} f^{6} e^{16 i e} - 4503599627370496 B a^{12} c^{30} f^{6} e^{16 i e}\right ) e^{10 i f x}\right ) e^{- 6 i e}}{5764607523034234880 a^{14} c^{35} f^{7}} & \text {for}\: a^{14} c^{35} f^{7} e^{6 i e} \neq 0 \\x \left (- \frac {21 A + 9 i B}{128 a^{2} c^{5}} + \frac {\left (A e^{14 i e} + 7 A e^{12 i e} + 21 A e^{10 i e} + 35 A e^{8 i e} + 35 A e^{6 i e} + 21 A e^{4 i e} + 7 A e^{2 i e} + A - i B e^{14 i e} - 5 i B e^{12 i e} - 9 i B e^{10 i e} - 5 i B e^{8 i e} + 5 i B e^{6 i e} + 9 i B e^{4 i e} + 5 i B e^{2 i e} + i B\right ) e^{- 4 i e}}{128 a^{2} c^{5}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (21 A + 9 i B\right )}{128 a^{2} c^{5}} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))**2/(c-I*c*tan(f*x+e))**5,x)
Output:
Piecewise((((11258999068426240*I*A*a**12*c**30*f**6*exp(2*I*e) - 112589990 68426240*B*a**12*c**30*f**6*exp(2*I*e))*exp(-4*I*f*x) + (15762598695796736 0*I*A*a**12*c**30*f**6*exp(4*I*e) - 112589990684262400*B*a**12*c**30*f**6* exp(4*I*e))*exp(-2*I*f*x) + (-788129934789836800*I*A*a**12*c**30*f**6*exp( 8*I*e) + 112589990684262400*B*a**12*c**30*f**6*exp(8*I*e))*exp(2*I*f*x) + (-394064967394918400*I*A*a**12*c**30*f**6*exp(10*I*e) - 56294995342131200* B*a**12*c**30*f**6*exp(10*I*e))*exp(4*I*f*x) + (-157625986957967360*I*A*a* *12*c**30*f**6*exp(12*I*e) - 67553994410557440*B*a**12*c**30*f**6*exp(12*I *e))*exp(6*I*f*x) + (-39406496739491840*I*A*a**12*c**30*f**6*exp(14*I*e) - 28147497671065600*B*a**12*c**30*f**6*exp(14*I*e))*exp(8*I*f*x) + (-450359 9627370496*I*A*a**12*c**30*f**6*exp(16*I*e) - 4503599627370496*B*a**12*c** 30*f**6*exp(16*I*e))*exp(10*I*f*x))*exp(-6*I*e)/(5764607523034234880*a**14 *c**35*f**7), Ne(a**14*c**35*f**7*exp(6*I*e), 0)), (x*(-(21*A + 9*I*B)/(12 8*a**2*c**5) + (A*exp(14*I*e) + 7*A*exp(12*I*e) + 21*A*exp(10*I*e) + 35*A* exp(8*I*e) + 35*A*exp(6*I*e) + 21*A*exp(4*I*e) + 7*A*exp(2*I*e) + A - I*B* exp(14*I*e) - 5*I*B*exp(12*I*e) - 9*I*B*exp(10*I*e) - 5*I*B*exp(8*I*e) + 5 *I*B*exp(6*I*e) + 9*I*B*exp(4*I*e) + 5*I*B*exp(2*I*e) + I*B)*exp(-4*I*e)/( 128*a**2*c**5)), True)) + x*(21*A + 9*I*B)/(128*a**2*c**5)
Exception generated. \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^5,x, al gorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.64 (sec) , antiderivative size = 193, normalized size of antiderivative = 0.77 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=-\frac {3 \, {\left (-7 i \, A + 3 \, B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{256 \, a^{2} c^{5} f} - \frac {3 \, {\left (7 i \, A - 3 \, B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{256 \, a^{2} c^{5} f} + \frac {15 \, {\left (7 \, A + 3 i \, B\right )} \tan \left (f x + e\right )^{6} - 45 \, {\left (-7 i \, A + 3 \, B\right )} \tan \left (f x + e\right )^{5} - 20 \, {\left (7 \, A + 3 i \, B\right )} \tan \left (f x + e\right )^{4} - 60 \, {\left (-7 i \, A + 3 \, B\right )} \tan \left (f x + e\right )^{3} - 67 \, {\left (7 \, A + 3 i \, B\right )} \tan \left (f x + e\right )^{2} - {\left (7 i \, A - 3 \, B\right )} \tan \left (f x + e\right ) - 176 \, A + 16 i \, B}{640 \, a^{2} c^{5} f {\left (\tan \left (f x + e\right ) + i\right )}^{5} {\left (\tan \left (f x + e\right ) - i\right )}^{2}} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^5,x, al gorithm="giac")
Output:
-3/256*(-7*I*A + 3*B)*log(tan(f*x + e) + I)/(a^2*c^5*f) - 3/256*(7*I*A - 3 *B)*log(tan(f*x + e) - I)/(a^2*c^5*f) + 1/640*(15*(7*A + 3*I*B)*tan(f*x + e)^6 - 45*(-7*I*A + 3*B)*tan(f*x + e)^5 - 20*(7*A + 3*I*B)*tan(f*x + e)^4 - 60*(-7*I*A + 3*B)*tan(f*x + e)^3 - 67*(7*A + 3*I*B)*tan(f*x + e)^2 - (7* I*A - 3*B)*tan(f*x + e) - 176*A + 16*I*B)/(a^2*c^5*f*(tan(f*x + e) + I)^5* (tan(f*x + e) - I)^2)
Time = 6.96 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.16 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-\frac {3\,B}{640\,a^2\,c^5}+\frac {A\,7{}\mathrm {i}}{640\,a^2\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {7\,A}{32\,a^2\,c^5}+\frac {B\,3{}\mathrm {i}}{32\,a^2\,c^5}\right )-{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (-\frac {9\,B}{32\,a^2\,c^5}+\frac {A\,21{}\mathrm {i}}{32\,a^2\,c^5}\right )-{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {21\,A}{128\,a^2\,c^5}+\frac {B\,9{}\mathrm {i}}{128\,a^2\,c^5}\right )-{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (-\frac {27\,B}{128\,a^2\,c^5}+\frac {A\,63{}\mathrm {i}}{128\,a^2\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {469\,A}{640\,a^2\,c^5}+\frac {B\,201{}\mathrm {i}}{640\,a^2\,c^5}\right )+\frac {11\,A}{40\,a^2\,c^5}-\frac {B\,1{}\mathrm {i}}{40\,a^2\,c^5}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^7-{\mathrm {tan}\left (e+f\,x\right )}^6\,3{}\mathrm {i}+{\mathrm {tan}\left (e+f\,x\right )}^5-{\mathrm {tan}\left (e+f\,x\right )}^4\,5{}\mathrm {i}+5\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}+3\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}+\frac {3\,x\,\left (7\,A+B\,3{}\mathrm {i}\right )}{128\,a^2\,c^5} \] Input:
int((A + B*tan(e + f*x))/((a + a*tan(e + f*x)*1i)^2*(c - c*tan(e + f*x)*1i )^5),x)
Output:
(tan(e + f*x)*((A*7i)/(640*a^2*c^5) - (3*B)/(640*a^2*c^5)) + tan(e + f*x)^ 4*((7*A)/(32*a^2*c^5) + (B*3i)/(32*a^2*c^5)) - tan(e + f*x)^3*((A*21i)/(32 *a^2*c^5) - (9*B)/(32*a^2*c^5)) - tan(e + f*x)^6*((21*A)/(128*a^2*c^5) + ( B*9i)/(128*a^2*c^5)) - tan(e + f*x)^5*((A*63i)/(128*a^2*c^5) - (27*B)/(128 *a^2*c^5)) + tan(e + f*x)^2*((469*A)/(640*a^2*c^5) + (B*201i)/(640*a^2*c^5 )) + (11*A)/(40*a^2*c^5) - (B*1i)/(40*a^2*c^5))/(f*(3*tan(e + f*x) - tan(e + f*x)^2*1i + 5*tan(e + f*x)^3 - tan(e + f*x)^4*5i + tan(e + f*x)^5 - tan (e + f*x)^6*3i - tan(e + f*x)^7 + 1i)) + (3*x*(7*A + B*3i))/(128*a^2*c^5)
\[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^5} \, dx=\frac {\left (\int \frac {\tan \left (f x +e \right )}{\tan \left (f x +e \right )^{7} i -3 \tan \left (f x +e \right )^{6}-\tan \left (f x +e \right )^{5} i -5 \tan \left (f x +e \right )^{4}-5 \tan \left (f x +e \right )^{3} i -\tan \left (f x +e \right )^{2}-3 \tan \left (f x +e \right ) i +1}d x \right ) b +\left (\int \frac {1}{\tan \left (f x +e \right )^{7} i -3 \tan \left (f x +e \right )^{6}-\tan \left (f x +e \right )^{5} i -5 \tan \left (f x +e \right )^{4}-5 \tan \left (f x +e \right )^{3} i -\tan \left (f x +e \right )^{2}-3 \tan \left (f x +e \right ) i +1}d x \right ) a}{a^{2} c^{5}} \] Input:
int((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e))^5,x)
Output:
(int(tan(e + f*x)/(tan(e + f*x)**7*i - 3*tan(e + f*x)**6 - tan(e + f*x)**5 *i - 5*tan(e + f*x)**4 - 5*tan(e + f*x)**3*i - tan(e + f*x)**2 - 3*tan(e + f*x)*i + 1),x)*b + int(1/(tan(e + f*x)**7*i - 3*tan(e + f*x)**6 - tan(e + f*x)**5*i - 5*tan(e + f*x)**4 - 5*tan(e + f*x)**3*i - tan(e + f*x)**2 - 3 *tan(e + f*x)*i + 1),x)*a)/(a**2*c**5)