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

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

Optimal result

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

I*2^(5/4+n)*a*hypergeom([1/4, 3/4-n],[5/4],1/2-1/2*I*tan(d*x+c))*(e*sec(d* 
x+c))^(1/2)*(1+I*tan(d*x+c))^(3/4-n)*(a+I*a*tan(d*x+c))^(-1+n)/d
 

Mathematica [A] (verified)

Time = 6.26 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.81 \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^n \, dx=-\frac {i 2^{\frac {3}{2}+n} \left (e^{i d x}\right )^n \left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^{\frac {1}{2}+n} \left (1+e^{2 i (c+d x)}\right )^{\frac {1}{2}+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{4}+n,\frac {1}{2}+n,\frac {5}{4}+n,-e^{2 i (c+d x)}\right ) \sec ^{-\frac {1}{2}-n}(c+d x) \sqrt {e \sec (c+d x)} (\cos (d x)+i \sin (d x))^{-n} (a+i a \tan (c+d x))^n}{d (1+4 n)} \] Input:

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

Output:

((-I)*2^(3/2 + n)*(E^(I*d*x))^n*(E^(I*(c + d*x))/(1 + E^((2*I)*(c + d*x))) 
)^(1/2 + n)*(1 + E^((2*I)*(c + d*x)))^(1/2 + n)*Hypergeometric2F1[1/4 + n, 
 1/2 + n, 5/4 + n, -E^((2*I)*(c + d*x))]*Sec[c + d*x]^(-1/2 - n)*Sqrt[e*Se 
c[c + d*x]]*(a + I*a*Tan[c + d*x])^n)/(d*(1 + 4*n)*(Cos[d*x] + I*Sin[d*x]) 
^n)
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 3986, 3042, 4006, 80, 79}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3986

\(\displaystyle \frac {\sqrt {e \sec (c+d x)} \int \sqrt [4]{a-i a \tan (c+d x)} (i \tan (c+d x) a+a)^{n+\frac {1}{4}}dx}{\sqrt [4]{a-i a \tan (c+d x)} \sqrt [4]{a+i a \tan (c+d x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sqrt {e \sec (c+d x)} \int \sqrt [4]{a-i a \tan (c+d x)} (i \tan (c+d x) a+a)^{n+\frac {1}{4}}dx}{\sqrt [4]{a-i a \tan (c+d x)} \sqrt [4]{a+i a \tan (c+d x)}}\)

\(\Big \downarrow \) 4006

\(\displaystyle \frac {a^2 \sqrt {e \sec (c+d x)} \int \frac {(i \tan (c+d x) a+a)^{n-\frac {3}{4}}}{(a-i a \tan (c+d x))^{3/4}}d\tan (c+d x)}{d \sqrt [4]{a-i a \tan (c+d x)} \sqrt [4]{a+i a \tan (c+d x)}}\)

\(\Big \downarrow \) 80

\(\displaystyle \frac {a^2 2^{n-\frac {3}{4}} \sqrt {e \sec (c+d x)} (1+i \tan (c+d x))^{\frac {3}{4}-n} (a+i a \tan (c+d x))^{n-1} \int \frac {\left (\frac {1}{2} i \tan (c+d x)+\frac {1}{2}\right )^{n-\frac {3}{4}}}{(a-i a \tan (c+d x))^{3/4}}d\tan (c+d x)}{d \sqrt [4]{a-i a \tan (c+d x)}}\)

\(\Big \downarrow \) 79

\(\displaystyle \frac {i a 2^{n+\frac {5}{4}} \sqrt {e \sec (c+d x)} (1+i \tan (c+d x))^{\frac {3}{4}-n} (a+i a \tan (c+d x))^{n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {3}{4}-n,\frac {5}{4},\frac {1}{2} (1-i \tan (c+d x))\right )}{d}\)

Input:

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

Output:

(I*2^(5/4 + n)*a*Hypergeometric2F1[1/4, 3/4 - n, 5/4, (1 - I*Tan[c + d*x]) 
/2]*Sqrt[e*Sec[c + d*x]]*(1 + I*Tan[c + d*x])^(3/4 - n)*(a + I*a*Tan[c + d 
*x])^(-1 + n))/d
 

Defintions of rubi rules used

rule 79
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( 
a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 
, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] 
&&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] 
 ||  !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
 

rule 80
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c 
 + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) 
^FracPart[n])   Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) 
), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] &&  !IntegerQ[m] &&  !Integ 
erQ[n] && (RationalQ[m] ||  !SimplerQ[n + 1, m + 1])
 

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

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

rule 4006
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + ( 
f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(c/f)   Subst[Int[(a + b*x)^(m - 1)*( 
c + d*x)^(n - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n 
}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]
 
Maple [F]

\[\int \sqrt {e \sec \left (d x +c \right )}\, \left (a +i a \tan \left (d x +c \right )\right )^{n}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral(sqrt(2)*(2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^n*sqr 
t(e/(e^(2*I*d*x + 2*I*c) + 1))*e^(1/2*I*d*x + 1/2*I*c), x)
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^n \, 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 )}^n \,d x \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

(sqrt(e)*i*( - 2*sqrt(sec(c + d*x))*(tan(c + d*x)*a*i + a)**n + 2*int(sqrt 
(sec(c + d*x))*(tan(c + d*x)*a*i + a)**n*tan(c + d*x),x)*d*n + int(sqrt(se 
c(c + d*x))*(tan(c + d*x)*a*i + a)**n*tan(c + d*x),x)*d))/(2*d*n)