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

1.  ∫(((c+d x))^m)((Trig[a+b x])^n)((Trig[a+b x])^p)dx

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

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

Derivation: Integration by parts

Basis: ((Sin[a+b x])^n)Cos[a+b x]==(∂_x)(((Sin[a+b x])^(n+1))/(b(n+1)))

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

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

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

Program code:

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

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

Derivation: Algebraic expansion

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

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

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

Program code:

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

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

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

1:  ∫(((c+d x))^m) ((Sec[a+b x])^n) Tan[a+b x]dx  when  m>0

Derivation: Integration by parts

Basis: ((Sec[a+b x])^n)Tan[a+b x]==(∂_x)(((Sec[a+b x])^n)/(b n))

Note: Dummy exponent p===1 required in program code so InputForm of integrand is recognized.

Rule: If  m>0, then

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

Program code:

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

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

2:  ∫(((c+d x))^m)((Sec[a+b x])^2)((Tan[a+b x])^n)dx  when  m∈(SuperPlus[ℤ])∧ n≠-1

Derivation: Integration by parts

Basis: ((Sec[a+b x])^2)((Tan[a+b x])^n)==(∂_x)(((Tan[a+b x])^(n+1))/(b(n+1)))

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

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

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

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

Program code:

Int[(c_.+d_.*x_)^m_.*Sec[a_.+b_.*x_]*Tan[a_.+b_.*x_]^p_,x_Symbol] :=
  -Int[(c+d*x)^m*Sec[a+b*x]*Tan[a+b*x]^(p-2),x] + Int[(c+d*x)^m*Sec[a+b*x]^3*Tan[a+b*x]^(p-2),x] /;
FreeQ[{a,b,c,d,m},x] && IGtQ[p/2,0]

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

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

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

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

Derivation: Integration by parts

Rule: If  m∈(SuperPlus[ℤ])∧ ((n/2)∈ℤ ∨ ((p-1)/2)∈ℤ), let u=∫((Sec[a+b x])^n)((Tan[a+b x])^p)dx, then

∫(((c+d x))^m)((Sec[a+b x])^n)((Tan[a+b x])^p)dx  ⟶  u(((c+d x))^m)-d m∫u(((c+d x))^(m-1))dx

Program code:

Int[(c_.+d_.*x_)^m_.*Sec[a_.+b_.*x_]^n_.*Tan[a_.+b_.*x_]^p_.,x_Symbol] :=
  Module[{u=IntHide[Sec[a+b*x]^n*Tan[a+b*x]^p,x]},
  Dist[(c+d*x)^m,u,x] - d*m*Int[(c+d*x)^(m-1)*u,x]] /;
FreeQ[{a,b,c,d,n,p},x] && IGtQ[m,0] && (IntegerQ[n/2] || IntegerQ[(p-1)/2])

Int[(c_.+d_.*x_)^m_.*Csc[a_.+b_.*x_]^n_.*Cot[a_.+b_.*x_]^p_.,x_Symbol] :=
  Module[{u=IntHide[Csc[a+b*x]^n*Cot[a+b*x]^p,x]},
  Dist[(c+d*x)^m,u,x] - d*m*Int[(c+d*x)^(m-1)*u,x]] /;
FreeQ[{a,b,c,d,n,p},x] && IGtQ[m,0] && (IntegerQ[n/2] || IntegerQ[(p-1)/2])

4.  ∫(((c+d x))^m)((Sec[a+b x])^p)((Csc[a+b x])^n)dx

1:  ∫(((c+d x))^m)((Csc[a+b x])^n)((Sec[a+b x])^n)dx  when  n∈ℤ

Derivation: Algebraic simplification

Basis: Csc[z]Sec[z]==2 Csc[2 z]

Rule: If  n∈ℤ, then

∫(((c+d x))^m)((Csc[a+b x])^n)((Sec[a+b x])^n)dx  ⟶  (2^n)∫ (((c+d x))^m)((Csc[2a+2b x])^n)dx

Program code:

