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

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

Derivation: Algebraic simplification

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

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

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

Program code:

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

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

Derivation: Algebraic simplification

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

Rule: If  a+b==0, then

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

Program code:

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

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

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

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

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

Derivation: Integration by substitution

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

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

Rule: If  p∉ℤ, then

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

Program code:

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

2:  ∫(((b (((c Sec[e+f x]))^n)))^p)dx  when  p∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((b ((F[x])^n)))^p)/((F[x])^(n p)))==0

Rule: If  p∉ℤ, then

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

Program code:

Int[(b_.*(c_.*sec[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  b^IntPart[p]*(b*(c*Sec[e+f*x])^n)^FracPart[p]/(c*Sec[e+f*x])^(n*FracPart[p])*Int[(c*Sec[e+f*x])^(n*p),x] /;
FreeQ[{b,c,e,f,n,p},x] && Not[IntegerQ[p]]

2.  ∫(((b (((c Sec[e+f x]))^n)))^p)dx  when  p∉ℤ

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

Derivation: Integration by substitution

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

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

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

Program code:

Int[tan[e_.+f_.*x_]^m_.*(b_.*sec[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  b/(2*f)*Subst[Int[(-1+x)^((m-1)/2)*(b*x)^(p-1),x],x,Sec[e+f*x]^2] /;
FreeQ[{b,e,f,p},x] && Not[IntegerQ[p]] && IntegerQ[(m-1)/2]

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

Derivation: Piecewise constant extraction

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

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

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

Program code:

Int[u_.*(b_.*sec[e_.+f_.*x_]^n_)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Sec[e+f*x],x]},
  (b*ff^n)^IntPart[p]*(b*Sec[e+f*x]^n)^FracPart[p]/(Sec[e+f*x]/ff)^(n*FracPart[p])*
    Int[ActivateTrig[u]*(Sec[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]])

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

Derivation: Piecewise constant extraction

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

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

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

Program code:

Int[u_.*(b_.*(c_.*sec[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  b^IntPart[p]*(b*(c*Sec[e+f*x])^n)^FracPart[p]/(c*Sec[e+f*x])^(n*FracPart[p])*
    Int[ActivateTrig[u]*(c*Sec[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 Sec[e+f x]))^n)))^p)dx

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

1:  ∫(1/(a+b ((Sec[e+f x])^2)))dx  when  a+b≠0

Derivation: Algebraic expansion

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

Rule: If  a+b≠0, then

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

Program code:

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

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

Derivation: Integration by substitution

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

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

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

Program code:

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

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

Derivation: Integration by substitution

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

Rule: If  2 p∈ℤ, then

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

Program code:

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

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

Derivation: Integration by substitution

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

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

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

Program code:

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

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

Rule:

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

Program code:

Int[(a_+b_.*(c_.*sec[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  Unintegrable[(a+b*(c*Sec[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 Sec[e+f x]))^n)))^p)dx

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

Derivation: Integration by substitution

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

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

Basis: If (m/2)∈ℤ, then ((Sin[e+f x])^m)F[((Sec[e+f x])^2)]==(1/f)Subst[(((x^m)F[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)∈ℤ, then

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

Program code:

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

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

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

Derivation: Integration by substitution

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

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

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

Program code:

Int[sin[e_.+f_.*x_]^m_.*(a_+b_.*sec[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)*(b+a*(ff*x)^n)^p/(ff*x)^(n*p),x],x,Cos[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[(m-1)/2] && IntegerQ[n] && IntegerQ[p]

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

Derivation: Integration by substitution

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

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

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

Program code:

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

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

Rule:

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

Program code:

Int[(d_.*sin[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sec[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Sin[e+f*x])^m*(a+b*(c*Sec[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 Sec[e+f x]))^n)))^p)dx

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

Derivation: Algebraic normalization

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

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

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

Program code:

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

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

Derivation: Piecewise constant extraction

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

Rule: If  m∉ℤ, then

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

Program code:

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

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

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

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

Derivation: Integration by substitution

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

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

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

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

Program code:

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

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

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==-1+((Sec[z])^2)

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

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

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

Program code:

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

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

1:  ∫(((d Tan[e+f x]))^m) (((b ((Sec[e+f x])^2)))^p)dx

Derivation: Integration by substitution

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

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

Rule:

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

Program code:

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

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

Derivation: Integration by substitution

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

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

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

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

Program code:

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

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

1:  ∫(((d Tan[e+f x]))^m) (((b (((c Sec[e+f x]))^n)))^p)dx  when  m>1 ∧ p n+m-1≠0

Reference: G&R 2.510.1

Reference: G&R 2.510.4

Rule: If  m>1 ∧ p n+m-1≠0, then

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

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_*(b_.*(c_.*sec[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  d*(d*Tan[e+f*x])^(m-1)*(b*(c*Sec[e+f*x])^n)^p/(f*(p*n+m-1)) - 
  d^2*(m-1)/(p*n+m-1)*Int[(d*Tan[e+f*x])^(m-2)*(b*(c*Sec[e+f*x])^n)^p,x] /;
FreeQ[{b,c,d,e,f,p,n},x] && GtQ[m,1] && NeQ[p*n+m-1,0] && IntegersQ[2*p*n,2*m]

2:  ∫(((d Tan[e+f x]))^m) (((b (((c Sec[e+f x]))^n)))^p) dx  when  m<-1 ∧ p n+m+1≠0

Reference: G&R 2.510.4

Reference: G&R 2.510.1

Rule: If  m<-1 ∧ p n+m+1≠0, then

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

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_*(b_.*(c_.*sec[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  (d*Tan[e+f*x])^(m+1)*(b*(c*Sec[e+f*x])^n)^p/(d*f*(m+1)) - 
  (p*n+m+1)/(d^2*(m+1))*Int[(d*Tan[e+f*x])^(m+2)*(b*(c*Sec[e+f*x])^n)^p,x] /;
FreeQ[{b,c,d,e,f,p,n},x] && LtQ[m,-1] && NeQ[p*n+m+1,0] && IntegersQ[2*p*n,2*m]

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

Rule:

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

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*sec[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Tan[e+f*x])^m*(a+b*(c*Sec[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 Sec[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 Sec[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 Sec[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*cot[e_.+f_.*x_])^m_*(a_+b_.*(c_.*sec[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*Sec[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 Sec[e+f x]))^n)))^p)dx

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

Derivation: Integration by substitution

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

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

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

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

Program code:

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

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

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

Derivation: Integration by substitution

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

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

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

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

Program code:

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

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

Derivation: Integration by substitution

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

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

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

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

Program code:

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

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

Derivation: Algebraic expansion

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

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

Program code:

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

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

Rule:

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

Program code:

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

8:  ∫(((d Csc[e+f x]))^m) (((a+b (((c Sec[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 Sec[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 Sec[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^m_*(a_+b_.*(c_.*sec[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*Sec[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]