Rules for integrands of the form (((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))

1.  ∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  when  p>0

1:  ∫(a+b ((Sin[e+f x])^2)) (A+B ((Sin[e+f x])^2))dx

Derivation: Algebraic expansion

Basis: (a+b z) (A+B z)==(1/8) (4 A (2 a+b)+B (4 a+3 b))-(1/8) (4 A b+B (4 a+3 b)) (1-2 z)-(1/4) b B z (3-4 z)

Rule:

∫(a+b ((Sin[e+f x])^2)) (A+B ((Sin[e+f x])^2))dx  ⟶  
(((4 A (2 a+b)+B (4 a+3 b)) x)/8)-(((4 A b+B (4 a+3 b)) Cos[e+f x] Sin[e+f x])/(8 f))-((b B Cos[e+f x] ((Sin[e+f x])^3))/(4 f))

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^2)*(A_.+B_.*sin[e_.+f_.*x_]^2),x_Symbol] :=
  (4*A*(2*a+b)+B*(4*a+3*b))*x/8 - 
  (4*A*b+B*(4*a+3*b))*Cos[e+f*x]*Sin[e+f*x]/(8*f) - 
  b*B*Cos[e+f*x]*Sin[e+f*x]^3/(4*f) /;
FreeQ[{a,b,e,f,A,B},x]

2:  ∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  when  p>0

Rule: If  p>0, then

∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  ⟶  
-((B Cos[e+f x] Sin[e+f x] (((a+b ((Sin[e+f x])^2)))^p))/(2 f (p+1)))+
(1/(2 (p+1))) ∫(((a+b ((Sin[e+f x])^2)))^(p-1))(a B+2 a A (p+1)+(2 A b (p+1)+B (b+2 a p+2 b p)) ((Sin[e+f x])^2))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^2)^p_*(A_.+B_.*sin[e_.+f_.*x_]^2),x_Symbol] :=
  -B*Cos[e+f*x]*Sin[e+f*x]*(a+b*Sin[e+f*x]^2)^p/(2*f*(p+1)) + 
  1/(2*(p+1))*Int[(a+b*Sin[e+f*x]^2)^(p-1)*
    Simp[a*B+2*a*A*(p+1)+(2*A*b*(p+1)+B*(b+2*a*p+2*b*p))*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,e,f,A,B},x] && GtQ[p,0]

2.  ∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  when  p<0

1:  ∫((A+B ((Sin[c+d x])^2))/(a+b ((Sin[e+f x])^2)))dx

Derivation: Algebraic expansion

Basis: ((A+B z)/(a+b z))==(B/b)+((A b-a B)/(b (a+b z)))

Rule:

∫((A+B ((Sin[c+d x])^2))/(a+b ((Sin[e+f x])^2)))dx  ⟶  ((B x)/b)+((A b-a B)/b) ∫(1/(a+b ((Sin[e+f x])^2)))dx

Program code:

Int[(A_.+B_.*sin[e_.+f_.*x_]^2)/(a_+b_.*sin[e_.+f_.*x_]^2),x_Symbol] :=
  B*x/b + (A*b-a*B)/b*Int[1/(a+b*Sin[e+f*x]^2),x] /;
FreeQ[{a,b,e,f,A,B},x]

2:  ∫((A+B ((Sin[c+d x])^2))/(Sqrt[a+b ((Sin[e+f x])^2)]))dx

Derivation: Algebraic expansion

Basis: ((A+B ((Sin[z])^2))/(Sqrt[a+b ((Sin[z])^2)]))==((B (Sqrt[a+b ((Sin[z])^2)]))/b)+((A b-a B)/(b (Sqrt[a+b ((Sin[z])^2)])))

Rule:

∫((A+B ((Sin[c+d x])^2))/(Sqrt[a+b ((Sin[e+f x])^2)]))dx  ⟶  (B/b) ∫(Sqrt[a+b ((Sin[e+f x])^2)])dx+((A b-a B)/b) ∫(1/(Sqrt[a+b ((Sin[e+f x])^2)]))dx

Program code:

Int[(A_.+B_.*sin[e_.+f_.*x_]^2)/Sqrt[a_+b_.*sin[e_.+f_.*x_]^2],x_Symbol] :=
  B/b*Int[Sqrt[a+b*Sin[e+f*x]^2],x] + (A*b-a*B)/b*Int[1/Sqrt[a+b*Sin[e+f*x]^2],x] /;
FreeQ[{a,b,e,f,A,B},x]

3:  ∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  when  p<-1 ∧ a+b≠0

Rule: If  p<-1 ∧ a+b≠0, then

∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  ⟶  
-(((A b-a B) Cos[e+f x] Sin[e+f x] (((a+b ((Sin[e+f x])^2)))^(p+1)))/(2 a f (a+b) (p+1)))-
(1/(2 a (a+b) (p+1)))∫(((a+b ((Sin[e+f x])^2)))^(p+1)) (a B-A (2 a (p+1)+b (2 p+3))+2 (A b-a B) (p+2) ((Sin[e+f x])^2))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^2)^p_*(A_.+B_.*sin[e_.+f_.*x_]^2),x_Symbol] :=
  -(A*b-a*B)*Cos[e+f*x]*Sin[e+f*x]*(a+b*Sin[e+f*x]^2)^(p+1)/(2*a*f*(a+b)*(p+1)) - 
  1/(2*a*(a+b)*(p+1))*Int[(a+b*Sin[e+f*x]^2)^(p+1)*
    Simp[a*B-A*(2*a*(p+1)+b*(2*p+3))+2*(A*b-a*B)*(p+2)*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,e,f,A,B},x] && LtQ[p,-1] && NeQ[a+b,0]

3:  ∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  when  p∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: A+B ((Sin[z])^2)==((A+(A+B) ((Tan[z])^2))/(1+((Tan[z])^2)))

Basis: (∂_x)(((((a+b ((Sin[e+f x])^2)))^p) (((((Sec[e+f x])^2)))^p))/(((a+(a+b) ((Tan[e+f x])^2)))^p))==0

Basis: F[Tan[e+f x]]==(1/f) Subst[((F[x])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If  p∉ℤ, then

∫(((a+b ((Sin[e+f x])^2)))^p) (A+B ((Sin[e+f x])^2))dx  ⟶  (((((a+b ((Sin[e+f x])^2)))^p) (((((Sec[e+f x])^2)))^p))/(((a+(a+b) ((Tan[e+f x])^2)))^p)) ∫(((((a+(a+b) ((Tan[e+f x])^2)))^p) (A+(A+B) ((Tan[e+f x])^2)))/(((1+((Tan[e+f x])^2)))^(p+1)))dx

  ⟶  (((((a+b ((Sin[e+f x])^2)))^p) (((((Sec[e+f x])^2)))^p))/(f (((a+(a+b) ((Tan[e+f x])^2)))^p))) Subst[∫(((((a+(a+b) (x^2)))^p) (A+(A+B) (x^2)))/(((1+(x^2)))^(p+2)))dx,x,Tan[e+f x]]

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_]^2)^p_*(A_.+B_.*sin[e_.+f_.*x_]^2),x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff*(a+b*Sin[e+f*x]^2)^p*(Sec[e+f*x]^2)^p/(f*(a+(a+b)*Tan[e+f*x]^2)^p)*
    Subst[Int[(a+(a+b)*ff^2*x^2)^p*(A+(A+B)*ff^2*x^2)/(1+ff^2*x^2)^(p+2),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,A,B},x] && Not[IntegerQ[p]]

Rules for integrands of the form  u (((a+b ((Sin[e+f x])^2)))^p)

1.  ∫u (((a+b ((Sin[e+f x])^2)))^p)dx  when  a+b==0

1:  ∫u (((a+b ((Sin[e+f x])^2)))^p)dx  when a+b==0 ∧ p∈ℤ

Derivation: Algebraic simplification

Basis: If  a+b==0, then a+b ((Sin[z])^2)==a ((Cos[z])^2)

Rule: If  a+b==0 ∧ p∈ℤ, then

