\(\int (d \tan (e+f x))^m (a+b \sqrt {c \tan (e+f x)}) \, dx\) [409]

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

Optimal result

Integrand size = 27, antiderivative size = 121 \[ \int (d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right ) \, dx=\frac {a \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{2},\frac {3+m}{2},-\tan ^2(e+f x)\right ) \tan (e+f x) (d \tan (e+f x))^m}{f (1+m)}+\frac {2 b \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (3+2 m),\frac {1}{4} (7+2 m),-\tan ^2(e+f x)\right ) (c \tan (e+f x))^{3/2} (d \tan (e+f x))^m}{c f (3+2 m)} \] Output:

a*hypergeom([1, 1/2+1/2*m],[3/2+1/2*m],-tan(f*x+e)^2)*tan(f*x+e)*(d*tan(f* 
x+e))^m/f/(1+m)+2*b*hypergeom([1, 3/4+1/2*m],[7/4+1/2*m],-tan(f*x+e)^2)*(c 
*tan(f*x+e))^(3/2)*(d*tan(f*x+e))^m/c/f/(3+2*m)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.41 (sec) , antiderivative size = 304, normalized size of antiderivative = 2.51 \[ \int (d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right ) \, dx=\frac {\left (\left (a-b \sqrt [4]{-c^2}\right ) \operatorname {Hypergeometric2F1}\left (1,2 (1+m),3+2 m,-\frac {\sqrt {c \tan (e+f x)}}{\sqrt [4]{-c^2}}\right )+\left (a+i b \sqrt [4]{-c^2}\right ) \operatorname {Hypergeometric2F1}\left (1,2 (1+m),3+2 m,-\frac {i \sqrt {c \tan (e+f x)}}{\sqrt [4]{-c^2}}\right )+a \operatorname {Hypergeometric2F1}\left (1,2 (1+m),3+2 m,\frac {i \sqrt {c \tan (e+f x)}}{\sqrt [4]{-c^2}}\right )-i b \sqrt [4]{-c^2} \operatorname {Hypergeometric2F1}\left (1,2 (1+m),3+2 m,\frac {i \sqrt {c \tan (e+f x)}}{\sqrt [4]{-c^2}}\right )+a \operatorname {Hypergeometric2F1}\left (1,2 (1+m),3+2 m,\frac {\sqrt {c \tan (e+f x)}}{\sqrt [4]{-c^2}}\right )+b \sqrt [4]{-c^2} \operatorname {Hypergeometric2F1}\left (1,2 (1+m),3+2 m,\frac {\sqrt {c \tan (e+f x)}}{\sqrt [4]{-c^2}}\right )\right ) \tan (e+f x) (d \tan (e+f x))^m}{4 f (1+m)} \] Input:

Integrate[(d*Tan[e + f*x])^m*(a + b*Sqrt[c*Tan[e + f*x]]),x]
 

Output:

(((a - b*(-c^2)^(1/4))*Hypergeometric2F1[1, 2*(1 + m), 3 + 2*m, -(Sqrt[c*T 
an[e + f*x]]/(-c^2)^(1/4))] + (a + I*b*(-c^2)^(1/4))*Hypergeometric2F1[1, 
2*(1 + m), 3 + 2*m, ((-I)*Sqrt[c*Tan[e + f*x]])/(-c^2)^(1/4)] + a*Hypergeo 
metric2F1[1, 2*(1 + m), 3 + 2*m, (I*Sqrt[c*Tan[e + f*x]])/(-c^2)^(1/4)] - 
I*b*(-c^2)^(1/4)*Hypergeometric2F1[1, 2*(1 + m), 3 + 2*m, (I*Sqrt[c*Tan[e 
+ f*x]])/(-c^2)^(1/4)] + a*Hypergeometric2F1[1, 2*(1 + m), 3 + 2*m, Sqrt[c 
*Tan[e + f*x]]/(-c^2)^(1/4)] + b*(-c^2)^(1/4)*Hypergeometric2F1[1, 2*(1 + 
m), 3 + 2*m, Sqrt[c*Tan[e + f*x]]/(-c^2)^(1/4)])*Tan[e + f*x]*(d*Tan[e + f 
*x])^m)/(4*f*(1 + m))
 

Rubi [A] (warning: unable to verify)

Time = 0.59 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.23, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3042, 4153, 7267, 30, 2370, 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 (d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right ) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right )dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \frac {c \int \frac {(d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right )}{\tan ^2(e+f x) c^2+c^2}d(c \tan (e+f x))}{f}\)

\(\Big \downarrow \) 7267

