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

1.  ∫(((((e+f x))^m) ((Trig[c+d x])^n))/(a+b Sin[c+d x]))dx

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

Derivation: Algebraic expansion

Basis: ((z^n)/(a+b z))==((z^(n-1))/b)-((a (z^(n-1)))/(b (a+b z)))

Rule: If  (m|n)∈(SuperPlus[ℤ]), then

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

Program code:

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

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

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

1.  ∫(((((e+f x))^m) Cos[c+d x])/(a+b Sin[c+d x]))dx  when  m∈(SuperPlus[ℤ])

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

Derivation: Algebraic expansion

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

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

Note: Although the first expansion is simpler, the second is used so the antiderivative will be expressed in terms of (e^(i (c+d x))) rather than (e^(-i (c+d x))).

Rule: If  m∈(SuperPlus[ℤ])∧ (a^2)-(b^2)==0, then

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

Program code:

Int[(e_.+f_.*x_)^m_.*Cos[c_.+d_.*x_]/(a_+b_.*Sin[c_.+d_.*x_]),x_Symbol] :=
  -I*(e+f*x)^(m+1)/(b*f*(m+1)) + 2*Int[(e+f*x)^m*E^(I*(c+d*x))/(a-I*b*E^(I*(c+d*x))),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && EqQ[a^2-b^2,0]

Int[(e_.+f_.*x_)^m_.*Sin[c_.+d_.*x_]/(a_+b_.*Cos[c_.+d_.*x_]),x_Symbol] :=
  I*(e+f*x)^(m+1)/(b*f*(m+1)) - 2*I*Int[(e+f*x)^m*E^(I*(c+d*x))/(a+b*E^(I*(c+d*x))),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && EqQ[a^2-b^2,0]

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

Derivation: Algebraic expansion

Basis: ((Cos[z])/(a+b Sin[z]))==(i/b)+(1/(i b+(a-(Sqrt[(a^2)-(b^2)])) (e^(i z))))+(1/(i b+(a+(Sqrt[(a^2)-(b^2)])) (e^(i z))))==-(i/b)+((e^(i z))/(a-(Sqrt[(a^2)-(b^2)])-i b (e^(i z))))+((e^(i z))/(a+(Sqrt[(a^2)-(b^2)])-i b (e^(i z))))

Basis: ((Sin[z])/(a+b Cos[z]))==-(i/b)+(i/(b+(a-(Sqrt[(a^2)-(b^2)])) (e^(i z))))+(i/(b+(a+(Sqrt[(a^2)-(b^2)])) (e^(i z))))==(i/b)-((i (e^(i z)))/(a-(Sqrt[(a^2)-(b^2)])+b (e^(i z))))-((i (e^(i z)))/(a+(Sqrt[(a^2)-(b^2)])+b (e^(i z))))

Note: Although the first expansion is simpler, the second is used so the antiderivative will be expressed in terms of (e^(i (c+d x))) rather than (e^(-i (c+d x))).

Rule: If  m∈(SuperPlus[ℤ])∧ (a^2)-(b^2)>0, then

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

Program code:

Int[(e_.+f_.*x_)^m_.*Cos[c_.+d_.*x_]/(a_+b_.*Sin[c_.+d_.*x_]),x_Symbol] :=
  -I*(e+f*x)^(m+1)/(b*f*(m+1)) + 
  Int[(e+f*x)^m*E^(I*(c+d*x))/(a-Rt[a^2-b^2,2]-I*b*E^(I*(c+d*x))),x] + 
  Int[(e+f*x)^m*E^(I*(c+d*x))/(a+Rt[a^2-b^2,2]-I*b*E^(I*(c+d*x))),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && PosQ[a^2-b^2]

Int[(e_.+f_.*x_)^m_.*Sin[c_.+d_.*x_]/(a_+b_.*Cos[c_.+d_.*x_]),x_Symbol] :=
  I*(e+f*x)^(m+1)/(b*f*(m+1)) - 
  I*Int[(e+f*x)^m*E^(I*(c+d*x))/(a-Rt[a^2-b^2,2]+b*E^(I*(c+d*x))),x] - 
  I*Int[(e+f*x)^m*E^(I*(c+d*x))/(a+Rt[a^2-b^2,2]+b*E^(I*(c+d*x))),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && PosQ[a^2-b^2]

3:  ∫(((((e+f x))^m) Cos[c+d x])/(a+b Sin[c+d x]))dx  when  m∈(SuperPlus[ℤ])∧ (a^2)-(b^2)≱0

Derivation: Algebraic expansion

Basis: ((Cos[z])/(a+b Sin[z]))==-(i/b)+((i (e^(i z)))/(i a-(Sqrt[-(a^2)+(b^2)])+b (e^(i z))))+((i (e^(i z)))/(i a+(Sqrt[-(a^2)+(b^2)])+b (e^(i z))))

Basis: ((Sin[z])/(a+b Cos[z]))==(i/b)+((e^(i z))/(i a-(Sqrt[-(a^2)+(b^2)])+i b (e^(i z))))+((e^(i z))/(i a+(Sqrt[-(a^2)+(b^2)])+i b (e^(i z))))

Rule: If  m∈(SuperPlus[ℤ])∧ (a^2)-(b^2)≱0, then

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

Program code:

Int[(e_.+f_.*x_)^m_.*Cos[c_.+d_.*x_]/(a_+b_.*Sin[c_.+d_.*x_]),x_Symbol] :=
  -I*(e+f*x)^(m+1)/(b*f*(m+1)) + 
  I*Int[(e+f*x)^m*E^(I*(c+d*x))/(I*a-Rt[-a^2+b^2,2]+b*E^(I*(c+d*x))),x] + 
  I*Int[(e+f*x)^m*E^(I*(c+d*x))/(I*a+Rt[-a^2+b^2,2]+b*E^(I*(c+d*x))),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && NegQ[a^2-b^2]

Int[(e_.+f_.*x_)^m_.*Sin[c_.+d_.*x_]/(a_+b_.*Cos[c_.+d_.*x_]),x_Symbol] :=
  I*(e+f*x)^(m+1)/(b*f*(m+1)) + 
  Int[(e+f*x)^m*E^(I*(c+d*x))/(I*a-Rt[-a^2+b^2,2]+I*b*E^(I*(c+d*x))),x] + 
  Int[(e+f*x)^m*E^(I*(c+d*x))/(I*a+Rt[-a^2+b^2,2]+I*b*E^(I*(c+d*x))),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && NegQ[a^2-b^2]

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

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

Derivation: Algebraic expansion

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

Rule: If  n-1∈(SuperPlus[ℤ])∧ (a^2)-(b^2)==0, then

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

Program code:

Int[(e_.+f_.*x_)^m_.*Cos[c_.+d_.*x_]^n_/(a_+b_.*Sin[c_.+d_.*x_]),x_Symbol] :=
  1/a*Int[(e+f*x)^m*Cos[c+d*x]^(n-2),x] - 
  1/b*Int[(e+f*x)^m*Cos[c+d*x]^(n-2)*Sin[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f,m},x] && IGtQ[n,1] && EqQ[a^2-b^2,0]

Int[(e_.+f_.*x_)^m_.*Sin[c_.+d_.*x_]^n_/(a_+b_.*Cos[c_.+d_.*x_]),x_Symbol] :=
  1/a*Int[(e+f*x)^m*Sin[c+d*x]^(n-2),x] - 
  1/b*Int[(e+f*x)^m*Sin[c+d*x]^(n-2)*Cos[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f,m},x] && IGtQ[n,1] && EqQ[a^2-b^2,0]

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

Derivation: Algebraic expansion

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

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

Rule: If  n-1∈(SuperPlus[ℤ])∧ (a^2)-(b^2)≠0 ∧ m∈(SuperPlus[ℤ]), then

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

Program code:

Int[(e_.+f_.*x_)^m_.*Cos[c_.+d_.*x_]^n_/(a_+b_.*Sin[c_.+d_.*x_]),x_Symbol] :=
  a/b^2*Int[(e+f*x)^m*Cos[c+d*x]^(n-2),x] - 
  1/b*Int[(e+f*x)^m*Cos[c+d*x]^(n-2)*Sin[c+d*x],x] - 
  (a^2-b^2)/b^2*Int[(e+f*x)^m*Cos[c+d*x]^(n-2)/(a+b*Sin[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[n,1] && NeQ[a^2-b^2,0] && IGtQ[m,0]

Int[(e_.+f_.*x_)^m_.*Sin[c_.+d_.*x_]^n_/(a_+b_.*Cos[c_.+d_.*x_]),x_Symbol] :=
  a/b^2*Int[(e+f*x)^m*Sin[c+d*x]^(n-2),x] - 
  1/b*Int[(e+f*x)^m*Sin[c+d*x]^(n-2)*Cos[c+d*x],x] - 
  (a^2-b^2)/b^2*Int[(e+f*x)^m*Sin[c+d*x]^(n-2)/(a+b*Cos[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[n,1] && NeQ[a^2-b^2,0] && IGtQ[m,0]

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

Derivation: Algebraic expansion

Basis: (((Tan[z])^p)/(a+b Sin[z]))==((Sec[z] ((Tan[z])^(p-1)))/b)-((a Sec[z] ((Tan[z])^(p-1)))/(b (a+b Sin[z])))

Rule: If  (m|n)∈(SuperPlus[ℤ]), then

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

Program code:

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

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

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

Derivation: Algebraic expansion

Basis: (((Cot[z])^n)/(a+b Sin[z]))==(((Cot[z])^n)/a)-((b Cos[z] ((Cot[z])^(n-1)))/(a (a+b Sin[z])))

Rule: If  (m|n)∈(SuperPlus[ℤ]), then

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

Program code:

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

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

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

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

Derivation: Algebraic expansion

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

Rule: If  m∈(SuperPlus[ℤ])∧ (a^2)-(b^2)==0, then

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

Program code:

Int[(e_.+f_.*x_)^m_.*Sec[c_.+d_.*x_]^n_./(a_+b_.*Sin[c_.+d_.*x_]),x_Symbol] :=
  1/a*Int[(e+f*x)^m*Sec[c+d*x]^(n+2),x] - 
  1/b*Int[(e+f*x)^m*Sec[c+d*x]^(n+1)*Tan[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f,n},x] && IGtQ[m,0] && EqQ[a^2-b^2,0]

Int[(e_.+f_.*x_)^m_.*Csc[c_.+d_.*x_]^n_./(a_+b_.*Cos[c_.+d_.*x_]),x_Symbol] :=
  1/a*Int[(e+f*x)^m*Csc[c+d*x]^(n+2),x] - 
  1/b*Int[(e+f*x)^m*Csc[c+d*x]^(n+1)*Cot[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f,n},x] && IGtQ[m,0] && EqQ[a^2-b^2,0]

2:  ∫(((((e+f x))^m) ((Sec[c+d x])^n))/(a+b Sin[c+d x]))dx  when  m∈(SuperPlus[ℤ])∧ (a^2)-(b^2)≠0 ∧ n∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

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

Basis: (((Csc[z])^2)/(a+b Cos[z]))==-((b^2)/(((a^2)-(b^2)) (a+b Cos[z])))+((((Csc[z])^2) (a-b Cos[z]))/((a^2)-(b^2)))

Rule: If m∈(SuperPlus[ℤ])∧ (a^2)-(b^2)≠0 ∧ n∈(SuperPlus[ℤ]), then

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

Program code:

Int[(e_.+f_.*x_)^m_.*Sec[c_.+d_.*x_]^n_./(a_+b_.*Sin[c_.+d_.*x_]),x_Symbol] :=
  -b^2/(a^2-b^2)*Int[(e+f*x)^m*Sec[c+d*x]^(n-2)/(a+b*Sin[c+d*x]),x] + 
  1/(a^2-b^2)*Int[(e+f*x)^m*Sec[c+d*x]^n*(a-b*Sin[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && NeQ[a^2-b^2,0] && IGtQ[n,0]

Int[(e_.+f_.*x_)^m_.*Csc[c_.+d_.*x_]^n_./(a_+b_.*Cos[c_.+d_.*x_]),x_Symbol] :=
  -b^2/(a^2-b^2)*Int[(e+f*x)^m*Csc[c+d*x]^(n-2)/(a+b*Cos[c+d*x]),x] + 
  1/(a^2-b^2)*Int[(e+f*x)^m*Csc[c+d*x]^n*(a-b*Cos[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0] && NeQ[a^2-b^2,0] && IGtQ[n,0]

6:  ∫(((((e+f x))^m) ((Csc[c+d x])^n))/(a+b Sin[c+d x]))dx  when  (m|n)∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Basis: (((Csc[z])^n)/(a+b Sin[z]))==(((Csc[z])^n)/a)-((b ((Csc[z])^(n-1)))/(a (a+b Sin[z])))

Rule: If  (m|n)∈(SuperPlus[ℤ]), then

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

Program code:

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

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

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

Rule:

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

Program code:

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

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

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

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

Derivation: Algebraic expansion

Basis: ((z^n)/(a+b z))==((z^(n-1))/b)-((a (z^(n-1)))/(b (a+b z)))

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

Basis: (((Tan[z])^p)/(a+b Sin[z]))==((Sec[z] ((Tan[z])^(p-1)))/b)-((a Sec[z] ((Tan[z])^(p-1)))/(b (a+b Sin[z])))

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

Basis: (((Cot[z])^n)/(a+b Sin[z]))==(((Cot[z])^n)/a)-((b ((Cot[z])^(n-1)) Cos[z])/(a (a+b Sin[z])))

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

Basis: (((Csc[z])^n)/(a+b Sin[z]))==(((Csc[z])^n)/a)-((b ((Csc[z])^(n-1)))/(a (a+b Sin[z])))

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

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

Program code:

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

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

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

Rule:

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

Program code:

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

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

3:  ∫(((((e+f x))^m) ((Trig[c+d x])^n))/(a+b Sec[c+d x]))dx  when  (m|n)∈ℤ

Derivation: Algebraic normalization

Basis: (1/(a+b Sec[z]))==((Cos[z])/(b+a Cos[z]))

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

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

Program code:

Int[(e_.+f_.*x_)^m_.*F_[c_.+d_.*x_]^n_./(a_+b_.*Sec[c_.+d_.*x_]),x_Symbol] :=
  Int[(e+f*x)^m*Cos[c+d*x]*F[c+d*x]^n/(b+a*Cos[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && TrigQ[F] && IntegersQ[m,n]

Int[(e_.+f_.*x_)^m_.*F_[c_.+d_.*x_]^n_./(a_+b_.*Csc[c_.+d_.*x_]),x_Symbol] :=
  Int[(e+f*x)^m*Sin[c+d*x]*F[c+d*x]^n/(b+a*Sin[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && TrigQ[F] && IntegersQ[m,n]

4:  ∫(((((e+f x))^m) ((Trig1[c+d x])^n) ((Trig2[c+d x])^p))/(a+b Sec[c+d x]))dx  when  (m|n|p)∈ℤ

Derivation: Algebraic normalization

Basis: (1/(a+b Sec[z]))==((Cos[z])/(b+a Cos[z]))

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

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

Program code:

Int[(e_.+f_.*x_)^m_.*F_[c_.+d_.*x_]^n_.*G_[c_.+d_.*x_]^p_./(a_+b_.*Sec[c_.+d_.*x_]),x_Symbol] :=
  Int[(e+f*x)^m*Cos[c+d*x]*F[c+d*x]^n*G[c+d*x]^p/(b+a*Cos[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && TrigQ[F] && TrigQ[G] && IntegersQ[m,n,p]

Int[(e_.+f_.*x_)^m_.*F_[c_.+d_.*x_]^n_.*G_[c_.+d_.*x_]^p_./(a_+b_.*Csc[c_.+d_.*x_]),x_Symbol] :=
  Int[(e+f*x)^m*Sin[c+d*x]*F[c+d*x]^n*G[c+d*x]^p/(b+a*Sin[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && TrigQ[F] && TrigQ[G] && IntegersQ[m,n,p]

Rules for integrands involving trig functions

0.  ∫((Sin[a+b x])^p)((Trig[c+d x])^q)dx

1:  ∫((Sin[a+b x])^p) ((Sin[c+d x])^q)dx  when  p∈(SuperPlus[ℤ])∧ q∈ℤ

Derivation: Algebraic expansion

Basis: ((Sin[v])^p) ((Sin[w])^q)==(1/(2^(p+q))) (((i (e^(-i v))-i (e^(i v))))^p) (((i (e^(-i w))-i (e^(i w))))^q)

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

∫((Sin[a+b x])^p) ((Sin[c+d x])^q)dx  ⟶  (1/(2^(p+q))) ∫(((i (e^(-i (c+d x)))-i (e^(i (c+d x)))))^q) ExpandIntegrand[(((i (e^(-i (a+b x)))-i (e^(i (a+b x)))))^p),x]dx

Program code:

Int[Sin[a_.+b_.*x_]^p_.*Sin[c_.+d_.*x_]^q_.,x_Symbol] :=
  1/2^(p+q)*Int[ExpandIntegrand[(I/E^(I*(c+d*x))-I*E^(I*(c+d*x)))^q,(I/E^(I*(a+b*x))-I*E^(I*(a+b*x)))^p,x],x] /;
FreeQ[{a,b,c,d,q},x] && IGtQ[p,0] && Not[IntegerQ[q]]

Int[Cos[a_.+b_.*x_]^p_.*Cos[c_.+d_.*x_]^q_.,x_Symbol] :=
  1/2^(p+q)*Int[ExpandIntegrand[(E^(-I*(c+d*x))+E^(I*(c+d*x)))^q,(E^(-I*(a+b*x))+E^(I*(a+b*x)))^p,x],x] /;
FreeQ[{a,b,c,d,q},x] && IGtQ[p,0] && Not[IntegerQ[q]]

2:  ∫((Sin[a+b x])^p) ((Cos[c+d x])^q)dx  when  p∈(SuperPlus[ℤ])∧ q∈ℤ

Derivation: Algebraic expansion

Basis: ((Sin[v])^p) ((Cos[w])^q)==(1/(2^(p+q))) (((i (e^(-i v))-i (e^(i v))))^p) ((((e^(-i w))+(e^(i w))))^q)

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

∫((Sin[a+b x])^p) ((Cos[c+d x])^q)dx  ⟶  (1/(2^(p+q))) ∫((((e^(-i (c+d x)))+(e^(i (c+d x)))))^q) ExpandIntegrand[(((i (e^(-i (a+b x)))-i (e^(i (a+b x)))))^p),x]dx

Program code:

Int[Sin[a_.+b_.*x_]^p_.*Cos[c_.+d_.*x_]^q_.,x_Symbol] :=
  1/2^(p+q)*Int[ExpandIntegrand[(E^(-I*(c+d*x))+E^(I*(c+d*x)))^q,(I/E^(I*(a+b*x))-I*E^(I*(a+b*x)))^p,x],x] /;
FreeQ[{a,b,c,d,q},x] && IGtQ[p,0] && Not[IntegerQ[q]]

Int[Cos[a_.+b_.*x_]^p_.*Sin[c_.+d_.*x_]^q_.,x_Symbol] :=
  1/2^(p+q)*Int[ExpandIntegrand[(I/E^(I*(c+d*x))-I*E^(I*(c+d*x)))^q,(E^(-I*(a+b*x))+E^(I*(a+b*x)))^p,x],x] /;
FreeQ[{a,b,c,d,q},x] && IGtQ[p,0] && Not[IntegerQ[q]]

3:  ∫Sin[a+b x] Tan[c+d x]dx  when  (b^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: Sin[v] Tan[w]==((e^(-i v))/2)-((e^(i v))/2)-((e^(-i v))/(1+(e^(2 i w))))+((e^(i v))/(1+(e^(2 i w))))

Basis: Cos[v] Cot[w]==((i (e^(-i v)))/2)+((i (e^(i v)))/2)-((i (e^(-i v)))/(1-(e^(2 i w))))-((i (e^(i v)))/(1-(e^(2 i w))))

Rule: If  (b^2)-(d^2)≠0, then

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

Program code:

Int[Sin[a_.+b_.*x_]*Tan[c_.+d_.*x_],x_Symbol] :=
  Int[E^(-I*(a+b*x))/2 - E^(I*(a+b*x))/2 - E^(-I*(a+b*x))/(1+E^(2*I*(c+d*x))) + E^(I*(a+b*x))/(1+E^(2*I*(c+d*x))),x] /;
FreeQ[{a,b,c,d},x] && NeQ[b^2-d^2,0]

Int[Cos[a_.+b_.*x_]*Cot[c_.+d_.*x_],x_Symbol] :=
  Int[I*E^(-I*(a+b*x))/2 + I*E^(I*(a+b*x))/2 - I*E^(-I*(a+b*x))/(1-E^(2*I*(c+d*x))) - I*E^(I*(a+b*x))/(1-E^(2*I*(c+d*x))),x] /;
FreeQ[{a,b,c,d},x] && NeQ[b^2-d^2,0]

4:  ∫Sin[a+b x] Cot[c+d x]dx  when  (b^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: Sin[v] Cot[w]==-((e^(-i v))/2)+((e^(i v))/2)+((e^(-i v))/(1-(e^(2 i w))))-((e^(i v))/(1-(e^(2 i w))))

Basis: Cos[v] Tan[w]==-((i (e^(-i v)))/2)-((i (e^(i v)))/2)+((i (e^(-i v)))/(1+(e^(2 i w))))+((i (e^(i v)))/(1+(e^(2 i w))))

Rule: If  (b^2)-(d^2)≠0, then

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

Program code:

Int[Sin[a_.+b_.*x_]*Cot[c_.+d_.*x_],x_Symbol] :=
  Int[-E^(-I*(a+b*x))/2 + E^(I*(a+b*x))/2 + E^(-I*(a+b*x))/(1-E^(2*I*(c+d*x))) - E^(I*(a+b*x))/(1-E^(2*I*(c+d*x))),x] /;
FreeQ[{a,b,c,d},x] && NeQ[b^2-d^2,0]

Int[Cos[a_.+b_.*x_]*Tan[c_.+d_.*x_],x_Symbol] :=
  Int[-I*E^(-I*(a+b*x))/2 - I*E^(I*(a+b*x))/2 + I*E^(-I*(a+b*x))/(1+E^(2*I*(c+d*x))) + I*E^(I*(a+b*x))/(1+E^(2*I*(c+d*x))),x] /;
FreeQ[{a,b,c,d},x] && NeQ[b^2-d^2,0]

1:  ∫((Sin[(a/(c+d x))])^n)dx  when  n∈(SuperPlus[ℤ])

Derivation: Integration by substitution

Basis: F[(a/(c+d x))]==-(1/d)Subst[((F[a x])/(x^2)),x,(1/(c+d x))] (∂_x)(1/(c+d x))

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

∫((Sin[(a/(c+d x))])^n)dx  ⟶  -(1/d) Subst[∫(((Sin[a x])^n)/(x^2))dx,x,(1/(c+d x))]

Program code:

Int[Sin[a_./(c_.+d_.*x_)]^n_.,x_Symbol] :=
  -1/d*Subst[Int[Sin[a*x]^n/x^2,x],x,1/(c+d*x)] /;
FreeQ[{a,c,d},x] && IGtQ[n,0]

Int[Cos[a_./(c_.+d_.*x_)]^n_.,x_Symbol] :=
  -1/d*Subst[Int[Cos[a*x]^n/x^2,x],x,1/(c+d*x)] /;
FreeQ[{a,c,d},x] && IGtQ[n,0]

2.  ∫((Sin[((a+b x)/(c+d x))])^n)dx  when  n∈(SuperPlus[ℤ])

1:  ∫((Sin[((a+b x)/(c+d x))])^n)dx  when  n∈(SuperPlus[ℤ])∧ b c-a d≠0

Derivation: Integration by substitution

Basis: F[((a+b x)/(c+d x))]==-(1/d)Subst[((F[(b/d)-(((b c-a d) x)/d)])/(x^2)),x,(1/(c+d x))] (∂_x)(1/(c+d x))

Rule: If  n∈(SuperPlus[ℤ])∧ b c-a d≠0, then

∫((Sin[((a+b x)/(c+d x))])^n)dx  ⟶  -(1/d) Subst[∫(((Sin[(b/d)-(((b c-a d) x)/d)])^n)/(x^2))dx,x,(1/(c+d x))]

Program code:

Int[Sin[e_.*(a_.+b_.*x_)/(c_.+d_.*x_)]^n_.,x_Symbol] :=
  -1/d*Subst[Int[Sin[b*e/d-e*(b*c-a*d)*x/d]^n/x^2,x],x,1/(c+d*x)] /;
FreeQ[{a,b,c,d},x] && IGtQ[n,0] && NeQ[b*c-a*d,0]

Int[Cos[e_.*(a_.+b_.*x_)/(c_.+d_.*x_)]^n_.,x_Symbol] :=
  -1/d*Subst[Int[Cos[b*e/d-e*(b*c-a*d)*x/d]^n/x^2,x],x,1/(c+d*x)] /;
FreeQ[{a,b,c,d},x] && IGtQ[n,0] && NeQ[b*c-a*d,0]

2:  ∫((Sin[u])^n)dx  when  n∈(SuperPlus[ℤ])∧ u==((a+b x)/(c+d x))

Derivation: Algebraic normalization

Rule: If  n∈(SuperPlus[ℤ])∧ u==((a+b x)/(c+d x)), then

∫((Sin[u])^n)dx  ⟶  ∫((Sin[((a+b x)/(c+d x))])^n)dx

Program code:

Int[Sin[u_]^n_.,x_Symbol] :=
  Module[{lst=QuotientOfLinearsParts[u,x]},
  Int[Sin[(lst[[1]]+lst[[2]]*x)/(lst[[3]]+lst[[4]]*x)]^n,x]] /;
IGtQ[n,0] && QuotientOfLinearsQ[u,x]

Int[Cos[u_]^n_.,x_Symbol] :=
  Module[{lst=QuotientOfLinearsParts[u,x]},
  Int[Cos[(lst[[1]]+lst[[2]]*x)/(lst[[3]]+lst[[4]]*x)]^n,x]] /;
IGtQ[n,0] && QuotientOfLinearsQ[u,x]

3.  ∫u ((Sin[v])^p)((Trig[w])^q)dx

1.  ∫u ((Sin[v])^p)((Sin[w])^q)dx

1:  ∫u ((Sin[v])^p) ((Sin[w])^q)dx  when  w==v

Derivation: Algebraic simplification

Rule: If  w==v, then

∫u ((Sin[v])^p) ((Sin[w])^q)dx  ⟶  ∫u ((Sin[v])^(p+q))dx

Program code:

Int[u_.*Sin[v_]^p_.*Sin[w_]^q_.,x_Symbol] :=
  Int[u*Sin[v]^(p+q),x] /;
EqQ[w,v]

Int[u_.*Cos[v_]^p_.*Cos[w_]^q_.,x_Symbol] :=
  Int[u*Cos[v]^(p+q),x] /;
EqQ[w,v]

2:  ∫((Sin[v])^p)((Sin[w])^q)dx  when (p|q)∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

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

∫((Sin[v])^p)((Sin[w])^q)dx  ⟶  ∫TrigReduce[((Sin[v])^p)((Sin[w])^q)]dx

Program code:

Int[Sin[v_]^p_.*Sin[w_]^q_.,x_Symbol] :=
  Int[ExpandTrigReduce[Sin[v]^p*Sin[w]^q,x],x] /;
(PolynomialQ[v,x] && PolynomialQ[w,x] || BinomialQ[{v,w},x] && IndependentQ[Cancel[v/w],x]) && IGtQ[p,0] && IGtQ[q,0]

Int[Cos[v_]^p_.*Cos[w_]^q_.,x_Symbol] :=
  Int[ExpandTrigReduce[Cos[v]^p*Cos[w]^q,x],x] /;
(PolynomialQ[v,x] && PolynomialQ[w,x] || BinomialQ[{v,w},x] && IndependentQ[Cancel[v/w],x]) && IGtQ[p,0] && IGtQ[q,0]

3:  ∫(x^m)((Sin[v])^p)((Sin[w])^q)dx  when (m|p|q)∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

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

∫(x^m)((Sin[v])^p)((Sin[w])^q)dx  ⟶  ∫(x^m)TrigReduce[((Sin[v])^p)((Sin[w])^q)]dx

Program code:

Int[x_^m_.*Sin[v_]^p_.*Sin[w_]^q_.,x_Symbol] :=
  Int[ExpandTrigReduce[x^m,Sin[v]^p*Sin[w]^q,x],x] /;
IGtQ[m,0] && IGtQ[p,0] && IGtQ[q,0] && (PolynomialQ[v,x] && PolynomialQ[w,x] || BinomialQ[{v,w},x] && IndependentQ[Cancel[v/w],x])

Int[x_^m_.*Cos[v_]^p_.*Cos[w_]^q_.,x_Symbol] :=
  Int[ExpandTrigReduce[x^m,Cos[v]^p*Cos[w]^q,x],x] /;
IGtQ[m,0] && IGtQ[p,0] && IGtQ[q,0] && (PolynomialQ[v,x] && PolynomialQ[w,x] || BinomialQ[{v,w},x] && IndependentQ[Cancel[v/w],x])

2.  ∫u ((Sin[v])^p)((Cos[w])^q)dx

1:  ∫u ((Sin[v])^p) ((Cos[w])^p)dx  when  w==v∧ p∈ℤ

Derivation: Algebraic simplification

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

Rule: If  w==v∧ p∈ℤ, then

∫u ((Sin[v])^p) ((Cos[w])^p)dx  ⟶  (1/(2^p))∫u ((Sin[2v])^p)dx

Program code:

Int[u_.*Sin[v_]^p_.*Cos[w_]^p_.,x_Symbol] :=
  1/2^p*Int[u*Sin[2*v]^p,x] /;
EqQ[w,v] && IntegerQ[p]

2:  ∫((Sin[v])^p)((Cos[w])^q)dx  when (p|q)∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

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

∫((Sin[v])^p)((Cos[w])^q)dx  ⟶  ∫TrigReduce[((Sin[v])^p)((Cos[w])^q)]dx

Program code:

Int[Sin[v_]^p_.*Cos[w_]^q_.,x_Symbol] :=
  Int[ExpandTrigReduce[Sin[v]^p*Cos[w]^q,x],x] /;
IGtQ[p,0] && IGtQ[q,0] && (PolynomialQ[v,x] && PolynomialQ[w,x] || BinomialQ[{v,w},x] && IndependentQ[Cancel[v/w],x])

3:  ∫(x^m)((Sin[v])^p)((Cos[w])^q)dx  when (m|p|q)∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

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

∫(x^m)((Sin[v])^p)((Cos[w])^q)dx  ⟶  ∫(x^m)TrigReduce[((Sin[v])^p)((Cos[w])^q)]dx

Program code:

Int[x_^m_.*Sin[v_]^p_.*Cos[w_]^q_.,x_Symbol] :=
  Int[ExpandTrigReduce[x^m,Sin[v]^p*Cos[w]^q,x],x] /;
IGtQ[m,0] && IGtQ[p,0] && IGtQ[q,0] && (PolynomialQ[v,x] && PolynomialQ[w,x] || BinomialQ[{v,w},x] && IndependentQ[Cancel[v/w],x])

3.  ∫u ((Sin[v])^p)((Tan[w])^q)dx

1:  ∫Sin[v] ((Tan[w])^n)dx  when  n>0 ∧ x∉v-w ∧ w≠v

Derivation: Algebraic expansion

Basis: Sin[v] Tan[w]==-Cos[v]+Cos[v-w] Sec[w]

Basis: Cos[v] Cot[w]==-Sin[v]+Cos[v-w] Csc[w]

Rule: If  n>0 ∧ x∉v-w ∧ w≠v, then

∫Sin[v] ((Tan[w])^n)dx  ⟶  -∫Cos[v] ((Tan[w])^(n-1))dx+Cos[v-w] ∫Sec[w] ((Tan[w])^(n-1))dx

Program code:

Int[Sin[v_]*Tan[w_]^n_.,x_Symbol] :=
  -Int[Cos[v]*Tan[w]^(n-1),x] + Cos[v-w]*Int[Sec[w]*Tan[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

Int[Cos[v_]*Cot[w_]^n_.,x_Symbol] :=
  -Int[Sin[v]*Cot[w]^(n-1),x] + Cos[v-w]*Int[Csc[w]*Cot[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

4.  ∫u ((Sin[v])^p)((Cot[w])^q)dx

1:  ∫Sin[v] ((Cot[w])^n)dx  when  n>0 ∧ x∉v-w ∧ w≠v

Derivation: Algebraic expansion

Basis: Sin[v] Cot[w]==Cos[v]+Sin[v-w] Csc[w]

Basis: Cos[v] Tan[w]==Sin[v]-Sin[v-w] Sec[w]

Rule: If  n>0 ∧ x∉v-w ∧ w≠v, then

∫Sin[v] ((Cot[w])^n)dx  ⟶  ∫Cos[v] ((Cot[w])^(n-1))dx+Sin[v-w] ∫Csc[w] ((Cot[w])^(n-1))dx

Program code:

Int[Sin[v_]*Cot[w_]^n_.,x_Symbol] :=
  Int[Cos[v]*Cot[w]^(n-1),x] + Sin[v-w]*Int[Csc[w]*Cot[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

Int[Cos[v_]*Tan[w_]^n_.,x_Symbol] :=
  Int[Sin[v]*Tan[w]^(n-1),x] - Sin[v-w]*Int[Sec[w]*Tan[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

5.  ∫u ((Sin[v])^p)((Sec[w])^q)dx

1:  ∫Sin[v] ((Sec[w])^n)dx  when  n>0 ∧ x∉v-w ∧ w≠v

Derivation: Algebraic expansion

Basis: Sin[v] Sec[w]==Cos[v-w] Tan[w]+Sin[v-w]

Basis: Cos[v]*Csc[w]==Cos[v-w]*Cot[w]-Sin[v-w]

Rule: If  n>0 ∧ x∉v-w ∧ w≠v, then

∫Sin[v] ((Sec[w])^n)dx  ⟶  Cos[v-w] ∫Tan[w] ((Sec[w])^(n-1))dx+Sin[v-w] ∫((Sec[w])^(n-1))dx

Program code:

Int[Sin[v_]*Sec[w_]^n_.,x_Symbol] :=
  Cos[v-w]*Int[Tan[w]*Sec[w]^(n-1),x] + Sin[v-w]*Int[Sec[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

Int[Cos[v_]*Csc[w_]^n_.,x_Symbol] :=
  Cos[v-w]*Int[Cot[w]*Csc[w]^(n-1),x] - Sin[v-w]*Int[Csc[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

6.  ∫u ((Sin[v])^p)((Csc[w])^q)dx

1:  ∫Sin[v] ((Csc[w])^n)dx  when  n>0 ∧ x∉v-w ∧ w≠v

Derivation: Algebraic expansion

Basis: Sin[v] Csc[w]==Sin[v-w] Cot[w]+Cos[v-w]

Basis: Cos[v] Sec[w]==-Sin[v-w] Tan[w]+Cos[v-w]

Rule: If  n>0 ∧ x∉v-w ∧ w≠v, then

∫Sin[v] ((Csc[w])^n)dx  ⟶  Sin[v-w] ∫Cot[w] ((Csc[w])^(n-1))dx+Cos[v-w] ∫((Csc[w])^(n-1))dx

Program code:

Int[Sin[v_]*Csc[w_]^n_.,x_Symbol] :=
  Sin[v-w]*Int[Cot[w]*Csc[w]^(n-1),x] + Cos[v-w]*Int[Csc[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

Int[Cos[v_]*Sec[w_]^n_.,x_Symbol] :=
  -Sin[v-w]*Int[Tan[w]*Sec[w]^(n-1),x] + Cos[v-w]*Int[Sec[w]^(n-1),x] /;
GtQ[n,0] && FreeQ[v-w,x] && NeQ[w,v]

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

Derivation: Algebraic simplification

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

Rule:

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

Program code:

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

5:  ∫(x^m)(((a+b ((Sin[c+d x])^2)))^n)dx  when  a+b≠0 ∧ (m|n)∈ℤ ∧ m>0 ∧ n<0

Derivation: Algebraic simplification

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

Note: This rule should be replaced with rules that directly reduce the integrand rather than transforming it using trig power expansion!

Rule: If  a+b≠0 ∧ (m|n)∈ℤ ∧ m>0 ∧ n<0, then

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

Program code:

Int[x_^m_.*(a_+b_.*Sin[c_.+d_.*x_]^2)^n_,x_Symbol] :=
  1/2^n*Int[x^m*(2*a+b-b*Cos[2*c+2*d*x])^n,x] /;
FreeQ[{a,b,c,d},x] && NeQ[a+b,0] && IGtQ[m,0] && ILtQ[n,0] && (EqQ[n,-1] || EqQ[m,1] && EqQ[n,-2])

Int[x_^m_.*(a_+b_.*Cos[c_.+d_.*x_]^2)^n_,x_Symbol] :=
  1/2^n*Int[x^m*(2*a+b+b*Cos[2*c+2*d*x])^n,x] /;
FreeQ[{a,b,c,d},x] && NeQ[a+b,0] && IGtQ[m,0] && ILtQ[n,0] && (EqQ[n,-1] || EqQ[m,1] && EqQ[n,-2])

6:  ∫((((f+g x))^m)/(a+b ((Cos[d+e x])^2)+c ((Sin[d+e x])^2)))dx  when  m∈(SuperPlus[ℤ])∧ a+b≠0 ∧ a+c≠0

Derivation: Algebraic simplification

Basis: a+b ((Cos[z])^2)+c ((Sin[z])^2)==(1/2) (2 a+b+c+(b-c) Cos[2 z])

Rule: If  m∈(SuperPlus[ℤ])∧ a+b≠0 ∧ a+c≠0, then

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

Program code:

Int[(f_.+g_.*x_)^m_./(a_.+b_.*Cos[d_.+e_.*x_]^2+c_.*Sin[d_.+e_.*x_]^2),x_Symbol] :=
  2*Int[(f+g*x)^m/(2*a+b+c+(b-c)*Cos[2*d+2*e*x]),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && IGtQ[m,0] && NeQ[a+b,0] && NeQ[a+c,0]

Int[(f_.+g_.*x_)^m_.*Sec[d_.+e_.*x_]^2/(b_+c_.*Tan[d_.+e_.*x_]^2),x_Symbol] :=
  2*Int[(f+g*x)^m/(b+c+(b-c)*Cos[2*d+2*e*x]),x] /;
FreeQ[{b,c,d,e,f,g},x] && IGtQ[m,0]

Int[(f_.+g_.*x_)^m_.*Sec[d_.+e_.*x_]^2/(b_.+a_.*Sec[d_.+e_.*x_]^2+c_.*Tan[d_.+e_.*x_]^2),x_Symbol] :=
  2*Int[(f+g*x)^m/(2*a+b+c+(b-c)*Cos[2*d+2*e*x]),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && IGtQ[m,0] && NeQ[a+b,0] && NeQ[a+c,0]

Int[(f_.+g_.*x_)^m_.*Csc[d_.+e_.*x_]^2/(c_+b_.*Cot[d_.+e_.*x_]^2),x_Symbol] :=
  2*Int[(f+g*x)^m/(b+c+(b-c)*Cos[2*d+2*e*x]),x] /;
FreeQ[{b,c,d,e,f,g},x] && IGtQ[m,0]

Int[(f_.+g_.*x_)^m_.*Csc[d_.+e_.*x_]^2/(c_.+b_.*Cot[d_.+e_.*x_]^2+a_.*Csc[d_.+e_.*x_]^2),x_Symbol] :=
  2*Int[(f+g*x)^m/(2*a+b+c+(b-c)*Cos[2*d+2*e*x]),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && IGtQ[m,0] && NeQ[a+b,0] && NeQ[a+c,0]

7:  ∫(((e+f x) (A+B Sin[c+d x]))/(((a+b Sin[c+d x]))^2))dx  when  a A-b B==0

Derivation: Integration by parts

Basis: If  a A-b B==0, then (( (A+B Sin[c+d x]))/(((a+b Sin[c+d x]))^2))==-(∂_x)((B Cos[c+d x])/(a d (a+b Sin[c+d x])))

Rule: If  a A-b B==0, then

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

Program code:

Int[(e_.+f_.*x_)*(A_+B_.*Sin[c_.+d_.*x_])/(a_+b_.*Sin[c_.+d_.*x_])^2,x_Symbol] :=
  -B*(e+f*x)*Cos[c+d*x]/(a*d*(a+b*Sin[c+d*x])) +
  B*f/(a*d)*Int[Cos[c+d*x]/(a+b*Sin[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f,A,B},x] && EqQ[a*A-b*B,0]

Int[(e_.+f_.*x_)*(A_+B_.*Cos[c_.+d_.*x_])/(a_+b_.*Cos[c_.+d_.*x_])^2,x_Symbol] :=
  B*(e+f*x)*Sin[c+d*x]/(a*d*(a+b*Cos[c+d*x])) -
  B*f/(a*d)*Int[Sin[c+d*x]/(a+b*Cos[c+d*x]),x] /;
FreeQ[{a,b,c,d,e,f,A,B},x] && EqQ[a*A-b*B,0]

8.  ∫(((((b x))^m) ((Sin[a x])^n))/(((c Sin[a x]+d x Cos[a x]))^2))dx  when  a c+d==0 ∧ m==2-n

1:  ∫((x^2)/(((c Sin[a x]+d x Cos[a x]))^2))dx  when  a c+d==0

Derivation: Integration by parts

Basis: If  a c+d==0, then ((x Sin[a x])/(((c Sin[a x]+d x Cos[a x]))^2))==(∂_x)(1/(a d (c Sin[a x]+d x Cos[a x])))

Basis: If  a c+d==0, then (∂_x)(x/(Sin[a x]))==(((c Sin[a x]+d x Cos[a x]))/(c ((Sin[a x])^2)))

Rule: If  a c+d==0, then

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

Program code:

Int[x_^2/(c_.*Sin[a_.*x_]+d_.*x_*Cos[a_.*x_])^2,x_Symbol] :=
  x/(a*d*Sin[a*x]*(c*Sin[a*x]+d*x*Cos[a*x])) + 1/d^2*Int[1/Sin[a*x]^2,x] /;
FreeQ[{a,c,d},x] && EqQ[a*c+d,0]

Int[x_^2/(c_.*Cos[a_.*x_]+d_.*x_*Sin[a_.*x_])^2,x_Symbol] :=
  -x/(a*d*Cos[a*x]*(c*Cos[a*x]+d*x*Sin[a*x])) + 1/d^2*Int[1/Cos[a*x]^2,x] /;
FreeQ[{a,c,d},x] && EqQ[a*c-d,0]

2:  ∫(((Sin[a x])^2)/(((c Sin[a x]+d x Cos[a x]))^2))dx  when  a c+d==0

Derivation: Integration by parts

Basis: If  a c+d==0, then ((b x Sin[a x])/(((c Sin[a x]+d x Cos[a x]))^2))==(∂_x)(b/(a d (c Sin[a x]+d x Cos[a x])))

Basis: If  a c+d==0 ∧ m==2-n, then (∂_x)((((b x))^(m-1)) ((Sin[a x])^(n-1)))==-((b (n-1))/c) (((b x))^(m-2)) ((Sin[a x])^(n-2)) (c Sin[a x]+d x Cos[a x])

Rule: If  a c+d==0 ∧ m==2-n, then

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

Program code:

Int[Sin[a_.*x_]^2/(c_.*Sin[a_.*x_]+d_.*x_*Cos[a_.*x_])^2,x_Symbol] :=
  1/(d^2*x) + Sin[a*x]/(a*d*x*(d*x*Cos[a*x]+c*Sin[a*x])) /;
FreeQ[{a,c,d},x] && EqQ[a*c+d,0]

Int[Cos[a_.*x_]^2/(c_.*Cos[a_.*x_]+d_.*x_*Sin[a_.*x_])^2,x_Symbol] :=
  1/(d^2*x) - Cos[a*x]/(a*d*x*(d*x*Sin[a*x]+c*Cos[a*x])) /;
FreeQ[{a,c,d},x] && EqQ[a*c-d,0]

3:  ∫(((((b x))^m) ((Sin[a x])^n))/(((c Sin[a x]+d x Cos[a x]))^2))dx  when  a c+d==0 ∧ m==2-n

Derivation: Integration by parts

Basis: If  a c+d==0, then ((b x Sin[a x])/(((c Sin[a x]+d x Cos[a x]))^2))==(∂_x)(b/(a d (c Sin[a x]+d x Cos[a x])))

Basis: If  a c+d==0 ∧ m==2-n, then (∂_x)((((b x))^(m-1)) ((Sin[a x])^(n-1)))==-((b (n-1))/c) (((b x))^(m-2)) ((Sin[a x])^(n-2)) (c Sin[a x]+d x Cos[a x])

Rule: If  a c+d==0 ∧ m==2-n, then

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

Program code:

Int[(b_.*x_)^m_*Sin[a_.*x_]^n_/(c_.*Sin[a_.*x_]+d_.*x_*Cos[a_.*x_])^2,x_Symbol] :=
  b*(b*x)^(m-1)*Sin[a*x]^(n-1)/(a*d*(c*Sin[a*x]+d*x*Cos[a*x])) - 
  b^2*(n-1)/d^2*Int[(b*x)^(m-2)*Sin[a*x]^(n-2),x] /;
FreeQ[{a,b,c,d,m,n},x] && EqQ[a*c+d,0] && EqQ[m,2-n]

Int[(b_.*x_)^m_*Cos[a_.*x_]^n_/(c_.*Cos[a_.*x_]+d_.*x_*Sin[a_.*x_])^2,x_Symbol] :=
  -b*(b*x)^(m-1)*Cos[a*x]^(n-1)/(a*d*(c*Cos[a*x]+d*x*Sin[a*x])) - 
  b^2*(n-1)/d^2*Int[(b*x)^(m-2)*Cos[a*x]^(n-2),x] /;
FreeQ[{a,b,c,d,m,n},x] && EqQ[a*c-d,0] && EqQ[m,2-n]

Rule: If  a c+d==0 ∧ m==n+2, then

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

Int[(b_.*x_)^m_.*Csc[a_.*x_]^n_./(c_.*Sin[a_.*x_]+d_.*x_*Cos[a_.*x_])^2,x_Symbol] :=
  b*(b*x)^(m-1)*Csc[a*x]^(n+1)/(a*d*(c*Sin[a*x]+d*x*Cos[a*x])) + 
  b^2*(n+1)/d^2*Int[(b*x)^(m-2)*Csc[a*x]^(n+2),x] /;
FreeQ[{a,b,c,d,m,n},x] && EqQ[a*c+d,0] && EqQ[m,n+2]

Int[(b_.*x_)^m_.*Sec[a_.*x_]^n_./(c_.*Cos[a_.*x_]+d_.*x_*Sin[a_.*x_])^2,x_Symbol] :=
  -b*(b*x)^(m-1)*Sec[a*x]^(n+1)/(a*d*(c*Cos[a*x]+d*x*Sin[a*x])) + 
  b^2*(n+1)/d^2*Int[(b*x)^(m-2)*Sec[a*x]^(n+2),x] /;
FreeQ[{a,b,c,d,m,n},x] && EqQ[a*c-d,0] && EqQ[m,n+2]

9.  ∫(((g+h x))^p) (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ (2 m|n-m)∈ℤ

1:  ∫(((g+h x))^p) (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈ℤ ∧ n-m∈(SuperPlus[ℤ])

Derivation: Algebraic simplification

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

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈ℤ ∧ n-m∈(SuperPlus[ℤ]), then

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

Program code:

Int[(g_.+h_.*x_)^p_.*(a_+b_.*Sin[e_.+f_.*x_])^m_.*(c_+d_.*Sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^m*c^m*Int[(g+h*x)^p*Cos[e+f*x]^(2*m)*(c+d*Sin[e+f*x])^(n-m),x] /;
FreeQ[{a,b,c,d,e,f,g,h},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m] && IGtQ[n-m,0]

Int[(g_.+h_.*x_)^p_.*(a_+b_.*Cos[e_.+f_.*x_])^m_.*(c_+d_.*Cos[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^m*c^m*Int[(g+h*x)^p*Sin[e+f*x]^(2*m)*(c+d*Cos[e+f*x])^(n-m),x] /;
FreeQ[{a,b,c,d,e,f,g,h},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m] && IGtQ[n-m,0]

2:  ∫(((g+h x))^p) (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ p∈ℤ ∧ 2 m∈ℤ ∧ n-m∈(SuperPlus[ℤ])

Derivation: Piecewise constant extraction

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (∂_x)(((((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^m))/((Cos[e+f x])^(2m)))==0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ p∈ℤ ∧ 2 m∈ℤ ∧ n-m∈(SuperPlus[ℤ]), then

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

Program code:

Int[(g_.+h_.*x_)^p_.*(a_+b_.*Sin[e_.+f_.*x_])^m_*(c_+d_.*Sin[e_.+f_.*x_])^n_,x_Symbol] :=
  a^IntPart[m]*c^IntPart[m]*(a+b*Sin[e+f*x])^FracPart[m]*(c+d*Sin[e+f*x])^FracPart[m]/Cos[e+f*x]^(2*FracPart[m])*
    Int[(g+h*x)^p*Cos[e+f*x]^(2*m)*(c+d*Sin[e+f*x])^(n-m),x] /;
FreeQ[{a,b,c,d,e,f,g,h},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[p] && IntegerQ[2*m] && IGeQ[n-m,0]

Int[(g_.+h_.*x_)^p_.*(a_+b_.*Cos[e_.+f_.*x_])^m_*(c_+d_.*Cos[e_.+f_.*x_])^n_,x_Symbol] :=
  a^IntPart[m]*c^IntPart[m]*(a+b*Cos[e+f*x])^FracPart[m]*(c+d*Cos[e+f*x])^FracPart[m]/Sin[e+f*x]^(2*FracPart[m])*
    Int[(g+h*x)^p*Sin[e+f*x]^(2*m)*(c+d*Cos[e+f*x])^(n-m),x] /;
FreeQ[{a,b,c,d,e,f,g,h},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[p] && IntegerQ[2*m] && IGeQ[n-m,0]

10:  ∫((Sec[v])^m) (((a+b Tan[v]))^n)dx  when  ((m-1)/2)∈ℤ ∧ m+n==0

Derivation: Algebraic simplification

Basis: ((a+b Tan[z])/(Sec[z]))==a Cos[z]+b Sin[z]

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

∫((Sec[v])^m) (((a+b Tan[v]))^n)dx  ⟶  ∫(((a Cos[v]+b Sin[v]))^n)dx

Program code:

Int[Sec[v_]^m_.*(a_+b_.*Tan[v_])^n_., x_Symbol] :=
  Int[(a*Cos[v]+b*Sin[v])^n,x] /;
FreeQ[{a,b},x] && IntegerQ[(m-1)/2] && EqQ[m+n,0]

Int[Csc[v_]^m_.*(a_+b_.*Cot[v_])^n_., x_Symbol] :=
  Int[(b*Cos[v]+a*Sin[v])^n,x] /;
FreeQ[{a,b},x] && IntegerQ[(m-1)/2] && EqQ[m+n,0]

11:  ∫u ((Sin[a+b x])^m)((Sin[c+d x])^n)dx  when  (m|n)∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If (m|n)∈(SuperPlus[ℤ]), then

∫u ((Sin[a+b x])^m)((Sin[c+d x])^n)dx  ⟶  ∫u TrigReduce[((Sin[a+b x])^m)((Sin[c+d x])^n)]dx

Program code:

Int[u_.*Sin[a_.+b_.*x_]^m_.*Sin[c_.+d_.*x_]^n_.,x_Symbol] :=
  Int[ExpandTrigReduce[u,Sin[a+b*x]^m*Sin[c+d*x]^n,x],x] /;
FreeQ[{a,b,c,d},x] && IGtQ[m,0] && IGtQ[n,0]

Int[u_.*Cos[a_.+b_.*x_]^m_.*Cos[c_.+d_.*x_]^n_.,x_Symbol] :=
  Int[ExpandTrigReduce[u,Cos[a+b*x]^m*Cos[c+d*x]^n,x],x] /;
FreeQ[{a,b,c,d},x] && IGtQ[m,0] && IGtQ[n,0]

12:  ∫Sec[a+b x]Sec[c+d x]dx  when  (b^2)-(d^2)==0 ∧ b c-a d≠0

Derivation: Algebraic expansion

Basis: If  (b^2)-(d^2)==0 ∧ b c-a d≠0 , then Sec[a+b x] Sec[c+d x]==-Csc[((b c-a d)/d)]Tan[a+b x]+Csc[((b c-a d)/b)]Tan[c+d x]

Rule: If  (b^2)-(d^2)==0 ∧ b c-a d≠0 , then

∫Sec[a+b x] Sec[c+d x]dx  ⟶  -Csc[((b c-a d)/d)] ∫Tan[a+b x]dx+Csc[((b c-a d)/b)] ∫Tan[c+d x]dx

Program code:

Int[Sec[a_.+b_.*x_]*Sec[c_+d_.*x_],x_Symbol] :=
  -Csc[(b*c-a*d)/d]*Int[Tan[a+b*x],x] + Csc[(b*c-a*d)/b]*Int[Tan[c+d*x],x] /;
FreeQ[{a,b,c,d},x] && EqQ[b^2-d^2,0] && NeQ[b*c-a*d,0]

Int[Csc[a_.+b_.*x_]*Csc[c_+d_.*x_],x_Symbol] :=
  Csc[(b*c-a*d)/b]*Int[Cot[a+b*x],x] - Csc[(b*c-a*d)/d]*Int[Cot[c+d*x],x] /;
FreeQ[{a,b,c,d},x] && EqQ[b^2-d^2,0] && NeQ[b*c-a*d,0]

13:  ∫Tan[a+b x] Tan[c+d x]dx  when  (b^2)-(d^2)==0 ∧ b c-a d≠0

Derivation: Algebraic expansion

Basis: If  (b^2)-(d^2)==0, then Tan[a+b x] Tan[c+d x]==-(b/d)+(b/d)Cos[((b c-a d)/d)] Sec[a+b x] Sec[c+d x]

Rule: If  (b^2)-(d^2)==0 ∧ b c-a d≠0 , then

∫Tan[a+b x] Tan[c+d x]dx  ⟶  -((b x)/d)+(b/d)Cos[((b c-a d)/d)] ∫Sec[a+b x]Sec[c+d x]dx

Program code:

Int[Tan[a_.+b_.*x_]*Tan[c_+d_.*x_],x_Symbol] :=
  -b*x/d + b/d*Cos[(b*c-a*d)/d]*Int[Sec[a+b*x]*Sec[c+d*x],x] /;
FreeQ[{a,b,c,d},x] && EqQ[b^2-d^2,0] && NeQ[b*c-a*d,0]

Int[Cot[a_.+b_.*x_]*Cot[c_+d_.*x_],x_Symbol] :=
  -b*x/d + Cos[(b*c-a*d)/d]*Int[Csc[a+b*x]*Csc[c+d*x],x] /;
FreeQ[{a,b,c,d},x] && EqQ[b^2-d^2,0] && NeQ[b*c-a*d,0]

14:  ∫u(((a Cos[v]+b Sin[v]))^n)dx  when  (a^2)+(b^2)==0

Derivation: Algebraic simplification

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

Rule: If  (a^2)+(b^2)==0, then

∫u(((a Cos[v]+b Sin[v]))^n)dx  ⟶  ∫u(((a (e^(-((a v)/b)))))^n)dx

Program code:

Int[u_.*(a_.*Cos[v_]+b_.*Sin[v_])^n_.,x_Symbol] :=
  Int[u*(a*E^(-a/b*v))^n,x] /;
FreeQ[{a,b,n},x] && EqQ[a^2+b^2,0]

15.  ∫u Sin[d (((a+b Log[c (x^n)]))^2)]dx

1:  ∫Sin[d (((a+b Log[c (x^n)]))^2)]dx

Derivation: Algebraic expansion

Basis: Sin[z]==(i/2) (e^(-i z))-(i/2) (e^(i z))

Rule:

∫Sin[d (((a+b Log[c (x^n)]))^2)]dx  ⟶  (i/2) ∫(e^(-i d (((a+b Log[c (x^n)]))^2)))dx-(i/2) ∫(e^(i d (((a+b Log[c (x^n)]))^2)))dx

Program code:

Int[Sin[d_.*(a_.+b_.*Log[c_.*x_^n_.])^2],x_Symbol] :=
  I/2*Int[E^(-I*d*(a+b*Log[c*x^n])^2),x] - I/2*Int[E^(I*d*(a+b*Log[c*x^n])^2),x] /;
FreeQ[{a,b,c,d,n},x]

Int[Cos[d_.*(a_.+b_.*Log[c_.*x_^n_.])^2],x_Symbol] :=
  1/2*Int[E^(-I*d*(a+b*Log[c*x^n])^2),x] + 1/2*Int[E^(I*d*(a+b*Log[c*x^n])^2),x] /;
FreeQ[{a,b,c,d,n},x]

2:  ∫(((e x))^m) Sin[d (((a+b Log[c (x^n)]))^2)]dx

Derivation: Algebraic expansion

Basis: Sin[z]==(i/2) (e^(-i z))-(i/2) (e^(i z))

Rule:

∫(((e x))^m) Sin[d (((a+b Log[c (x^n)]))^2)]dx  ⟶  (i/2) ∫(((e x))^m) (e^(-i d (((a+b Log[c (x^n)]))^2)))dx-(i/2) ∫(((e x))^m) (e^(i d (((a+b Log[c (x^n)]))^2)))dx

Program code:

Int[(e_.*x_)^m_.*Sin[d_.*(a_.+b_.*Log[c_.*x_^n_.])^2],x_Symbol] :=
  I/2*Int[(e*x)^m*E^(-I*d*(a+b*Log[c*x^n])^2),x] - I/2*Int[(e*x)^m*E^(I*d*(a+b*Log[c*x^n])^2),x] /;
FreeQ[{a,b,c,d,e,m,n},x]

Int[(e_.*x_)^m_.*Cos[d_.*(a_.+b_.*Log[c_.*x_^n_.])^2],x_Symbol] :=
  1/2*Int[(e*x)^m*E^(-I*d*(a+b*Log[c*x^n])^2),x] + 1/2*Int[(e*x)^m*E^(I*d*(a+b*Log[c*x^n])^2),x] /;
FreeQ[{a,b,c,d,e,m,n},x]