Integrand size = 24, antiderivative size = 104 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {64 i a^3 \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}+\frac {16 i a^2 \cos (c+d x) (a+i a \tan (c+d x))^{3/2}}{3 d}+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{5/2}}{3 d} \] Output:
-64/3*I*a^3*cos(d*x+c)*(a+I*a*tan(d*x+c))^(1/2)/d+16/3*I*a^2*cos(d*x+c)*(a +I*a*tan(d*x+c))^(3/2)/d+2/3*I*a*cos(d*x+c)*(a+I*a*tan(d*x+c))^(5/2)/d
Time = 0.72 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.57 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {2 i a^3 \sec (c+d x) (12+11 \cos (2 (c+d x))-5 i \sin (2 (c+d x))) \sqrt {a+i a \tan (c+d x)}}{3 d} \] Input:
Integrate[Cos[c + d*x]*(a + I*a*Tan[c + d*x])^(7/2),x]
Output:
(((-2*I)/3)*a^3*Sec[c + d*x]*(12 + 11*Cos[2*(c + d*x)] - (5*I)*Sin[2*(c + d*x)])*Sqrt[a + I*a*Tan[c + d*x]])/d
Time = 0.48 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3975, 3042, 3975, 3042, 3974}
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 (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^{7/2}}{\sec (c+d x)}dx\) |
\(\Big \downarrow \) 3975 |
\(\displaystyle \frac {8}{3} a \int \cos (c+d x) (i \tan (c+d x) a+a)^{5/2}dx+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{5/2}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {8}{3} a \int \frac {(i \tan (c+d x) a+a)^{5/2}}{\sec (c+d x)}dx+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{5/2}}{3 d}\) |
\(\Big \downarrow \) 3975 |
\(\displaystyle \frac {8}{3} a \left (4 a \int \cos (c+d x) (i \tan (c+d x) a+a)^{3/2}dx+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{3/2}}{d}\right )+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{5/2}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {8}{3} a \left (4 a \int \frac {(i \tan (c+d x) a+a)^{3/2}}{\sec (c+d x)}dx+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{3/2}}{d}\right )+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{5/2}}{3 d}\) |
\(\Big \downarrow \) 3974 |
\(\displaystyle \frac {8}{3} a \left (\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{3/2}}{d}-\frac {8 i a^2 \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )+\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^{5/2}}{3 d}\) |
Input:
Int[Cos[c + d*x]*(a + I*a*Tan[c + d*x])^(7/2),x]
Output:
(((2*I)/3)*a*Cos[c + d*x]*(a + I*a*Tan[c + d*x])^(5/2))/d + (8*a*(((-8*I)* a^2*Cos[c + d*x]*Sqrt[a + I*a*Tan[c + d*x]])/d + ((2*I)*a*Cos[c + d*x]*(a + I*a*Tan[c + d*x])^(3/2))/d))/3
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[2*b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^ (n - 1)/(f*m)), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] && EqQ[Simplify[m/2 + n - 1], 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 - 1)/(f*(m + n - 1))), x] + Simp[a*((m + 2*n - 2)/(m + n - 1)) Int[(d*Se c[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] && IGtQ[Simplify[m/2 + n - 1], 0] && !Inte gerQ[n]
Time = 7.05 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.48
method | result | size |
default | \(\frac {\left (-\frac {2 i \left (\sec \left (d x +c \right )+22 \cos \left (d x +c \right )\right )}{3}-\frac {20 \sin \left (d x +c \right )}{3}\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a^{3}}{d}\) | \(50\) |
Input:
int(cos(d*x+c)*(a+I*a*tan(d*x+c))^(7/2),x,method=_RETURNVERBOSE)
Output:
1/d*(-2/3*I*(sec(d*x+c)+22*cos(d*x+c))-20/3*sin(d*x+c))*(a*(1+I*tan(d*x+c) ))^(1/2)*a^3
Time = 0.09 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.68 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {4 \, \sqrt {2} {\left (3 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 12 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 8 i \, a^{3}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{3 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:
integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="fricas")
Output:
-4/3*sqrt(2)*(3*I*a^3*e^(4*I*d*x + 4*I*c) + 12*I*a^3*e^(2*I*d*x + 2*I*c) + 8*I*a^3)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))/(d*e^(2*I*d*x + 2*I*c) + d)
Timed out. \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))**(7/2),x)
Output:
Timed out
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 418 vs. \(2 (80) = 160\).
Time = 0.23 (sec) , antiderivative size = 418, normalized size of antiderivative = 4.02 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\frac {2 \, {\left (23 i \, a^{\frac {7}{2}} + \frac {20 \, a^{\frac {7}{2}} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {88 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {60 \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {130 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {60 \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {88 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {20 \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {23 i \, a^{\frac {7}{2}} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}\right )} {\left (-\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )}^{\frac {7}{2}}}{-3 \, d {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}^{\frac {7}{2}} {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}^{\frac {7}{2}} {\left (\frac {6 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {14 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {14 i \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 i \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {14 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {6 i \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {\sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + 1\right )}} \] Input:
integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="maxima")
Output:
2*(23*I*a^(7/2) + 20*a^(7/2)*sin(d*x + c)/(cos(d*x + c) + 1) - 88*I*a^(7/2 )*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 60*a^(7/2)*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 130*I*a^(7/2)*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 60*a^(7 /2)*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 88*I*a^(7/2)*sin(d*x + c)^6/(cos (d*x + c) + 1)^6 - 20*a^(7/2)*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 23*I*a ^(7/2)*sin(d*x + c)^8/(cos(d*x + c) + 1)^8)*(-2*I*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1)^(7/2)/(d*(sin(d*x + c)/ (cos(d*x + c) + 1) + 1)^(7/2)*(sin(d*x + c)/(cos(d*x + c) + 1) - 1)^(7/2)* (-18*I*sin(d*x + c)/(cos(d*x + c) + 1) + 42*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 42*I*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 42*I*sin(d*x + c)^5/(co s(d*x + c) + 1)^5 - 42*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 18*I*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 3*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 - 3))
Exception generated. \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(cos(d*x+c)*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument TypeError: Bad Argument TypeDone
Time = 1.92 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.98 \[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {2\,a^3\,\sqrt {\frac {a\,\left (\cos \left (2\,c+2\,d\,x\right )+1+\sin \left (2\,c+2\,d\,x\right )\,1{}\mathrm {i}\right )}{\cos \left (2\,c+2\,d\,x\right )+1}}\,\left (5\,\sin \left (c+d\,x\right )+5\,\sin \left (3\,c+3\,d\,x\right )+\cos \left (c+d\,x\right )\,35{}\mathrm {i}+\cos \left (3\,c+3\,d\,x\right )\,11{}\mathrm {i}\right )}{3\,d\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )} \] Input:
int(cos(c + d*x)*(a + a*tan(c + d*x)*1i)^(7/2),x)
Output:
-(2*a^3*((a*(cos(2*c + 2*d*x) + sin(2*c + 2*d*x)*1i + 1))/(cos(2*c + 2*d*x ) + 1))^(1/2)*(cos(c + d*x)*35i + 5*sin(c + d*x) + cos(3*c + 3*d*x)*11i + 5*sin(3*c + 3*d*x)))/(3*d*(cos(2*c + 2*d*x) + 1))
\[ \int \cos (c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\sqrt {a}\, a^{3} \left (-\left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right ) \tan \left (d x +c \right )^{3}d x \right ) i -3 \left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right ) \tan \left (d x +c \right )^{2}d x \right )+3 \left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right ) \tan \left (d x +c \right )d x \right ) i +\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )d x \right ) \] Input:
int(cos(d*x+c)*(a+I*a*tan(d*x+c))^(7/2),x)
Output:
sqrt(a)*a**3*( - int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)*tan(c + d*x)**3 ,x)*i - 3*int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)*tan(c + d*x)**2,x) + 3 *int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)*tan(c + d*x),x)*i + int(sqrt(ta n(c + d*x)*i + 1)*cos(c + d*x),x))