Integrand size = 26, antiderivative size = 145 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {(A-i B) x}{16 a^4}+\frac {i A-B}{8 d (a+i a \tan (c+d x))^4}+\frac {i A+B}{12 a d (a+i a \tan (c+d x))^3}+\frac {i A+B}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac {i A+B}{16 d \left (a^4+i a^4 \tan (c+d x)\right )} \] Output:
1/16*(A-I*B)*x/a^4+1/8*(I*A-B)/d/(a+I*a*tan(d*x+c))^4+1/12*(I*A+B)/a/d/(a+ I*a*tan(d*x+c))^3+1/16*(I*A+B)/d/(a^2+I*a^2*tan(d*x+c))^2+1/16*(I*A+B)/d/( a^4+I*a^4*tan(d*x+c))
Time = 0.85 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.91 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\sec ^3(c+d x) (18 i A \cos (c+d x)+2 (7 i A+4 B) \cos (3 (c+d x))-(A-i B) (5 \sin (c+d x)+11 \sin (3 (c+d x)))+6 (A-i B) \arctan (\tan (c+d x)) \sec (c+d x) (\cos (4 (c+d x))+i \sin (4 (c+d x))))}{96 a^4 d (-i+\tan (c+d x))^4} \] Input:
Integrate[(A + B*Tan[c + d*x])/(a + I*a*Tan[c + d*x])^4,x]
Output:
(Sec[c + d*x]^3*((18*I)*A*Cos[c + d*x] + 2*((7*I)*A + 4*B)*Cos[3*(c + d*x) ] - (A - I*B)*(5*Sin[c + d*x] + 11*Sin[3*(c + d*x)]) + 6*(A - I*B)*ArcTan[ Tan[c + d*x]]*Sec[c + d*x]*(Cos[4*(c + d*x)] + I*Sin[4*(c + d*x)])))/(96*a ^4*d*(-I + Tan[c + d*x])^4)
Time = 0.51 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.99, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {3042, 4009, 3042, 3960, 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 (c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4}dx\) |
\(\Big \downarrow \) 4009 |
\(\displaystyle \frac {(A-i B) \int \frac {1}{(i \tan (c+d x) a+a)^3}dx}{2 a}+\frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A-i B) \int \frac {1}{(i \tan (c+d x) a+a)^3}dx}{2 a}+\frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {(A-i B) \left (\frac {\int \frac {1}{(i \tan (c+d x) a+a)^2}dx}{2 a}+\frac {i}{6 d (a+i a \tan (c+d x))^3}\right )}{2 a}+\frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A-i B) \left (\frac {\int \frac {1}{(i \tan (c+d x) a+a)^2}dx}{2 a}+\frac {i}{6 d (a+i a \tan (c+d x))^3}\right )}{2 a}+\frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {(A-i B) \left (\frac {\frac {\int \frac {1}{i \tan (c+d x) a+a}dx}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}}{2 a}+\frac {i}{6 d (a+i a \tan (c+d x))^3}\right )}{2 a}+\frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A-i B) \left (\frac {\frac {\int \frac {1}{i \tan (c+d x) a+a}dx}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}}{2 a}+\frac {i}{6 d (a+i a \tan (c+d x))^3}\right )}{2 a}+\frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {(A-i B) \left (\frac {\frac {\frac {\int 1dx}{2 a}+\frac {i}{2 d (a+i a \tan (c+d x))}}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}}{2 a}+\frac {i}{6 d (a+i a \tan (c+d x))^3}\right )}{2 a}+\frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {-B+i A}{8 d (a+i a \tan (c+d x))^4}+\frac {(A-i B) \left (\frac {\frac {\frac {x}{2 a}+\frac {i}{2 d (a+i a \tan (c+d x))}}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}}{2 a}+\frac {i}{6 d (a+i a \tan (c+d x))^3}\right )}{2 a}\) |
Input:
Int[(A + B*Tan[c + d*x])/(a + I*a*Tan[c + d*x])^4,x]
Output:
(I*A - B)/(8*d*(a + I*a*Tan[c + d*x])^4) + ((A - I*B)*((I/6)/(d*(a + I*a*T an[c + d*x])^3) + ((I/4)/(d*(a + I*a*Tan[c + d*x])^2) + (x/(2*a) + (I/2)/( d*(a + I*a*Tan[c + d*x])))/(2*a))/(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.29 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.01
method | result | size |
risch | \(-\frac {i x B}{16 a^{4}}+\frac {x A}{16 a^{4}}+\frac {{\mathrm e}^{-2 i \left (d x +c \right )} B}{16 d \,a^{4}}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} A}{8 d \,a^{4}}+\frac {3 i {\mathrm e}^{-4 i \left (d x +c \right )} A}{32 d \,a^{4}}-\frac {{\mathrm e}^{-6 i \left (d x +c \right )} B}{48 d \,a^{4}}+\frac {i {\mathrm e}^{-6 i \left (d x +c \right )} A}{24 d \,a^{4}}-\frac {{\mathrm e}^{-8 i \left (d x +c \right )} B}{128 d \,a^{4}}+\frac {i {\mathrm e}^{-8 i \left (d x +c \right )} A}{128 d \,a^{4}}\) | \(147\) |
derivativedivides | \(-\frac {i A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {A \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}-\frac {i B \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}+\frac {i B}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {i A}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}-\frac {A}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}-\frac {i B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}-\frac {B}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}\) | \(199\) |
default | \(-\frac {i A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {A \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}-\frac {i B \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}+\frac {i B}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {i A}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}-\frac {A}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}-\frac {i B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}-\frac {B}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}\) | \(199\) |
Input:
int((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)
Output:
-1/16*I*x/a^4*B+1/16*x/a^4*A+1/16/d/a^4*exp(-2*I*(d*x+c))*B+1/8*I/d/a^4*ex p(-2*I*(d*x+c))*A+3/32*I/d/a^4*exp(-4*I*(d*x+c))*A-1/48/d/a^4*exp(-6*I*(d* x+c))*B+1/24*I/d/a^4*exp(-6*I*(d*x+c))*A-1/128/d/a^4*exp(-8*I*(d*x+c))*B+1 /128*I/d/a^4*exp(-8*I*(d*x+c))*A
Time = 0.08 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.61 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\left (24 \, {\left (A - i \, B\right )} d x e^{\left (8 i \, d x + 8 i \, c\right )} - 24 \, {\left (-2 i \, A - B\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + 36 i \, A e^{\left (4 i \, d x + 4 i \, c\right )} - 8 \, {\left (-2 i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i \, A - 3 \, B\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{384 \, a^{4} d} \] Input:
integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")
Output:
1/384*(24*(A - I*B)*d*x*e^(8*I*d*x + 8*I*c) - 24*(-2*I*A - B)*e^(6*I*d*x + 6*I*c) + 36*I*A*e^(4*I*d*x + 4*I*c) - 8*(-2*I*A + B)*e^(2*I*d*x + 2*I*c) + 3*I*A - 3*B)*e^(-8*I*d*x - 8*I*c)/(a^4*d)
Time = 0.37 (sec) , antiderivative size = 299, normalized size of antiderivative = 2.06 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\begin {cases} \frac {\left (294912 i A a^{12} d^{3} e^{16 i c} e^{- 4 i d x} + \left (24576 i A a^{12} d^{3} e^{12 i c} - 24576 B a^{12} d^{3} e^{12 i c}\right ) e^{- 8 i d x} + \left (131072 i A a^{12} d^{3} e^{14 i c} - 65536 B a^{12} d^{3} e^{14 i c}\right ) e^{- 6 i d x} + \left (393216 i A a^{12} d^{3} e^{18 i c} + 196608 B a^{12} d^{3} e^{18 i c}\right ) e^{- 2 i d x}\right ) e^{- 20 i c}}{3145728 a^{16} d^{4}} & \text {for}\: a^{16} d^{4} e^{20 i c} \neq 0 \\x \left (- \frac {A - i B}{16 a^{4}} + \frac {\left (A e^{8 i c} + 4 A e^{6 i c} + 6 A e^{4 i c} + 4 A e^{2 i c} + A - i B e^{8 i c} - 2 i B e^{6 i c} + 2 i B e^{2 i c} + i B\right ) e^{- 8 i c}}{16 a^{4}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (A - i B\right )}{16 a^{4}} \] Input:
integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))**4,x)
Output:
Piecewise(((294912*I*A*a**12*d**3*exp(16*I*c)*exp(-4*I*d*x) + (24576*I*A*a **12*d**3*exp(12*I*c) - 24576*B*a**12*d**3*exp(12*I*c))*exp(-8*I*d*x) + (1 31072*I*A*a**12*d**3*exp(14*I*c) - 65536*B*a**12*d**3*exp(14*I*c))*exp(-6* I*d*x) + (393216*I*A*a**12*d**3*exp(18*I*c) + 196608*B*a**12*d**3*exp(18*I *c))*exp(-2*I*d*x))*exp(-20*I*c)/(3145728*a**16*d**4), Ne(a**16*d**4*exp(2 0*I*c), 0)), (x*(-(A - I*B)/(16*a**4) + (A*exp(8*I*c) + 4*A*exp(6*I*c) + 6 *A*exp(4*I*c) + 4*A*exp(2*I*c) + A - I*B*exp(8*I*c) - 2*I*B*exp(6*I*c) + 2 *I*B*exp(2*I*c) + I*B)*exp(-8*I*c)/(16*a**4)), True)) + x*(A - I*B)/(16*a* *4)
Exception generated. \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.43 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.81 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {{\left (-i \, A - B\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{32 \, a^{4} d} + \frac {{\left (-i \, A - B\right )} \log \left (\tan \left (d x + c\right ) - i\right )}{32 \, a^{4} d} + \frac {3 \, {\left (A - i \, B\right )} \tan \left (d x + c\right )^{3} - 12 \, {\left (i \, A + B\right )} \tan \left (d x + c\right )^{2} - 19 \, {\left (A - i \, B\right )} \tan \left (d x + c\right ) + 16 i \, A + 4 \, B}{48 \, a^{4} d {\left (\tan \left (d x + c\right ) - i\right )}^{4}} \] Input:
integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")
Output:
-1/32*(-I*A - B)*log(tan(d*x + c) + I)/(a^4*d) + 1/32*(-I*A - B)*log(tan(d *x + c) - I)/(a^4*d) + 1/48*(3*(A - I*B)*tan(d*x + c)^3 - 12*(I*A + B)*tan (d*x + c)^2 - 19*(A - I*B)*tan(d*x + c) + 16*I*A + 4*B)/(a^4*d*(tan(d*x + c) - I)^4)
Time = 3.55 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.99 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\frac {B}{12\,a^4}+{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {A}{16\,a^4}-\frac {B\,1{}\mathrm {i}}{16\,a^4}\right )+\frac {A\,1{}\mathrm {i}}{3\,a^4}-{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {B}{4\,a^4}+\frac {A\,1{}\mathrm {i}}{4\,a^4}\right )-\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {19\,A}{48\,a^4}-\frac {B\,19{}\mathrm {i}}{48\,a^4}\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4-{\mathrm {tan}\left (c+d\,x\right )}^3\,4{}\mathrm {i}-6\,{\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,4{}\mathrm {i}+1\right )}-\frac {x\,\left (B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{16\,a^4} \] Input:
int((A + B*tan(c + d*x))/(a + a*tan(c + d*x)*1i)^4,x)
Output:
(tan(c + d*x)^3*(A/(16*a^4) - (B*1i)/(16*a^4)) - tan(c + d*x)^2*((A*1i)/(4 *a^4) + B/(4*a^4)) + (A*1i)/(3*a^4) + B/(12*a^4) - tan(c + d*x)*((19*A)/(4 8*a^4) - (B*19i)/(48*a^4)))/(d*(tan(c + d*x)*4i - 6*tan(c + d*x)^2 - tan(c + d*x)^3*4i + tan(c + d*x)^4 + 1)) - (x*(A*1i + B)*1i)/(16*a^4)
\[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\left (\int \frac {\tan \left (d x +c \right )}{\tan \left (d x +c \right )^{4}-4 \tan \left (d x +c \right )^{3} i -6 \tan \left (d x +c \right )^{2}+4 \tan \left (d x +c \right ) i +1}d x \right ) b +\left (\int \frac {1}{\tan \left (d x +c \right )^{4}-4 \tan \left (d x +c \right )^{3} i -6 \tan \left (d x +c \right )^{2}+4 \tan \left (d x +c \right ) i +1}d x \right ) a}{a^{4}} \] Input:
int((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x)
Output:
(int(tan(c + d*x)/(tan(c + d*x)**4 - 4*tan(c + d*x)**3*i - 6*tan(c + d*x)* *2 + 4*tan(c + d*x)*i + 1),x)*b + int(1/(tan(c + d*x)**4 - 4*tan(c + d*x)* *3*i - 6*tan(c + d*x)**2 + 4*tan(c + d*x)*i + 1),x)*a)/a**4