Integrand size = 12, antiderivative size = 167 \[ \int (a+b \tan (e+f x))^m \, dx=\frac {b \operatorname {Hypergeometric2F1}\left (1,1+m,2+m,\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right ) (a+b \tan (e+f x))^{1+m}}{2 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right ) f (1+m)}-\frac {b \operatorname {Hypergeometric2F1}\left (1,1+m,2+m,\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) (a+b \tan (e+f x))^{1+m}}{2 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right ) f (1+m)} \] Output:
1/2*b*hypergeom([1, 1+m],[2+m],(a+b*tan(f*x+e))/(a-(-b^2)^(1/2)))*(a+b*tan (f*x+e))^(1+m)/(-b^2)^(1/2)/(a-(-b^2)^(1/2))/f/(1+m)-1/2*b*hypergeom([1, 1 +m],[2+m],(a+b*tan(f*x+e))/(a+(-b^2)^(1/2)))*(a+b*tan(f*x+e))^(1+m)/(-b^2) ^(1/2)/(a+(-b^2)^(1/2))/f/(1+m)
Result contains complex when optimal does not.
Time = 0.13 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.71 \[ \int (a+b \tan (e+f x))^m \, dx=\frac {\left ((a+i b) \operatorname {Hypergeometric2F1}\left (1,1+m,2+m,\frac {a+b \tan (e+f x)}{a-i b}\right )-(a-i b) \operatorname {Hypergeometric2F1}\left (1,1+m,2+m,\frac {a+b \tan (e+f x)}{a+i b}\right )\right ) (a+b \tan (e+f x))^{1+m}}{2 (a+i b) (i a+b) f (1+m)} \] Input:
Integrate[(a + b*Tan[e + f*x])^m,x]
Output:
(((a + I*b)*Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a - I *b)] - (a - I*b)*Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/( a + I*b)])*(a + b*Tan[e + f*x])^(1 + m))/(2*(a + I*b)*(I*a + b)*f*(1 + m))
Time = 0.38 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3966, 485, 2009}
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+b \tan (e+f x))^m \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \tan (e+f x))^mdx\) |
\(\Big \downarrow \) 3966 |
\(\displaystyle \frac {b \int \frac {(a+b \tan (e+f x))^m}{\tan ^2(e+f x) b^2+b^2}d(b \tan (e+f x))}{f}\) |
\(\Big \downarrow \) 485 |
\(\displaystyle \frac {b \int \left (\frac {\sqrt {-b^2} (a+b \tan (e+f x))^m}{2 b^2 \left (\sqrt {-b^2}-b \tan (e+f x)\right )}+\frac {\sqrt {-b^2} (a+b \tan (e+f x))^m}{2 b^2 \left (b \tan (e+f x)+\sqrt {-b^2}\right )}\right )d(b \tan (e+f x))}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \left (\frac {(a+b \tan (e+f x))^{m+1} \operatorname {Hypergeometric2F1}\left (1,m+1,m+2,\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )}{2 \sqrt {-b^2} (m+1) \left (a-\sqrt {-b^2}\right )}-\frac {(a+b \tan (e+f x))^{m+1} \operatorname {Hypergeometric2F1}\left (1,m+1,m+2,\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )}{2 \sqrt {-b^2} (m+1) \left (a+\sqrt {-b^2}\right )}\right )}{f}\) |
Input:
Int[(a + b*Tan[e + f*x])^m,x]
Output:
(b*((Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a - Sqrt[-b^ 2])]*(a + b*Tan[e + f*x])^(1 + m))/(2*Sqrt[-b^2]*(a - Sqrt[-b^2])*(1 + m)) - (Hypergeometric2F1[1, 1 + m, 2 + m, (a + b*Tan[e + f*x])/(a + Sqrt[-b^2 ])]*(a + b*Tan[e + f*x])^(1 + m))/(2*Sqrt[-b^2]*(a + Sqrt[-b^2])*(1 + m))) )/f
Int[((c_) + (d_.)*(x_))^(n_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[Expand Integrand[(c + d*x)^n, 1/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d, n}, x] & & !IntegerQ[2*n]
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d Su bst[Int[(a + x)^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c , d, n}, x] && NeQ[a^2 + b^2, 0]
\[\int \left (a +b \tan \left (f x +e \right )\right )^{m}d x\]
Input:
int((a+b*tan(f*x+e))^m,x)
Output:
int((a+b*tan(f*x+e))^m,x)
\[ \int (a+b \tan (e+f x))^m \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \] Input:
integrate((a+b*tan(f*x+e))^m,x, algorithm="fricas")
Output:
integral((b*tan(f*x + e) + a)^m, x)
\[ \int (a+b \tan (e+f x))^m \, dx=\int \left (a + b \tan {\left (e + f x \right )}\right )^{m}\, dx \] Input:
integrate((a+b*tan(f*x+e))**m,x)
Output:
Integral((a + b*tan(e + f*x))**m, x)
\[ \int (a+b \tan (e+f x))^m \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \] Input:
integrate((a+b*tan(f*x+e))^m,x, algorithm="maxima")
Output:
integrate((b*tan(f*x + e) + a)^m, x)
\[ \int (a+b \tan (e+f x))^m \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \] Input:
integrate((a+b*tan(f*x+e))^m,x, algorithm="giac")
Output:
integrate((b*tan(f*x + e) + a)^m, x)
Timed out. \[ \int (a+b \tan (e+f x))^m \, dx=\int {\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^m \,d x \] Input:
int((a + b*tan(e + f*x))^m,x)
Output:
int((a + b*tan(e + f*x))^m, x)
\[ \int (a+b \tan (e+f x))^m \, dx=\int \left (\tan \left (f x +e \right ) b +a \right )^{m}d x \] Input:
int((a+b*tan(f*x+e))^m,x)
Output:
int((tan(e + f*x)*b + a)**m,x)