Int[(c_.+d_.*x_)^m_.*Csc[a_.+b_.*x_]^n_.*Sec[a_.+b_.*x_]^n_., x_Symbol] :=
  2^n*Int[(c+d*x)^m*Csc[2*a+2*b*x]^n,x] /;
FreeQ[{a,b,c,d,m},x] && IntegerQ[n] && RationalQ[m]

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

Derivation: Integration by parts

Rule: If  (n|p)∈ℤ ∧ m>0 ∧ n≠p, let u=∫((Csc[a+b x])^n)((Sec[a+b x])^p)dx, then

∫(((c+d x))^m) ((Csc[a+b x])^n)((Sec[a+b x])^p)dx  ⟶  (((c+d x))^m) u-d m∫(((c+d x))^(m-1)) udx

Program code:

Int[(c_.+d_.*x_)^m_.*Csc[a_.+b_.*x_]^n_.*Sec[a_.+b_.*x_]^p_., x_Symbol] :=
  Module[{u=IntHide[Csc[a+b*x]^n*Sec[a+b*x]^p,x]},
  Dist[(c+d*x)^m,u,x] - d*m*Int[(c+d*x)^(m-1)*u,x]] /;
FreeQ[{a,b,c,d},x] && IntegersQ[n,p] && GtQ[m,0] && NeQ[n,p]

5:  ∫(u^m)((Trig[v])^n)((Trig[w])^p)dx  when  u==c+d x ∧ v==w==a+b x

Derivation: Algebraic normalization

Rule: If  u==c+d x ∧ v==w==a+b x, then

∫(u^m)((Trig[v])^n)((Trig[w])^p)dx  ⟶  ∫(((c+d x))^m) ((Trig[a+b x])^n)((Trig[a+b x])^p)dx

Program code:

Int[u_^m_.*F_[v_]^n_.*G_[w_]^p_.,x_Symbol] :=
  Int[ExpandToSum[u,x]^m*F[ExpandToSum[v,x]]^n*G[ExpandToSum[v,x]]^p,x] /;
FreeQ[{m,n,p},x] && TrigQ[F] && TrigQ[G] && EqQ[v,w] && LinearQ[{u,v,w},x] && Not[LinearMatchQ[{u,v,w},x]]

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

Derivation: Integration by parts

Basis: Cos[c+d x](((a+b Sin[c+d x]))^n)==(∂_x)((((a+b Sin[c+d x]))^(n+1))/(b d(n+1)))

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

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

Program code:

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

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

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

Derivation: Integration by parts

Basis: ((Sec[c+d x])^2)(((a+b Tan[c+d x]))^n)==(∂_x)((((a+b Tan[c+d x]))^(n+1))/(b d(n+1)))

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

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

Program code:

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

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

4:  ∫(((e+f x))^m)Sec[c+d x]Tan[c+d x](((a+b Sec[c+d x]))^n)dx  when  m∈(SuperPlus[ℤ])∧ n≠-1

Derivation: Integration by parts

Basis: Sec[c+d x]Tan[c+d x](((a+b Sec[c+d x]))^n)==(∂_x)((((a+b Sec[c+d x]))^(n+1))/(b d(n+1)))

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

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

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

Program code:

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

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

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

Derivation: Algebraic expansion

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

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

Program code:

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

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

Derivation: Algebraic expansion

Rule: If (p|q)∈(SuperPlus[ℤ])∧ b c-a d==0 ∧ (b/d)-1∈(SuperPlus[ℤ]), then

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

Program code:

Int[(e_.+f_.*x_)^m_.*F_[a_.+b_.*x_]^p_.*G_[c_.+d_.*x_]^q_.,x_Symbol] :=
  Int[ExpandTrigExpand[(e+f*x)^m*G[c+d*x]^q,F,c+d*x,p,b/d,x],x] /;
FreeQ[{a,b,c,d,e,f,m},x] && MemberQ[{Sin,Cos},F] && MemberQ[{Sec,Csc},G] && IGtQ[p,0] && IGtQ[q,0] && EqQ[b*c-a*d,0] && IGtQ[b/d,1]