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

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

Optimal result

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

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

Mathematica [C] (warning: unable to verify)

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

Time = 3.02 (sec) , antiderivative size = 190, normalized size of antiderivative = 2.13 \[ \int \frac {a+i a \tan (c+d x)}{(e \cos (c+d x))^{3/2}} \, dx=\frac {(\cos (d x)-i \sin (d x)) \left (\frac {6 \cos (c+d x) \, _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))) (1-i \tan (c))}{\sqrt {\sin ^2(d x+\arctan (\tan (c)))}}+(\csc (c)-i \sec (c)) \left (-3 \cos (c+d x) (3 \cos (c-d x-\arctan (\tan (c)))+\cos (c+d x+\arctan (\tan (c))))+\frac {4 (i+3 \cos (d x) \cos (c+d x) \csc (c)) \tan (c)}{\sqrt {\sec ^2(c)}}\right )\right ) (a+i a \tan (c+d x))}{6 d e \sqrt {e \cos (c+d x)} \sqrt {\sec ^2(c)}} \] Input:

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

Output:

((Cos[d*x] - I*Sin[d*x])*((6*Cos[c + d*x]*HypergeometricPFQ[{-1/2, -1/4}, 
{3/4}, Cos[d*x + ArcTan[Tan[c]]]^2]*Sin[d*x + ArcTan[Tan[c]]]*(1 - I*Tan[c 
]))/Sqrt[Sin[d*x + ArcTan[Tan[c]]]^2] + (Csc[c] - I*Sec[c])*(-3*Cos[c + d* 
x]*(3*Cos[c - d*x - ArcTan[Tan[c]]] + Cos[c + d*x + ArcTan[Tan[c]]]) + (4* 
(I + 3*Cos[d*x]*Cos[c + d*x]*Csc[c])*Tan[c])/Sqrt[Sec[c]^2]))*(a + I*a*Tan 
[c + d*x]))/(6*d*e*Sqrt[e*Cos[c + d*x]]*Sqrt[Sec[c]^2])
 

Rubi [A] (verified)

Time = 0.63 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.30, 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, 4255, 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 \frac {a+i a \tan (c+d x)}{(e \cos (c+d x))^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3998

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3967

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4255

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4258

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3119

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

Input:

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

Output:

((((2*I)/3)*a*(e*Sec[c + d*x])^(3/2))/d + a*((-2*e^2*EllipticE[(c + d*x)/2 
, 2])/(d*Sqrt[Cos[c + d*x]]*Sqrt[e*Sec[c + d*x]]) + (2*e*Sqrt[e*Sec[c + d* 
x]]*Sin[c + d*x])/d))/((e*Cos[c + d*x])^(3/2)*(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 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[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. 213 vs. \(2 (80 ) = 160\).

Time = 2.88 (sec) , antiderivative size = 214, normalized size of antiderivative = 2.40

method result size
default \(\frac {2 \left (12 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-6 \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}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-6 \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 ) a}{3 \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \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}\, e d}\) \(214\)
parts \(-\frac {2 a \left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} e +\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} e}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\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}\, \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} e +\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} e}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{e \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}{3 d \left (e \cos \left (d x +c \right )\right )^{\frac {3}{2}}}\) \(217\)

Input:

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

Output:

2/3/(2*sin(1/2*d*x+1/2*c)^2-1)/sin(1/2*d*x+1/2*c)/(-2*sin(1/2*d*x+1/2*c)^2 
*e+e)^(1/2)/e*(12*sin(1/2*d*x+1/2*c)^4*cos(1/2*d*x+1/2*c)-6*(2*sin(1/2*d*x 
+1/2*c)^2-1)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticE(cos(1/2*d*x+1/2* 
c),2^(1/2))*sin(1/2*d*x+1/2*c)^2-6*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))*a/d
 

Fricas [A] (verification not implemented)

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

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

Output:

-4/3*(sqrt(1/2)*(3*I*a*e^(4*I*d*x + 4*I*c) + I*a*e^(2*I*d*x + 2*I*c))*sqrt 
(e*e^(2*I*d*x + 2*I*c) + e)*e^(-1/2*I*d*x - 1/2*I*c) + 3*sqrt(1/2)*(I*a*e^ 
(4*I*d*x + 4*I*c) + 2*I*a*e^(2*I*d*x + 2*I*c) + I*a)*sqrt(e)*weierstrassZe 
ta(-4, 0, weierstrassPInverse(-4, 0, e^(I*d*x + I*c))))/(d*e^2*e^(4*I*d*x 
+ 4*I*c) + 2*d*e^2*e^(2*I*d*x + 2*I*c) + d*e^2)
 

Sympy [F]

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

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

Output:

I*a*(Integral(-I/(e*cos(c + d*x))**(3/2), x) + Integral(tan(c + d*x)/(e*co 
s(c + d*x))**(3/2), x))
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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