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

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

Optimal result

Integrand size = 23, antiderivative size = 737 \[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\frac {a^2 \cos (e+f x) \left (1-\cos ^2(e+f x)\right )^{\frac {1}{2} (-1+q)} \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{-2+\frac {3-q}{2}+\frac {1}{2} (-1+q)} \left (\left (2 \left (a^2-b^2\right )+b^2 (1+q) \cos ^2(e+f x)\right ) \Phi \left (-\frac {a^2 \cot ^2(e+f x)}{a^2-b^2},1,\frac {1-q}{2}\right )-b^2 (-1+q) \cos ^2(e+f x) \Phi \left (-\frac {a^2 \cot ^2(e+f x)}{a^2-b^2},1,\frac {3-q}{2}\right )\right ) \sin (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1-q)} (g \tan (e+f x))^q}{2 \left (a^2-b^2\right )^2 \left (-a^2+b^2\right ) f}-\frac {a^2 \cos (e+f x) \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{\frac {1}{2} (-1+q)} \operatorname {Hypergeometric2F1}\left (\frac {1-q}{2},\frac {1-q}{2},\frac {3-q}{2},\frac {\cos ^2(e+f x)-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}{1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}\right ) \sin (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1-q)} (g \tan (e+f x))^q}{\left (a^2-b^2\right )^2 f (-1+q)}+\frac {b^2 \cos (e+f x) \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{\frac {1}{2} (-1+q)} \operatorname {Hypergeometric2F1}\left (\frac {1-q}{2},\frac {1-q}{2},\frac {3-q}{2},\frac {\cos ^2(e+f x)-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}{1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}\right ) \sin (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1-q)} (g \tan (e+f x))^q}{\left (a^2-b^2\right )^2 f (-1+q)}-\frac {2 a b \operatorname {AppellF1}\left (\frac {1-q}{2},-\frac {q}{2},2,\frac {3-q}{2},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right ) \cos (e+f x) \sin ^2(e+f x)^{-q/2} (g \tan (e+f x))^q}{\left (a^2-b^2\right )^2 f (-1+q)} \] Output:

1/2*a^2*cos(f*x+e)*(1-cos(f*x+e)^2)^(-1/2+1/2*q)/(1-b^2*cos(f*x+e)^2/(-a^2 
+b^2))*((2*a^2-2*b^2+b^2*(1+q)*cos(f*x+e)^2)*HurwitzLerchPhi(-a^2*cot(f*x+ 
e)^2/(a^2-b^2),1,1/2-1/2*q)-b^2*(-1+q)*cos(f*x+e)^2*HurwitzLerchPhi(-a^2*c 
ot(f*x+e)^2/(a^2-b^2),1,3/2-1/2*q))*sin(f*x+e)*(sin(f*x+e)^2)^(-1/2-1/2*q) 
*(g*tan(f*x+e))^q/(a^2-b^2)^2/(-a^2+b^2)/f-a^2*cos(f*x+e)*(1-b^2*cos(f*x+e 
)^2/(-a^2+b^2))^(-1/2+1/2*q)*hypergeom([1/2-1/2*q, 1/2-1/2*q],[3/2-1/2*q], 
(cos(f*x+e)^2-b^2*cos(f*x+e)^2/(-a^2+b^2))/(1-b^2*cos(f*x+e)^2/(-a^2+b^2)) 
)*sin(f*x+e)*(sin(f*x+e)^2)^(-1/2-1/2*q)*(g*tan(f*x+e))^q/(a^2-b^2)^2/f/(- 
1+q)+b^2*cos(f*x+e)*(1-b^2*cos(f*x+e)^2/(-a^2+b^2))^(-1/2+1/2*q)*hypergeom 
([1/2-1/2*q, 1/2-1/2*q],[3/2-1/2*q],(cos(f*x+e)^2-b^2*cos(f*x+e)^2/(-a^2+b 
^2))/(1-b^2*cos(f*x+e)^2/(-a^2+b^2)))*sin(f*x+e)*(sin(f*x+e)^2)^(-1/2-1/2* 
q)*(g*tan(f*x+e))^q/(a^2-b^2)^2/f/(-1+q)-2*a*b*AppellF1(1/2-1/2*q,-1/2*q,2 
,3/2-1/2*q,cos(f*x+e)^2,b^2*cos(f*x+e)^2/(-a^2+b^2))*cos(f*x+e)*(g*tan(f*x 
+e))^q/(a^2-b^2)^2/f/(-1+q)/((sin(f*x+e)^2)^(1/2*q))
 

Mathematica [A] (warning: unable to verify)

Time = 9.00 (sec) , antiderivative size = 695, normalized size of antiderivative = 0.94 \[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx =\text {Too large to display} \] Input:

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

Output:

(Cos[e + f*x]*Sin[e + f*x]*(g*Tan[e + f*x])^p*(a*(2 + p)*((a^2 + b^2)*Hype 
rgeometric2F1[1, (1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] - 2* 
b^2*Hypergeometric2F1[2, (1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x] 
^2]) + 2*b*(-a^2 + b^2)*(1 + p)*AppellF1[(2 + p)/2, -1/2, 2, (4 + p)/2, -T 
an[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]*Tan[e + f*x]))/(f*(1 + p)*(a 
 + b*Sin[e + f*x])^2*(a*(2 + p)*((a^2 + b^2)*Hypergeometric2F1[1, (1 + p)/ 
2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] - 2*b^2*Hypergeometric2F1[2, 
(1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2]) + 2*b*(-a^2 + b^2)*A 
ppellF1[(2 + p)/2, -1/2, 2, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan 
[e + f*x]^2]*Tan[e + f*x] + 2*b*(-a^2 + b^2)*(1 + p)*AppellF1[(2 + p)/2, - 
1/2, 2, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]*Tan[e + 
 f*x] + (2*b*(-a^2 + b^2)*(2 + p)*((-4 + (4*b^2)/a^2)*AppellF1[(4 + p)/2, 
-1/2, 3, (6 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2] + Appe 
llF1[(4 + p)/2, 1/2, 2, (6 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + 
 f*x]^2])*Tan[e + f*x]^3)/(4 + p) + a*(2 + p)*(-2*b^2*(-Hypergeometric2F1[ 
2, (1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] + (1 + (1 - b^2/a^ 
2)*Tan[e + f*x]^2)^(-2)) + (a^2 + b^2)*(-Hypergeometric2F1[1, (1 + p)/2, ( 
3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] + (1 + (1 - b^2/a^2)*Tan[e + f*x] 
^2)^(-1)))))
 

Rubi [F]

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+b \sin (e+f x))^2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3211

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

Input:

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

Output:

$Aborted
 

Defintions of rubi rules used

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

rule 3211
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( 
x_)])^(p_.), x_Symbol] :> Unintegrable[(a + b*Sin[e + f*x])^m*(g*Tan[e + f* 
x])^p, x] /; FreeQ[{a, b, e, f, g, m, p}, x]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

g**p*int(tan(e + f*x)**p/(sin(e + f*x)**2*b**2 + 2*sin(e + f*x)*a*b + a**2 
),x)