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

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

Derivation: Integration by substitution

Basis: ((Sin[e+f x])^2)==(((Tan[e+f x])^2)/(1+((Tan[e+f x])^2)))

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

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

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

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

Program code:

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

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

Derivation: Algebraic expansion

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

Note: This rule sucks...

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

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

Program code:

Int[sin[e_.+f_.*x_]^m_.*(a_+b_.*tan[e_.+f_.*x_])^n_.,x_Symbol] :=
  Int[Sin[e+f*x]^m*(a*Cos[e+f*x]+b*Sin[e+f*x])^n/Cos[e+f*x]^n,x] /;
FreeQ[{a,b,e,f},x] && IntegerQ[(m-1)/2] && ILtQ[n,0] && (LtQ[m,5] && GtQ[n,-4] || EqQ[m,5] && EqQ[n,-1])

Rules for integrands of the form (((d Csc[e+f x]))^m) (((a+b Tan[e+f x]))^n)

1:  ∫(((d Csc[e+f x]))^m) (((a+b Tan[e+f x]))^n) 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 Tan[e+f x]))^n)dx  ⟶  (((d Csc[e+f x]))^(FracPart[m])) (((((Sin[e+f x])/d)))^(FracPart[m]))∫((((a+b Tan[e+f x]))^n)/(((((Sin[e+f x])/d)))^m))dx

Program code:

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

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

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

Derivation: Algebraic simplification

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

Rule: If  n∈ℤ, then

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

Program code:

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

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