\(\int \sin ^5(e+f x) (a+b \tan ^2(e+f x))^p \, dx\) [154]

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

Optimal result

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

1/15*(-2*b*p+10*a-7*b)*cos(f*x+e)^3*(a-b+b*sec(f*x+e)^2)^(p+1)/(a-b)^2/f-1 
/5*cos(f*x+e)^5*(a-b+b*sec(f*x+e)^2)^(p+1)/(a-b)/f-1/15*(15*a^2-20*a*b*(p+ 
1)+4*b^2*(p^2+3*p+2))*cos(f*x+e)*hypergeom([-1/2, -p],[1/2],-b*sec(f*x+e)^ 
2/(a-b))*(a-b+b*sec(f*x+e)^2)^p/(a-b)^2/f/(((a-b+b*sec(f*x+e)^2)/(a-b))^p)
 

Mathematica [A] (warning: unable to verify)

Time = 5.47 (sec) , antiderivative size = 283, normalized size of antiderivative = 1.33 \[ \int \sin ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=-\frac {2^{3+p} \cos (e+f x) \sin ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left (\left (15 a^2-20 a b (1+p)+4 b^2 \left (2+3 p+p^2\right )\right ) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},-p,\frac {1}{2},-\frac {b \sec ^2(e+f x)}{a-b}\right )+\frac {1}{4} (a+b+(a-b) \cos (2 (e+f x))) (-17 a+b (11+4 p)+3 (a-b) \cos (2 (e+f x))) \left (\frac {a+b \tan ^2(e+f x)}{a-b}\right )^p\right )}{15 (a-b)^2 f \left (3 \left (\frac {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}{a-b}\right )^p-2^{2+p} \cos (2 (e+f x)) \left (\frac {a+b \tan ^2(e+f x)}{a-b}\right )^p+2^p \cos (4 (e+f x)) \left (\frac {a+b \tan ^2(e+f x)}{a-b}\right )^p\right )} \] Input:

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

Output:

-1/15*(2^(3 + p)*Cos[e + f*x]*Sin[e + f*x]^4*(a + b*Tan[e + f*x]^2)^p*((15 
*a^2 - 20*a*b*(1 + p) + 4*b^2*(2 + 3*p + p^2))*Hypergeometric2F1[-1/2, -p, 
 1/2, -((b*Sec[e + f*x]^2)/(a - b))] + ((a + b + (a - b)*Cos[2*(e + f*x)]) 
*(-17*a + b*(11 + 4*p) + 3*(a - b)*Cos[2*(e + f*x)])*((a + b*Tan[e + f*x]^ 
2)/(a - b))^p)/4))/((a - b)^2*f*(3*(((a + b + (a - b)*Cos[2*(e + f*x)])*Se 
c[e + f*x]^2)/(a - b))^p - 2^(2 + p)*Cos[2*(e + f*x)]*((a + b*Tan[e + f*x] 
^2)/(a - b))^p + 2^p*Cos[4*(e + f*x)]*((a + b*Tan[e + f*x]^2)/(a - b))^p))
 

Rubi [A] (verified)

Time = 0.65 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.01, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 4147, 365, 25, 359, 279, 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 ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4147

\(\displaystyle \frac {\int \cos ^6(e+f x) \left (1-\sec ^2(e+f x)\right )^2 \left (b \sec ^2(e+f x)+a-b\right )^pd\sec (e+f x)}{f}\)

\(\Big \downarrow \) 365

