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

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

Optimal result

Integrand size = 26, antiderivative size = 90 \[ \int (e \cos (c+d x))^{5/2} (a+i a \tan (c+d x)) \, dx=-\frac {2 i a (e \cos (c+d x))^{5/2}}{5 d}+\frac {6 a (e \cos (c+d x))^{5/2} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a (e \cos (c+d x))^{5/2} \tan (c+d x)}{5 d} \] Output:

-2/5*I*a*(e*cos(d*x+c))^(5/2)/d+6/5*a*(e*cos(d*x+c))^(5/2)*EllipticE(sin(1 
/2*d*x+1/2*c),2^(1/2))/d/cos(d*x+c)^(5/2)+2/5*a*(e*cos(d*x+c))^(5/2)*tan(d 
*x+c)/d
 

Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 2.76 (sec) , antiderivative size = 250, normalized size of antiderivative = 2.78 \[ \int (e \cos (c+d x))^{5/2} (a+i a \tan (c+d x)) \, dx=\frac {e^2 \sqrt {e \cos (c+d x)} (\cos (d x)-i \sin (d x)) \left (\left (9 \cos (c-d x-\arctan (\tan (c))) (\csc (c)-i \sec (c))+3 \cos (c+d x+\arctan (\tan (c))) (\csc (c)-i \sec (c))-\csc (c) \sqrt {\sec ^2(c)} (\cos (d x)+i \sin (d x)) (6 \cos (c)+3 \cos (c+2 d x)+3 \cos (3 c+2 d x)+2 i \sin (c)-4 i \sin (c+2 d x)-2 i \sin (3 c+2 d x))\right ) \sqrt {\sin ^2(d x+\arctan (\tan (c)))}+6 i \, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sin (d x+\arctan (\tan (c))) (i+\tan (c))\right ) (a+i a \tan (c+d x))}{10 d \sqrt {\sec ^2(c)} \sqrt {\sin ^2(d x+\arctan (\tan (c)))}} \] Input:

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

Output:

(e^2*Sqrt[e*Cos[c + d*x]]*(Cos[d*x] - I*Sin[d*x])*((9*Cos[c - d*x - ArcTan 
[Tan[c]]]*(Csc[c] - I*Sec[c]) + 3*Cos[c + d*x + ArcTan[Tan[c]]]*(Csc[c] - 
I*Sec[c]) - Csc[c]*Sqrt[Sec[c]^2]*(Cos[d*x] + I*Sin[d*x])*(6*Cos[c] + 3*Co 
s[c + 2*d*x] + 3*Cos[3*c + 2*d*x] + (2*I)*Sin[c] - (4*I)*Sin[c + 2*d*x] - 
(2*I)*Sin[3*c + 2*d*x]))*Sqrt[Sin[d*x + ArcTan[Tan[c]]]^2] + (6*I)*Hyperge 
ometricPFQ[{-1/2, -1/4}, {3/4}, Cos[d*x + ArcTan[Tan[c]]]^2]*Sin[d*x + Arc 
Tan[Tan[c]]]*(I + Tan[c]))*(a + I*a*Tan[c + d*x]))/(10*d*Sqrt[Sec[c]^2]*Sq 
rt[Sin[d*x + ArcTan[Tan[c]]]^2])
 

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.36, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3042, 3998, 3042, 3967, 3042, 4256, 3042, 4258, 3042, 3119}

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))^{5/2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3998

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3967

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4256

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4258

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3119

\(\displaystyle (e \cos (c+d x))^{5/2} (e \sec (c+d x))^{5/2} \left (a \left (\frac {6 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d e^2 \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}}+\frac {2 \sin (c+d x)}{5 d e (e \sec (c+d x))^{3/2}}\right )-\frac {2 i a}{5 d (e \sec (c+d x))^{5/2}}\right )\)

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 3119
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(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. 204 vs. \(2 (77 ) = 154\).

Time = 9.01 (sec) , antiderivative size = 205, normalized size of antiderivative = 2.28

method result size
default \(\frac {2 a \,e^{3} \left (8 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+8 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-12 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-8 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+6 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+3 \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}-i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 \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}\) \(205\)
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^{3} \left (-8 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\right )}{5 \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 {5}{2}}}{5 d}\) \(232\)
risch \(-\frac {i \left ({\mathrm e}^{2 i \left (d x +c \right )}+7\right ) \sqrt {2}\, e^{2} a \sqrt {e \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) {\mathrm e}^{-i \left (d x +c \right )}}}{10 d}-\frac {3 i \left (-\frac {2 \left (e \,{\mathrm e}^{2 i \left (d x +c \right )}+e \right )}{e \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (e \,{\mathrm e}^{2 i \left (d x +c \right )}+e \right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \left (-2 i \operatorname {EllipticE}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {e \,{\mathrm e}^{3 i \left (d x +c \right )}+e \,{\mathrm e}^{i \left (d x +c \right )}}}\right ) \sqrt {2}\, e^{2} a \sqrt {e \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) {\mathrm e}^{-i \left (d x +c \right )}}\, \sqrt {e \,{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}{5 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(320\)

Input:

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

Output:

2/5/sin(1/2*d*x+1/2*c)/(-2*sin(1/2*d*x+1/2*c)^2*e+e)^(1/2)*a*e^3*(8*I*sin( 
1/2*d*x+1/2*c)^7+8*sin(1/2*d*x+1/2*c)^6*cos(1/2*d*x+1/2*c)-12*I*sin(1/2*d* 
x+1/2*c)^5-8*sin(1/2*d*x+1/2*c)^4*cos(1/2*d*x+1/2*c)+6*I*sin(1/2*d*x+1/2*c 
)^3+2*sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)+3*EllipticE(cos(1/2*d*x+1/2* 
c),2^(1/2))*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)- 
I*sin(1/2*d*x+1/2*c))/d
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.89 \[ \int (e \cos (c+d x))^{5/2} (a+i a \tan (c+d x)) \, dx=\frac {12 i \, \sqrt {\frac {1}{2}} a e^{\frac {5}{2}} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right ) + \sqrt {\frac {1}{2}} {\left (-i \, a e^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i \, a e^{2}\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 )}}{5 \, d} \] Input:

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

Output:

1/5*(12*I*sqrt(1/2)*a*e^(5/2)*weierstrassZeta(-4, 0, weierstrassPInverse(- 
4, 0, e^(I*d*x + I*c))) + sqrt(1/2)*(-I*a*e^2*e^(2*I*d*x + 2*I*c) + 5*I*a* 
e^2)*sqrt(e*e^(2*I*d*x + 2*I*c) + e)*e^(-1/2*I*d*x - 1/2*I*c))/d
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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