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

1.  ∫P[x] (((a+b x))^m) (((c+d x))^n) (((e+f x))^p)dx  when  b c+a d==0 ∧ m==n

1:  ∫P[x] (((a+b x))^m) (((c+d x))^n) (((e+f x))^p) dx  when  b c+a d==0 ∧ m==n ∧ (m∈ℤ ∨ a>0 ∧ c>0)

Derivation: Algebraic simplification

Basis: If  b c+a d==0 ∧ (m∈ℤ ∨ a>0 ∧ c>0), then (((a+b x))^m) (((c+d x))^m)==(((a c+b d (x^2)))^m)

Rule: If  b c+a d==0 ∧ m==n ∧ (m∈ℤ ∨ a>0 ∧ c>0), then

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

Program code:

Int[Px_*(a_.+b_.*x_)^m_.*(c_.+d_.*x_)^n_.*(e_.+f_.*x_)^p_.,x_Symbol] :=
  Int[Px*(a*c+b*d*x^2)^m*(e+f*x)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && PolyQ[Px,x] && EqQ[b*c+a*d,0] && EqQ[m,n] && (IntegerQ[m] || GtQ[a,0] && GtQ[c,0])

2:  ∫P[x] (((a+b x))^m) (((c+d x))^n) (((e+f x))^p) dx  when  b c+a d==0 ∧ m==n ∧ m∉ℤ

Derivation: Piecewise constant extraction

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

Rule: If  b c+a d==0 ∧ m==n ∧ m∉ℤ, then

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

Program code:

Int[Px_*(a_.+b_.*x_)^m_*(c_.+d_.*x_)^n_*(e_.+f_.*x_)^p_.,x_Symbol] :=
  (a+b*x)^FracPart[m]*(c+d*x)^FracPart[m]/(a*c+b*d*x^2)^FracPart[m]*Int[Px*(a*c+b*d*x^2)^m*(e+f*x)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && PolyQ[Px,x] && EqQ[b*c+a*d,0] && EqQ[m,n] && Not[IntegerQ[m]]

2:  ∫P[x] (((a+b x))^m) (((c+d x))^n) (((e+f x))^p)dx  when  PolynomialRemainder[P[x],a+b x,x]==0

Derivation: Algebraic expansion

Basis: If  PolynomialRemainder[P[x],a+b x,x]==0, then P[x]==(a+b x) PolynomialQuotient[P[x],a+b x,x]

Rule: If  PolynomialRemainder[P[x],a+b x,x]==0, then

∫P[x] (((a+b x))^m) (((c+d x))^n) (((e+f x))^p)dx  ⟶  ∫PolynomialQuotient[P[x],a+b x,x] (((a+b x))^(m+1)) (((c+d x))^n) (((e+f x))^p)dx

Program code:

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

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

Derivation: Algebraic expansion

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

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

Program code:

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

4:  ∫P[x] (((a+b x))^m) (((c+d x))^n) (((e+f x))^p)dx  when  m<-1

Derivation: Algebraic expansion and nondegenerate trilinear recurrence 3

Basis: Let Q[x]->PolynomialQuotient[P[x],a+b x,x]and R->PolynomialRemainder[P[x],a+b x,x], then P[x]==Q[x] (a+b x)+R

Note: If the integrand has a negative integer exponent, incrementing it, rather than another negative fractional exponent, produces simpler antiderivatives.

Rule: If  m<-1, let Q[x]->PolynomialQuotient[P[x],a+b x,x]and R->PolynomialRemainder[P[x],a+b x,x], then

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

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

((b R (((a+b x))^(m+1)) (((c+d x))^(n+1)) (((e+f x))^(p+1)))/((m+1) (b c-a d) (b e-a f)))+
(1/((m+1) (b c-a d) (b e-a f))) ∫(((a+b x))^(m+1)) (((c+d x))^n) (((e+f x))^p)·
((m+1) (b c-a d) (b e-a f)Q[x]+ a d f R (m+1)-b R (d e (m+n+2)+c f (m+p+2))-b d f R (m+n+p+3) x)dx

Program code:

Int[Px_*(a_.+b_.*x_)^m_*(c_.+d_.*x_)^n_.*(e_.+f_.*x_)^p_.,x_Symbol] :=
  With[{Qx=PolynomialQuotient[Px,a+b*x,x], R=PolynomialRemainder[Px,a+b*x,x]},
  b*R*(a+b*x)^(m+1)*(c+d*x)^(n+1)*(e+f*x)^(p+1)/((m+1)*(b*c-a*d)*(b*e-a*f)) + 
  1/((m+1)*(b*c-a*d)*(b*e-a*f))*Int[(a+b*x)^(m+1)*(c+d*x)^n*(e+f*x)^p*
    ExpandToSum[(m+1)*(b*c-a*d)*(b*e-a*f)*Qx+a*d*f*R*(m+1)-b*R*(d*e*(m+n+2)+c*f*(m+p+2))-b*d*f*R*(m+n+p+3)*x,x],x]] /;
FreeQ[{a,b,c,d,e,f,n,p},x] && PolyQ[Px,x] && ILtQ[m,-1]

Int[Px_*(a_.+b_.*x_)^m_*(c_.+d_.*x_)^n_.*(e_.+f_.*x_)^p_.,x_Symbol] :=
  With[{Qx=PolynomialQuotient[Px,a+b*x,x], R=PolynomialRemainder[Px,a+b*x,x]},
  b*R*(a+b*x)^(m+1)*(c+d*x)^(n+1)*(e+f*x)^(p+1)/((m+1)*(b*c-a*d)*(b*e-a*f)) + 
  1/((m+1)*(b*c-a*d)*(b*e-a*f))*Int[(a+b*x)^(m+1)*(c+d*x)^n*(e+f*x)^p*
    ExpandToSum[(m+1)*(b*c-a*d)*(b*e-a*f)*Qx+a*d*f*R*(m+1)-b*R*(d*e*(m+n+2)+c*f*(m+p+2))-b*d*f*R*(m+n+p+3)*x,x],x]] /;
FreeQ[{a,b,c,d,e,f,n,p},x] && PolyQ[Px,x] && LtQ[m,-1] && IntegersQ[2*m,2*n,2*p]

5:  ∫(Subscript[P, q])[x] (((a+b x))^m) (((c+d x))^n) (((e+f x))^p)dx  when  m+n+p+q+1≠0

Derivation: Algebraic expansion and nondegenerate trilinear recurrence 2

Rule: If  m+n+p+q+1≠0, then

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

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

(((Subscript[P, q])[x,q] (((a+b x))^(m+q-1)) (((c+d x))^(n+1)) (((e+f x))^(p+1)))/(d f (b^(q-1)) (m+n+p+q+1)))+
(1/(d f (b^q) (m+n+p+q+1))) ∫(((a+b x))^m) (((c+d x))^n) (((e+f x))^p)·
(d f (b^q) (m+n+p+q+1) (Subscript[P, q])[x]-d f (Subscript[P, q])[x,q] (m+n+p+q+1) (((a+b x))^q)+
(Subscript[P, q])[x,q] (((a+b x))^(q-2)) ((a^2) d f (m+n+p+q+1)-b (b c e (m+q-1)+a (d e (n+1)+c f (p+1)))+
b (a d f (2 (m+q)+n+p)-b (d e (m+q+n)+c f (m+q+p))) x))dx

Program code:

Int[Px_*(a_.+b_.*x_)^m_.*(c_.+d_.*x_)^n_.*(e_.+f_.*x_)^p_.,x_Symbol] :=
  With[{q=Expon[Px,x],k=Coeff[Px,x,Expon[Px,x]]},
  k*(a+b*x)^(m+q-1)*(c+d*x)^(n+1)*(e+f*x)^(p+1)/(d*f*b^(q-1)*(m+n+p+q+1)) + 
  1/(d*f*b^q*(m+n+p+q+1))*Int[(a+b*x)^m*(c+d*x)^n*(e+f*x)^p*
    ExpandToSum[d*f*b^q*(m+n+p+q+1)*Px-d*f*k*(m+n+p+q+1)*(a+b*x)^q + 
      k*(a+b*x)^(q-2)*(a^2*d*f*(m+n+p+q+1)-b*(b*c*e*(m+q-1)+a*(d*e*(n+1)+c*f*(p+1)))+
        b*(a*d*f*(2*(m+q)+n+p)-b*(d*e*(m+q+n)+c*f*(m+q+p)))*x),x],x] /;
  NeQ[m+n+p+q+1,0]] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && PolyQ[Px,x]