Integrand size = 26, antiderivative size = 112 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=\frac {(A-i B) x}{8 a^3}+\frac {i A-B}{6 f (a+i a \tan (e+f x))^3}+\frac {i A+B}{8 a f (a+i a \tan (e+f x))^2}+\frac {i A+B}{8 f \left (a^3+i a^3 \tan (e+f x)\right )} \] Output:
1/8*(A-I*B)*x/a^3+1/6*(I*A-B)/f/(a+I*a*tan(f*x+e))^3+1/8*(I*A+B)/a/f/(a+I* a*tan(f*x+e))^2+1/8*(I*A+B)/f/(a^3+I*a^3*tan(f*x+e))
Time = 0.63 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.97 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=\frac {-10 A+2 i B+3 (i A+B) \arctan (\tan (e+f x)) \sec ^3(e+f x) (\cos (3 (e+f x))+i \sin (3 (e+f x)))+(-9 i A-9 B) \tan (e+f x)+3 (A-i B) \tan ^2(e+f x)}{24 a^3 f (-i+\tan (e+f x))^3} \] Input:
Integrate[(A + B*Tan[e + f*x])/(a + I*a*Tan[e + f*x])^3,x]
Output:
(-10*A + (2*I)*B + 3*(I*A + B)*ArcTan[Tan[e + f*x]]*Sec[e + f*x]^3*(Cos[3* (e + f*x)] + I*Sin[3*(e + f*x)]) + ((-9*I)*A - 9*B)*Tan[e + f*x] + 3*(A - I*B)*Tan[e + f*x]^2)/(24*a^3*f*(-I + Tan[e + f*x])^3)
Time = 0.70 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.99, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3042, 4009, 3042, 3960, 3042, 3960, 24}
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))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3}dx\) |
\(\Big \downarrow \) 4009 |
\(\displaystyle \frac {(A-i B) \int \frac {1}{(i \tan (e+f x) a+a)^2}dx}{2 a}+\frac {-B+i A}{6 f (a+i a \tan (e+f x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A-i B) \int \frac {1}{(i \tan (e+f x) a+a)^2}dx}{2 a}+\frac {-B+i A}{6 f (a+i a \tan (e+f x))^3}\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {(A-i B) \left (\frac {\int \frac {1}{i \tan (e+f x) a+a}dx}{2 a}+\frac {i}{4 f (a+i a \tan (e+f x))^2}\right )}{2 a}+\frac {-B+i A}{6 f (a+i a \tan (e+f x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A-i B) \left (\frac {\int \frac {1}{i \tan (e+f x) a+a}dx}{2 a}+\frac {i}{4 f (a+i a \tan (e+f x))^2}\right )}{2 a}+\frac {-B+i A}{6 f (a+i a \tan (e+f x))^3}\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {(A-i B) \left (\frac {\frac {\int 1dx}{2 a}+\frac {i}{2 f (a+i a \tan (e+f x))}}{2 a}+\frac {i}{4 f (a+i a \tan (e+f x))^2}\right )}{2 a}+\frac {-B+i A}{6 f (a+i a \tan (e+f x))^3}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {-B+i A}{6 f (a+i a \tan (e+f x))^3}+\frac {(A-i B) \left (\frac {\frac {x}{2 a}+\frac {i}{2 f (a+i a \tan (e+f x))}}{2 a}+\frac {i}{4 f (a+i a \tan (e+f x))^2}\right )}{2 a}\) |
Input:
Int[(A + B*Tan[e + f*x])/(a + I*a*Tan[e + f*x])^3,x]
Output:
(I*A - B)/(6*f*(a + I*a*Tan[e + f*x])^3) + ((A - I*B)*((I/4)/(f*(a + I*a*T an[e + f*x])^2) + (x/(2*a) + (I/2)/(f*(a + I*a*Tan[e + f*x])))/(2*a)))/(2* a)
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a*((a + b*Tan[c + d*x])^n/(2*b*d*n)), x] + Simp[1/(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] && LtQ[n, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*((a + b*Tan[e + f*x])^m/(2*a *f*m)), x] + Simp[(b*c + a*d)/(2*a*b) Int[(a + b*Tan[e + f*x])^(m + 1), x ], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2 , 0] && LtQ[m, 0]
Time = 0.27 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.14
method | result | size |
risch | \(-\frac {i x B}{8 a^{3}}+\frac {x A}{8 a^{3}}+\frac {{\mathrm e}^{-2 i \left (f x +e \right )} B}{16 a^{3} f}+\frac {3 i {\mathrm e}^{-2 i \left (f x +e \right )} A}{16 a^{3} f}-\frac {{\mathrm e}^{-4 i \left (f x +e \right )} B}{32 a^{3} f}+\frac {3 i {\mathrm e}^{-4 i \left (f x +e \right )} A}{32 a^{3} f}-\frac {{\mathrm e}^{-6 i \left (f x +e \right )} B}{48 a^{3} f}+\frac {i {\mathrm e}^{-6 i \left (f x +e \right )} A}{48 a^{3} f}\) | \(128\) |
derivativedivides | \(-\frac {i A}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {B}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {A}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )}-\frac {i B}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )}+\frac {A \arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{3}}-\frac {i B \arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{3}}-\frac {A}{6 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{3}}-\frac {i B}{6 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{3}}\) | \(158\) |
default | \(-\frac {i A}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {B}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {A}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )}-\frac {i B}{8 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )}+\frac {A \arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{3}}-\frac {i B \arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{3}}-\frac {A}{6 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{3}}-\frac {i B}{6 f \,a^{3} \left (-i+\tan \left (f x +e \right )\right )^{3}}\) | \(158\) |
Input:
int((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3,x,method=_RETURNVERBOSE)
Output:
-1/8*I*x/a^3*B+1/8*x/a^3*A+1/16/a^3/f*exp(-2*I*(f*x+e))*B+3/16*I/a^3/f*exp (-2*I*(f*x+e))*A-1/32/a^3/f*exp(-4*I*(f*x+e))*B+3/32*I/a^3/f*exp(-4*I*(f*x +e))*A-1/48/a^3/f*exp(-6*I*(f*x+e))*B+1/48*I/a^3/f*exp(-6*I*(f*x+e))*A
Time = 0.08 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.68 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=\frac {{\left (12 \, {\left (A - i \, B\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 6 \, {\left (-3 i \, A - B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 3 \, {\left (-3 i \, A + B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, A - 2 \, B\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{96 \, a^{3} f} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3,x, algorithm="fricas")
Output:
1/96*(12*(A - I*B)*f*x*e^(6*I*f*x + 6*I*e) - 6*(-3*I*A - B)*e^(4*I*f*x + 4 *I*e) - 3*(-3*I*A + B)*e^(2*I*f*x + 2*I*e) + 2*I*A - 2*B)*e^(-6*I*f*x - 6* I*e)/(a^3*f)
Time = 0.29 (sec) , antiderivative size = 258, normalized size of antiderivative = 2.30 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=\begin {cases} \frac {\left (\left (512 i A a^{6} f^{2} e^{6 i e} - 512 B a^{6} f^{2} e^{6 i e}\right ) e^{- 6 i f x} + \left (2304 i A a^{6} f^{2} e^{8 i e} - 768 B a^{6} f^{2} e^{8 i e}\right ) e^{- 4 i f x} + \left (4608 i A a^{6} f^{2} e^{10 i e} + 1536 B a^{6} f^{2} e^{10 i e}\right ) e^{- 2 i f x}\right ) e^{- 12 i e}}{24576 a^{9} f^{3}} & \text {for}\: a^{9} f^{3} e^{12 i e} \neq 0 \\x \left (- \frac {A - i B}{8 a^{3}} + \frac {\left (A e^{6 i e} + 3 A e^{4 i e} + 3 A e^{2 i e} + A - i B e^{6 i e} - i B e^{4 i e} + i B e^{2 i e} + i B\right ) e^{- 6 i e}}{8 a^{3}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (A - i B\right )}{8 a^{3}} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))**3,x)
Output:
Piecewise((((512*I*A*a**6*f**2*exp(6*I*e) - 512*B*a**6*f**2*exp(6*I*e))*ex p(-6*I*f*x) + (2304*I*A*a**6*f**2*exp(8*I*e) - 768*B*a**6*f**2*exp(8*I*e)) *exp(-4*I*f*x) + (4608*I*A*a**6*f**2*exp(10*I*e) + 1536*B*a**6*f**2*exp(10 *I*e))*exp(-2*I*f*x))*exp(-12*I*e)/(24576*a**9*f**3), Ne(a**9*f**3*exp(12* I*e), 0)), (x*(-(A - I*B)/(8*a**3) + (A*exp(6*I*e) + 3*A*exp(4*I*e) + 3*A* exp(2*I*e) + A - I*B*exp(6*I*e) - I*B*exp(4*I*e) + I*B*exp(2*I*e) + I*B)*e xp(-6*I*e)/(8*a**3)), True)) + x*(A - I*B)/(8*a**3)
Exception generated. \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.47 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.89 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=-\frac {{\left (-i \, A - B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{16 \, a^{3} f} - \frac {{\left (i \, A + B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{16 \, a^{3} f} + \frac {3 \, {\left (A - i \, B\right )} \tan \left (f x + e\right )^{2} - 9 \, {\left (i \, A + B\right )} \tan \left (f x + e\right ) - 10 \, A + 2 i \, B}{24 \, a^{3} f {\left (\tan \left (f x + e\right ) - i\right )}^{3}} \] Input:
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3,x, algorithm="giac")
Output:
-1/16*(-I*A - B)*log(tan(f*x + e) + I)/(a^3*f) - 1/16*(I*A + B)*log(tan(f* x + e) - I)/(a^3*f) + 1/24*(3*(A - I*B)*tan(f*x + e)^2 - 9*(I*A + B)*tan(f *x + e) - 10*A + 2*I*B)/(a^3*f*(tan(f*x + e) - I)^3)
Time = 5.22 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.99 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {B}{8\,a^3}+\frac {A\,1{}\mathrm {i}}{8\,a^3}\right )-\frac {A\,5{}\mathrm {i}}{12\,a^3}-\frac {B}{12\,a^3}+\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {3\,A}{8\,a^3}-\frac {B\,3{}\mathrm {i}}{8\,a^3}\right )}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}+1\right )}-\frac {x\,\left (B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,a^3} \] Input:
int((A + B*tan(e + f*x))/(a + a*tan(e + f*x)*1i)^3,x)
Output:
- (tan(e + f*x)^2*((A*1i)/(8*a^3) + B/(8*a^3)) - (A*5i)/(12*a^3) - B/(12*a ^3) + tan(e + f*x)*((3*A)/(8*a^3) - (B*3i)/(8*a^3)))/(f*(tan(e + f*x)*3i - 3*tan(e + f*x)^2 - tan(e + f*x)^3*1i + 1)) - (x*(A*1i + B)*1i)/(8*a^3)
\[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3} \, dx=\frac {-\left (\int \frac {\tan \left (f x +e \right )}{\tan \left (f x +e \right )^{3} i +3 \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 )^{3} i +3 \tan \left (f x +e \right )^{2}-3 \tan \left (f x +e \right ) i -1}d x \right ) a}{a^{3}} \] Input:
int((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3,x)
Output:
( - (int(tan(e + f*x)/(tan(e + f*x)**3*i + 3*tan(e + f*x)**2 - 3*tan(e + f *x)*i - 1),x)*b + int(1/(tan(e + f*x)**3*i + 3*tan(e + f*x)**2 - 3*tan(e + f*x)*i - 1),x)*a))/a**3