\(\int \sin ^2(e+f x) (b (c \tan (e+f x))^n)^p \, dx\) [165]

Optimal result
Mathematica [A] (verified)
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 = 63 \[ \int \sin ^2(e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {\operatorname {Hypergeometric2F1}\left (2,\frac {1}{2} (3+n p),\frac {1}{2} (5+n p),-\tan ^2(e+f x)\right ) \tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (3+n p)} \] Output:

hypergeom([2, 1/2*n*p+3/2],[1/2*n*p+5/2],-tan(f*x+e)^2)*tan(f*x+e)^3*(b*(c 
*tan(f*x+e))^n)^p/f/(n*p+3)
 

Mathematica [A] (verified)

Time = 0.44 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.00 \[ \int \sin ^2(e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {\operatorname {Hypergeometric2F1}\left (2,\frac {1}{2} (3+n p),\frac {1}{2} (5+n p),-\tan ^2(e+f x)\right ) \tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (3+n p)} \] Input:

Integrate[Sin[e + f*x]^2*(b*(c*Tan[e + f*x])^n)^p,x]
 

Output:

(Hypergeometric2F1[2, (3 + n*p)/2, (5 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f 
*x]^3*(b*(c*Tan[e + f*x])^n)^p)/(f*(3 + n*p))
 

Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4142, 3042, 3071, 278}

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 \sin ^2(e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sin (e+f x)^2 \left (b (c \tan (e+f x))^n\right )^pdx\)

\(\Big \downarrow \) 4142

\(\displaystyle (c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p \int \sin ^2(e+f x) (c \tan (e+f x))^{n p}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle (c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p \int \sin (e+f x)^2 (c \tan (e+f x))^{n p}dx\)

\(\Big \downarrow \) 3071

\(\displaystyle \frac {c (c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p \int \frac {(c \tan (e+f x))^{n p+2}}{\left (\tan ^2(e+f x) c^2+c^2\right )^2}d(c \tan (e+f x))}{f}\)

\(\Big \downarrow \) 278

\(\displaystyle \frac {\tan ^3(e+f x) \operatorname {Hypergeometric2F1}\left (2,\frac {1}{2} (n p+3),\frac {1}{2} (n p+5),-\tan ^2(e+f x)\right ) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+3)}\)

Input:

Int[Sin[e + f*x]^2*(b*(c*Tan[e + f*x])^n)^p,x]
 

Output:

(Hypergeometric2F1[2, (3 + n*p)/2, (5 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f 
*x]^3*(b*(c*Tan[e + f*x])^n)^p)/(f*(3 + n*p))
 

Defintions of rubi rules used

rule 278
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( 
c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( 
-b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] &&  !IGtQ[p, 0] && (ILtQ[p, 0 
] || GtQ[a, 0])
 

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

rule 3071
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S 
ymbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[b*(ff/f)   Subst[I 
nt[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff)], 
x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]
 

rule 4142
Int[(u_.)*((b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> S 
imp[b^IntPart[p]*((b*(c*Tan[e + f*x])^n)^FracPart[p]/(c*Tan[e + f*x])^(n*Fr 
acPart[p]))   Int[ActivateTrig[u]*(c*Tan[e + f*x])^(n*p), x], x] /; FreeQ[{ 
b, c, e, f, n, p}, x] &&  !IntegerQ[p] &&  !IntegerQ[n] && (EqQ[u, 1] || Ma 
tchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, 
 cos, tan, cot, sec, csc}, trig]])
 
Maple [F]

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

Input:

int(sin(f*x+e)^2*(b*(c*tan(f*x+e))^n)^p,x)
 

Output:

int(sin(f*x+e)^2*(b*(c*tan(f*x+e))^n)^p,x)
 

Fricas [F]

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

integrate(sin(f*x+e)^2*(b*(c*tan(f*x+e))^n)^p,x, algorithm="fricas")
 

Output:

integral(-(cos(f*x + e)^2 - 1)*((c*tan(f*x + e))^n*b)^p, x)
 

Sympy [F]

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

integrate(sin(f*x+e)**2*(b*(c*tan(f*x+e))**n)**p,x)
 

Output:

Integral((b*(c*tan(e + f*x))**n)**p*sin(e + f*x)**2, x)
 

Maxima [F]

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

integrate(sin(f*x+e)^2*(b*(c*tan(f*x+e))^n)^p,x, algorithm="maxima")
 

Output:

integrate(((c*tan(f*x + e))^n*b)^p*sin(f*x + e)^2, x)
 

Giac [F]

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

integrate(sin(f*x+e)^2*(b*(c*tan(f*x+e))^n)^p,x, algorithm="giac")
 

Output:

integrate(((c*tan(f*x + e))^n*b)^p*sin(f*x + e)^2, x)
 

Mupad [F(-1)]

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

int(sin(e + f*x)^2*(b*(c*tan(e + f*x))^n)^p,x)
 

Output:

int(sin(e + f*x)^2*(b*(c*tan(e + f*x))^n)^p, x)
 

Reduce [F]

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

int(sin(f*x+e)^2*(b*(c*tan(f*x+e))^n)^p,x)
 

Output:

c**(n*p)*b**p*int(tan(e + f*x)**(n*p)*sin(e + f*x)**2,x)