\(\int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx\) [664]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [F]
Giac [F(-1)]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 26, antiderivative size = 124 \[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=-\frac {2 i a (e \cos (c+d x))^{7/2}}{7 d}+\frac {10 a (e \cos (c+d x))^{7/2} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (e \cos (c+d x))^{7/2} \tan (c+d x)}{7 d}+\frac {10 a (e \cos (c+d x))^{7/2} \sec ^2(c+d x) \tan (c+d x)}{21 d} \] Output:

-2/7*I*a*(e*cos(d*x+c))^(7/2)/d+10/21*a*(e*cos(d*x+c))^(7/2)*InverseJacobi 
AM(1/2*d*x+1/2*c,2^(1/2))/d/cos(d*x+c)^(7/2)+2/7*a*(e*cos(d*x+c))^(7/2)*ta 
n(d*x+c)/d+10/21*a*(e*cos(d*x+c))^(7/2)*sec(d*x+c)^2*tan(d*x+c)/d
 

Mathematica [A] (verified)

Time = 0.71 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.07 \[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=\frac {a e^3 \sqrt {e \cos (c+d x)} (\cos (d x)-i \sin (d x)) \left (10 \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) (\cos (c+d x)-i \sin (c+d x))+\sqrt {\cos (c+d x)} (-8 i+2 i \cos (2 (c+d x))+5 \sin (2 (c+d x)))\right ) (\cos (c+2 d x)+i \sin (c+2 d x))}{21 d \sqrt {\cos (c+d x)}} \] Input:

Integrate[(e*Cos[c + d*x])^(7/2)*(a + I*a*Tan[c + d*x]),x]
 

Output:

(a*e^3*Sqrt[e*Cos[c + d*x]]*(Cos[d*x] - I*Sin[d*x])*(10*EllipticF[(c + d*x 
)/2, 2]*(Cos[c + d*x] - I*Sin[c + d*x]) + Sqrt[Cos[c + d*x]]*(-8*I + (2*I) 
*Cos[2*(c + d*x)] + 5*Sin[2*(c + d*x)]))*(Cos[c + 2*d*x] + I*Sin[c + 2*d*x 
]))/(21*d*Sqrt[Cos[c + d*x]])
 

Rubi [A] (verified)

Time = 0.88 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.27, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3042, 3998, 3042, 3967, 3042, 4256, 3042, 4256, 3042, 4258, 3042, 3120}

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 (a+i a \tan (c+d x)) (e \cos (c+d x))^{7/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+i a \tan (c+d x)) (e \cos (c+d x))^{7/2}dx\)

\(\Big \downarrow \) 3998

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \int \frac {i \tan (c+d x) a+a}{(e \sec (c+d x))^{7/2}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \int \frac {i \tan (c+d x) a+a}{(e \sec (c+d x))^{7/2}}dx\)