\(\displaystyle \frac {2 c \int \frac {\sqrt {c \tan (e+f x)} \left (c d \tan ^2(e+f x)\right )^m (a+b c \tan (e+f x))}{c^4 \tan ^4(e+f x)+c^2}d\sqrt {c \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 30

\(\displaystyle \frac {2 c (c \tan (e+f x))^{-m} \left (c d \tan ^2(e+f x)\right )^m \int \frac {(c \tan (e+f x))^{\frac {1}{2} (2 m+1)} \left (a+b \sqrt {c \tan (e+f x)}\right )}{c^4 \tan ^4(e+f x)+c^2}d\sqrt {c \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 2370

\(\displaystyle \frac {2 c (c \tan (e+f x))^{-m} \left (c d \tan ^2(e+f x)\right )^m \int \left (\frac {a (c \tan (e+f x))^{\frac {1}{2} (2 m+1)}}{c^4 \tan ^4(e+f x)+c^2}+\frac {b (c \tan (e+f x))^{\frac {1}{2} (2 m+2)}}{c^4 \tan ^4(e+f x)+c^2}\right )d\sqrt {c \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 c (c \tan (e+f x))^{-m} \left (c d \tan ^2(e+f x)\right )^m \left (\frac {a (c \tan (e+f x))^{m+1} \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-c^2 \tan ^4(e+f x)\right )}{2 c^2 (m+1)}+\frac {b (c \tan (e+f x))^{\frac {1}{2} (2 m+3)} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (2 m+3),\frac {1}{4} (2 m+7),-c^2 \tan ^4(e+f x)\right )}{c^2 (2 m+3)}\right )}{f}\)

Input:

Int[(d*Tan[e + f*x])^m*(a + b*Sqrt[c*Tan[e + f*x]]),x]
 

Output:

(2*c*(c*d*Tan[e + f*x]^2)^m*((a*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, 
 -(c^2*Tan[e + f*x]^4)]*(c*Tan[e + f*x])^(1 + m))/(2*c^2*(1 + m)) + (b*Hyp 
ergeometric2F1[1, (3 + 2*m)/4, (7 + 2*m)/4, -(c^2*Tan[e + f*x]^4)]*(c*Tan[ 
e + f*x])^((3 + 2*m)/2))/(c^2*(3 + 2*m))))/(f*(c*Tan[e + f*x])^m)
 

Defintions of rubi rules used

rule 30
Int[(u_.)*((a_.)*(x_))^(m_.)*((b_.)*(x_)^(i_.))^(p_), x_Symbol] :> Simp[b^I 
ntPart[p]*((b*x^i)^FracPart[p]/(a^(i*IntPart[p])*(a*x)^(i*FracPart[p]))) 
Int[u*(a*x)^(m + i*p), x], x] /; FreeQ[{a, b, i, m, p}, x] && IntegerQ[i] & 
&  !IntegerQ[p]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2370
Int[((Pq_)*((c_.)*(x_))^(m_.))/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[ 
{v = Sum[(c*x)^(m + ii)*((Coeff[Pq, x, ii] + Coeff[Pq, x, n/2 + ii]*x^(n/2) 
)/(c^ii*(a + b*x^n))), {ii, 0, n/2 - 1}]}, Int[v, x] /; SumQ[v]] /; FreeQ[{ 
a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[n/2, 0] && Expon[Pq, x] < n
 

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

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 

rule 7267
Int[u_, x_Symbol] :> With[{lst = SubstForFractionalPowerOfLinear[u, x]}, Si 
mp[lst[[2]]*lst[[4]]   Subst[Int[lst[[1]], x], x, lst[[3]]^(1/lst[[2]])], x 
] /;  !FalseQ[lst] && SubstForFractionalPowerQ[u, lst[[3]], x]]
 
Maple [F]

\[\int \left (d \tan \left (f x +e \right )\right )^{m} \left (a +b \sqrt {c \tan \left (f x +e \right )}\right )d x\]

Input:

int((d*tan(f*x+e))^m*(a+b*(c*tan(f*x+e))^(1/2)),x)
 

Output:

int((d*tan(f*x+e))^m*(a+b*(c*tan(f*x+e))^(1/2)),x)
 

Fricas [F]

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

integrate((d*tan(f*x+e))^m*(a+b*(c*tan(f*x+e))^(1/2)),x, algorithm="fricas 
")
 

Output:

integral(sqrt(c*tan(f*x + e))*(d*tan(f*x + e))^m*b + (d*tan(f*x + e))^m*a, 
 x)
 

Sympy [F]

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

integrate((d*tan(f*x+e))**m*(a+b*(c*tan(f*x+e))**(1/2)),x)
 

Output:

Integral((d*tan(e + f*x))**m*(a + b*sqrt(c*tan(e + f*x))), x)
 

Maxima [F]

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

integrate((d*tan(f*x+e))^m*(a+b*(c*tan(f*x+e))^(1/2)),x, algorithm="maxima 
")
 

Output:

integrate((sqrt(c*tan(f*x + e))*b + a)*(d*tan(f*x + e))^m, x)
 

Giac [F]

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

integrate((d*tan(f*x+e))^m*(a+b*(c*tan(f*x+e))^(1/2)),x, algorithm="giac")
 

Output:

integrate((sqrt(c*tan(f*x + e))*b + a)*(d*tan(f*x + e))^m, x)
 

Mupad [F(-1)]

Timed out. \[ \int (d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right ) \, dx=\int \left (a+b\,\sqrt {c\,\mathrm {tan}\left (e+f\,x\right )}\right )\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^m \,d x \] Input:

int((a + b*(c*tan(e + f*x))^(1/2))*(d*tan(e + f*x))^m,x)
 

Output:

int((a + b*(c*tan(e + f*x))^(1/2))*(d*tan(e + f*x))^m, x)
 

Reduce [F]

\[ \int (d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right ) \, dx=d^{m} \left (\sqrt {c}\, \left (\int \tan \left (f x +e \right )^{m +\frac {1}{2}}d x \right ) b +\left (\int \tan \left (f x +e \right )^{m}d x \right ) a \right ) \] Input:

int((d*tan(f*x+e))^m*(a+b*(c*tan(f*x+e))^(1/2)),x)
                                                                                    
                                                                                    
 

Output:

d**m*(sqrt(c)*int(tan(e + f*x)**((2*m + 1)/2),x)*b + int(tan(e + f*x)**m,x 
)*a)