Integrand size = 31, antiderivative size = 66 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=\frac {i \operatorname {Hypergeometric2F1}\left (1,m+n,1+n,\frac {1}{2} (1-i \tan (e+f x))\right ) (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n}{2 f n} \] Output:
1/2*I*hypergeom([1, m+n],[1+n],1/2-1/2*I*tan(f*x+e))*(a+I*a*tan(f*x+e))^m* (c-I*c*tan(f*x+e))^n/f/n
Time = 0.25 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.32 \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=-\frac {i 2^{-1+n} \operatorname {Hypergeometric2F1}\left (m,1-n,1+m,\frac {1}{2} (1+i \tan (e+f x))\right ) (1-i \tan (e+f x))^{-n} (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n}{f m} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^m*(c - I*c*Tan[e + f*x])^n,x]
Output:
((-I)*2^(-1 + n)*Hypergeometric2F1[m, 1 - n, 1 + m, (1 + I*Tan[e + f*x])/2 ]*(a + I*a*Tan[e + f*x])^m*(c - I*c*Tan[e + f*x])^n)/(f*m*(1 - I*Tan[e + f *x])^n)
Time = 0.29 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.32, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {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 (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^ndx\) |
\(\Big \downarrow \) 4006 |
\(\displaystyle \frac {a c \int (i \tan (e+f x) a+a)^{m-1} (c-i c \tan (e+f x))^{n-1}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 80 |
\(\displaystyle \frac {a 2^{n-1} (1-i \tan (e+f x))^{-n} (c-i c \tan (e+f x))^n \int \left (\frac {1}{2}-\frac {1}{2} i \tan (e+f x)\right )^{n-1} (i \tan (e+f x) a+a)^{m-1}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle -\frac {i 2^{n-1} (1-i \tan (e+f x))^{-n} (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \operatorname {Hypergeometric2F1}\left (m,1-n,m+1,\frac {1}{2} (i \tan (e+f x)+1)\right )}{f m}\) |
Input:
Int[(a + I*a*Tan[e + f*x])^m*(c - I*c*Tan[e + f*x])^n,x]
Output:
((-I)*2^(-1 + n)*Hypergeometric2F1[m, 1 - n, 1 + m, (1 + I*Tan[e + f*x])/2 ]*(a + I*a*Tan[e + f*x])^m*(c - I*c*Tan[e + f*x])^n)/(f*m*(1 - I*Tan[e + f *x])^n)
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]))
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])
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]
\[\int \left (a +i a \tan \left (f x +e \right )\right )^{m} \left (c -i c \tan \left (f x +e \right )\right )^{n}d x\]
Input:
int((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e))^n,x)
Output:
int((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e))^n,x)
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{n} \,d x } \] Input:
integrate((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e))^n,x, algorithm="fricas")
Output:
integral((2*c/(e^(2*I*f*x + 2*I*e) + 1))^n*e^(2*I*f*m*x + 2*I*e*m + m*log( a/c) + m*log(2*c/(e^(2*I*f*x + 2*I*e) + 1))), x)
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=\int \left (i a \left (\tan {\left (e + f x \right )} - i\right )\right )^{m} \left (- i c \left (\tan {\left (e + f x \right )} + i\right )\right )^{n}\, dx \] Input:
integrate((a+I*a*tan(f*x+e))**m*(c-I*c*tan(f*x+e))**n,x)
Output:
Integral((I*a*(tan(e + f*x) - I))**m*(-I*c*(tan(e + f*x) + I))**n, x)
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{n} \,d x } \] Input:
integrate((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e))^n,x, algorithm="maxima")
Output:
integrate((I*a*tan(f*x + e) + a)^m*(-I*c*tan(f*x + e) + c)^n, x)
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{n} \,d x } \] Input:
integrate((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e))^n,x, algorithm="giac")
Output:
integrate((I*a*tan(f*x + e) + a)^m*(-I*c*tan(f*x + e) + c)^n, x)
Timed out. \[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=\int {\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^m\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^n \,d x \] Input:
int((a + a*tan(e + f*x)*1i)^m*(c - c*tan(e + f*x)*1i)^n,x)
Output:
int((a + a*tan(e + f*x)*1i)^m*(c - c*tan(e + f*x)*1i)^n, x)
\[ \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x))^n \, dx=\frac {i \left (-\left (\tan \left (f x +e \right ) a i +a \right )^{m} \left (-\tan \left (f x +e \right ) c i +c \right )^{n}+\left (\int \left (\tan \left (f x +e \right ) a i +a \right )^{m} \left (-\tan \left (f x +e \right ) c i +c \right )^{n} \tan \left (f x +e \right )d x \right ) f m +\left (\int \left (\tan \left (f x +e \right ) a i +a \right )^{m} \left (-\tan \left (f x +e \right ) c i +c \right )^{n} \tan \left (f x +e \right )d x \right ) f n \right )}{f \left (m -n \right )} \] Input:
int((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e))^n,x)
Output:
(i*( - (tan(e + f*x)*a*i + a)**m*( - tan(e + f*x)*c*i + c)**n + int((tan(e + f*x)*a*i + a)**m*( - tan(e + f*x)*c*i + c)**n*tan(e + f*x),x)*f*m + int ((tan(e + f*x)*a*i + a)**m*( - tan(e + f*x)*c*i + c)**n*tan(e + f*x),x)*f* n))/(f*(m - n))