\(\Big \downarrow \) 3967

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \int \frac {1}{(e \sec (c+d x))^{7/2}}dx-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \int \frac {1}{\left (e \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{7/2}}dx-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 4256

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \left (\frac {5 \int \frac {1}{(e \sec (c+d x))^{3/2}}dx}{7 e^2}+\frac {2 \sin (c+d x)}{7 d e (e \sec (c+d x))^{5/2}}\right )-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \left (\frac {5 \int \frac {1}{\left (e \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx}{7 e^2}+\frac {2 \sin (c+d x)}{7 d e (e \sec (c+d x))^{5/2}}\right )-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 4256

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \left (\frac {5 \left (\frac {\int \sqrt {e \sec (c+d x)}dx}{3 e^2}+\frac {2 \sin (c+d x)}{3 d e \sqrt {e \sec (c+d x)}}\right )}{7 e^2}+\frac {2 \sin (c+d x)}{7 d e (e \sec (c+d x))^{5/2}}\right )-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \left (\frac {5 \left (\frac {\int \sqrt {e \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{3 e^2}+\frac {2 \sin (c+d x)}{3 d e \sqrt {e \sec (c+d x)}}\right )}{7 e^2}+\frac {2 \sin (c+d x)}{7 d e (e \sec (c+d x))^{5/2}}\right )-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 4258

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \left (\frac {5 \left (\frac {\sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {\cos (c+d x)}}dx}{3 e^2}+\frac {2 \sin (c+d x)}{3 d e \sqrt {e \sec (c+d x)}}\right )}{7 e^2}+\frac {2 \sin (c+d x)}{7 d e (e \sec (c+d x))^{5/2}}\right )-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \left (\frac {5 \left (\frac {\sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 e^2}+\frac {2 \sin (c+d x)}{3 d e \sqrt {e \sec (c+d x)}}\right )}{7 e^2}+\frac {2 \sin (c+d x)}{7 d e (e \sec (c+d x))^{5/2}}\right )-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

\(\Big \downarrow \) 3120

\(\displaystyle (e \cos (c+d x))^{7/2} (e \sec (c+d x))^{7/2} \left (a \left (\frac {5 \left (\frac {2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {e \sec (c+d x)}}{3 d e^2}+\frac {2 \sin (c+d x)}{3 d e \sqrt {e \sec (c+d x)}}\right )}{7 e^2}+\frac {2 \sin (c+d x)}{7 d e (e \sec (c+d x))^{5/2}}\right )-\frac {2 i a}{7 d (e \sec (c+d x))^{7/2}}\right )\)

Input:

Int[(e*Cos[c + d*x])^(7/2)*(a + I*a*Tan[c + d*x]),x]
 

Output:

(e*Cos[c + d*x])^(7/2)*(e*Sec[c + d*x])^(7/2)*((((-2*I)/7)*a)/(d*(e*Sec[c 
+ d*x])^(7/2)) + a*((2*Sin[c + d*x])/(7*d*e*(e*Sec[c + d*x])^(5/2)) + (5*( 
(2*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[e*Sec[c + d*x]])/(3*d 
*e^2) + (2*Sin[c + d*x])/(3*d*e*Sqrt[e*Sec[c + d*x]])))/(7*e^2)))
 

Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3120
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 
)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 3967
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( 
x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a   Int[(d 
*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] 
|| NeQ[a^2 + b^2, 0])
 

rule 3998
Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x 
_)])^(n_.), x_Symbol] :> Simp[(d*Cos[e + f*x])^m*(d*Sec[e + f*x])^m   Int[( 
a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m 
, n}, x] &&  !IntegerQ[m]
 

rule 4256
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( 
b*Csc[c + d*x])^(n + 1)/(b*d*n)), x] + Simp[(n + 1)/(b^2*n)   Int[(b*Csc[c 
+ d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && IntegerQ[2* 
n]
 

rule 4258
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^n*Sin[c + d*x]^n   Int[1/Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && 
 EqQ[n^2, 1/4]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 228 vs. \(2 (106 ) = 212\).

Time = 11.12 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.85

method result size
parts \(-\frac {2 a \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, e^{4} \left (48 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}-120 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+128 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-72 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+5 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+16 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 \sqrt {-e \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\, d}-\frac {2 i a \left (e \cos \left (d x +c \right )\right )^{\frac {7}{2}}}{7 d}\) \(229\)
default \(-\frac {2 a \,e^{4} \left (48 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}+48 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-96 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}-72 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+72 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+56 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-24 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-16 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} e +e}\, d}\) \(241\)

Input:

int((e*cos(d*x+c))^(7/2)*(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

-2/21*a*(e*(2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*e^4*(48* 
cos(1/2*d*x+1/2*c)^9-120*cos(1/2*d*x+1/2*c)^7+128*cos(1/2*d*x+1/2*c)^5-72* 
cos(1/2*d*x+1/2*c)^3+5*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c) 
^2+1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))+16*cos(1/2*d*x+1/2*c))/( 
-e*(2*sin(1/2*d*x+1/2*c)^4-sin(1/2*d*x+1/2*c)^2))^(1/2)/sin(1/2*d*x+1/2*c) 
/(e*(2*cos(1/2*d*x+1/2*c)^2-1))^(1/2)/d-2/7*I*a*(e*cos(d*x+c))^(7/2)/d
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.89 \[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=\frac {{\left (-40 i \, \sqrt {\frac {1}{2}} a e^{\frac {7}{2}} e^{\left (i \, d x + i \, c\right )} {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right ) + \sqrt {\frac {1}{2}} {\left (-3 i \, a e^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 16 i \, a e^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 7 i \, a e^{3}\right )} \sqrt {e e^{\left (2 i \, d x + 2 i \, c\right )} + e} e^{\left (-\frac {1}{2} i \, d x - \frac {1}{2} i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{42 \, d} \] Input:

integrate((e*cos(d*x+c))^(7/2)*(a+I*a*tan(d*x+c)),x, algorithm="fricas")
 

Output:

1/42*(-40*I*sqrt(1/2)*a*e^(7/2)*e^(I*d*x + I*c)*weierstrassPInverse(-4, 0, 
 e^(I*d*x + I*c)) + sqrt(1/2)*(-3*I*a*e^3*e^(4*I*d*x + 4*I*c) - 16*I*a*e^3 
*e^(2*I*d*x + 2*I*c) + 7*I*a*e^3)*sqrt(e*e^(2*I*d*x + 2*I*c) + e)*e^(-1/2* 
I*d*x - 1/2*I*c))*e^(-I*d*x - I*c)/d
 

Sympy [F(-1)]

Timed out. \[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=\text {Timed out} \] Input:

integrate((e*cos(d*x+c))**(7/2)*(a+I*a*tan(d*x+c)),x)
 

Output:

Timed out
 

Maxima [F]

\[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=\int { \left (e \cos \left (d x + c\right )\right )^{\frac {7}{2}} {\left (i \, a \tan \left (d x + c\right ) + a\right )} \,d x } \] Input:

integrate((e*cos(d*x+c))^(7/2)*(a+I*a*tan(d*x+c)),x, algorithm="maxima")
 

Output:

integrate((e*cos(d*x + c))^(7/2)*(I*a*tan(d*x + c) + a), x)
 

Giac [F(-1)]

Timed out. \[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=\text {Timed out} \] Input:

integrate((e*cos(d*x+c))^(7/2)*(a+I*a*tan(d*x+c)),x, algorithm="giac")
 

Output:

Timed out
 

Mupad [F(-1)]

Timed out. \[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=\int {\left (e\,\cos \left (c+d\,x\right )\right )}^{7/2}\,\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right ) \,d x \] Input:

int((e*cos(c + d*x))^(7/2)*(a + a*tan(c + d*x)*1i),x)
 

Output:

int((e*cos(c + d*x))^(7/2)*(a + a*tan(c + d*x)*1i), x)
                                                                                    
                                                                                    
 

Reduce [F]

\[ \int (e \cos (c+d x))^{7/2} (a+i a \tan (c+d x)) \, dx=\sqrt {e}\, a \,e^{3} \left (\left (\int \sqrt {\cos \left (d x +c \right )}\, \cos \left (d x +c \right )^{3} \tan \left (d x +c \right )d x \right ) i +\int \sqrt {\cos \left (d x +c \right )}\, \cos \left (d x +c \right )^{3}d x \right ) \] Input:

int((e*cos(d*x+c))^(7/2)*(a+I*a*tan(d*x+c)),x)
 

Output:

sqrt(e)*a*e**3*(int(sqrt(cos(c + d*x))*cos(c + d*x)**3*tan(c + d*x),x)*i + 
 int(sqrt(cos(c + d*x))*cos(c + d*x)**3,x))