∫u (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (a^p) ∫u ((Cos[e+f x])^(2 p))dx

Program code:

Int[u_.*(a_+b_.*sin[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  a^p*Int[ActivateTrig[u*cos[e+f*x]^(2*p)],x] /;
FreeQ[{a,b,e,f,p},x] && EqQ[a+b,0] && IntegerQ[p]

2:  ∫u (((a+b ((Sin[e+f x])^2)))^p)dx  when a+b==0

Derivation: Algebraic simplification

Basis: If  a+b==0, then a+b ((Sin[z])^2)==a ((Cos[z])^2)

Rule: If  a+b==0, then

∫u (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  ∫u (((a ((Cos[e+f x])^2)))^p)dx

Program code:

Int[u_.*(a_+b_.*sin[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  Int[ActivateTrig[u*(a*cos[e+f*x]^2)^p],x] /;
FreeQ[{a,b,e,f,p},x] && EqQ[a+b,0]

2.  ∫(((a+b ((Sin[e+f x])^2)))^p)dx

1.  ∫(((a+b ((Sin[e+f x])^2)))^p)dx  when  a+b≠0 ∧ p>0

1.  ∫(Sqrt[a+b ((Sin[e+f x])^2)])dx

1:  ∫(Sqrt[a+b ((Sin[e+f x])^2)])dx  when  a>0

Rule: If  a>0, then

∫(Sqrt[a+b ((Sin[e+f x])^2)])dx  ⟶  ((Sqrt[a])/f) EllipticE[e+f x,-(b/a)]

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]^2],x_Symbol] :=
  Sqrt[a]/f*EllipticE[e+f*x,-b/a] /;
FreeQ[{a,b,e,f},x] && GtQ[a,0]

2:  ∫(Sqrt[a+b ((Sin[e+f x])^2)])dx  when  a≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[a+b ((Sin[e+f x])^2)])/(Sqrt[1+((b ((Sin[e+f x])^2))/a)]))==0

Rule: If  a≯0, then

∫(Sqrt[a+b ((Sin[e+f x])^2)])dx  ⟶  ((Sqrt[a+b ((Sin[e+f x])^2)])/(Sqrt[1+((b ((Sin[e+f x])^2))/a)])) ∫(Sqrt[1+((b ((Sin[e+f x])^2))/a)])dx

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]^2],x_Symbol] :=
  Sqrt[a+b*Sin[e+f*x]^2]/Sqrt[1+b*Sin[e+f*x]^2/a]*Int[Sqrt[1+(b*Sin[e+f*x]^2)/a],x] /;
FreeQ[{a,b,e,f},x] && Not[GtQ[a,0]]

2:  ∫(((a+b ((Sin[e+f x])^2)))^2)dx

Derivation: Algebraic expansion

Basis: (((a+b z))^2)==(1/8) (8 (a^2)+8 a b+3 (b^2))-(b/8) (8 a+3 b) (1-2 z)-(1/4) (b^2) (3-4 z) z

Rule:

∫(((a+b ((Sin[e+f x])^2)))^2)dx  ⟶  
(((8 (a^2)+8 a b+3 (b^2)) x)/8)-((b (8 a+3 b) Cos[e+f x] Sin[e+f x])/(8 f))-(((b^2) Cos[e+f x] ((Sin[e+f x])^3))/(4 f))

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^2)^2,x_Symbol] :=
  (8*a^2+8*a*b+3*b^2)*x/8 - 
  b*(8*a+3*b)*Cos[e+f*x]*Sin[e+f*x]/(8*f) - 
  b^2*Cos[e+f*x]*Sin[e+f*x]^3/(4*f) /;
FreeQ[{a,b,e,f},x]

3:  ∫(((a+b ((Sin[e+f x])^2)))^p)dx  when  a+b≠0 ∧ p>1

Rule: If  a+b≠0 ∧ p>1, then

