\(\int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx\) [204]

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

Optimal result

Integrand size = 28, antiderivative size = 139 \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\frac {6 i a^3 \sqrt {e \sec (c+d x)}}{d}+\frac {6 a^3 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {e \sec (c+d x)}}{d}+\frac {2 i a \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^2}{5 d}+\frac {6 i \sqrt {e \sec (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}{5 d} \] Output:

6*I*a^3*(e*sec(d*x+c))^(1/2)/d+6*a^3*cos(d*x+c)^(1/2)*InverseJacobiAM(1/2* 
d*x+1/2*c,2^(1/2))*(e*sec(d*x+c))^(1/2)/d+2/5*I*a*(e*sec(d*x+c))^(1/2)*(a+ 
I*a*tan(d*x+c))^2/d+6/5*I*(e*sec(d*x+c))^(1/2)*(a^3+I*a^3*tan(d*x+c))/d
 

Mathematica [A] (verified)

Time = 2.30 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.57 \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\frac {a^3 \sec ^2(c+d x) \sqrt {e \sec (c+d x)} \left (18 i+20 i \cos (2 (c+d x))+30 \cos ^{\frac {5}{2}}(c+d x) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )-5 \sin (2 (c+d x))\right )}{5 d} \] Input:

Integrate[Sqrt[e*Sec[c + d*x]]*(a + I*a*Tan[c + d*x])^3,x]
 

Output:

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

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 3979, 3042, 3979, 3042, 3967, 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))^3 \sqrt {e \sec (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+i a \tan (c+d x))^3 \sqrt {e \sec (c+d x)}dx\)

\(\Big \downarrow \) 3979

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3979

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3967

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4258

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

\(\Big \downarrow \) 3042

\(\displaystyle \frac {9}{5} a \left (\frac {5}{3} a \left (a \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+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}\right )+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right ) \sqrt {e \sec (c+d x)}}{3 d}\right )+\frac {2 i a (a+i a \tan (c+d x))^2 \sqrt {e \sec (c+d x)}}{5 d}\)

\(\Big \downarrow \) 3120

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

Input:

Int[Sqrt[e*Sec[c + d*x]]*(a + I*a*Tan[c + d*x])^3,x]
 

Output:

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

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 3979
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}, x] && EqQ[a^2 + b^2, 0] && GtQ[n, 0] && NeQ[m + n - 1, 0] && IntegersQ 
[2*m, 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 [A] (verified)

Time = 7.86 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.74

method result size
default \(\frac {a^{3} \left (-2 \tan \left (d x +c \right )+8 i-\frac {2 i \sec \left (d x +c \right )^{2}}{5}+6 i \left (\cos \left (d x +c \right )+1\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right )\right ) \sqrt {e \sec \left (d x +c \right )}}{d}\) \(103\)
parts \(-\frac {2 i a^{3} \left (\cos \left (d x +c \right )+1\right ) \sqrt {e \sec \left (d x +c \right )}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )}{d}+\frac {i a^{3} \sqrt {e \sec \left (d x +c \right )}\, \left (4 \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \left (5+5 \cos \left (d x +c \right )-\sec \left (d x +c \right )-\sec \left (d x +c \right )^{2}\right )-5 \cos \left (d x +c \right ) \ln \left (\frac {2 \cos \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+2 \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}-\cos \left (d x +c \right )+1}{\cos \left (d x +c \right )+1}\right )+5 \cos \left (d x +c \right ) \ln \left (\frac {4 \cos \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}+4 \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}-2 \cos \left (d x +c \right )+2}{\cos \left (d x +c \right )+1}\right )\right )}{10 d \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}}+\frac {6 i a^{3} \sqrt {e \sec \left (d x +c \right )}}{d}-\frac {3 a^{3} \left (\frac {2 \tan \left (d x +c \right )}{3}+\frac {4 i \left (\cos \left (d x +c \right )+1\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )}{3}\right ) \sqrt {e \sec \left (d x +c \right )}}{d}\) \(451\)

Input:

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

Output:

a^3/d*(-2*tan(d*x+c)+8*I-2/5*I*sec(d*x+c)^2+6*I*(cos(d*x+c)+1)*(cos(d*x+c) 
/(cos(d*x+c)+1))^(1/2)*(1/(cos(d*x+c)+1))^(1/2)*EllipticF(I*(cot(d*x+c)-cs 
c(d*x+c)),I))*(e*sec(d*x+c))^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.06 \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=-\frac {2 \, {\left (\sqrt {2} {\left (-25 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 36 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 15 i \, a^{3}\right )} \sqrt {\frac {e}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (\frac {1}{2} i \, d x + \frac {1}{2} i \, c\right )} + 15 \, \sqrt {2} {\left (i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a^{3}\right )} \sqrt {e} {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )}}{5 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \] Input:

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

Output:

-2/5*(sqrt(2)*(-25*I*a^3*e^(4*I*d*x + 4*I*c) - 36*I*a^3*e^(2*I*d*x + 2*I*c 
) - 15*I*a^3)*sqrt(e/(e^(2*I*d*x + 2*I*c) + 1))*e^(1/2*I*d*x + 1/2*I*c) + 
15*sqrt(2)*(I*a^3*e^(4*I*d*x + 4*I*c) + 2*I*a^3*e^(2*I*d*x + 2*I*c) + I*a^ 
3)*sqrt(e)*weierstrassPInverse(-4, 0, e^(I*d*x + I*c)))/(d*e^(4*I*d*x + 4* 
I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)
 

Sympy [F]

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

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

Output:

-I*a**3*(Integral(I*sqrt(e*sec(c + d*x)), x) + Integral(-3*sqrt(e*sec(c + 
d*x))*tan(c + d*x), x) + Integral(sqrt(e*sec(c + d*x))*tan(c + d*x)**3, x) 
 + Integral(-3*I*sqrt(e*sec(c + d*x))*tan(c + d*x)**2, x))
 

Maxima [F]

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

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

Output:

integrate(sqrt(e*sec(d*x + c))*(I*a*tan(d*x + c) + a)^3, x)
 

Giac [F(-2)]

Exception generated. \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{-1,[2,0]%%%}+%%%{%%{[-2,0]:[1,0,%%%{1,[1]%%%}]%%},[1,0]%%% 
}+%%%{%%%
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(sqrt(e)*a**3*( - 2*sqrt(sec(c + d*x))*tan(c + d*x)**2*i + 38*sqrt(sec(c + 
 d*x))*i + 5*int(sqrt(sec(c + d*x)),x)*d - 15*int(sqrt(sec(c + d*x))*tan(c 
 + d*x)**2,x)*d))/(5*d)