\(\int (a+b \sin ^2(c+d x))^p \tan ^3(c+d x) \, dx\) [475]

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

-1/2*(b*p+a+b)*hypergeom([1, p+1],[2+p],(a+b*sin(d*x+c)^2)/(a+b))*(a+b*sin 
(d*x+c)^2)^(p+1)/(a+b)^2/d/(p+1)+1/2*sec(d*x+c)^2*(a+b*sin(d*x+c)^2)^(p+1) 
/(a+b)/d
 

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.81 \[ \int \left (a+b \sin ^2(c+d x)\right )^p \tan ^3(c+d x) \, dx=\frac {\left (-\left ((a+b+b p) \operatorname {Hypergeometric2F1}\left (1,1+p,2+p,\frac {a+b \sin ^2(c+d x)}{a+b}\right )\right )+(a+b) (1+p) \sec ^2(c+d x)\right ) \left (a+b \sin ^2(c+d x)\right )^{1+p}}{2 (a+b)^2 d (1+p)} \] Input:

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

Output:

((-((a + b + b*p)*Hypergeometric2F1[1, 1 + p, 2 + p, (a + b*Sin[c + d*x]^2 
)/(a + b)]) + (a + b)*(1 + p)*Sec[c + d*x]^2)*(a + b*Sin[c + d*x]^2)^(1 + 
p))/(2*(a + b)^2*d*(1 + p))
 

Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.02, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3673, 87, 78}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3673

\(\displaystyle \frac {\int \frac {\sin ^2(c+d x) \left (b \sin ^2(c+d x)+a\right )^p}{\left (1-\sin ^2(c+d x)\right )^2}d\sin ^2(c+d x)}{2 d}\)

\(\Big \downarrow \) 87

\(\displaystyle \frac {\frac {\left (a+b \sin ^2(c+d x)\right )^{p+1}}{(a+b) \left (1-\sin ^2(c+d x)\right )}-\frac {(a+b p+b) \int \frac {\left (b \sin ^2(c+d x)+a\right )^p}{1-\sin ^2(c+d x)}d\sin ^2(c+d x)}{a+b}}{2 d}\)

\(\Big \downarrow \) 78

\(\displaystyle \frac {\frac {\left (a+b \sin ^2(c+d x)\right )^{p+1}}{(a+b) \left (1-\sin ^2(c+d x)\right )}-\frac {(a+b p+b) \left (a+b \sin ^2(c+d x)\right )^{p+1} \operatorname {Hypergeometric2F1}\left (1,p+1,p+2,\frac {b \sin ^2(c+d x)+a}{a+b}\right )}{(p+1) (a+b)^2}}{2 d}\)

Input:

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

Output:

(-(((a + b + b*p)*Hypergeometric2F1[1, 1 + p, 2 + p, (a + b*Sin[c + d*x]^2 
)/(a + b)]*(a + b*Sin[c + d*x]^2)^(1 + p))/((a + b)^2*(1 + p))) + (a + b*S 
in[c + d*x]^2)^(1 + p)/((a + b)*(1 - Sin[c + d*x]^2)))/(2*d)
 

Defintions of rubi rules used

rule 78
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b 
*c - a*d)^n*((a + b*x)^(m + 1)/(b^(n + 1)*(m + 1)))*Hypergeometric2F1[-n, m 
 + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m}, x] 
 &&  !IntegerQ[m] && IntegerQ[n]
 

rule 87
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p 
+ 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p 
+ 1)))/(f*(p + 1)*(c*f - d*e))   Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] 
/; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege 
rQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ[p, n]))))
 

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

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

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

Input:

int((a+b*sin(d*x+c)^2)^p*tan(d*x+c)^3,x)
 

Output:

int((a+b*sin(d*x+c)^2)^p*tan(d*x+c)^3,x)
 

Fricas [F]

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

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

Output:

integral((-b*cos(d*x + c)^2 + a + b)^p*tan(d*x + c)^3, x)
 

Sympy [F(-1)]

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

integrate((a+b*sin(d*x+c)**2)**p*tan(d*x+c)**3,x)
 

Output:

Timed out
 

Maxima [F]

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

integrate((a+b*sin(d*x+c)^2)^p*tan(d*x+c)^3,x, algorithm="maxima")
 

Output:

integrate((b*sin(d*x + c)^2 + a)^p*tan(d*x + c)^3, x)
 

Giac [F]

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

integrate((a+b*sin(d*x+c)^2)^p*tan(d*x+c)^3,x, algorithm="giac")
 

Output:

integrate((b*sin(d*x + c)^2 + a)^p*tan(d*x + c)^3, x)
 

Mupad [F(-1)]

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

int(tan(c + d*x)^3*(a + b*sin(c + d*x)^2)^p,x)
 

Output:

int(tan(c + d*x)^3*(a + b*sin(c + d*x)^2)^p, x)
 

Reduce [F]

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

int((a+b*sin(d*x+c)^2)^p*tan(d*x+c)^3,x)
 

Output:

int((sin(c + d*x)**2*b + a)**p*tan(c + d*x)**3,x)