∫(((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  
-((b Cos[e+f x] Sin[e+f x] (((a+b ((Sin[e+f x])^2)))^(p-1)))/(2 f p))+
(1/(2 p))∫(((a+b ((Sin[e+f x])^2)))^(p-2))(a (b+2 a p)+b (2 a+b) (2 p-1) ((Sin[e+f x])^2))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  -b*Cos[e+f*x]*Sin[e+f*x]*(a+b*Sin[e+f*x]^2)^(p-1)/(2*f*p) + 
  1/(2*p)*Int[(a+b*Sin[e+f*x]^2)^(p-2)*Simp[a*(b+2*a*p)+b*(2*a+b)*(2*p-1)*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,e,f},x] && NeQ[a+b,0] && GtQ[p,1]

2.  ∫(((a+b ((Sin[e+f x])^2)))^p)dx  when  a+b≠0 ∧ p<0

1:  ∫(1/(a+b ((Sin[e+f x])^2)))dx

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: F[((Sin[e+f x])^2)]==(1/f) Subst[((F[((x^2)/(1+(x^2)))])/(1+(x^2))),x,Tan[e+f x]] (∂_x)Tan[e+f x]

Rule: If  p∈ℤ, then

∫(1/(a+b ((Sin[e+f x])^2)))dx  ⟶  (1/f)Subst[∫(1/(a+(a+b) (x^2)))dx,x,Tan[e+f x]]

Program code:

Int[1/(a_+b_.*sin[e_.+f_.*x_]^2),x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[1/(a+(a+b)*ff^2*x^2),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x]

2.  ∫(1/(Sqrt[a+b ((Sin[e+f x])^2)]))dx

1:  ∫(1/(Sqrt[a+b ((Sin[e+f x])^2)]))dx  when  a>0

Rule: If  a>0, then

∫(1/(Sqrt[a+b ((Sin[e+f x])^2)]))dx  ⟶  (1/((Sqrt[a]) f)) EllipticF[e+f x,-(b/a)]

Program code:

Int[1/Sqrt[a_+b_.*sin[e_.+f_.*x_]^2],x_Symbol] :=
  1/(Sqrt[a]*f)*EllipticF[e+f*x,-b/a] /;
FreeQ[{a,b,e,f},x] && GtQ[a,0]

2:  ∫(1/(Sqrt[a+b ((Sin[e+f x])^2)]))dx  when  a≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[1+((b ((Sin[e+f x])^2))/a)])/(Sqrt[a+b ((Sin[e+f x])^2)]))==0

Rule: If  a≯0, then

∫(1/(Sqrt[a+b ((Sin[e+f x])^2)]))dx  ⟶  ((Sqrt[1+((b ((Sin[e+f x])^2))/a)])/(Sqrt[a+b ((Sin[e+f x])^2)])) ∫(1/(Sqrt[1+((b ((Sin[e+f x])^2))/a)]))dx

Program code:

Int[1/Sqrt[a_+b_.*sin[e_.+f_.*x_]^2],x_Symbol] :=
  Sqrt[1+b*Sin[e+f*x]^2/a]/Sqrt[a+b*Sin[e+f*x]^2]*Int[1/Sqrt[1+(b*Sin[e+f*x]^2)/a],x] /;
FreeQ[{a,b,e,f},x] && Not[GtQ[a,0]]

3:  ∫(((a+b ((Sin[e+f x])^2)))^p)dx  when  a+b≠0 ∧ p<-1

Rule: If  a+b≠0 ∧ p<-1, then

∫(((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  
-((b Cos[e+f x] Sin[e+f x] (((a+b ((Sin[e+f x])^2)))^(p+1)))/(2 a f (p+1) (a+b)))+
(1/(2 a (p+1) (a+b)))∫(((a+b ((Sin[e+f x])^2)))^(p+1)) (2 a (p+1)+b (2 p+3)-2 b (p+2) ((Sin[e+f x])^2))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  -b*Cos[e+f*x]*Sin[e+f*x]*(a+b*Sin[e+f*x]^2)^(p+1)/(2*a*f*(p+1)*(a+b)) + 
  1/(2*a*(p+1)*(a+b))*Int[(a+b*Sin[e+f*x]^2)^(p+1)*Simp[2*a*(p+1)+b*(2*p+3)-2*b*(p+2)*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,e,f},x] && NeQ[a+b,0] && LtQ[p,-1]

3:  ∫(((a+b ((Sin[e+f x])^2)))^p)dx  when  p∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x]))==0

Basis: Cos[e+f x]F[Sin[e+f x]]==(1/f)Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If  p∉ℤ, then

∫(((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x])) ∫((Cos[e+f x] (((a+b ((Sin[e+f x])^2)))^p))/(Sqrt[1-((Sin[e+f x])^2)]))dx

  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(f Cos[e+f x])) Subst[∫((((a+b (x^2)))^p)/(Sqrt[1-(x^2)]))dx,x,Sin[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff*Sqrt[Cos[e+f*x]^2]/(f*Cos[e+f*x])*Subst[Int[(a+b*ff^2*x^2)^p/Sqrt[1-ff^2*x^2],x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && Not[IntegerQ[p]]

3.  ∫(((d Sin[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx

1.  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  m∈ℤ

1:  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  ((m-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==1-((Cos[z])^2)

Basis: If ((m-1)/2)∈ℤ, then ((Sin[e+f x])^m)F[((Sin[e+f x])^2)]==-(1/f)Subst[(((1-(x^2)))^((m-1)/2))F[1-(x^2)],x,Cos[e+f x]](∂_x)Cos[e+f x]

Rule: If ((m-1)/2)∈ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  -(1/f)Subst[∫(((1-(x^2)))^((m-1)/2)) (((a+b-b (x^2)))^p)dx,x,Cos[e+f x]]

Program code:

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

2.  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ

1:  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ ∧ p∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: If (m/2)∈ℤ, then ((Sin[e+f x])^m)F[((Sin[e+f x])^2)]==(1/f)Subst[(((x^m) F[((x^2)/(1+(x^2)))])/(((1+(x^2)))^(m/2+1))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If  (m/2)∈ℤ ∧ p∈ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (1/f)Subst[∫(((x^m) (((a+(a+b) (x^2)))^p))/(((1+(x^2)))^(m/2+p+1)))dx,x,Tan[e+f x]]

Program code:

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

2:  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ ∧ p∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x]))==0

Basis: Cos[e+f x]F[Sin[e+f x]]==(1/f)Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If  (m/2)∈ℤ ∧ p∉ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x])) ∫((Cos[e+f x] ((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p))/(Sqrt[1-((Sin[e+f x])^2)]))dx

  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(f Cos[e+f x])) Subst[∫(((x^m) (((a+b (x^2)))^p))/(Sqrt[1-(x^2)]))dx,x,Sin[e+f x]]

Program code:

Int[sin[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff^(m+1)*Sqrt[Cos[e+f*x]^2]/(f*Cos[e+f*x])*Subst[Int[x^m*(a+b*ff^2*x^2)^p/Sqrt[1-ff^2*x^2],x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[m/2] && Not[IntegerQ[p]]

2:  ∫(((d Sin[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((((d Sin[e+f x]))^(m-1))/(((((Sin[e+f x])^2)))^((m-1)/2)))==0

Basis: Sin[e+f x] F[((Sin[e+f x])^2)]==-(1/f) Subst[F[1-(x^2)],x,Cos[e+f x]] (∂_x)Cos[e+f x]

Rule: If  m∉ℤ, then

∫(((d Sin[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  d ∫Sin[e+f x] (((d Sin[e+f x]))^(m-1)) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  ((d (((d Sin[e+f x]))^(m-1)))/(((((Sin[e+f x])^2)))^((m-1)/2))) ∫Sin[e+f x] (((((Sin[e+f x])^2)))^((m-1)/2)) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  -(((d^(2IntPart[((m-1)/2)]+1)) (((d Sin[e+f x]))^(2FracPart[((m-1)/2)])))/(f (((((Sin[e+f x])^2)))^(racPart[((m-1)/2)])))) Subst[∫(((1-(x^2)))^((m-1)/2)) (((a+b-b (x^2)))^p)dx,x,Cos[e+f x]]

Program code:

Int[(d_.*sin[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Cos[e+f*x],x]},
  -ff*d^(2*IntPart[(m-1)/2]+1)*(d*Sin[e+f*x])^(2*FracPart[(m-1)/2])/(f*(Sin[e+f*x]^2)^FracPart[(m-1)/2])*
    Subst[Int[(1-ff^2*x^2)^((m-1)/2)*(a+b-b*ff^2*x^2)^p,x],x,Cos[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m,p},x] && Not[IntegerQ[m]]

4.  ∫(((d Cos[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx

1.  ∫((Cos[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when m∈ℤ

1:  ∫((Cos[e+f x])^m)(((a+b ((Sin[e+f x])^2)))^p)dx  when ((m-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: If ((m-1)/2)∈ℤ, then ((Cos[e+f x])^m)F[Sin[e+f x]]==(1/f)Subst[(((1-(x^2)))^((m-1)/2))F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If ((m-1)/2)∈ℤ, then

∫((Cos[e+f x])^m)(((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (1/f)Subst[∫(((1-(x^2)))^((m-1)/2))(((a+b (x^2)))^p)dx,x,Sin[e+f x]]

Program code:

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

2.  ∫((Cos[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when (m/2)∈ℤ

1:  ∫((Cos[e+f x])^m)(((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ ∧ p∈ℤ

Derivation: Integration by substitution

Basis: ((Cos[z])^2)==(1/(1+((Tan[z])^2)))

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: If (m/2)∈ℤ, then ((Cos[e+f x])^m)F[((Sin[e+f x])^2)]==(1/f)Subst[((F[((x^2)/(1+(x^2)))])/(((1+(x^2)))^(m/2+1))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If (m/2)∈ℤ ∧ p∈ℤ, then

∫((Cos[e+f x])^m)(((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (1/f)Subst[∫((((a+(a+b) (x^2)))^p)/(((1+(x^2)))^(m/2+p+1)))dx,x,Tan[e+f x]]

Program code:

Int[cos[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[(a+(a+b)*ff^2*x^2)^p/(1+ff^2*x^2)^(m/2+p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[p]

2:  ∫((Cos[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ ∧ p∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)(((Cos[e+f x])^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2)))==0

Basis: If (m/2)∈ℤ, then (((Cos[e+f x])^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2)))==((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x]))

Basis: Cos[e+f x] F[Sin[e+f x]]==(1/f) Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If (m/2)∈ℤ ∧ p∉ℤ, then

∫((Cos[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  ∫Cos[e+f x] ((Cos[e+f x])^(m-1)) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  (((Cos[e+f x])^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2))) ∫Cos[e+f x] (((1-((Sin[e+f x])^2)))^((m-1)/2)) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(f Cos[e+f x])) Subst[∫(((1-(x^2)))^((m-1)/2)) (((a+b (x^2)))^p)dx,x,Sin[e+f x]]

Program code:

Int[cos[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff*Sqrt[Cos[e+f*x]^2]/(f*Cos[e+f*x])*Subst[Int[(1-ff^2*x^2)^((m-1)/2)*(a+b*ff^2*x^2)^p,x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[m/2] && Not[IntegerQ[p]]

2:  ∫(((d Cos[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((((d Cos[e+f x]))^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2)))==0

Basis: Cos[e+f x] F[Sin[e+f x]]==(1/f) Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule:

∫(((d Cos[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  d ∫Cos[e+f x] (((d Cos[e+f x]))^(m-1)) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  ((d (((d Cos[e+f x]))^(m-1)))/(((((Cos[e+f x])^2)))^((m-1)/2))) ∫Cos[e+f x] (((1-((Sin[e+f x])^2)))^((m-1)/2)) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  (((d^(2IntPart[((m-1)/2)]+1)) (((d Cos[e+f x]))^(2FracPart[((m-1)/2)])))/(f (((((Cos[e+f x])^2)))^(FracPart[((m-1)/2)])))) Subst[∫(((1-(x^2)))^((m-1)/2)) (((a+b (x^2)))^p)dx,x,Sin[e+f x]]

Program code:

Int[(d_.*cos[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff*d^(2*IntPart[(m-1)/2]+1)*(d*Cos[e+f*x])^(2*FracPart[(m-1)/2])/(f*(Cos[e+f*x]^2)^FracPart[(m-1)/2])*
    Subst[Int[(1-ff^2*x^2)^((m-1)/2)*(a+b*ff^2*x^2)^p,x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m,p},x] && Not[IntegerQ[m]]

5.  ∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx

1:  ∫((Tan[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  ((m-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==(((Sin[z])^2)/(1-((Sin[z])^2)))

Basis: If ((m-1)/2)∈ℤ, then ((Tan[e+f x])^m)F[((Sin[e+f x])^2)]==(1/(2 f))Subst[(((x^((m-1)/2))F[x])/(((1-x))^((m+1)/2))),x,((Sin[e+f x])^2)](∂_x)((Sin[e+f x])^2)

Rule: If ((m-1)/2)∈ℤ, then

∫((Tan[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (1/(2 f))Subst[∫(((x^((m-1)/2))(((a+b x))^p))/(((1-x))^((m+1)/2))) dx,x,((Sin[e+f x])^2)]

Program code:

Int[tan[e_.+f_.*x_]^m_.*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x]^2,x]},
  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]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[(m-1)/2]

2:  ∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  p∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: (((d Tan[e+f x]))^m) F[((Sin[e+f x])^2)]==(1/f) Subst[(((((d x))^m)F[((x^2)/(1+(x^2)))])/(1+(x^2))),x,Tan[e+f x]] (∂_x)Tan[e+f x]

Rule: If  p∈ℤ, then

∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  (1/f)Subst[∫(((((d x))^m)(((a+(a+b) (x^2)))^p))/(((1+(x^2)))^(p+1)))dx,x,Tan[e+f x]]

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[(d*ff*x)^m*(a+(a+b)*ff^2*x^2)^p/(1+ff^2*x^2)^(p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m},x] && IntegerQ[p]

3:  ∫((Tan[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ ∧ p∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (m/2)∈ℤ, then ((Tan[e+f x])^m)==(((Sin[e+f x])^m)/(((((Cos[e+f x])^2)))^(m/2)))

Basis: (∂_x)((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x]))==0

Basis: Cos[e+f x]F[Sin[e+f x]]==(1/f)Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If  (m/2)∈ℤ ∧ p∉ℤ, then

∫((Tan[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  ∫((((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p))/(((((Cos[e+f x])^2)))^(m/2)))dx

  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x])) ∫((Cos[e+f x] ((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p))/(((1-((Sin[e+f x])^2)))^((m+1)/2)))dx

  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(f Cos[e+f x])) Subst[∫(((x^m) (((a+b (x^2)))^p))/(((1-(x^2)))^((m+1)/2)))dx,x,Sin[e+f x]]

Program code:

Int[tan[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff^(m+1)*Sqrt[Cos[e+f*x]^2]/(f*Cos[e+f*x])*
    Subst[Int[x^m*(a+b*ff^2*x^2)^p/(1-ff^2*x^2)^((m+1)/2),x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[m/2] && Not[IntegerQ[p]]

4:  ∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (m/2)∈ℤ, then ((Tan[e+f x])^m)==(((Sin[e+f x])^m)/(((((Cos[e+f x])^2)))^(m/2)))

Basis: (∂_x)(((((d Tan[e+f x]))^m) (((((Cos[e+f x])^2)))^(m/2)))/((Sin[e+f x])^m))==0

Basis: Cos[e+f x]F[Sin[e+f x]]==(1/f)Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If  m∉ℤ, then

∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (((((d Tan[e+f x]))^m) (((((Cos[e+f x])^2)))^(m/2)))/((Sin[e+f x])^m)) ∫((((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p))/(((((Cos[e+f x])^2)))^(m/2)))dx

  ⟶  (((((d Tan[e+f x]))^(m+1)) (((((Cos[e+f x])^2)))^((m+1)/2)))/(d ((Sin[e+f x])^(m+1)))) ∫((Cos[e+f x] ((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^2)))^p))/(((1-((Sin[e+f x])^2)))^((m+1)/2)))dx

  ⟶  (((((d Tan[e+f x]))^(m+1)) (((((Cos[e+f x])^2)))^((m+1)/2)))/(d f ((Sin[e+f x])^(m+1)))) Subst[∫(((x^m) (((a+b (x^2)))^p))/(((1-(x^2)))^((m+1)/2)))dx,x,Sin[e+f x]]

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff*(d*Tan[e+f*x])^(m+1)*(Cos[e+f*x]^2)^((m+1)/2)/(d*f*Sin[e+f*x]^(m+1))*
    Subst[Int[(ff*x)^m*(a+b*ff^2*x^2)^p/(1-ff^2*x^2)^((m+1)/2),x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m,p},x] && Not[IntegerQ[m]]

6.  ∫(((c Cos[e+f x]))^m) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx

1:  ∫((Cos[e+f x])^m)(((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx  when ((m-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: If ((m-1)/2)∈ℤ, then ((Cos[e+f x])^m)F[Sin[e+f x]]==(1/f)Subst[(((1-(x^2)))^((m-1)/2))F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If ((m-1)/2)∈ℤ, then

∫((Cos[e+f x])^m)(((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (1/f)Subst[∫(((d x))^n)(((1-(x^2)))^((m-1)/2))(((a+b (x^2)))^p)dx,x,Sin[e+f x]]

Program code:

Int[cos[e_.+f_.*x_]^m_.*(d_.*sin[e_.+f_.*x_])^n_.*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff/f*Subst[Int[(d*ff*x)^n*(1-ff^2*x^2)^((m-1)/2)*(a+b*ff^2*x^2)^p,x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,n,p},x] && IntegerQ[(m-1)/2]

2:  ∫(((c Cos[e+f x]))^m) ((Sin[e+f x])^n) (((a+b ((Sin[e+f x])^2)))^p)dx  when  ((n-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==1-((Cos[z])^2)

Basis: If ((n-1)/2)∈ℤ, then ((Sin[e+f x])^n)F[((Sin[e+f x])^2)]==-(1/f)Subst[(((1-(x^2)))^((n-1)/2))F[1-(x^2)],x,Cos[e+f x]](∂_x)Cos[e+f x]

Rule: If ((n-1)/2)∈ℤ, then

∫(((c Cos[e+f x]))^m) ((Sin[e+f x])^n) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  -(1/f)Subst[∫(((c x))^m)(((1-(x^2)))^((n-1)/2)) (((a+b-b (x^2)))^p)dx,x,Cos[e+f x]]

Program code:

Int[(c_.*sin[e_.+f_.*x_])^m_*sin[e_.+f_.*x_]^n_.*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Cos[e+f*x],x]},
  -ff/f*Subst[Int[(c*ff*x)^m*(1-ff^2*x^2)^((n-1)/2)*(a+b-b*ff^2*x^2)^p,x],x,Cos[e+f*x]/ff]] /;
FreeQ[{a,b,c,e,f,m,p},x] && IntegerQ[(n-1)/2]

3.  ∫(((c Cos[e+f x]))^m) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx  when (m/2)∈ℤ

1:  ∫((Cos[e+f x])^m)((Sin[e+f x])^n) (((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ

Derivation: Integration by substitution

Basis: ((Cos[z])^2)==(1/(1+((Tan[z])^2)))

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: If (m/2)∈ℤ, then ((Cos[e+f x])^m)F[((Sin[e+f x])^2)]==(1/f)Subst[((F[((x^2)/(1+(x^2)))])/(((1+(x^2)))^(m/2+1))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If (m/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ, then

∫((Cos[e+f x])^m)((Sin[e+f x])^n) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  (1/f)Subst[∫(((x^n) (((a+(a+b) (x^2)))^p))/(((1+(x^2)))^((m+n)/2+p+1)))dx,x,Tan[e+f x]]

Program code:

Int[cos[e_.+f_.*x_]^m_*sin[e_.+f_.*x_]^n_*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff^(n+1)/f*Subst[Int[x^n*(a+(a+b)*ff^2*x^2)^p/(1+ff^2*x^2)^((m+n)/2+p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[n/2] && IntegerQ[p]

2:  ∫((Cos[e+f x])^m) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx  when  (m/2)∈ℤ ∧ ¬((n/2)∈ℤ ∧ p∈ℤ)

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)(((Cos[e+f x])^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2)))==0

Basis: If (m/2)∈ℤ, then (((Cos[e+f x])^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2)))==((Sqrt[((Cos[e+f x])^2)])/(Cos[e+f x]))

Basis: Cos[e+f x] F[Sin[e+f x]]==(1/f) Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If (m/2)∈ℤ, then

∫((Cos[e+f x])^m) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  ∫Cos[e+f x] ((Cos[e+f x])^(m-1)) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  (((Cos[e+f x])^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2))) ∫Cos[e+f x] (((1-((Sin[e+f x])^2)))^((m-1)/2)) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  ((Sqrt[((Cos[e+f x])^2)])/(f Cos[e+f x])) Subst[∫(((d x))^n) (((1-(x^2)))^((m-1)/2)) (((a+b (x^2)))^p)dx,x,Sin[e+f x]]

Program code:

Int[cos[e_.+f_.*x_]^m_*(d_.*sin[e_.+f_.*x_])^n_.*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff*Sqrt[Cos[e+f*x]^2]/(f*Cos[e+f*x])*Subst[Int[(d*ff*x)^n*(1-ff^2*x^2)^((m-1)/2)*(a+b*ff^2*x^2)^p,x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,n,p},x] && IntegerQ[m/2]

4:  ∫(((c Cos[e+f x]))^m) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((((c Cos[e+f x]))^(m-1))/(((((Cos[e+f x])^2)))^((m-1)/2)))==0

Basis: Cos[e+f x] F[Sin[e+f x]]==(1/f) Subst[F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule:

∫(((c Cos[e+f x]))^m) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx  ⟶  c ∫Cos[e+f x] (((c Cos[e+f x]))^(m-1)) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  ((c (((c Cos[e+f x]))^(m-1)))/(((((Cos[e+f x])^2)))^((m-1)/2))) ∫Cos[e+f x] (((1-((Sin[e+f x])^2)))^((m-1)/2)) (((d Sin[e+f x]))^n) (((a+b ((Sin[e+f x])^2)))^p)dx

  ⟶  (((c^(2IntPart[((m-1)/2)]+1)) (((c Cos[e+f x]))^(2FracPart[((m-1)/2)])))/(f (((((Cos[e+f x])^2)))^(FracPart[((m-1)/2)])))) Subst[∫(((d x))^n) (((1-(x^2)))^((m-1)/2)) (((a+b (x^2)))^p)dx,x,Sin[e+f x]]

Program code:

Int[(c_.*cos[e_.+f_.*x_])^m_*(d_.*sin[e_.+f_.*x_])^n_.*(a_+b_.*sin[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff*c^(2*IntPart[(m-1)/2]+1)*(c*Cos[e+f*x])^(2*FracPart[(m-1)/2])/(f*(Cos[e+f*x]^2)^FracPart[(m-1)/2])*
    Subst[Int[(d*ff*x)^n*(1-ff^2*x^2)^((m-1)/2)*(a+b*ff^2*x^2)^p,x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]

Rules for integrands of the form (((d Trig[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)

1.  ∫(((d Trig[e+f x]))^m) (((b (((c Sin[e+f x]))^n)))^p)dx  when  p∉ℤ

1.  ∫(((b ((Sin[e+f x])^2)))^p)dx  when  p∉ℤ

1:  ∫(((b ((Sin[e+f x])^2)))^p)dx  when  p∉ℤ ∧ p>1

Rule: If  p∉ℤ ∧ p>1, then

∫(((b ((Sin[e+f x])^2)))^p)dx  ⟶  -((Cot[e+f x] (((b ((Sin[e+f x])^2)))^p))/(2f p))+((b(2 p-1))/(2 p))∫(((b ((Sin[e+f x])^2)))^(p-1))dx

Program code:

Int[(b_.*sin[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  -Cot[e+f*x]*(b*Sin[e+f*x]^2)^p/(2*f*p) + 
  b*(2*p-1)/(2*p)*Int[(b*Sin[e+f*x]^2)^(p-1),x] /;
FreeQ[{b,e,f},x] && Not[IntegerQ[p]] && GtQ[p,1]

2:  ∫(((b ((Sin[e+f x])^2)))^p)dx  when  p∉ℤ ∧ p<-1

Rule: If  p∉ℤ ∧ p<-1, then

∫(((b ((Sin[e+f x])^2)))^p)dx  ⟶  ((Cot[e+f x] (((b ((Sin[e+f x])^2)))^(p+1)))/(b f (2 p+1)))+((2 (p+1))/(b (2 p+1)))∫(((b ((Sin[e+f x])^2)))^(p+1))dx

Program code:

Int[(b_.*sin[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  Cot[e+f*x]*(b*Sin[e+f*x]^2)^(p+1)/(b*f*(2*p+1)) + 
  2*(p+1)/(b*(2*p+1))*Int[(b*Sin[e+f*x]^2)^(p+1),x] /;
FreeQ[{b,e,f},x] && Not[IntegerQ[p]] && LtQ[p,-1]

2.  ∫((Tan[e+f x])^m) (((b (((c Sin[e+f x]))^n)))^p)dx  when  ((m-1)/2)∈ℤ

1:  ∫((Tan[e+f x])^m) (((b ((Sin[e+f x])^n)))^p)dx  when  ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==(((Sin[z])^2)/(1-((Sin[z])^2)))

Basis: If ((m-1)/2)∈ℤ, then ((Tan[e+f x])^m)F[((Sin[e+f x])^2)]==(1/(2 f))Subst[(((x^((m-1)/2))F[x])/(((1-x))^((m+1)/2))),x,((Sin[e+f x])^2)](∂_x)((Sin[e+f x])^2)

Rule: If ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ, then

∫((Tan[e+f x])^m) (((b ((Sin[e+f x])^n)))^p)dx  ⟶  (1/(2 f))Subst[∫(((x^((m-1)/2))(((b (x^(n/2))))^p))/(((1-x))^((m+1)/2))) dx,x,((Sin[e+f x])^2)]

Program code:

Int[tan[e_.+f_.*x_]^m_.*(b_.*sin[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x]^2,x]},
  ff^((m+1)/2)/(2*f)*Subst[Int[x^((m-1)/2)*(b*ff^(n/2)*x^(n/2))^p/(1-ff*x)^((m+1)/2),x],x,Sin[e+f*x]^2/ff]] /;
FreeQ[{b,e,f,p},x] && IntegerQ[(m-1)/2] && IntegerQ[n/2]

2:  ∫((Tan[e+f x])^m) (((b (((c Sin[e+f x]))^n)))^p)dx  when  ((m-1)/2)∈(SuperMinus[ℤ])

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==(((Sin[z])^2)/(1-((Sin[z])^2)))

Basis: If ((m-1)/2)∈ℤ, then ((Tan[e+f x])^m)F[Sin[e+f x]]==(1/f)Subst[(((x^m)F[x])/(((1-(x^2)))^((m+1)/2))),x,Sin[e+f x]](∂_x)Sin[e+f x]

Rule: If ((m-1)/2)∈(SuperMinus[ℤ]), then

∫((Tan[e+f x])^m) (((b (((c Sin[e+f x]))^n)))^p)dx  ⟶  (1/f)Subst[∫(((x^m)(((b (((c x))^n)))^p))/(((1-(x^2)))^((m+1)/2))) dx,x,Sin[e+f x]]

Program code:

Int[tan[e_.+f_.*x_]^m_.*(b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff^(m+1)/f*Subst[Int[x^m*(b*(c*ff*x)^n)^p/(1-ff^2*x^2)^((m+1)/2),x],x,Sin[e+f*x]/ff]] /;
FreeQ[{b,c,e,f,n,p},x] && ILtQ[(m-1)/2,0]

3:  ∫u (((b ((Sin[e+f x])^n)))^p)dx  when  p∉ℤ ∧ n∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((b ((Sin[e+f x])^n)))^p)/((Sin[e+f x])^(n p)))==0

Rule: If  p∉ℤ ∧ n∈ℤ, then

∫u (((b ((Sin[e+f x])^n)))^p)dx  ⟶  (((b^(IntPart[p])) (((b ((Sin[e+f x])^n)))^(FracPart[p])))/((Sin[e+f x])^(n FracPart[p]))) ∫u ((Sin[e+f x])^(n p))dx

Program code:

Int[u_.*(b_.*sin[e_.+f_.*x_]^n_)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  (b*ff^n)^IntPart[p]*(b*Sin[e+f*x]^n)^FracPart[p]/(Sin[e+f*x]/ff)^(n*FracPart[p])*
    Int[ActivateTrig[u]*(Sin[e+f*x]/ff)^(n*p),x]] /;
FreeQ[{b,e,f,n,p},x] && Not[IntegerQ[p]] && IntegerQ[n] && 
  (EqQ[u,1] || MatchQ[u,(d_.*trig_[e+f*x])^m_. /; FreeQ[{d,m},x] && MemberQ[{sin,cos,tan,cot,sec,csc},trig]])

4:  ∫u (((b (((c Sin[e+f x]))^n)))^p)dx  when  p∉ℤ ∧ n∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((b (((c Sin[e+f x]))^n)))^p)/(((c Sin[e+f x]))^(n p)))==0

Rule: If  p∉ℤ ∧ n∉ℤ, then

∫u (((b (((c Sin[e+f x]))^n)))^p)dx  ⟶  (((b^(IntPart[p])) (((b (((c Sin[e+f x]))^n)))^(FracPart[p])))/(((c Sin[e+f x]))^(n FracPart[p]))) ∫u (((c Sin[e+f x]))^(n p))dx

Program code:

Int[u_.*(b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  b^IntPart[p]*(b*(c*Sin[e+f*x])^n)^FracPart[p]/(c*Sin[e+f*x])^(n*FracPart[p])*
    Int[ActivateTrig[u]*(c*Sin[e+f*x])^(n*p),x] /;
FreeQ[{b,c,e,f,n,p},x] && Not[IntegerQ[p]] && Not[IntegerQ[n]] && 
  (EqQ[u,1] || MatchQ[u,(d_.*trig_[e+f*x])^m_. /; FreeQ[{d,m},x] && MemberQ[{sin,cos,tan,cot,sec,csc},trig]])

2.  ∫(((a+b (((c Sin[e+f x]))^n)))^p)dx

1.  ∫(((a+b ((Sin[e+f x])^4)))^p)dx

x:  ∫(((a+b ((Sin[e+f x])^4)))^p)dx  when  p∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(1/(1+((Cot[z])^2)))

Basis: F[((Sin[e+f x])^2)]==-(1/f) Subst[((F[(1/(1+(x^2)))])/(1+(x^2))),x,Cot[e+f x]] (∂_x)Cot[e+f x]

Rule: If p∈ℤ, then

∫(((a+b ((Sin[e+f x])^4)))^p)dx  ⟶  -(1/f)Subst[∫((((a+b+2 a (x^2)+a (x^4)))^p)/(((1+(x^2)))^(2 p+1)))dx,x,Cot[e+f x]]

Program code:

(* Int[(a_+b_.*sin[e_.+f_.*x_]^4)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  -ff/f*Subst[Int[(a+b+2*a*ff^2*x^2+a*ff^4*x^4)^p/(1+ff^2*x^2)^(2*p+1),x],x,Cot[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[p] *)

1:  ∫(((a+b ((Sin[e+f x])^4)))^p)dx  when  p∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: F[((Sin[e+f x])^2)]==(1/f)Subst[((F[((x^2)/(1+(x^2)))])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If p∈ℤ, then

∫(((a+b ((Sin[e+f x])^4)))^p)dx  ⟶  (1/f)Subst[∫((((a+2 a (x^2)+(a+b) (x^4)))^p)/(((1+(x^2)))^(2 p+1)))dx,x,Tan[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^4)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[(a+2*a*ff^2*x^2+(a+b)*ff^4*x^4)^p/(1+ff^2*x^2)^(2*p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[p]

2:  ∫(((a+b ((Sin[e+f x])^4)))^p)dx  when  p-(1/2)∈ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: a+b ((Sin[z])^4)==((a+2 a  ((Tan[z])^2)+(a+b) ((Tan[z])^4))/((Sec[z])^4))

Basis: (∂_x)(((((a+b ((Sin[e+f x])^4)))^p) (((((Sec[e+f x])^2)))^(2 p)))/(((a+2 a  ((Tan[e+f x])^2)+(a+b) ((Tan[e+f x])^4)))^p))==0

Basis: F[Tan[e+f x]]==(1/f) Subst[((F[x])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If  p-(1/2)∈ℤ, then

∫(((a+b ((Sin[e+f x])^4)))^p)dx  ⟶  (((((a+b ((Sin[e+f x])^4)))^p) (((((Sec[e+f x])^2)))^(2 p)))/(((a+2 a  ((Tan[e+f x])^2)+(a+b) ((Tan[e+f x])^4)))^p)) ∫((((a+2 a  ((Tan[e+f x])^2)+(a+b) ((Tan[e+f x])^4)))^p)/(((1+((Tan[e+f x])^2)))^(2 p)))dx

  ⟶  (((((a+b ((Sin[e+f x])^4)))^p) (((((Sec[e+f x])^2)))^(2 p)))/(f (((a+2 a  ((Tan[e+f x])^2)+(a+b) ((Tan[e+f x])^4)))^p))) Subst[∫((((a+2 a (x^2)+(a+b) (x^4)))^p)/(((1+(x^2)))^(2 p+1)))dx,x,Tan[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^4)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff*(a+b*Sin[e+f*x]^4)^p*(Sec[e+f*x]^2)^(2*p)/(f*(a+2*a*Tan[e+f*x]^2+(a+b)*Tan[e+f*x]^4)^p)*
    Subst[Int[(a+2*a*ff^2*x^2+(a+b)*ff^4*x^4)^p/(1+ff^2*x^2)^(2*p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[p-1/2]

2:  ∫(1/(a+b ((Sin[e+f x])^n)))dx  when  (n/2)∈ℤ

Derivation: Algebraic expansion

Basis: If  (n/2)∈(SuperPlus[ℤ]), then (1/(a+b (z^n)))==(2/(a n))(∑_(k=1)^(n/2))(1/(1-(((-1))^(-4 k/n))(((-(a/b)))^(-2/n))(z^2)))

Rule: If (n/2)∈ℤ, then

∫(1/(a+b ((Sin[e+f x])^n)))dx  ⟶  (2/(a n))(∑_(k=1)^(n/2))∫(1/(1-(((-1))^(-4 k/n))(((-(a/b)))^(-2/n))((Sin[e+f x])^2)))dx

Program code:

Int[1/(a_+b_.*sin[e_.+f_.*x_]^n_),x_Symbol] :=
  Module[{k},
  Dist[2/(a*n),Sum[Int[1/(1-Sin[e+f*x]^2/((-1)^(4*k/n)*Rt[-a/b,n/2])),x],{k,1,n/2}],x]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[n/2]

x:  ∫(((a+b ((Sin[e+f x])^n)))^p)dx  when  (n/2)∈ℤ ∧ p∈(SuperPlus[ℤ])

Derivation: Integration by substitution

Basis: F[((Sin[e+f x])^2)]==-(1/f) Subst[((F[(1/(1+(x^2)))])/(1+(x^2))),x,Cot[e+f x]] (∂_x)Cot[e+f x]

Rule: If  (n/2)∈ℤ ∧ p∈(SuperPlus[ℤ]), then

∫(((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  -(1/f)Subst[∫((((b+a (((1+(x^2)))^(n/2))))^p)/(((1+(x^2)))^(n p/2+1)))dx,x,Cot[e+f x]]

Program code:

(* Int[(a_+b_.*sin[e_.+f_.*x_]^n_)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  -ff/f*Subst[Int[(b+a*(1+ff^2*x^2)^(n/2))^p/(1+ff^2*x^2)^(n*p/2+1),x],x,Cot[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[n/2] && IGtQ[p,0] *)

3:  ∫(((a+b ((Sin[e+f x])^n)))^p)dx  when  (n/2)∈ℤ ∧ p∈(SuperPlus[ℤ])

Derivation: Integration by substitution

Basis: F[((Sin[e+f x])^2)]==(1/f)Subst[((F[((x^2)/(1+(x^2)))])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If  (n/2)∈ℤ ∧ p∈(SuperPlus[ℤ]), then

∫(((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  (1/f)Subst[∫((((b (x^n)+a (((1+(x^2)))^(n/2))))^p)/(((1+(x^2)))^(n p/2+1)))dx,x,Tan[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_]^n_)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[(b*ff^n*x^n+a*(1+ff^2*x^2)^(n/2))^p/(1+ff^2*x^2)^(n*p/2+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[n/2] && IGtQ[p,0]

4:  ∫(((a+b (((c Sin[e+f x]))^n)))^p)dx  when  p∈(SuperPlus[ℤ])∨ (p==-1 ∧ n∈ℤ)

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ])∨ (p==-1 ∧ n∈ℤ), then

∫(((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  ∫ExpandTrig[(((a+b (((c Sin[e+f x]))^n)))^p),x]dx

Program code:

Int[(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  Int[ExpandTrig[(a+b*(c*sin[e+f*x])^n)^p,x],x] /;
FreeQ[{a,b,c,e,f,n},x] && (IGtQ[p,0] || EqQ[p,-1] && IntegerQ[n])

U:  ∫(((a+b (((c Sin[e+f x]))^n)))^p)dx

Rule:

∫(((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  ∫(((a+b (((c Sin[e+f x]))^n)))^p)dx

Program code:

Int[(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  Unintegrable[(a+b*(c*Sin[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,e,f,n,p},x]

3.  ∫(((d Sin[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

1:  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  when  ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==1-((Cos[z])^2)

Basis: If ((m-1)/2)∈ℤ, then ((Sin[e+f x])^m)F[((Sin[e+f x])^2)]==-(1/f)Subst[(((1-(x^2)))^((m-1)/2))F[1-(x^2)],x,Cos[e+f x]](∂_x)Cos[e+f x]

Rule: If ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  -(1/f)Subst[∫(((1-(x^2)))^((m-1)/2))(((a+b (((1-(x^2)))^(n/2))))^p)dx,x,Cos[e+f x]]

Program code:

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

Int[sin[e_.+f_.*x_]^m_.*(a_+b_.*sin[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Cos[e+f*x],x]},
  -ff/f*Subst[Int[(1-ff^2*x^2)^((m-1)/2)*(a+b*(1-ff^2*x^2)^(n/2))^p,x],x,Cos[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[(m-1)/2] && IntegerQ[n/2]

2:  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  when  (m/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: If (m/2)∈ℤ, then ((Sin[e+f x])^m)F[((Sin[e+f x])^2)]==(1/f)Subst[(((x^m) F[((x^2)/(1+(x^2)))])/(((1+(x^2)))^(m/2+1))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If  (m/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  (1/f)Subst[∫(((x^m) (((a (((1+(x^2)))^(n/2))+b (x^n)))^p))/(((1+(x^2)))^(m/2+n p/2+1)))dx,x,Tan[e+f x]]

Program code:

Int[sin[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^4)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff^(m+1)/f*Subst[Int[x^m*(a+2*a*ff^2*x^2+(a+b)*ff^4*x^4)^p/(1+ff^2*x^2)^(m/2+2*p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[p]

Int[sin[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff^(m+1)/f*Subst[Int[x^m*(a*(1+ff^2*x^2)^(n/2)+b*ff^n*x^n)^p/(1+ff^2*x^2)^(m/2+n*p/2+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[n/2] && IntegerQ[p]

3:  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^4)))^p)dx  when  (m/2)∈ℤ ∧ p-(1/2)∈ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: If (m/2)∈ℤ, then ((Sin[z])^m)==(((Tan[z])^m)/(((1+((Tan[z])^2)))^(m/2)))

Basis: If (n/2)∈ℤ, then a+b ((Sin[z])^n)==((a ((Sec[z])^n)+b ((Tan[z])^n))/((Sec[z])^n))==((a (((1+((Tan[z])^2)))^(n/2))+b ((Tan[z])^n))/(((1+((Tan[z])^2)))^(n/2)))

Basis: If (n/2)∈ℤ, then (∂_x)(((((a+b ((Sin[e+f x])^n)))^p) (((((Sec[e+f x])^2)))^(n p/2)))/(((a ((Sec[e+f x])^n)+b ((Tan[e+f x])^n)))^p))==0

Basis: F[Tan[e+f x]]==(1/f) Subst[((F[x])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If (m/2)∈ℤ ∧ p-(1/2)∈ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^4)))^p)dx  ⟶  (((((a+b ((Sin[e+f x])^4)))^p) (((((Sec[e+f x])^2)))^(2 p)))/(((a ((Sec[e+f x])^4)+b ((Tan[e+f x])^4)))^p)) ∫((((Tan[e+f x])^m) (((a (((1+((Tan[e+f x])^2)))^2)+b ((Tan[e+f x])^4)))^p))/(((1+((Tan[e+f x])^2)))^(m/2+2 p)))dx

  ⟶  (((((a+b ((Sin[e+f x])^4)))^p) (((((Sec[e+f x])^2)))^(2 p)))/(f (((a ((Sec[e+f x])^4)+b ((Tan[e+f x])^4)))^p))) Subst[∫(((x^m) (((a (((1+(x^2)))^2)+b (x^4)))^p))/(((1+(x^2)))^(m/2+2 p+1)))dx,x,Tan[e+f x]]

Program code:

Int[sin[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^4)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff^(m+1)*(a+b*Sin[e+f*x]^4)^p*(Sec[e+f*x]^2)^(2*p)/(f*Apart[a*(1+Tan[e+f*x]^2)^2+b*Tan[e+f*x]^4]^p)*
    Subst[Int[x^m*ExpandToSum[a*(1+ff^2*x^2)^2+b*ff^4*x^4,x]^p/(1+ff^2*x^2)^(m/2+2*p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[m/2] && IntegerQ[p-1/2]

4:  ∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  when  (m|p)∈ℤ ∧ (n==4 ∨ p>0 ∨ p==-1 ∧ n∈ℤ)

Derivation: Algebraic expansion

Rule: If  (m|p)∈ℤ ∧ (n==4 ∨ p>0 ∨ p==-1 ∧ n∈ℤ), then

∫((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  ∫ExpandTrig[((Sin[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p),x]dx

Program code:

Int[sin[e_.+f_.*x_]^m_.*(a_+b_.*sin[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  Int[ExpandTrig[sin[e+f*x]^m*(a+b*sin[e+f*x]^n)^p,x],x] /;
FreeQ[{a,b,e,f},x] && IntegersQ[m,p] && (EqQ[n,4] || GtQ[p,0] || EqQ[p,-1] && IntegerQ[n])

5:  ∫(((d Sin[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((d Sin[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  ∫ExpandTrig[(((d Sin[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p),x]dx

Program code:

Int[(d_.*sin[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Int[ExpandTrig[(d*sin[e+f*x])^m*(a+b*(c*sin[e+f*x])^n)^p,x],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && IGtQ[p,0]

U:  ∫(((d Sin[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Rule:

∫(((d Sin[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  ∫(((d Sin[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*sin[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Sin[e+f*x])^m*(a+b*(c*Sin[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x]

4.  ∫(((d Cos[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

1:  ∫((Cos[e+f x])^m)(((a+b (((c Sin[e+f x]))^n)))^p)dx  when ((m-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: If ((m-1)/2)∈ℤ, then ((Cos[e+f x])^m)F[Sin[e+f x]]==(1/f)Subst[(((1-(x^2)))^((m-1)/2))F[x],x,Sin[e+f x]] (∂_x)Sin[e+f x]

Rule: If ((m-1)/2)∈ℤ, then

∫((Cos[e+f x])^m)(((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  (1/f)Subst[∫(((1-(x^2)))^((m-1)/2))(((a+b (((c x))^n)))^p)dx,x,Sin[e+f x]]

Program code:

Int[cos[e_.+f_.*x_]^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff/f*Subst[Int[(1-ff^2*x^2)^((m-1)/2)*(a+b*(c*ff*x)^n)^p,x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,c,e,f,n,p},x] && IntegerQ[(m-1)/2] && (EqQ[n,4] || GtQ[m,0] || IGtQ[p,0] || IntegersQ[m,p])

2:  ∫((Cos[e+f x])^m)(((a+b ((Sin[e+f x])^n)))^p)dx  when  (m/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ

Derivation: Integration by substitution

Basis: ((Cos[z])^2)==(1/(1+((Tan[z])^2)))

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: If (m/2)∈ℤ, then ((Cos[e+f x])^m)F[((Sin[e+f x])^2)]==(1/f)Subst[((F[((x^2)/(1+(x^2)))])/(((1+(x^2)))^(m/2+1))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If (m/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ, then

∫((Cos[e+f x])^m)(((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  (1/f)Subst[∫((((b (x^n)+a (((1+(x^2)))^(n/2))))^p)/(((1+(x^2)))^(m/2+n p/2+1)))dx,x,Tan[e+f x]]

Program code:

Int[cos[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^4)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[(a+2*a*ff^2*x^2+(a+b)*ff^4*x^4)^p/(1+ff^2*x^2)^(m/2+2*p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[p]

Int[cos[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[(b*ff^n*x^n+a*(1+ff^2*x^2)^(n/2))^p/(1+ff^2*x^2)^(m/2+n*p/2+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[n/2] && IntegerQ[p]

3.  ∫(((Cos[e+f x])^m)/(a+b ((Sin[e+f x])^n)))dx  when  (m/2)∈ℤ∧ ((n-1)/2)∈ℤ

1:  ∫(((Cos[e+f x])^m)/(a+b ((Sin[e+f x])^n)))dx  when (m/2)∈(SuperPlus[ℤ])∧ ((n-1)/2)∈ℤ

Derivation: Algebraic expansion

Basis: ((Cos[z])^2)==1-((Sin[z])^2)

Rule: If (m/2)∈(SuperPlus[ℤ])∧ ((n-1)/2)∈ℤ, then

∫(((Cos[e+f x])^m)/(a+b ((Sin[e+f x])^n)))dx  ⟶  ∫Expand[((((1-((Sin[e+f x])^2)))^(m/2))/(a+b ((Sin[e+f x])^n))),x]dx

Program code:

Int[cos[e_.+f_.*x_]^m_/(a_+b_.*sin[e_.+f_.*x_]^n_),x_Symbol] :=
  Int[Expand[(1-Sin[e+f*x]^2)^(m/2)/(a+b*Sin[e+f*x]^n),x],x] /;
FreeQ[{a,b,e,f},x] && IGtQ[m/2,0] && IntegerQ[(n-1)/2]

x:  ∫(((Cos[e+f x])^m)/(a+b ((Sin[e+f x])^n)))dx  when (m/2)∈ℤ∧ ((n-1)/2)∈ℤ ∧ p-1∈(SuperMinus[ℤ])∧ m<0

Derivation: Algebraic expansion

Basis: ((Cos[z])^2)==1-((Sin[z])^2)

Rule: If (m/2)∈ℤ∧ ((n-1)/2)∈ℤ ∧ p-1∈(SuperMinus[ℤ])∧ m<0, then

∫(((Cos[e+f x])^m)/(a+b ((Sin[e+f x])^n)))dx  ⟶  ∫ExpandTrig[((((1-((Sin[e+f x])^2)))^(m/2))/(a+b ((Sin[e+f x])^n))),x]dx

Program code:

(* Int[cos[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^n_)^p_,x_Symbol] :=
  Int[ExpandTrig[(1-sin[e+f*x]^2)^(m/2)*(a+b*sin[e+f*x]^n)^p,x],x] /;
FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[(n-1)/2] && ILtQ[p,-1] && LtQ[m,0] *)

4:  ∫(((d Cos[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((d Cos[e+f x]))^m) (((a+b (((c Cos[e+f x]))^n)))^p)dx  ⟶  ∫ExpandTrig[(((d Cos[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p),x]dx

Program code:

Int[(d_.*cos[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Int[ExpandTrig[(d*cos[e+f*x])^m*(a+b*(c*sin[e+f*x])^n)^p,x],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && IGtQ[p,0]

U:  ∫(((d Cos[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Rule:

∫(((d Cos[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  ∫(((d Cos[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*cos[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Cos[e+f*x])^m*(a+b*(c*Sin[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x]

5.  ∫(((d Tan[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

1.  ∫((Tan[e+f x])^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  ((m-1)/2)∈ℤ

1:  ∫((Tan[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  when  ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==(((Sin[z])^2)/(1-((Sin[z])^2)))

Basis: If ((m-1)/2)∈ℤ, then ((Tan[e+f x])^m)F[((Sin[e+f x])^2)]==(1/(2 f))Subst[(((x^((m-1)/2))F[x])/(((1-x))^((m+1)/2))),x,((Sin[e+f x])^2)](∂_x)((Sin[e+f x])^2)

Rule: If ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ, then

∫((Tan[e+f x])^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  (1/(2 f))Subst[∫(((x^((m-1)/2))(((a+b (x^(n/2))))^p))/(((1-x))^((m+1)/2))) dx,x,((Sin[e+f x])^2)]

Program code:

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

2:  ∫((Tan[e+f x])^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  ((m-1)/2)∈(SuperMinus[ℤ])

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==(((Sin[z])^2)/(1-((Sin[z])^2)))

Basis: If ((m-1)/2)∈ℤ, then ((Tan[e+f x])^m)F[Sin[e+f x]]==(1/f)Subst[(((x^m)F[x])/(((1-(x^2)))^((m+1)/2))),x,Sin[e+f x]](∂_x)Sin[e+f x]

Rule: If ((m-1)/2)∈(SuperMinus[ℤ]), then

∫((Tan[e+f x])^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  (1/f)Subst[∫(((x^m)(((a+b (((c x))^n)))^p))/(((1-(x^2)))^((m+1)/2))) dx,x,Sin[e+f x]]

Program code:

Int[tan[e_.+f_.*x_]^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff^(m+1)/f*Subst[Int[x^m*(a+b*(c*ff*x)^n)^p/(1-ff^2*x^2)^((m+1)/2),x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,c,e,f,n,p},x] && ILtQ[(m-1)/2,0]

2.  ∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^n)))^p)dx  when  (n/2)∈ℤ

1:  ∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^4)))^p)dx  when  p∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: (((d Tan[e+f x]))^m) F[((Sin[e+f x])^2)]==(1/f) Subst[(((((d x))^m)F[((x^2)/(1+(x^2)))])/(1+(x^2))),x,Tan[e+f x]] (∂_x)Tan[e+f x]

Rule: If p∈ℤ, then

∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^4)))^p)dx  ⟶  (1/f)Subst[∫(((((d x))^m)(((a (((1+(x^2)))^2)+b (x^4)))^p))/(((1+(x^2)))^(2 p+1)))dx,x,Tan[e+f x]]

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^4)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/f*Subst[Int[(d*ff*x)^m*ExpandToSum[a*(1+ff^2*x^2)^2+b*ff^4*x^4,x]^p/(1+ff^2*x^2)^(2*p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m},x] && IntegerQ[p]

2:  ∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^4)))^p)dx  when  p-(1/2)∈ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: If (n/2)∈ℤ, then a+b ((Sin[z])^n)==((a ((Sec[z])^n)+b ((Tan[z])^n))/((Sec[z])^n))==((a (((1+((Tan[z])^2)))^(n/2))+b ((Tan[z])^n))/(((1+((Tan[z])^2)))^(n/2)))

Basis: If (n/2)∈ℤ, then (∂_x)(((((a+b ((Sin[e+f x])^n)))^p) (((((Sec[e+f x])^2)))^(n p/2)))/(((a ((Sec[e+f x])^n)+b ((Tan[e+f x])^n)))^p))==0

Basis: F[Tan[e+f x]]==(1/f) Subst[((F[x])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If p-(1/2)∈ℤ, then

∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^4)))^p)dx  ⟶  (((((a+b ((Sin[e+f x])^4)))^p) (((((Sec[e+f x])^2)))^(2 p)))/(((a ((Sec[e+f x])^4)+b ((Tan[e+f x])^4)))^p)) ∫(((((d Tan[e+f x]))^m) (((a (((1+((Tan[e+f x])^2)))^2)+b ((Tan[e+f x])^5)))^p))/(((1+((Tan[e+f x])^2)))^(2 p+1)))dx

  ⟶  (((((a+b ((Sin[e+f x])^4)))^p) (((((Sec[e+f x])^2)))^(2 p)))/(f (((a ((Sec[e+f x])^4)+b ((Tan[e+f x])^4)))^p))) Subst[∫(((((d x))^m) (((a (((1+(x^2)))^2)+b (x^4)))^p))/(((1+(x^2)))^(2 p+1)))dx,x,Tan[e+f x]]

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^4)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff*(a+b*Sin[e+f*x]^4)^p*(Sec[e+f*x]^2)^(2*p)/(f*Apart[a*(1+Tan[e+f*x]^2)^2+b*Tan[e+f*x]^4]^p)*
    Subst[Int[(d*ff*x)^m*ExpandToSum[a*(1+ff^2*x^2)^2+b*ff^4*x^4,x]^p/(1+ff^2*x^2)^(2*p+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m},x] && IntegerQ[p-1/2]

3:  ∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^n)))^p)dx  when  (n/2)∈ℤ ∧ p∈(SuperPlus[ℤ])

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: (((d Tan[e+f x]))^m) F[((Sin[e+f x])^2)]==(1/f) Subst[(((((d x))^m)F[((x^2)/(1+(x^2)))])/(1+(x^2))),x,Tan[e+f x]] (∂_x)Tan[e+f x]

Rule: If (n/2)∈ℤ ∧ p∈(SuperPlus[ℤ]), then

∫(((d Tan[e+f x]))^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶  (1/f)Subst[∫(((((d x))^m)(((b (x^n)+a (((1+(x^2)))^(n/2))))^p))/(((1+(x^2)))^(n p/2+1)))dx,x,Tan[e+f x]]

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff^(m+1)/f*Subst[Int[(d*x)^m*(b*ff^n*x^n+a*(1+ff^2*x^2)^(n/2))^p/(1+ff^2*x^2)^(n*p/2+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m},x] && IntegerQ[n/2] && IGtQ[p,0]

3:  ∫(((d Tan[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((d Tan[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  ∫ExpandTrig[(((d Tan[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p),x]dx

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Int[ExpandTrig[(d*tan[e+f*x])^m*(a+b*(c*sin[e+f*x])^n)^p,x],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && IGtQ[p,0]

U:  ∫(((d Tan[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Rule:

∫(((d Tan[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  ∫(((d Tan[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Tan[e+f*x])^m*(a+b*(c*Sin[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x]

6:  ∫(((d Cot[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Cot[e+f x]))^m) (((((Tan[e+f x])/d)))^m))==0

Rule: If  m∉ℤ, then

∫(((d Cot[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  (((d Cot[e+f x]))^(FracPart[m])) (((((Tan[e+f x])/d)))^(FracPart[m])) ∫(((((Tan[e+f x])/d)))^(-m)) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*cot[e_.+f_.*x_])^m_*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  (d*Cot[e+f*x])^FracPart[m]*(Tan[e+f*x]/d)^FracPart[m]*Int[(Tan[e+f*x]/d)^(-m)*(a+b*(c*Sin[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]

7:  ∫(((d Sec[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Sec[e+f x]))^m) (((((Cos[e+f x])/d)))^m))==0

Rule: If  m∉ℤ, then

∫(((d Sec[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  (((d Sec[e+f x]))^(FracPart[m])) (((((Cos[e+f x])/d)))^(FracPart[m])) ∫(((((Cos[e+f x])/d)))^(-m)) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*sec[e_.+f_.*x_])^m_*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  (d*Sec[e+f*x])^FracPart[m]*(Cos[e+f*x]/d)^FracPart[m]*Int[(Cos[e+f*x]/d)^(-m)*(a+b*(c*Sin[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]

8.  ∫(((d Csc[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  m∉ℤ

1:  ∫(((d Csc[e+f x]))^m) (((a+b ((Sin[e+f x])^n)))^p)dx  when  m∉ℤ ∧ (n|p)∈ℤ

Derivation: Algebraic normalization

Basis: If (n|p)∈ℤ, then (((a+b ((Sin[e+f x])^n)))^p)==(d^(n p))(((d Csc[e+f x]))^(-n p)) (((b+a ((Csc[e+f x])^n)))^p)

Rule: If  m∉ℤ ∧ (n|p)∈ℤ, then

∫(((d Csc[e+f x]))^m) (((a+b ((Sin[e+f x])^n)))^p)dx  ⟶   (d^(n p)) ∫(((d Csc[e+f x]))^(m-n p)) (((b+a ((Csc[e+f x])^n)))^p)dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^m_*(a_+b_.*sin[e_.+f_.*x_]^n_.)^p_.,x_Symbol] :=
  d^(n*p)*Int[(d*Csc[e+f*x])^(m-n*p)*(b+a*Csc[e+f*x]^n)^p,x] /;
FreeQ[{a,b,d,e,f,m,n,p},x] && Not[IntegerQ[m]] && IntegersQ[n,p]

2:  ∫(((d Csc[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Csc[e+f x]))^m) (((((Sin[e+f x])/d)))^m))==0

Rule: If  m∉ℤ, then

∫(((d Csc[e+f x]))^m) (((a+b (((c Sin[e+f x]))^n)))^p)dx  ⟶  (((d Csc[e+f x]))^(FracPart[m])) (((((Sin[e+f x])/d)))^(FracPart[m])) ∫(((((Sin[e+f x])/d)))^(-m)) (((a+b (((c Sin[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^m_*(a_+b_.*(c_.*sin[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  (d*Csc[e+f*x])^FracPart[m]*(Sin[e+f*x]/d)^FracPart[m]*Int[(Sin[e+f*x]/d)^(-m)*(a+b*(c*Sin[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]

Rules for integrands of the form (((a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)))^p)

1.  ∫(((a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)))^p)dx  when  (p^2)==(1/4)

1:  ∫(((a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)))^p)dx  when  (p^2)==(1/4) ∧ a>0

Derivation: Algebraic simplification

Basis: c Sin[z]+d Cos[z]==(Sqrt[(c^2)+(d^2)]) Sin[ArcTan[c,d]+z]

Rule: If  (p^2)==(1/4) ∧ a>0, then

∫(((a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)))^p)dx  ⟶  ∫(((a+b ((((Sqrt[(c^2)+(d^2)]) Sin[ArcTan[c,d]+e+f x]))^2)))^p)dx

Program code:

Int[(a_+b_.*(c_.*sin[e_.+f_.*x_]+d_.*cos[e_.+f_.*x_])^2)^p_,x_Symbol] :=
  Int[(a+b*(Sqrt[c^2+d^2]*Sin[ArcTan[c,d]+e+f*x])^2)^p,x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[p^2,1/4] && GtQ[a,0]

2:  ∫(((a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)))^p)dx  when  (p^2)==(1/4) ∧ a≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)])/(Sqrt[1+((b (((c Sin[e+f x]+d Cos[e+f x]))^2))/a)]))==0

Rule: If  (p^2)==(1/4) ∧ a≯0, then

∫(((a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)))^p)dx  ⟶  ((((a+b (((c Sin[e+f x]+d Cos[e+f x]))^2)))^p)/(((1+((b (((c Sin[e+f x]+d Cos[e+f x]))^2))/a)))^p)) ∫(((1+((b (((c Sin[e+f x]+d Cos[e+f x]))^2))/a)))^p)dx

Program code:

Int[(a_+b_.*(c_.*sin[e_.+f_.*x_]+d_.*cos[e_.+f_.*x_])^2)^p_,x_Symbol] :=
  (a+b*(c*Sin[e+f*x]+d*Cos[e+f*x])^2)^p/(1+(b*(c*Sin[e+f*x]+d*Cos[e+f*x])^2)/a)^p*
    Int[(1+(b*(c*Sin[e+f*x]+d*Cos[e+f*x])^2)/a)^p,x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[p^2,1/4] && Not[GtQ[a,0]]