Integrand size = 22, antiderivative size = 134 \[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {4 \sin (c+d x)}{21 a^4 d}-\frac {4 \sin ^3(c+d x)}{63 a^4 d}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}+\frac {5 i \cos (c+d x)}{63 a d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{63 d \left (a^4+i a^4 \tan (c+d x)\right )} \] Output:
4/21*sin(d*x+c)/a^4/d-4/63*sin(d*x+c)^3/a^4/d+1/9*I*cos(d*x+c)/d/(a+I*a*ta n(d*x+c))^4+5/63*I*cos(d*x+c)/a/d/(a+I*a*tan(d*x+c))^3+8/63*I*cos(d*x+c)^3 /d/(a^4+I*a^4*tan(d*x+c))
Time = 0.39 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.71 \[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {i \sec ^4(c+d x) (-168 \cos (c+d x)-180 \cos (3 (c+d x))+28 \cos (5 (c+d x))-42 i \sin (c+d x)-135 i \sin (3 (c+d x))+35 i \sin (5 (c+d x)))}{1008 a^4 d (-i+\tan (c+d x))^4} \] Input:
Integrate[Cos[c + d*x]/(a + I*a*Tan[c + d*x])^4,x]
Output:
((-1/1008*I)*Sec[c + d*x]^4*(-168*Cos[c + d*x] - 180*Cos[3*(c + d*x)] + 28 *Cos[5*(c + d*x)] - (42*I)*Sin[c + d*x] - (135*I)*Sin[3*(c + d*x)] + (35*I )*Sin[5*(c + d*x)]))/(a^4*d*(-I + Tan[c + d*x])^4)
Time = 0.58 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.07, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.409, Rules used = {3042, 3983, 3042, 3983, 3042, 3981, 3042, 3113, 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 {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x) (a+i a \tan (c+d x))^4}dx\) |
\(\Big \downarrow \) 3983 |
\(\displaystyle \frac {5 \int \frac {\cos (c+d x)}{(i \tan (c+d x) a+a)^3}dx}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5 \int \frac {1}{\sec (c+d x) (i \tan (c+d x) a+a)^3}dx}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3983 |
\(\displaystyle \frac {5 \left (\frac {4 \int \frac {\cos (c+d x)}{(i \tan (c+d x) a+a)^2}dx}{7 a}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}\right )}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5 \left (\frac {4 \int \frac {1}{\sec (c+d x) (i \tan (c+d x) a+a)^2}dx}{7 a}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}\right )}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3981 |
\(\displaystyle \frac {5 \left (\frac {4 \left (\frac {3 \int \cos ^3(c+d x)dx}{5 a^2}+\frac {2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{7 a}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}\right )}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5 \left (\frac {4 \left (\frac {3 \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx}{5 a^2}+\frac {2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{7 a}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}\right )}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {5 \left (\frac {4 \left (-\frac {3 \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{5 a^2 d}+\frac {2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{7 a}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}\right )}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {5 \left (\frac {4 \left (-\frac {3 \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{5 a^2 d}+\frac {2 i \cos ^3(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{7 a}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}\right )}{9 a}+\frac {i \cos (c+d x)}{9 d (a+i a \tan (c+d x))^4}\) |
Input:
Int[Cos[c + d*x]/(a + I*a*Tan[c + d*x])^4,x]
Output:
((I/9)*Cos[c + d*x])/(d*(a + I*a*Tan[c + d*x])^4) + (5*(((I/7)*Cos[c + d*x ])/(d*(a + I*a*Tan[c + d*x])^3) + (4*((-3*(-Sin[c + d*x] + Sin[c + d*x]^3/ 3))/(5*a^2*d) + (((2*I)/5)*Cos[c + d*x]^3)/(d*(a^2 + I*a^2*Tan[c + d*x]))) )/(7*a)))/(9*a)
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[2*d^2*(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + 2*n))), x] - Simp[d^2*((m - 2)/(b^2*(m + 2*n))) Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[ {a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (IntegersQ[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[a*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/ (b*f*(m + 2*n))), x] + Simp[Simplify[m + n]/(a*(m + 2*n)) Int[(d*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x ] && EqQ[a^2 + b^2, 0] && LtQ[n, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2* n]
Time = 0.96 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.77
method | result | size |
risch | \(\frac {5 i {\mathrm e}^{-3 i \left (d x +c \right )}}{48 a^{4} d}+\frac {i {\mathrm e}^{-5 i \left (d x +c \right )}}{16 a^{4} d}+\frac {5 i {\mathrm e}^{-7 i \left (d x +c \right )}}{224 a^{4} d}+\frac {i {\mathrm e}^{-9 i \left (d x +c \right )}}{288 a^{4} d}+\frac {i \cos \left (d x +c \right )}{8 a^{4} d}+\frac {3 \sin \left (d x +c \right )}{16 a^{4} d}\) | \(103\) |
derivativedivides | \(\frac {\frac {86 i}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {8 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}-\frac {49 i}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {49 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {16}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {132}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {31}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {173}{12 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {31}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {2}{32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+32 i}}{a^{4} d}\) | \(174\) |
default | \(\frac {\frac {86 i}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {8 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}-\frac {49 i}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {49 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {16}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {132}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {31}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {173}{12 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {31}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {2}{32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+32 i}}{a^{4} d}\) | \(174\) |
Input:
int(cos(d*x+c)/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)
Output:
5/48*I/a^4/d*exp(-3*I*(d*x+c))+1/16*I/a^4/d*exp(-5*I*(d*x+c))+5/224*I/a^4/ d*exp(-7*I*(d*x+c))+1/288*I/a^4/d*exp(-9*I*(d*x+c))+1/8*I/a^4/d*cos(d*x+c) +3/16*sin(d*x+c)/a^4/d
Time = 0.11 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.55 \[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\left (-63 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 315 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 210 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 126 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 45 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 7 i\right )} e^{\left (-9 i \, d x - 9 i \, c\right )}}{2016 \, a^{4} d} \] Input:
integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")
Output:
1/2016*(-63*I*e^(10*I*d*x + 10*I*c) + 315*I*e^(8*I*d*x + 8*I*c) + 210*I*e^ (6*I*d*x + 6*I*c) + 126*I*e^(4*I*d*x + 4*I*c) + 45*I*e^(2*I*d*x + 2*I*c) + 7*I)*e^(-9*I*d*x - 9*I*c)/(a^4*d)
Time = 0.35 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.72 \[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\begin {cases} \frac {\left (- 1585446912 i a^{20} d^{5} e^{26 i c} e^{i d x} + 7927234560 i a^{20} d^{5} e^{24 i c} e^{- i d x} + 5284823040 i a^{20} d^{5} e^{22 i c} e^{- 3 i d x} + 3170893824 i a^{20} d^{5} e^{20 i c} e^{- 5 i d x} + 1132462080 i a^{20} d^{5} e^{18 i c} e^{- 7 i d x} + 176160768 i a^{20} d^{5} e^{16 i c} e^{- 9 i d x}\right ) e^{- 25 i c}}{50734301184 a^{24} d^{6}} & \text {for}\: a^{24} d^{6} e^{25 i c} \neq 0 \\\frac {x \left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 9 i c}}{32 a^{4}} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))**4,x)
Output:
Piecewise(((-1585446912*I*a**20*d**5*exp(26*I*c)*exp(I*d*x) + 7927234560*I *a**20*d**5*exp(24*I*c)*exp(-I*d*x) + 5284823040*I*a**20*d**5*exp(22*I*c)* exp(-3*I*d*x) + 3170893824*I*a**20*d**5*exp(20*I*c)*exp(-5*I*d*x) + 113246 2080*I*a**20*d**5*exp(18*I*c)*exp(-7*I*d*x) + 176160768*I*a**20*d**5*exp(1 6*I*c)*exp(-9*I*d*x))*exp(-25*I*c)/(50734301184*a**24*d**6), Ne(a**24*d**6 *exp(25*I*c), 0)), (x*(exp(10*I*c) + 5*exp(8*I*c) + 10*exp(6*I*c) + 10*exp (4*I*c) + 5*exp(2*I*c) + 1)*exp(-9*I*c)/(32*a**4), True))
Exception generated. \[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cos(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.37 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.08 \[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\frac {63}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}} + \frac {1953 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 9450 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 25998 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 42210 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 46368 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 33054 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15858 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4374 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 703}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{9}}}{1008 \, d} \] Input:
integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")
Output:
1/1008*(63/(a^4*(tan(1/2*d*x + 1/2*c) + I)) + (1953*tan(1/2*d*x + 1/2*c)^8 - 9450*I*tan(1/2*d*x + 1/2*c)^7 - 25998*tan(1/2*d*x + 1/2*c)^6 + 42210*I* tan(1/2*d*x + 1/2*c)^5 + 46368*tan(1/2*d*x + 1/2*c)^4 - 33054*I*tan(1/2*d* x + 1/2*c)^3 - 15858*tan(1/2*d*x + 1/2*c)^2 + 4374*I*tan(1/2*d*x + 1/2*c) + 703)/(a^4*(tan(1/2*d*x + 1/2*c) - I)^9))/d
Time = 4.59 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.20 \[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\left (63\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,252{}\mathrm {i}-588\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,672{}\mathrm {i}+378\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,168{}\mathrm {i}+372\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,288{}\mathrm {i}-97\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+20{}\mathrm {i}\right )\,2{}\mathrm {i}}{63\,a^4\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^9} \] Input:
int(cos(c + d*x)/(a + a*tan(c + d*x)*1i)^4,x)
Output:
((372*tan(c/2 + (d*x)/2)^3 - tan(c/2 + (d*x)/2)^2*288i - 97*tan(c/2 + (d*x )/2) + tan(c/2 + (d*x)/2)^4*168i + 378*tan(c/2 + (d*x)/2)^5 + tan(c/2 + (d *x)/2)^6*672i - 588*tan(c/2 + (d*x)/2)^7 - tan(c/2 + (d*x)/2)^8*252i + 63* tan(c/2 + (d*x)/2)^9 + 20i)*2i)/(63*a^4*d*(tan(c/2 + (d*x)/2) + 1i)*(tan(c /2 + (d*x)/2)*1i + 1)^9)
\[ \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\int \frac {\cos \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}{a^{4}} \] Input:
int(cos(d*x+c)/(a+I*a*tan(d*x+c))^4,x)
Output:
int(cos(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)/a**4