Integrand size = 24, antiderivative size = 101 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {2 i a^2 \cos ^3(c+d x) (a+i a \tan (c+d x))^3}{105 d}-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^4}{35 d}-\frac {i \cos ^7(c+d x) (a+i a \tan (c+d x))^5}{7 d} \] Output:
-2/105*I*a^2*cos(d*x+c)^3*(a+I*a*tan(d*x+c))^3/d-2/35*I*a*cos(d*x+c)^5*(a+ I*a*tan(d*x+c))^4/d-1/7*I*cos(d*x+c)^7*(a+I*a*tan(d*x+c))^5/d
Time = 0.56 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.21 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {a^5 \sec (c+d x) (-i \cos (4 (c+d x))+\sin (4 (c+d x))) \left (77+92 \cos (2 (c+d x))+\left (15+416 \sqrt {\cos ^2(c+d x)}\right ) \cos (4 (c+d x))+22 i \sin (2 (c+d x))+15 i \sin (4 (c+d x))-416 i \sqrt {\cos ^2(c+d x)} \sin (4 (c+d x))\right )}{840 d} \] Input:
Integrate[Cos[c + d*x]^7*(a + I*a*Tan[c + d*x])^5,x]
Output:
(a^5*Sec[c + d*x]*((-I)*Cos[4*(c + d*x)] + Sin[4*(c + d*x)])*(77 + 92*Cos[ 2*(c + d*x)] + (15 + 416*Sqrt[Cos[c + d*x]^2])*Cos[4*(c + d*x)] + (22*I)*S in[2*(c + d*x)] + (15*I)*Sin[4*(c + d*x)] - (416*I)*Sqrt[Cos[c + d*x]^2]*S in[4*(c + d*x)]))/(840*d)
Time = 0.48 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.03, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3978, 3042, 3978, 3042, 3969}
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 \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^5}{\sec (c+d x)^7}dx\) |
\(\Big \downarrow \) 3978 |
\(\displaystyle \frac {2}{7} a \int \cos ^5(c+d x) (i \tan (c+d x) a+a)^4dx-\frac {i \cos ^7(c+d x) (a+i a \tan (c+d x))^5}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{7} a \int \frac {(i \tan (c+d x) a+a)^4}{\sec (c+d x)^5}dx-\frac {i \cos ^7(c+d x) (a+i a \tan (c+d x))^5}{7 d}\) |
\(\Big \downarrow \) 3978 |
\(\displaystyle \frac {2}{7} a \left (\frac {1}{5} a \int \cos ^3(c+d x) (i \tan (c+d x) a+a)^3dx-\frac {i \cos ^5(c+d x) (a+i a \tan (c+d x))^4}{5 d}\right )-\frac {i \cos ^7(c+d x) (a+i a \tan (c+d x))^5}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{7} a \left (\frac {1}{5} a \int \frac {(i \tan (c+d x) a+a)^3}{\sec (c+d x)^3}dx-\frac {i \cos ^5(c+d x) (a+i a \tan (c+d x))^4}{5 d}\right )-\frac {i \cos ^7(c+d x) (a+i a \tan (c+d x))^5}{7 d}\) |
\(\Big \downarrow \) 3969 |
\(\displaystyle \frac {2}{7} a \left (-\frac {i \cos ^5(c+d x) (a+i a \tan (c+d x))^4}{5 d}-\frac {i a \cos ^3(c+d x) (a+i a \tan (c+d x))^3}{15 d}\right )-\frac {i \cos ^7(c+d x) (a+i a \tan (c+d x))^5}{7 d}\) |
Input:
Int[Cos[c + d*x]^7*(a + I*a*Tan[c + d*x])^5,x]
Output:
((-1/7*I)*Cos[c + d*x]^7*(a + I*a*Tan[c + d*x])^5)/d + (2*a*(((-1/15*I)*a* Cos[c + d*x]^3*(a + I*a*Tan[c + d*x])^3)/d - ((I/5)*Cos[c + d*x]^5*(a + I* a*Tan[c + d*x])^4)/d))/7
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/ (a*f*m)), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] && EqQ [Simplify[m + n], 0]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/( a*f*m)), x] + Simp[a*((m + n)/(m*d^2)) Int[(d*Sec[e + f*x])^(m + 2)*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 + b ^2, 0] && GtQ[n, 0] && LtQ[m, -1] && IntegersQ[2*m, 2*n]
Time = 194.97 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.55
method | result | size |
risch | \(-\frac {i a^{5} {\mathrm e}^{7 i \left (d x +c \right )}}{28 d}-\frac {i a^{5} {\mathrm e}^{5 i \left (d x +c \right )}}{10 d}-\frac {i a^{5} {\mathrm e}^{3 i \left (d x +c \right )}}{12 d}\) | \(56\) |
derivativedivides | \(\frac {i a^{5} \left (-\frac {\cos \left (d x +c \right )^{3} \sin \left (d x +c \right )^{4}}{7}-\frac {4 \cos \left (d x +c \right )^{3} \sin \left (d x +c \right )^{2}}{35}-\frac {8 \cos \left (d x +c \right )^{3}}{105}\right )+5 a^{5} \left (-\frac {\sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{4}}{7}-\frac {3 \cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{35}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{35}\right )-10 i a^{5} \left (-\frac {\cos \left (d x +c \right )^{5} \sin \left (d x +c \right )^{2}}{7}-\frac {2 \cos \left (d x +c \right )^{5}}{35}\right )-10 a^{5} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{6}}{7}+\frac {\left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {5 i a^{5} \cos \left (d x +c \right )^{7}}{7}+\frac {a^{5} \left (\frac {16}{5}+\cos \left (d x +c \right )^{6}+\frac {6 \cos \left (d x +c \right )^{4}}{5}+\frac {8 \cos \left (d x +c \right )^{2}}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(257\) |
default | \(\frac {i a^{5} \left (-\frac {\cos \left (d x +c \right )^{3} \sin \left (d x +c \right )^{4}}{7}-\frac {4 \cos \left (d x +c \right )^{3} \sin \left (d x +c \right )^{2}}{35}-\frac {8 \cos \left (d x +c \right )^{3}}{105}\right )+5 a^{5} \left (-\frac {\sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{4}}{7}-\frac {3 \cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{35}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{35}\right )-10 i a^{5} \left (-\frac {\cos \left (d x +c \right )^{5} \sin \left (d x +c \right )^{2}}{7}-\frac {2 \cos \left (d x +c \right )^{5}}{35}\right )-10 a^{5} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{6}}{7}+\frac {\left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {5 i a^{5} \cos \left (d x +c \right )^{7}}{7}+\frac {a^{5} \left (\frac {16}{5}+\cos \left (d x +c \right )^{6}+\frac {6 \cos \left (d x +c \right )^{4}}{5}+\frac {8 \cos \left (d x +c \right )^{2}}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(257\) |
Input:
int(cos(d*x+c)^7*(a+I*a*tan(d*x+c))^5,x,method=_RETURNVERBOSE)
Output:
-1/28*I/d*a^5*exp(7*I*(d*x+c))-1/10*I/d*a^5*exp(5*I*(d*x+c))-1/12*I/d*a^5* exp(3*I*(d*x+c))
Time = 0.10 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.48 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {-15 i \, a^{5} e^{\left (7 i \, d x + 7 i \, c\right )} - 42 i \, a^{5} e^{\left (5 i \, d x + 5 i \, c\right )} - 35 i \, a^{5} e^{\left (3 i \, d x + 3 i \, c\right )}}{420 \, d} \] Input:
integrate(cos(d*x+c)^7*(a+I*a*tan(d*x+c))^5,x, algorithm="fricas")
Output:
1/420*(-15*I*a^5*e^(7*I*d*x + 7*I*c) - 42*I*a^5*e^(5*I*d*x + 5*I*c) - 35*I *a^5*e^(3*I*d*x + 3*I*c))/d
Time = 0.35 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.20 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=\begin {cases} \frac {- 120 i a^{5} d^{2} e^{7 i c} e^{7 i d x} - 336 i a^{5} d^{2} e^{5 i c} e^{5 i d x} - 280 i a^{5} d^{2} e^{3 i c} e^{3 i d x}}{3360 d^{3}} & \text {for}\: d^{3} \neq 0 \\x \left (\frac {a^{5} e^{7 i c}}{4} + \frac {a^{5} e^{5 i c}}{2} + \frac {a^{5} e^{3 i c}}{4}\right ) & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**7*(a+I*a*tan(d*x+c))**5,x)
Output:
Piecewise(((-120*I*a**5*d**2*exp(7*I*c)*exp(7*I*d*x) - 336*I*a**5*d**2*exp (5*I*c)*exp(5*I*d*x) - 280*I*a**5*d**2*exp(3*I*c)*exp(3*I*d*x))/(3360*d**3 ), Ne(d**3, 0)), (x*(a**5*exp(7*I*c)/4 + a**5*exp(5*I*c)/2 + a**5*exp(3*I* c)/4), True))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (83) = 166\).
Time = 0.05 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.85 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {75 i \, a^{5} \cos \left (d x + c\right )^{7} + i \, {\left (15 \, \cos \left (d x + c\right )^{7} - 42 \, \cos \left (d x + c\right )^{5} + 35 \, \cos \left (d x + c\right )^{3}\right )} a^{5} + 30 i \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} a^{5} + 10 \, {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} a^{5} + 15 \, {\left (5 \, \sin \left (d x + c\right )^{7} - 7 \, \sin \left (d x + c\right )^{5}\right )} a^{5} + 3 \, {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{5}}{105 \, d} \] Input:
integrate(cos(d*x+c)^7*(a+I*a*tan(d*x+c))^5,x, algorithm="maxima")
Output:
-1/105*(75*I*a^5*cos(d*x + c)^7 + I*(15*cos(d*x + c)^7 - 42*cos(d*x + c)^5 + 35*cos(d*x + c)^3)*a^5 + 30*I*(5*cos(d*x + c)^7 - 7*cos(d*x + c)^5)*a^5 + 10*(15*sin(d*x + c)^7 - 42*sin(d*x + c)^5 + 35*sin(d*x + c)^3)*a^5 + 15 *(5*sin(d*x + c)^7 - 7*sin(d*x + c)^5)*a^5 + 3*(5*sin(d*x + c)^7 - 21*sin( d*x + c)^5 + 35*sin(d*x + c)^3 - 35*sin(d*x + c))*a^5)/d
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1697 vs. \(2 (83) = 166\).
Time = 0.57 (sec) , antiderivative size = 1697, normalized size of antiderivative = 16.80 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)^7*(a+I*a*tan(d*x+c))^5,x, algorithm="giac")
Output:
-1/3440640*(7357770*a^5*e^(16*I*d*x + 8*I*c)*log(I*e^(I*d*x + I*c) + 1) + 58862160*a^5*e^(14*I*d*x + 6*I*c)*log(I*e^(I*d*x + I*c) + 1) + 206017560*a ^5*e^(12*I*d*x + 4*I*c)*log(I*e^(I*d*x + I*c) + 1) + 412035120*a^5*e^(10*I *d*x + 2*I*c)*log(I*e^(I*d*x + I*c) + 1) + 412035120*a^5*e^(6*I*d*x - 2*I* c)*log(I*e^(I*d*x + I*c) + 1) + 206017560*a^5*e^(4*I*d*x - 4*I*c)*log(I*e^ (I*d*x + I*c) + 1) + 58862160*a^5*e^(2*I*d*x - 6*I*c)*log(I*e^(I*d*x + I*c ) + 1) + 515043900*a^5*e^(8*I*d*x)*log(I*e^(I*d*x + I*c) + 1) + 7357770*a^ 5*e^(-8*I*c)*log(I*e^(I*d*x + I*c) + 1) + 7390425*a^5*e^(16*I*d*x + 8*I*c) *log(I*e^(I*d*x + I*c) - 1) + 59123400*a^5*e^(14*I*d*x + 6*I*c)*log(I*e^(I *d*x + I*c) - 1) + 206931900*a^5*e^(12*I*d*x + 4*I*c)*log(I*e^(I*d*x + I*c ) - 1) + 413863800*a^5*e^(10*I*d*x + 2*I*c)*log(I*e^(I*d*x + I*c) - 1) + 4 13863800*a^5*e^(6*I*d*x - 2*I*c)*log(I*e^(I*d*x + I*c) - 1) + 206931900*a^ 5*e^(4*I*d*x - 4*I*c)*log(I*e^(I*d*x + I*c) - 1) + 59123400*a^5*e^(2*I*d*x - 6*I*c)*log(I*e^(I*d*x + I*c) - 1) + 517329750*a^5*e^(8*I*d*x)*log(I*e^( I*d*x + I*c) - 1) + 7390425*a^5*e^(-8*I*c)*log(I*e^(I*d*x + I*c) - 1) - 73 57770*a^5*e^(16*I*d*x + 8*I*c)*log(-I*e^(I*d*x + I*c) + 1) - 58862160*a^5* e^(14*I*d*x + 6*I*c)*log(-I*e^(I*d*x + I*c) + 1) - 206017560*a^5*e^(12*I*d *x + 4*I*c)*log(-I*e^(I*d*x + I*c) + 1) - 412035120*a^5*e^(10*I*d*x + 2*I* c)*log(-I*e^(I*d*x + I*c) + 1) - 412035120*a^5*e^(6*I*d*x - 2*I*c)*log(-I* e^(I*d*x + I*c) + 1) - 206017560*a^5*e^(4*I*d*x - 4*I*c)*log(-I*e^(I*d*...
Time = 1.36 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.84 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {2\,a^5\,\left (105\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,210{}\mathrm {i}-455\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,350{}\mathrm {i}+273\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,56{}\mathrm {i}-23\right )}{105\,d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,7{}\mathrm {i}+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,35{}\mathrm {i}-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,21{}\mathrm {i}+7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \] Input:
int(cos(c + d*x)^7*(a + a*tan(c + d*x)*1i)^5,x)
Output:
-(2*a^5*(tan(c/2 + (d*x)/2)*56i + 273*tan(c/2 + (d*x)/2)^2 - tan(c/2 + (d* x)/2)^3*350i - 455*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^5*210i + 105* tan(c/2 + (d*x)/2)^6 - 23))/(105*d*(7*tan(c/2 + (d*x)/2) - tan(c/2 + (d*x) /2)^2*21i - 35*tan(c/2 + (d*x)/2)^3 + tan(c/2 + (d*x)/2)^4*35i + 21*tan(c/ 2 + (d*x)/2)^5 - tan(c/2 + (d*x)/2)^6*7i - tan(c/2 + (d*x)/2)^7 + 1i))
Time = 0.19 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.09 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {a^{5} \left (240 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6} i -468 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} i +251 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} i -23 \cos \left (d x +c \right ) i -240 \sin \left (d x +c \right )^{7}+588 \sin \left (d x +c \right )^{5}-455 \sin \left (d x +c \right )^{3}+105 \sin \left (d x +c \right )+23 i \right )}{105 d} \] Input:
int(cos(d*x+c)^7*(a+I*a*tan(d*x+c))^5,x)
Output:
(a**5*(240*cos(c + d*x)*sin(c + d*x)**6*i - 468*cos(c + d*x)*sin(c + d*x)* *4*i + 251*cos(c + d*x)*sin(c + d*x)**2*i - 23*cos(c + d*x)*i - 240*sin(c + d*x)**7 + 588*sin(c + d*x)**5 - 455*sin(c + d*x)**3 + 105*sin(c + d*x) + 23*i))/(105*d)