\(\int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx\) [128]

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

Optimal result

Integrand size = 23, antiderivative size = 248 \[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx=\frac {(g \tan (e+f x))^{1+p}}{a^3 f g (1+p)}-\frac {3 \cos ^2(e+f x)^{\frac {7+p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {2+p}{2},\frac {7+p}{2},\frac {4+p}{2},\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}+\frac {5 (g \tan (e+f x))^{3+p}}{a^3 f g^3 (3+p)}-\frac {\cos ^2(e+f x)^{\frac {7+p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {4+p}{2},\frac {7+p}{2},\frac {6+p}{2},\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac {4 (g \tan (e+f x))^{5+p}}{a^3 f g^5 (5+p)} \] Output:

(g*tan(f*x+e))^(p+1)/a^3/f/g/(p+1)-3*(cos(f*x+e)^2)^(7/2+1/2*p)*hypergeom( 
[1+1/2*p, 7/2+1/2*p],[2+1/2*p],sin(f*x+e)^2)*sec(f*x+e)^5*(g*tan(f*x+e))^( 
2+p)/a^3/f/g^2/(2+p)+5*(g*tan(f*x+e))^(3+p)/a^3/f/g^3/(3+p)-(cos(f*x+e)^2) 
^(7/2+1/2*p)*hypergeom([2+1/2*p, 7/2+1/2*p],[3+1/2*p],sin(f*x+e)^2)*sec(f* 
x+e)^3*(g*tan(f*x+e))^(4+p)/a^3/f/g^4/(4+p)+4*(g*tan(f*x+e))^(5+p)/a^3/f/g 
^5/(5+p)
 

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(1276\) vs. \(2(248)=496\).

Time = 17.80 (sec) , antiderivative size = 1276, normalized size of antiderivative = 5.15 \[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx =\text {Too large to display} \] Input:

Integrate[(g*Tan[e + f*x])^p/(a + a*Sin[e + f*x])^3,x]
 

Output:

(2^(1 + p)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^6*Tan[(e + f*x)/2]*(1 - T 
an[(e + f*x)/2]^2)^p*(-(Tan[(e + f*x)/2]/(-1 + Tan[(e + f*x)/2]^2)))^p*(Hy 
pergeometric2F1[(1 + p)/2, 2 + p, (3 + p)/2, Tan[(e + f*x)/2]^2]/(1 + p) - 
 (4*Hypergeometric2F1[(1 + p)/2, 3 + p, (3 + p)/2, Tan[(e + f*x)/2]^2])/(1 
 + p) + (8*Hypergeometric2F1[(1 + p)/2, 4 + p, (3 + p)/2, Tan[(e + f*x)/2] 
^2])/(1 + p) - (8*Hypergeometric2F1[(1 + p)/2, 5 + p, (3 + p)/2, Tan[(e + 
f*x)/2]^2])/(1 + p) + (4*Hypergeometric2F1[(1 + p)/2, 6 + p, (3 + p)/2, Ta 
n[(e + f*x)/2]^2])/(1 + p) - (2*Hypergeometric2F1[(2 + p)/2, 2 + p, (4 + p 
)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p) + (12*Hypergeometric2F1 
[(2 + p)/2, 3 + p, (4 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p 
) - (32*Hypergeometric2F1[(2 + p)/2, 4 + p, (4 + p)/2, Tan[(e + f*x)/2]^2] 
*Tan[(e + f*x)/2])/(2 + p) + (40*Hypergeometric2F1[(2 + p)/2, 5 + p, (4 + 
p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p) - (24*Hypergeometric2F 
1[(2 + p)/2, 6 + p, (4 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + 
p) + (Hypergeometric2F1[2 + p, (3 + p)/2, (5 + p)/2, Tan[(e + f*x)/2]^2]*T 
an[(e + f*x)/2]^2)/(3 + p) - (12*Hypergeometric2F1[(3 + p)/2, 3 + p, (5 + 
p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^2)/(3 + p) + (48*Hypergeometric 
2F1[(3 + p)/2, 4 + p, (5 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^2)/( 
3 + p) - (80*Hypergeometric2F1[(3 + p)/2, 5 + p, (5 + p)/2, Tan[(e + f*x)/ 
2]^2]*Tan[(e + f*x)/2]^2)/(3 + p) + (60*Hypergeometric2F1[(3 + p)/2, 6 ...
 

Rubi [A] (verified)

Time = 0.65 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.02, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 3190, 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 \frac {(g \tan (e+f x))^p}{(a \sin (e+f x)+a)^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(g \tan (e+f x))^p}{(a \sin (e+f x)+a)^3}dx\)

\(\Big \downarrow \) 3190

\(\displaystyle \frac {\int \left (a^3 \sec ^6(e+f x) (g \tan (e+f x))^p-a^3 \sec ^3(e+f x) \tan ^3(e+f x) (g \tan (e+f x))^p+3 a^3 \sec ^4(e+f x) \tan ^2(e+f x) (g \tan (e+f x))^p-3 a^3 \sec ^5(e+f x) \tan (e+f x) (g \tan (e+f x))^p\right )dx}{a^6}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {4 a^3 (g \tan (e+f x))^{p+5}}{f g^5 (p+5)}-\frac {a^3 \sec ^3(e+f x) \cos ^2(e+f x)^{\frac {p+7}{2}} (g \tan (e+f x))^{p+4} \operatorname {Hypergeometric2F1}\left (\frac {p+4}{2},\frac {p+7}{2},\frac {p+6}{2},\sin ^2(e+f x)\right )}{f g^4 (p+4)}+\frac {5 a^3 (g \tan (e+f x))^{p+3}}{f g^3 (p+3)}-\frac {3 a^3 \sec ^5(e+f x) \cos ^2(e+f x)^{\frac {p+7}{2}} (g \tan (e+f x))^{p+2} \operatorname {Hypergeometric2F1}\left (\frac {p+2}{2},\frac {p+7}{2},\frac {p+4}{2},\sin ^2(e+f x)\right )}{f g^2 (p+2)}+\frac {a^3 (g \tan (e+f x))^{p+1}}{f g (p+1)}}{a^6}\)

Input:

Int[(g*Tan[e + f*x])^p/(a + a*Sin[e + f*x])^3,x]
 

Output:

((a^3*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p)) - (3*a^3*(Cos[e + f*x]^2)^(( 
7 + p)/2)*Hypergeometric2F1[(2 + p)/2, (7 + p)/2, (4 + p)/2, Sin[e + f*x]^ 
2]*Sec[e + f*x]^5*(g*Tan[e + f*x])^(2 + p))/(f*g^2*(2 + p)) + (5*a^3*(g*Ta 
n[e + f*x])^(3 + p))/(f*g^3*(3 + p)) - (a^3*(Cos[e + f*x]^2)^((7 + p)/2)*H 
ypergeometric2F1[(4 + p)/2, (7 + p)/2, (6 + p)/2, Sin[e + f*x]^2]*Sec[e + 
f*x]^3*(g*Tan[e + f*x])^(4 + p))/(f*g^4*(4 + p)) + (4*a^3*(g*Tan[e + f*x]) 
^(5 + p))/(f*g^5*(5 + p)))/a^6
 

Defintions of rubi rules used

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

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

rule 3190
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x 
_)])^(p_.), x_Symbol] :> Simp[a^(2*m)   Int[ExpandIntegrand[(g*Tan[e + f*x] 
)^p/Sec[e + f*x]^m, (a*Sec[e + f*x] - b*Tan[e + f*x])^(-m), x], x], x] /; F 
reeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]
 
Maple [F]

\[\int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{\left (a +\sin \left (f x +e \right ) a \right )^{3}}d x\]

Input:

int((g*tan(f*x+e))^p/(a+sin(f*x+e)*a)^3,x)
 

Output:

int((g*tan(f*x+e))^p/(a+sin(f*x+e)*a)^3,x)
 

Fricas [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}} \,d x } \] Input:

integrate((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x, algorithm="fricas")
 

Output:

integral(-(g*tan(f*x + e))^p/(3*a^3*cos(f*x + e)^2 - 4*a^3 + (a^3*cos(f*x 
+ e)^2 - 4*a^3)*sin(f*x + e)), x)
 

Sympy [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx=\frac {\int \frac {\left (g \tan {\left (e + f x \right )}\right )^{p}}{\sin ^{3}{\left (e + f x \right )} + 3 \sin ^{2}{\left (e + f x \right )} + 3 \sin {\left (e + f x \right )} + 1}\, dx}{a^{3}} \] Input:

integrate((g*tan(f*x+e))**p/(a+a*sin(f*x+e))**3,x)
 

Output:

Integral((g*tan(e + f*x))**p/(sin(e + f*x)**3 + 3*sin(e + f*x)**2 + 3*sin( 
e + f*x) + 1), x)/a**3
 

Maxima [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}} \,d x } \] Input:

integrate((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x, algorithm="maxima")
 

Output:

integrate((g*tan(f*x + e))^p/(a*sin(f*x + e) + a)^3, x)
 

Giac [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}} \,d x } \] Input:

integrate((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x, algorithm="giac")
 

Output:

integrate((g*tan(f*x + e))^p/(a*sin(f*x + e) + a)^3, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx=\int \frac {{\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3} \,d x \] Input:

int((g*tan(e + f*x))^p/(a + a*sin(e + f*x))^3,x)
 

Output:

int((g*tan(e + f*x))^p/(a + a*sin(e + f*x))^3, x)
 

Reduce [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx=\int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{\left (a +a \sin \left (f x +e \right )\right )^{3}}d x \] Input:

int((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x)
 

Output:

int((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x)