\(\displaystyle \frac {\frac {\int -\cos ^4(e+f x) \left (-5 (a-b) \sec ^2(e+f x)+10 a-b (2 p+7)\right ) \left (b \sec ^2(e+f x)+a-b\right )^pd\sec (e+f x)}{5 (a-b)}-\frac {\cos ^5(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{5 (a-b)}}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {-\frac {\int \cos ^4(e+f x) \left (-5 (a-b) \sec ^2(e+f x)+10 a-7 b-2 b p\right ) \left (b \sec ^2(e+f x)+a-b\right )^pd\sec (e+f x)}{5 (a-b)}-\frac {\cos ^5(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{5 (a-b)}}{f}\)

\(\Big \downarrow \) 359

\(\displaystyle \frac {-\frac {-\frac {\left (15 a^2-20 a b (p+1)+4 b^2 \left (p^2+3 p+2\right )\right ) \int \cos ^2(e+f x) \left (b \sec ^2(e+f x)+a-b\right )^pd\sec (e+f x)}{3 (a-b)}-\frac {(10 a-2 b p-7 b) \cos ^3(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{3 (a-b)}}{5 (a-b)}-\frac {\cos ^5(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{5 (a-b)}}{f}\)

\(\Big \downarrow \) 279

\(\displaystyle \frac {-\frac {-\frac {\left (15 a^2-20 a b (p+1)+4 b^2 \left (p^2+3 p+2\right )\right ) \left (a+b \sec ^2(e+f x)-b\right )^p \left (\frac {b \sec ^2(e+f x)}{a-b}+1\right )^{-p} \int \cos ^2(e+f x) \left (\frac {b \sec ^2(e+f x)}{a-b}+1\right )^pd\sec (e+f x)}{3 (a-b)}-\frac {(10 a-2 b p-7 b) \cos ^3(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{3 (a-b)}}{5 (a-b)}-\frac {\cos ^5(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{5 (a-b)}}{f}\)

\(\Big \downarrow \) 278

\(\displaystyle \frac {-\frac {\frac {\left (15 a^2-20 a b (p+1)+4 b^2 \left (p^2+3 p+2\right )\right ) \cos (e+f x) \left (a+b \sec ^2(e+f x)-b\right )^p \left (\frac {b \sec ^2(e+f x)}{a-b}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},-p,\frac {1}{2},-\frac {b \sec ^2(e+f x)}{a-b}\right )}{3 (a-b)}-\frac {(10 a-2 b p-7 b) \cos ^3(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{3 (a-b)}}{5 (a-b)}-\frac {\cos ^5(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{5 (a-b)}}{f}\)

Input:

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

Output:

(-1/5*(Cos[e + f*x]^5*(a - b + b*Sec[e + f*x]^2)^(1 + p))/(a - b) - (-1/3* 
((10*a - 7*b - 2*b*p)*Cos[e + f*x]^3*(a - b + b*Sec[e + f*x]^2)^(1 + p))/( 
a - b) + ((15*a^2 - 20*a*b*(1 + p) + 4*b^2*(2 + 3*p + p^2))*Cos[e + f*x]*H 
ypergeometric2F1[-1/2, -p, 1/2, -((b*Sec[e + f*x]^2)/(a - b))]*(a - b + b* 
Sec[e + f*x]^2)^p)/(3*(a - b)*(1 + (b*Sec[e + f*x]^2)/(a - b))^p))/(5*(a - 
 b)))/f
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 279
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^IntP 
art[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p])   Int[(c*x)^m* 
(1 + b*(x^2/a))^p, x], x] /; FreeQ[{a, b, c, m, p}, x] &&  !IGtQ[p, 0] && 
!(ILtQ[p, 0] || GtQ[a, 0])
 

rule 359
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x 
_Symbol] :> Simp[c*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] + 
Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(a*e^2*(m + 1))   Int[(e*x)^(m + 2)* 
(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] 
&& LtQ[m, -1] &&  !ILtQ[p, -1]
 

rule 365
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^2, x 
_Symbol] :> Simp[c^2*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] 
- Simp[1/(a*e^2*(m + 1))   Int[(e*x)^(m + 2)*(a + b*x^2)^p*Simp[2*b*c^2*(p 
+ 1) + c*(b*c - 2*a*d)*(m + 1) - a*d^2*(m + 1)*x^2, x], x], x] /; FreeQ[{a, 
 b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1]
 

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

rule 4147
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^ 
(p_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Simp[1/(f*ff^ 
m)   Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m + 1 
)), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[( 
m - 1)/2]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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