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

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 = 144 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\frac {\cos ^3(e+f x) \left (a-b+b \sec ^2(e+f x)\right )^{1+p}}{3 (a-b) f}-\frac {(3 a-2 b (1+p)) \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}}{3 (a-b) f} \] Output:

1/3*cos(f*x+e)^3*(a-b+b*sec(f*x+e)^2)^(p+1)/(a-b)/f-1/3*(3*a-2*b*(p+1))*co 
s(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)/f/(((a-b+b*sec(f*x+e)^2)/(a-b))^p)
 

Mathematica [A] (warning: unable to verify)

Time = 2.94 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.28 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\frac {\sin (e+f x) \tan (e+f x) \left (a+b \tan ^2(e+f x)\right )^p \left ((-3 a+2 b (1+p)) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},-p,\frac {1}{2},-\frac {b \sec ^2(e+f x)}{a-b}\right )+\left (a \cos ^2(e+f x)+b \sin ^2(e+f x)\right ) \left (\frac {a+b \tan ^2(e+f x)}{a-b}\right )^p\right )}{f \left (3 a \sec ^2(e+f x) \left (\frac {a-b+b \sec ^2(e+f x)}{a-b}\right )^p-3 (a-b) \left (\frac {a+b \tan ^2(e+f x)}{a-b}\right )^{1+p}\right )} \] Input:

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

Output:

(Sin[e + f*x]*Tan[e + f*x]*(a + b*Tan[e + f*x]^2)^p*((-3*a + 2*b*(1 + p))* 
Hypergeometric2F1[-1/2, -p, 1/2, -((b*Sec[e + f*x]^2)/(a - b))] + (a*Cos[e 
 + f*x]^2 + b*Sin[e + f*x]^2)*((a + b*Tan[e + f*x]^2)/(a - b))^p))/(f*(3*a 
*Sec[e + f*x]^2*((a - b + b*Sec[e + f*x]^2)/(a - b))^p - 3*(a - b)*((a + b 
*Tan[e + f*x]^2)/(a - b))^(1 + p)))
 

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4147, 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 ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4147

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 359

\(\displaystyle \frac {\frac {(3 a-2 b (p+1)) \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 {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{3 (a-b)}}{f}\)

\(\Big \downarrow \) 279

\(\displaystyle \frac {\frac {(3 a-2 b (p+1)) \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 {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{3 (a-b)}}{f}\)

\(\Big \downarrow \) 278

\(\displaystyle \frac {\frac {\cos ^3(e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{p+1}}{3 (a-b)}-\frac {(3 a-2 b (p+1)) \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)}}{f}\)

Input:

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

Output:

((Cos[e + f*x]^3*(a - b + b*Sec[e + f*x]^2)^(1 + p))/(3*(a - b)) - ((3*a - 
 2*b*(1 + p))*Cos[e + f*x]*Hypergeometric2F1[-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))/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 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 )^{3} \left (a +b \tan \left (f x +e \right )^{2}\right )^{p}d x\]

Input:

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

Output:

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

Fricas [F]

\[ \int \sin ^3(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 )^{3} \,d x } \] Input:

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

Output:

integral(-(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 ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^p \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [F]

\[ \int \sin ^3(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 )^{3} \,d x } \] Input:

integrate(sin(f*x+e)^3*(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)^3, x)
 

Giac [F]

\[ \int \sin ^3(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 )^{3} \,d x } \] Input:

integrate(sin(f*x+e)^3*(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)^3, x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \sin ^3(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 )^{3}d x \] Input:

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

Output:

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