Integrand size = 24, antiderivative size = 121 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {10 \sin (c+d x)}{21 a^3 d}-\frac {20 \sin ^3(c+d x)}{63 a^3 d}+\frac {2 \sin ^5(c+d x)}{21 a^3 d}+\frac {i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}+\frac {4 i \cos ^5(c+d x)}{21 d \left (a^3+i a^3 \tan (c+d x)\right )} \] Output:
10/21*sin(d*x+c)/a^3/d-20/63*sin(d*x+c)^3/a^3/d+2/21*sin(d*x+c)^5/a^3/d+1/ 9*I*cos(d*x+c)^3/d/(a+I*a*tan(d*x+c))^3+4/21*I*cos(d*x+c)^5/d/(a^3+I*a^3*t an(d*x+c))
Time = 0.51 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.81 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {\sec ^3(c+d x) (-210-567 \cos (2 (c+d x))+162 \cos (4 (c+d x))+7 \cos (6 (c+d x))-378 i \sin (2 (c+d x))+216 i \sin (4 (c+d x))+14 i \sin (6 (c+d x)))}{2016 a^3 d (-i+\tan (c+d x))^3} \] Input:
Integrate[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^3,x]
Output:
(Sec[c + d*x]^3*(-210 - 567*Cos[2*(c + d*x)] + 162*Cos[4*(c + d*x)] + 7*Co s[6*(c + d*x)] - (378*I)*Sin[2*(c + d*x)] + (216*I)*Sin[4*(c + d*x)] + (14 *I)*Sin[6*(c + d*x)]))/(2016*a^3*d*(-I + Tan[c + d*x])^3)
Time = 0.46 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.99, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {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 ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^3 (a+i a \tan (c+d x))^3}dx\) |
\(\Big \downarrow \) 3983 |
\(\displaystyle \frac {2 \int \frac {\cos ^3(c+d x)}{(i \tan (c+d x) a+a)^2}dx}{3 a}+\frac {i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 \int \frac {1}{\sec (c+d x)^3 (i \tan (c+d x) a+a)^2}dx}{3 a}+\frac {i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3981 |
\(\displaystyle \frac {2 \left (\frac {5 \int \cos ^5(c+d x)dx}{7 a^2}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{3 a}+\frac {i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 \left (\frac {5 \int \sin \left (c+d x+\frac {\pi }{2}\right )^5dx}{7 a^2}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{3 a}+\frac {i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {2 \left (-\frac {5 \int \left (\sin ^4(c+d x)-2 \sin ^2(c+d x)+1\right )d(-\sin (c+d x))}{7 a^2 d}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{3 a}+\frac {i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 \left (-\frac {5 \left (-\frac {1}{5} \sin ^5(c+d x)+\frac {2}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{7 a^2 d}+\frac {2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\right )}{3 a}+\frac {i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}\) |
Input:
Int[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^3,x]
Output:
((I/9)*Cos[c + d*x]^3)/(d*(a + I*a*Tan[c + d*x])^3) + (2*((-5*(-Sin[c + d* x] + (2*Sin[c + d*x]^3)/3 - Sin[c + d*x]^5/5))/(7*a^2*d) + (((2*I)/7)*Cos[ c + d*x]^5)/(d*(a^2 + I*a^2*Tan[c + d*x]))))/(3*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 = 1.10 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.99
method | result | size |
risch | \(\frac {3 i {\mathrm e}^{-5 i \left (d x +c \right )}}{64 a^{3} d}+\frac {3 i {\mathrm e}^{-7 i \left (d x +c \right )}}{224 a^{3} d}+\frac {i {\mathrm e}^{-9 i \left (d x +c \right )}}{576 a^{3} d}+\frac {9 i \cos \left (d x +c \right )}{64 a^{3} d}+\frac {21 \sin \left (d x +c \right )}{64 a^{3} d}+\frac {19 i \cos \left (3 d x +3 c \right )}{192 a^{3} d}+\frac {7 \sin \left (3 d x +3 c \right )}{64 a^{3} d}\) | \(120\) |
derivativedivides | \(\frac {-\frac {i}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}-\frac {1}{24 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {7}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}+\frac {46 i}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}+\frac {9 i}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {59 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {8}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {68}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {35}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {19}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {57}{32 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{3} d}\) | \(207\) |
default | \(\frac {-\frac {i}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}-\frac {1}{24 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {7}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}+\frac {46 i}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}+\frac {9 i}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {59 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {8}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {68}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {35}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {19}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {57}{32 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{3} d}\) | \(207\) |
Input:
int(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
3/64*I/a^3/d*exp(-5*I*(d*x+c))+3/224*I/a^3/d*exp(-7*I*(d*x+c))+1/576*I/a^3 /d*exp(-9*I*(d*x+c))+9/64*I/a^3/d*cos(d*x+c)+21/64*sin(d*x+c)/a^3/d+19/192 *I/a^3/d*cos(3*d*x+3*c)+7/64/a^3/d*sin(3*d*x+3*c)
Time = 0.09 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.70 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {{\left (-21 i \, e^{\left (12 i \, d x + 12 i \, c\right )} - 378 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 945 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 420 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 189 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 54 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 7 i\right )} e^{\left (-9 i \, d x - 9 i \, c\right )}}{4032 \, a^{3} d} \] Input:
integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")
Output:
1/4032*(-21*I*e^(12*I*d*x + 12*I*c) - 378*I*e^(10*I*d*x + 10*I*c) + 945*I* e^(8*I*d*x + 8*I*c) + 420*I*e^(6*I*d*x + 6*I*c) + 189*I*e^(4*I*d*x + 4*I*c ) + 54*I*e^(2*I*d*x + 2*I*c) + 7*I)*e^(-9*I*d*x - 9*I*c)/(a^3*d)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (105) = 210\).
Time = 0.38 (sec) , antiderivative size = 265, normalized size of antiderivative = 2.19 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\begin {cases} \frac {\left (- 811748818944 i a^{18} d^{6} e^{28 i c} e^{3 i d x} - 14611478740992 i a^{18} d^{6} e^{26 i c} e^{i d x} + 36528696852480 i a^{18} d^{6} e^{24 i c} e^{- i d x} + 16234976378880 i a^{18} d^{6} e^{22 i c} e^{- 3 i d x} + 7305739370496 i a^{18} d^{6} e^{20 i c} e^{- 5 i d x} + 2087354105856 i a^{18} d^{6} e^{18 i c} e^{- 7 i d x} + 270582939648 i a^{18} d^{6} e^{16 i c} e^{- 9 i d x}\right ) e^{- 25 i c}}{155855773237248 a^{21} d^{7}} & \text {for}\: a^{21} d^{7} e^{25 i c} \neq 0 \\\frac {x \left (e^{12 i c} + 6 e^{10 i c} + 15 e^{8 i c} + 20 e^{6 i c} + 15 e^{4 i c} + 6 e^{2 i c} + 1\right ) e^{- 9 i c}}{64 a^{3}} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**3/(a+I*a*tan(d*x+c))**3,x)
Output:
Piecewise(((-811748818944*I*a**18*d**6*exp(28*I*c)*exp(3*I*d*x) - 14611478 740992*I*a**18*d**6*exp(26*I*c)*exp(I*d*x) + 36528696852480*I*a**18*d**6*e xp(24*I*c)*exp(-I*d*x) + 16234976378880*I*a**18*d**6*exp(22*I*c)*exp(-3*I* d*x) + 7305739370496*I*a**18*d**6*exp(20*I*c)*exp(-5*I*d*x) + 208735410585 6*I*a**18*d**6*exp(18*I*c)*exp(-7*I*d*x) + 270582939648*I*a**18*d**6*exp(1 6*I*c)*exp(-9*I*d*x))*exp(-25*I*c)/(155855773237248*a**21*d**7), Ne(a**21* d**7*exp(25*I*c), 0)), (x*(exp(12*I*c) + 6*exp(10*I*c) + 15*exp(8*I*c) + 2 0*exp(6*I*c) + 15*exp(4*I*c) + 6*exp(2*I*c) + 1)*exp(-9*I*c)/(64*a**3), Tr ue))
Exception generated. \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.32 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.41 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {\frac {21 \, {\left (21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 36 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 19\right )}}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}^{3}} + \frac {3591 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 19656 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 56196 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 95760 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 107730 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 79464 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 38484 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 10944 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1615}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{9}}}{2016 \, d} \] Input:
integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x, algorithm="giac")
Output:
1/2016*(21*(21*tan(1/2*d*x + 1/2*c)^2 + 36*I*tan(1/2*d*x + 1/2*c) - 19)/(a ^3*(tan(1/2*d*x + 1/2*c) + I)^3) + (3591*tan(1/2*d*x + 1/2*c)^8 - 19656*I* tan(1/2*d*x + 1/2*c)^7 - 56196*tan(1/2*d*x + 1/2*c)^6 + 95760*I*tan(1/2*d* x + 1/2*c)^5 + 107730*tan(1/2*d*x + 1/2*c)^4 - 79464*I*tan(1/2*d*x + 1/2*c )^3 - 38484*tan(1/2*d*x + 1/2*c)^2 + 10944*I*tan(1/2*d*x + 1/2*c) + 1615)/ (a^3*(tan(1/2*d*x + 1/2*c) - I)^9))/d
Time = 3.63 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.55 \[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {\left (63\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,189{}\mathrm {i}-273\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,63{}\mathrm {i}-378\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,294{}\mathrm {i}-306\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,450{}\mathrm {i}+235\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,39{}\mathrm {i}+51\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-19{}\mathrm {i}\right )\,2{}\mathrm {i}}{63\,a^3\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}^3\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^9} \] Input:
int(cos(c + d*x)^3/(a + a*tan(c + d*x)*1i)^3,x)
Output:
((51*tan(c/2 + (d*x)/2) + tan(c/2 + (d*x)/2)^2*39i + 235*tan(c/2 + (d*x)/2 )^3 + tan(c/2 + (d*x)/2)^4*450i - 306*tan(c/2 + (d*x)/2)^5 + tan(c/2 + (d* x)/2)^6*294i - 378*tan(c/2 + (d*x)/2)^7 - tan(c/2 + (d*x)/2)^8*63i - 273*t an(c/2 + (d*x)/2)^9 - tan(c/2 + (d*x)/2)^10*189i + 63*tan(c/2 + (d*x)/2)^1 1 - 19i)*2i)/(63*a^3*d*(tan(c/2 + (d*x)/2) + 1i)^3*(tan(c/2 + (d*x)/2)*1i + 1)^9)
\[ \int \frac {\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=-\frac {\int \frac {\cos \left (d x +c \right )^{3}}{\tan \left (d x +c \right )^{3} i +3 \tan \left (d x +c \right )^{2}-3 \tan \left (d x +c \right ) i -1}d x}{a^{3}} \] Input:
int(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x)
Output:
( - int(cos(c + d*x)**3/(tan(c + d*x)**3*i + 3*tan(c + d*x)**2 - 3*tan(c + d*x)*i - 1),x))/a**3