Rules for integrands of the form(((c x))^m) (Subscript[P, q])[x] (((a (x^j)+b (x^n)))^p)

1:  ∫(Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ -1<n<1

Derivation: Integration by substitution

Basis: If  d∈(SuperPlus[ℤ]), then F[(x^n)]==d Subst[(x^(d-1)) F[(x^(d n))],x,(x^(1/d))] (∂_x)(x^(1/d))

Rule: If  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ -1<n<1, let d=Denominator[n], then

∫(Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  ⟶  d Subst[∫(x^(d-1)) (Subscript[P, q])[(x^(d n))] (((a (x^(d j))+b (x^(d n))))^p)dx,x,(x^(1/d))]

Program code:

Int[Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  With[{d=Denominator[n]},
  d*Subst[Int[x^(d-1)*ReplaceAll[SubstFor[x^n,Pq,x],x->x^(d*n)]*(a*x^(d*j)+b*x^(d*n))^p,x],x,x^(1/d)]] /;
FreeQ[{a,b,j,n,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && NeQ[n,j] && RationalQ[j,n] && IntegerQ[j/n] && LtQ[-1,n,1]

2.  ∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ ((m+1)/n)∈ℤ

1:  ∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ ((m+1)/n)∈ℤ

Derivation: Integration by substitution

Basis: If ((m+1)/n)∈ℤ, then (x^m)F[(x^n)]==(1/n) Subst[(x^(((m+1)/n)-1)) F[x],x,(x^n)] (∂_x)(x^n)

Note: If  n∈ℤ ∧ ((m+1)/n)∈ℤ, then m∈ℤ, and (((c x))^m) automatically evaluates to (c^m)(x^m).

Rule: If  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ ((m+1)/n)∈ℤ, then

∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  ⟶  (1/n) Subst[∫(x^(((m+1)/n)-1)) (Subscript[P, q])[x] (((a (x^(j/n))+b x))^p)dx,x,(x^n)]

Program code:

Int[x_^m_.*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  1/n*Subst[Int[x^(Simplify[(m+1)/n]-1)*SubstFor[x^n,Pq,x]*(a*x^Simplify[j/n]+b*x)^p,x],x,x^n] /;
FreeQ[{a,b,j,m,n,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && NeQ[n,j] && IntegerQ[Simplify[j/n]] && IntegerQ[Simplify[(m+1)/n]]

2:  ∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ ((m+1)/n)∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((c x))^m)/(x^m))==0

Rule: If  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ ((m+1)/n)∈ℤ, then

∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  ⟶  ((((c x))^m)/(x^m))∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx

Program code:

Int[(c_*x_)^m_.*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  c^(Sign[m]*Quotient[m,Sign[m]])*(c*x)^Mod[m,Sign[m]]/x^Mod[m,Sign[m]]*Int[x^m*Pq*(a*x^j+b*x^n)^p,x] /;
FreeQ[{a,b,c,j,n,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && NeQ[n,j] && IntegerQ[Simplify[j/n]] && 
  IntegerQ[Simplify[(m+1)/n]] && RationalQ[m] && GtQ[m^2,1]

Int[(c_*x_)^m_.*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  (c*x)^m/x^m*Int[x^m*Pq*(a*x^j+b*x^n)^p,x] /;
FreeQ[{a,b,c,j,m,n,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && NeQ[n,j] && IntegerQ[Simplify[j/n]] && IntegerQ[Simplify[(m+1)/n]]

3.  ∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ (j|n)∈(SuperPlus[ℤ])

1:  ∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ (j|n|(j/n))∈(SuperPlus[ℤ])∧ m∈ℤ ∧ GCD[m+1,n]≠1

Derivation: Integration by substitution

Basis: If  n∈ℤ ∧ m∈ℤ, let g=GCD[m+1,n], then (x^m)F[(x^n)]==(1/g)Subst[(x^(((m+1)/g)-1))F[(x^(n/g))],x,(x^g)](∂_x)(x^g)

Rule: If  p∉ℤ ∧ (j|n|(j/n))∈(SuperPlus[ℤ])∧ m∈ℤ, let g=GCD[m+1,n], if g≠1, then

∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  ⟶  (1/g) Subst[∫(x^(((m+1)/g)-1)) (Subscript[P, q])[(x^(n/g))] (((a (x^(j/g))+b (x^(n/g))))^p)dx,x,(x^g)]

Program code:

Int[x_^m_.*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  With[{g=GCD[m+1,n]},
  1/g*Subst[Int[x^((m+1)/g-1)*ReplaceAll[Pq,x->x^(1/g)]*(a*x^(j/g)+b*x^(n/g))^p,x],x,x^g] /;
 NeQ[g,1]] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && IGtQ[j,0] && IGtQ[n,0] && IGtQ[j/n,0] && IntegerQ[m]

2:  ∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ (j|n)∈(SuperPlus[ℤ])∧ j<n ∧ q>n-1 ∧ m+q+n p+1≠0

Reference: G&R 2.110.5, CRC 88a

Derivation: Binomial recurrence 3a

Reference: G&R 2.104

Note: This special case of the Ostrogradskiy-Hermite integration method reduces the degree of the polynomial in the resulting integrand.

Rule: If  p∉ℤ ∧ (j|n)∈(SuperPlus[ℤ])∧ j<n ∧ q>n-1 ∧ m+q+n p+1≠0, then

∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  ⟶  

∫(((c x))^m) ((Subscript[P, q])[(x^n)]-(Subscript[P, q])[x,q] (x^q))(((a (x^j)+b (x^n)))^p)dx+(((Subscript[P, q])[x,q])/(c^q))∫(((c x))^(m+q))(((a (x^j)+b (x^n)))^p)dx  ⟶  

(((Subscript[P, q])[x,q] (((c x))^(m+q-n+1)) (((a (x^j)+b (x^n)))^(p+1)))/(b (c^(q-n+1)) (m+q+n p+1)))+
∫(((c x))^m)((Subscript[P, q])[(x^n)]-(Subscript[P, q])[x,q] (x^q)-((a (Subscript[P, q])[x,q] (m+q-n+1)(x^(q-n)))/(b (m+q+n p+1)))) (((a (x^j)+b (x^n)))^p)dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  With[{q=Expon[Pq,x]},
    With[{Pqq=Coeff[Pq,x,q]},
    Pqq*(c*x)^(m+q-n+1)*(a*x^j+b*x^n)^(p+1)/(b*c^(q-n+1)*(m+q+n*p+1)) + 
    Int[(c*x)^m*ExpandToSum[Pq-Pqq*x^q-a*Pqq*(m+q-n+1)*x^(q-n)/(b*(m+q+n*p+1)),x]*(a*x^j+b*x^n)^p,x]] /;
  GtQ[q,n-1] && NeQ[m+q+n*p+1,0] && (IntegerQ[2*p] || IntegerQ[p+(q+1)/(2*n)])] /;
FreeQ[{a,b,c,m,p},x] && PolyQ[Pq,x] && Not[IntegerQ[p]] && IGtQ[j,0] && IGtQ[n,0] && LtQ[j,n]

4.  ∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ (n/(m+1))∈ℤ

1:  ∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ (n/(m+1))∈ℤ

Derivation: Integration by substitution

Basis: If (n/(m+1))∈ℤ, then (x^m)F[(x^n)]==(1/(m+1))Subst[F[(x^(n/(m+1)))],x,(x^(m+1))](∂_x)(x^(m+1))

Rule: If  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ (n/(m+1))∈ℤ

∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  ⟶  (1/(m+1))Subst[∫(Subscript[P, q])[(x^(n/(m+1)))] (((a (x^(j/(m+1)))+b (x^(n/(m+1)))))^p)dx,x,(x^(m+1))]

Program code:

Int[x_^m_.*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  1/(m+1)*Subst[
    Int[ReplaceAll[SubstFor[x^n,Pq,x],x->x^Simplify[n/(m+1)]]*(a*x^Simplify[j/(m+1)]+b*x^Simplify[n/(m+1)])^p,x],x,x^(m+1)] /;
FreeQ[{a,b,j,m,n,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && NeQ[n,j] && IntegerQ[Simplify[j/n]] && 
  IntegerQ[Simplify[n/(m+1)]] && Not[IntegerQ[n]]

2:  ∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ (n/(m+1))∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((c x))^m)/(x^m))==0

Rule: If  p∉ℤ ∧ j≠n ∧ (j/n)∈ℤ ∧ (n/(m+1))∈ℤ, then

∫(((c x))^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx  ⟶  ((((c x))^m)/(x^m))∫(x^m) (Subscript[P, q])[(x^n)] (((a (x^j)+b (x^n)))^p)dx

Program code:

Int[(c_*x_)^m_*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  c^(Sign[m]*Quotient[m,Sign[m]])*(c*x)^Mod[m,Sign[m]]/x^Mod[m,Sign[m]]*Int[x^m*Pq*(a*x^j+b*x^n)^p,x] /;
FreeQ[{a,b,c,j,n,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && NeQ[n,j] && IntegerQ[Simplify[j/n]] && 
  IntegerQ[Simplify[n/(m+1)]] && Not[IntegerQ[n]] && GtQ[m^2,1]

Int[(c_*x_)^m_*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  (c*x)^m/x^m*Int[x^m*Pq*(a*x^j+b*x^n)^p,x] /;
FreeQ[{a,b,c,j,m,n,p},x] && PolyQ[Pq,x^n] && Not[IntegerQ[p]] && NeQ[n,j] && IntegerQ[Simplify[j/n]] && 
  IntegerQ[Simplify[n/(m+1)]] && Not[IntegerQ[n]]

5:  ∫(((c x))^m) (Subscript[P, q])[x] (((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n

Derivation: Algebraic expansion

Rule:

∫(((c x))^m) (Subscript[P, q])[x] (((a (x^j)+b (x^n)))^p)dx  ⟶  ∫ ExpandIntegrand[(((c x))^m) (Subscript[P, q])[x] (((a (x^j)+b (x^n)))^p),x]dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  Int[ExpandIntegrand[(c*x)^m*Pq*(a*x^j+b*x^n)^p,x],x] /;
FreeQ[{a,b,c,j,m,n,p},x] && (PolyQ[Pq,x] || PolyQ[Pq,x^n]) && Not[IntegerQ[p]] && NeQ[n,j]

Int[Pq_*(a_.*x_^j_.+b_.*x_^n_)^p_,x_Symbol] :=
  Int[ExpandIntegrand[Pq*(a*x^j+b*x^n)^p,x],x] /;
FreeQ[{a,b,j,n,p},x] && (PolyQ[Pq,x] || PolyQ[Pq,x^n]) && Not[IntegerQ[p]] && NeQ[n,j]