Rules for integrands of the form(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)
when e f-d g≠0

0:  ∫(((e x))^m) (f+g x) (((b x+c (x^2)))^p)dx  when b g (m+p+1)-c f (m+2 p+2)==0 ∧ m+2 p+2≠0

Rule 1.2.1.3.0: If  b g (m+p+1)-c f (m+2 p+2)==0 ∧ m+2 p+2≠0, then

∫(((e x))^m) (f+g x) (((b x+c (x^2)))^p)dx  ⟶  ((g (((e x))^m) (((b x+c (x^2)))^(p+1)))/(c (m+2 p+2)))

Program code:

Int[(e_.*x_)^m_.*(f_+g_.*x_)*(b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  g*(e*x)^m*(b*x+c*x^2)^(p+1)/(c*(m+2*p+2)) /;
FreeQ[{b,c,e,f,g,m,p},x] && EqQ[b*g*(m+p+1)-c*f*(m+2*p+2),0] && NeQ[m+2*p+2,0]

1:  ∫(x^m) (f+g x) (((a+c (x^2)))^p)dx  when  m∈ℤ ∧ 2 p∉ℤ

Derivation: Algebraic expansion

Rule 1.2.1.3.1: If  m∈ℤ ∧ 2 p∉ℤ, then

∫(x^m) (f+g x) (((a+c (x^2)))^p)dx  ⟶  f ∫(x^m) (((a+c (x^2)))^p)dx+g ∫(x^(m+1)) (((a+c (x^2)))^p)dx

Program code:

Int[x_^m_.*(f_+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  f*Int[x^m*(a+c*x^2)^p,x] + g*Int[x^(m+1)*(a+c*x^2)^p,x] /;
FreeQ[{a,c,f,g,p},x] && IntegerQ[m] && Not[IntegerQ[2*p]]

2:  ∫(((e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when  p∈ℤ ∧ (p>0 ∨ a==0∧m∈ℤ)

Derivation: Algebraic expansion

Rule 1.2.1.3.2: If  p∈ℤ ∧ (p>0 ∨ a==0∧m∈ℤ), then

∫(((e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  ∫ExpandIntegrand[(((e x))^m) (f+g x) (((a+b x+c (x^2)))^p),x]dx

Program code:

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

Int[(e_.*x_)^m_.*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  Int[ExpandIntegrand[(e*x)^m*(f+g*x)*(a+c*x^2)^p,x],x] /;
FreeQ[{a,c,e,f,g,m},x] && IGtQ[p,0]

3:  ∫(((d+e x))^m)(f+g x)(((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c==0 ∧ m+2 p+3==0 ∧ 2 c f-b g==0

Derivation: Quadratic recurrence 2a with 2 c f-b g==0 : square quadratic recurrence 3b with m+2 p+3==0

Rule 1.2.1.3.3: If  (b^2)-4 a c==0 ∧ m+2 p+3==0 ∧ 2 c f-b g==0, then

∫(((d+e x))^m)(f+g x)(((a+b x+c (x^2)))^p)dx  ⟶  -((f g (((d+e x))^(m+1)) (((a+b x+c (x^2)))^(p+1)))/(b(p+1)(e f-d g)))

Program code:

Int[(d_.+e_.*x_)^m_.*(f_+g_.*x_)*(a_+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  -f*g*(d+e*x)^(m+1)*(a+b*x+c*x^2)^(p+1)/(b*(p+1)*(e*f-d*g)) /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && EqQ[b^2-4*a*c,0] && EqQ[m+2*p+3,0] && EqQ[2*c*f-b*g,0]

4:  ∫(((d+e x))^m) (f+g x)(((a+b x+c (x^2)))^p)dx  when  2 c f-b g==0 ∧ p<-1 ∧ m>0

Derivation: Integration by parts

Basis: If  2 c f-b g==0, then (∂_x)((g (((a+b x+c (x^2)))^(p+1)))/(2 c (p+1)))==(f+g x) (((a+b x+c (x^2)))^p)

Rule 1.2.1.3.4: If  2 c f-b g==0 ∧ p<-1 ∧ m>0, then

∫(((d+e x))^m)(f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  ((g (((d+e x))^m) (((a+b x+c (x^2)))^(p+1)))/(2 c (p+1)))-((e g m)/(2 c (p+1)))∫(((d+e x))^(m-1)) (((a+b x+c (x^2)))^(p+1))dx

Program code:

Int[(d_.+e_.*x_)^m_.*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  g*(d+e*x)^m*(a+b*x+c*x^2)^(p+1)/(2*c*(p+1)) - 
  e*g*m/(2*c*(p+1))*Int[(d+e*x)^(m-1)*(a+b*x+c*x^2)^(p+1),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && EqQ[2*c*f-b*g,0] && LtQ[p,-1] && GtQ[m,0]

5.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0

1:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c==0 ∧ m+2 p+3==0 ∧ 2 c f-b g≠0 ∧ 2 c d-b e≠0

Derivation: Algebraic expansion

Basis: f+g x==(((2 c f-b g) (d+e x))/(2 c d-b e))-(((e f-d g) (b+2 c x))/(2 c d-b e))

Rule 1.2.1.3.5: If  (b^2)-4 a c==0 ∧ m+2 p+3==0 ∧ 2 c f-b g≠0 ∧ 2 c d-b e≠0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
-((2 c (e f-d g) (((d+e x))^(m+1)) (((a+b x+c (x^2)))^(p+1)))/((p+1) (((2 c d-b e))^2)))+((2 c f-b g)/(2 c d-b e))∫(((d+e x))^(m+1))(((a+b x+c (x^2)))^p)dx

Program code:

Int[(d_.+e_.*x_)^m_.*(f_.+g_.*x_)*(a_+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  -2*c*(e*f-d*g)*(d+e*x)^(m+1)*(a+b*x+c*x^2)^(p+1)/((p+1)*(2*c*d-b*e)^2) + 
  (2*c*f-b*g)/(2*c*d-b*e)*Int[(d+e*x)^(m+1)*(a+b*x+c*x^2)^p,x] /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && EqQ[b^2-4*a*c,0] && EqQ[m+2*p+3,0] && NeQ[2*c*f-b*g,0] && NeQ[2*c*d-b*e,0]

2:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c==0

Derivation: Piecewise constant extraction

Basis: If  (b^2)-4 a c==0, then (∂_x)((((a+b x+c (x^2)))^p)/((((b/2)+c x))^(2 p)))==0

Rule 1.2.1.3.6: If  (b^2)-4 a c==0, then

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

Program code:

Int[(d_.+e_.*x_)^m_.*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  (a+b*x+c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2+c*x)^(2*FracPart[p]))*Int[(d+e*x)^m*(f+g*x)*(b/2+c*x)^(2*p),x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && EqQ[b^2-4*a*c,0]

6:  ∫(((d+e x))^m) (f+g x)(((a+b x+c (x^2)))^p)dx  when  (b^2)-4 a c≠0 ∧ p∈ℤ ∧ (p>0 ∨ a==0∧m∈ℤ)

Derivation: Algebraic expansion

Rule 1.2.1.3.6: If  (b^2)-4 a c≠0 ∧ p∈(SuperPlus[ℤ]), then

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

Program code:

Int[(d_.+e_.*x_)^m_.*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  Int[ExpandIntegrand[(d+e*x)^m*(f+g*x)*(a+b*x+c*x^2)^p,x],x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && NeQ[b^2-4*a*c,0] && IntegerQ[p] && (GtQ[p,0] || EqQ[a,0] && IntegerQ[m])

Int[(d_.+e_.*x_)^m_.*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  Int[ExpandIntegrand[(d+e*x)^m*(f+g*x)*(a+c*x^2)^p,x],x] /;
FreeQ[{a,c,d,e,f,g,m},x] && IGtQ[p,0]

7.  ∫(d+e x) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0

1:  ∫(((d+e x) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0

Derivation: Algebraic expansion

Rule 1.2.1.3.7.1: If  (b^2)-4 a c≠0, then

∫(((d+e x) (f+g x))/(a+b x+c (x^2)))dx  ⟶  ((e g x)/c)+(1/c) ∫((c d f-a e g+(c e f+c d g-b e g) x)/(a+b x+c (x^2)))dx

Program code:

Int[(d_.+e_.*x_)*(f_+g_.*x_)/(a_.+b_.*x_+c_.*x_^2),x_Symbol] :=
  e*g*x/c + 1/c*Int[(c*d*f-a*e*g+(c*e*f+c*d*g-b*e*g)*x)/(a+b*x+c*x^2),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0]

Int[(d_.+e_.*x_)*(f_+g_.*x_)/(a_+c_.*x_^2),x_Symbol] :=
  e*g*x/c + 1/c*Int[(c*d*f-a*e*g+c*(e*f+d*g)*x)/(a+c*x^2),x] /;
FreeQ[{a,c,d,e,f,g},x]

2:  ∫(d+e x) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ (b^2) e g (p+2)-2 a c e g+c (2 c d f-b (e f+d g)) (2 p+3)==0 ∧ p≠-1

Derivation: ???

Note: If  (b^2)-4 a c≠0 ∧ (b^2) e g (p+2)-2 a c e g+c (2 c d f-b (e f+d g)) (2 p+3)==0, then p≠-(3/2).

Rule 1.2.1.3.7.2: If  (b^2)-4 a c≠0 ∧ (b^2) e g (p+2)-2 a c e g+c (2 c d f-b (e f+d g)) (2 p+3)==0 ∧ p≠-1, then

∫(d+e x) (f+g x)(((a+b x+c (x^2)))^p)dx  ⟶  -(((b e g (p+2)-c (e f+d g) (2 p+3)-2 c e g (p+1) x) (((a+b x+c (x^2)))^(p+1)))/(2 (c^2) (p+1) (2 p+3)))

Program code:

Int[(d_.+e_.*x_)*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  -(b*e*g*(p+2)-c*(e*f+d*g)*(2*p+3)-2*c*e*g*(p+1)*x)*(a+b*x+c*x^2)^(p+1)/(2*c^2*(p+1)*(2*p+3)) /;
FreeQ[{a,b,c,d,e,f,g,p},x] && NeQ[b^2-4*a*c,0] && EqQ[b^2*e*g*(p+2)-2*a*c*e*g+c*(2*c*d*f-b*(e*f+d*g))*(2*p+3),0] && NeQ[p,-1]

Int[(d_.+e_.*x_)*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  ((e*f+d*g)*(2*p+3)+2*e*g*(p+1)*x)*(a+c*x^2)^(p+1)/(2*c*(p+1)*(2*p+3)) /;
FreeQ[{a,c,d,e,f,g,p},x] && EqQ[a*e*g-c*d*f*(2*p+3),0] && NeQ[p,-1]

3:  ∫(d+e x) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ p<-1

Derivation: ???

Rule 1.2.1.3.7.3: If  (b^2)-4 a c≠0 ∧ p<-1, then

∫(d+e x) (f+g x)(((a+b x+c (x^2)))^p)dx  ⟶  
-(((2 a c (e f+d g)-b (c d f+a e g)-((b^2) e g-b c (e f+d g)+2 c (c d f-a e g)) x) (((a+b x+c (x^2)))^(p+1)))/(c (p+1) ((b^2)-4 a c)))-
(((b^2) e g (p+2)-2 a c e g+c (2 c d f-b (e f+d g)) (2 p+3))/(c (p+1) ((b^2)-4 a c)))∫(((a+b x+c (x^2)))^(p+1))dx

Program code:

Int[(d_.+e_.*x_)*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  -(2*a*c*(e*f+d*g)-b*(c*d*f+a*e*g)-(b^2*e*g-b*c*(e*f+d*g)+2*c*(c*d*f-a*e*g))*x)*(a+b*x+c*x^2)^(p+1)/(c*(p+1)*(b^2-4*a*c)) - 
  (b^2*e*g*(p+2)-2*a*c*e*g+c*(2*c*d*f-b*(e*f+d*g))*(2*p+3))/(c*(p+1)*(b^2-4*a*c))*Int[(a+b*x+c*x^2)^(p+1),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && LtQ[p,-1]

Int[(d_.+e_.*x_)*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  (a*(e*f+d*g)-(c*d*f-a*e*g)*x)*(a+c*x^2)^(p+1)/(2*a*c*(p+1)) - 
  (a*e*g-c*d*f*(2*p+3))/(2*a*c*(p+1))*Int[(a+c*x^2)^(p+1),x] /;
FreeQ[{a,c,d,e,f,g},x] && LtQ[p,-1]

4:  ∫(d+e x) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ p≰-1

Derivation: ???

Rule 1.2.1.3.7.4: If  (b^2)-4 a c≠0 ∧ p≰-1, then

∫(d+e x) (f+g x)(((a+b x+c (x^2)))^p)dx  ⟶  
-(((b e g (p+2)-c (e f+d g) (2 p+3)-2 c e g (p+1) x) (((a+b x+c (x^2)))^(p+1)))/(2 (c^2) (p+1) (2 p+3)))+
(((b^2) e g (p+2)-2 a c e g+c (2 c d f-b (e f+d g)) (2 p+3))/(2 (c^2) (2 p+3)))∫(((a+b x+c (x^2)))^p)dx

Program code:

Int[(d_.+e_.*x_)*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  -(b*e*g*(p+2)-c*(e*f+d*g)*(2*p+3)-2*c*e*g*(p+1)*x)*(a+b*x+c*x^2)^(p+1)/(2*c^2*(p+1)*(2*p+3)) + 
  (b^2*e*g*(p+2)-2*a*c*e*g+c*(2*c*d*f-b*(e*f+d*g))*(2*p+3))/(2*c^2*(2*p+3))*Int[(a+b*x+c*x^2)^p,x] /;
FreeQ[{a,b,c,d,e,f,g,p},x] && NeQ[b^2-4*a*c,0] && Not[LeQ[p,-1]]

Int[(d_.+e_.*x_)*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  ((e*f+d*g)*(2*p+3)+2*e*g*(p+1)*x)*(a+c*x^2)^(p+1)/(2*c*(p+1)*(2*p+3)) - 
  (a*e*g-c*d*f*(2*p+3))/(c*(2*p+3))*Int[(a+c*x^2)^p,x] /;
FreeQ[{a,c,d,e,f,g,p},x] && Not[LeQ[p,-1]]

8.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0

1.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ p∈ℤ

1:  ∫(((e x))^m) (f+g x) (((b x+c (x^2)))^p)dx  when p∈ℤ

Derivation: Algebraic simplification

Rule 1.2.1.2.8.1.1: If  p∈ℤ, then

∫(((e x))^m) (f+g x) (((b x+c (x^2)))^p)dx  ⟶  (1/(e^p)) ∫(((e x))^(m+p)) (f+g x) (((b+c x))^p)dx

Program code:

Int[(e_.*x_)^m_.*(f_.+g_.*x_)*(b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  1/e^p*Int[(e*x)^(m+p)*(f+g*x)*(b+c*x)^p,x] /;
FreeQ[{b,c,e,f,g,m},x] && IntegerQ[p]

2:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ p∈ℤ

Derivation: Algebraic simplification

Basis: If  c (d^2)-b d e+a (e^2)==0, then a+b x+c (x^2)==(d+e x) ((a/d)+((c x)/e))

Rule 1.2.1.3.8.1.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ p∈ℤ, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  ∫(((d+e x))^(m+p)) (f+g x) ((((a/d)+((c x)/e)))^p)dx

Program code:

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  Int[(d+e*x)^(m+p)*(f+g*x)*(a/d+c/e*x)^p,x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && IntegerQ[p]

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

2.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ p∉ℤ

0:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ p∉ℤ ∧ m∈(SuperMinus[ℤ])                    ?????

Derivation: Algebraic simplification

Basis: If  c (d^2)-b d e+a (e^2)==0, then d+e x==((d e (a+b x+c (x^2)))/(a e+c d x))

Basis: If  c (d^2)+a (e^2)==0, then d+e x==(((d^2)(a+c (x^2)))/(a(d-e x)))

Rule 1.2.1.3.8.2.0: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ m∈(SuperMinus[ℤ]), then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  (d^m) (e^m) ∫(((f+g x) (((a+b x+c (x^2)))^(m+p)))/(((a e+c d x))^m))dx

Program code:

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  d^m*e^m*Int[(f+g*x)*(a+b*x+c*x^2)^(m+p)/(a*e+c*d*x)^m,x] /;
FreeQ[{a,b,c,d,e,f,g,p},x] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && Not[IntegerQ[2*p]] && ILtQ[m,0]

Int[x_*(d_+e_.*x_)^m_*(a_+c_.*x_^2)^p_,x_Symbol] :=
  d^m*e^m*Int[x*(a+c*x^2)^(m+p)/(a*e+c*d*x)^m,x] /;
FreeQ[{a,c,d,e,p},x] && EqQ[c*d^2+a*e^2,0] && Not[IntegerQ[p]] && ILtQ[m,0]          && EqQ[m,-1] && Not[ILtQ[p-1/2,0]]

1:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ m(g (c d-b e)+c e f)+e(p+1)(2 c f-b g)==0

Derivation: Quadratic recurrence 3a with c (d^2)-b d e+a (e^2)==0 and m(g (c d-b e)+c e f)+e(p+1)(2 c f-b g)==0

Note: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ m(g (c d-b e)+c e f)+e(p+1)(2 c f-b g)==0, then m+2 p+2≠0.

Rule 1.2.1.3.8.2.1: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ m(g (c d-b e)+c e f)+e(p+1)(2 c f-b g)==0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  ((g(((d+e x))^m) (((a+b x+c (x^2)))^(p+1)))/(c(m+2 p+2)))

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  g*(d+e*x)^m*(a+b*x+c*x^2)^(p+1)/(c*(m+2*p+2)) /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && EqQ[m*(g*(c*d-b*e)+c*e*f)+e*(p+1)*(2*c*f-b*g),0]

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  g*(d+e*x)^m*(a+c*x^2)^(p+1)/(c*(m+2*p+2)) /;
FreeQ[{a,c,d,e,f,g,m,p},x] && EqQ[c*d^2+a*e^2,0] && EqQ[m*(d*g+e*f)+2*e*f*(p+1),0]

2:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ p<-1 ∧ m>0

Derivation: Quadratic recurrence 3a with c (d^2)-b d e+a (e^2)=0 : special quadratic recurrence 2b

Note: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0, then 2 c d-b e≠0.

Rule 1.2.1.3.8.2.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ p<-1 ∧ m>0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((g (c d-b e)+c e f) (((d+e x))^m) (((a+b x+c (x^2)))^(p+1)))/(c (p+1)(2 c d-b e)))-((e(m(g (c d-b e)+c e f)+e(p+1)(2 c f-b g)))/(c (p+1)(2 c d-b e)))∫(((d+e x))^(m-1)) (((a+b x+c (x^2)))^(p+1))dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  (g*(c*d-b*e)+c*e*f)*(d+e*x)^m*(a+b*x+c*x^2)^(p+1)/(c*(p+1)*(2*c*d-b*e)) - 
  e*(m*(g*(c*d-b*e)+c*e*f)+e*(p+1)*(2*c*f-b*g))/(c*(p+1)*(2*c*d-b*e))*
    Int[(d+e*x)^(m-1)*(a+b*x+c*x^2)^(p+1),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && LtQ[p,-1] && GtQ[m,0]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  (d*g+e*f)*(d+e*x)^m*(a+c*x^2)^(p+1)/(2*c*d*(p+1)) - 
  e*(m*(d*g+e*f)+2*e*f*(p+1))/(2*c*d*(p+1))*Int[(d+e*x)^(m-1)*(a+c*x^2)^(p+1),x] /;
FreeQ[{a,c,d,e,f,g},x] && EqQ[c*d^2+a*e^2,0] && LtQ[p,-1] && GtQ[m,0]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  (g*(c*d-b*e)+c*e*f)*(d+e*x)^m*(a+b*x+c*x^2)^(p+1)/(c*(p+1)*(2*c*d-b*e)) - 
  e*(m*(g*(c*d-b*e)+c*e*f)+e*(p+1)*(2*c*f-b*g))/(c*(p+1)*(2*c*d-b*e))*
    Int[(d+e*x)^Simplify[m-1]*(a+b*x+c*x^2)^Simplify[p+1],x] /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && SumSimplerQ[p,1] && SumSimplerQ[m,-1] && NeQ[p,-1]

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  (d*g+e*f)*(d+e*x)^m*(a+c*x^2)^(p+1)/(2*c*d*(p+1)) - 
  e*(m*(d*g+e*f)+2*e*f*(p+1))/(2*c*d*(p+1))*Int[(d+e*x)^Simplify[m-1]*(a+c*x^2)^Simplify[p+1],x] /;
FreeQ[{a,c,d,e,f,g,m,p},x] && EqQ[c*d^2+a*e^2,0] && SumSimplerQ[p,1] && SumSimplerQ[m,-1] && NeQ[p,-1] && Not[IGtQ[m,0]]

3:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ (m≤-1 ∨ m+2 p+2==0) ∧ m+p+1≠0

Derivation: Quadratic recurrence 3a with c (d^2)-b d e+a (e^2)=0

Note: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0, then 2 c d-b e≠0.

Rule 1.2.1.3.8.2.3: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ (m≤-1 ∨ m+2 p+2==0) ∧ m+p+1≠0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((d g-e f) (((d+e x))^m) (((a+b x+c (x^2)))^(p+1)))/((2 c d-b e) (m+p+1)))+((m(g (c d-b e)+c e f)+e(p+1)(2 c f-b g))/(e (2 c d-b e) (m+p+1)))∫(((d+e x))^(m+1)) (((a+b x+c (x^2)))^p)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  (d*g-e*f)*(d+e*x)^m*(a+b*x+c*x^2)^(p+1)/((2*c*d-b*e)*(m+p+1)) + 
  (m*(g*(c*d-b*e)+c*e*f)+e*(p+1)*(2*c*f-b*g))/(e*(2*c*d-b*e)*(m+p+1))*Int[(d+e*x)^(m+1)*(a+b*x+c*x^2)^p,x] /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && 
  (LtQ[m,-1] && Not[IGtQ[m+p+1,0]] || LtQ[m,0] && LtQ[p,-1] || EqQ[m+2*p+2,0]) && NeQ[m+p+1,0]

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  (d*g-e*f)*(d+e*x)^m*(a+c*x^2)^(p+1)/(2*c*d*(m+p+1)) + 
  (m*(g*c*d+c*e*f)+2*e*c*f*(p+1))/(e*(2*c*d)*(m+p+1))*Int[(d+e*x)^(m+1)*(a+c*x^2)^p,x] /;
FreeQ[{a,c,d,e,f,g,m,p},x] && EqQ[c*d^2+a*e^2,0] && 
  (LtQ[m,-1] && Not[IGtQ[m+p+1,0]] || LtQ[m,0] && LtQ[p,-1] || EqQ[m+2*p+2,0]) && NeQ[m+p+1,0]

4:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ m+2 p+2≠0

Derivation: Quadratic recurrence 3a with c (d^2)-b d e+a (e^2)==0

Rule 1.2.1.3.8.2.4: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)==0 ∧ m+2 p+2≠0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
((g(((d+e x))^m) (((a+b x+c (x^2)))^(p+1)))/(c(m+2 p+2)))+((m(g (c d-b e)+c e f)+e(p+1)(2 c f-b g))/(c e (m+2 p+2)))∫(((d+e x))^m)(((a+b x+c (x^2)))^p)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  g*(d+e*x)^m*(a+b*x+c*x^2)^(p+1)/(c*(m+2*p+2)) + 
  (m*(g*(c*d-b*e)+c*e*f)+e*(p+1)*(2*c*f-b*g))/(c*e*(m+2*p+2))*Int[(d+e*x)^m*(a+b*x+c*x^2)^p,x] /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && NeQ[m+2*p+2,0] && (NeQ[m,2] || EqQ[d,0])

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  g*(d+e*x)^m*(a+c*x^2)^(p+1)/(c*(m+2*p+2)) + 
  (m*(d*g+e*f)+2*e*f*(p+1))/(e*(m+2*p+2))*Int[(d+e*x)^m*(a+c*x^2)^p,x] /;
FreeQ[{a,c,d,e,f,g,m,p},x] && EqQ[c*d^2+a*e^2,0] && NeQ[m+2*p+2,0] && NeQ[m,2]

5.  ∫(x^2) (f+g x) (((a+c (x^2)))^p)dx  when a (g^2)+(f^2) c==0

1:  ∫(x^2) (f+g x) (((a+c (x^2)))^p)dx  when a (g^2)+(f^2) c==0 ∧ p<-2

Derivation: Quadratic recurrence 2a

Rule 1.2.1.3.8.2.5.1: If  a (g^2)+(f^2) c==0 ∧ p<-2, then

∫(x^2) (f+g x) (((a+c (x^2)))^p)dx  ⟶  (((x^2) (a g-c f x) (((a+c (x^2)))^(p+1)))/(2 a c (p+1)))-(1/(2 a c (p+1)))∫x (2 a g-c f (2 p+5) x) (((a+c (x^2)))^(p+1))dx

Program code:

Int[x_^2*(f_+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  x^2*(a*g-c*f*x)*(a+c*x^2)^(p+1)/(2*a*c*(p+1)) - 
  1/(2*a*c*(p+1))*Int[x*Simp[2*a*g-c*f*(2*p+5)*x,x]*(a+c*x^2)^(p+1),x] /;
FreeQ[{a,c,f,g},x] && EqQ[a*g^2+f^2*c,0] && LtQ[p,-2]

2:  ∫(x^2) (f+g x) (((a+c (x^2)))^p)dx  when a (g^2)+(f^2) c==0

Derivation: Algebraic expansion

Basis: (x^2) (f+g x)==(((f+g x) (a+c (x^2)))/c)-((a (f+g x))/c)

Rule 1.2.1.3.8.2.5.2: If  a (g^2)+(f^2) c==0, then

∫(x^2) (f+g x) (((a+c (x^2)))^p)dx  ⟶  (1/c)∫(f+g x) (((a+c (x^2)))^(p+1))dx-(a/c)∫(f+g x) (((a+c (x^2)))^p)dx

Program code:

Int[x_^2*(f_+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  1/c*Int[(f+g*x)*(a+c*x^2)^(p+1),x] - a/c*Int[(f+g*x)*(a+c*x^2)^p,x] /;
FreeQ[{a,c,f,g,p},x] && EqQ[a*g^2+f^2*c,0]

?:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (f^2)-b f g+a (g^2)==0 ∧ p∈ℤ

Derivation: Algebraic simplification

Basis: If  c (f^2)-b f g+a (g^2)==0, then a+b x+c (x^2)==(f+g x) ((a/f)+((c x)/g))

Rule 1.2.1.3.8.1.2: If  (b^2)-4 a c≠0 ∧ c (f^2)-b f g+a (g^2)==0 ∧ p∈ℤ, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  ∫(((d+e x))^m) (((f+g x))^(p+1)) ((((a/f)+((c x)/g)))^p)dx

Program code:

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  Int[(d+e*x)^m*(f+g*x)^(p+1)*(a/f+c/g*x)^p,x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && NeQ[b^2-4*a*c,0] && EqQ[c*f^2-b*f*g+a*g^2,0] && IntegerQ[p]

Int[(d_+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+c_.*x_^2)^p_.,x_Symbol] :=
  Int[(d+e*x)^m*(f+g*x)^(p+1)*(a/f+c/g*x)^p,x] /;
FreeQ[{a,c,d,e,f,g,m},x] && EqQ[c*f^2+a*g^2,0] && (IntegerQ[p] || GtQ[a,0] && GtQ[f,0] && EqQ[p,-1])

9:  ∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∈ℤ

Derivation: Algebraic expansion

Rule 1.2.1.3.9: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∈ℤ, then

∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  ⟶  ∫ExpandIntegrand[(((((d+e x))^m) (f+g x))/(a+b x+c (x^2))),x]dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_.+b_.*x_+c_.*x_^2),x_Symbol] :=
  Int[ExpandIntegrand[(d+e*x)^m*(f+g*x)/(a+b*x+c*x^2),x],x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && IntegerQ[m]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_+c_.*x_^2),x_Symbol] :=
  Int[ExpandIntegrand[(d+e*x)^m*(f+g*x)/(a+c*x^2),x],x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && IntegerQ[m]

10.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m+2 p+3==0

1:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m+2 p+3==0 ∧ b (e f+d g)-2 (c d f+a e g)==0

Derivation: Quadratic recurrence 3b

Rule 1.2.1.3.10.1: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m+2 p+3==0 ∧ p≠-1 ∧ b (e f+d g)-2 (c d f+a e g)==0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  -(((e f-d g) (((d+e x))^(m+1)) (((a+b x+c (x^2)))^(p+1)))/(2(p+1) (c (d^2)-b d e+a (e^2))))

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  -(e*f-d*g)*(d+e*x)^(m+1)*(a+b*x+c*x^2)^(p+1)/(2*(p+1)*(c*d^2-b*d*e+a*e^2)) /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && EqQ[Simplify[m+2*p+3],0] && EqQ[b*(e*f+d*g)-2*(c*d*f+a*e*g),0]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  -(e*f-d*g)*(d+e*x)^(m+1)*(a+c*x^2)^(p+1)/(2*(p+1)*(c*d^2+a*e^2)) /;
FreeQ[{a,c,d,e,f,g,m,p},x] && NeQ[c*d^2+a*e^2,0] && EqQ[Simplify[m+2*p+3],0] && EqQ[c*d*f+a*e*g,0]

2:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m+2 p+3==0 ∧ p<-1

Derivation: Quadratic recurrence 2a

Rule 1.2.1.3.10.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m+2 p+3==0 ∧ p<-1, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((((d+e x))^m) (((a+b x+c (x^2)))^(p+1))(b f-2 a g+(2 c f-b g) x))/((p+1) ((b^2)-4 a c)))+((m(b (e f+d g)-2 (c d f+a e g)))/((p+1) ((b^2)-4 a c)))∫(((d+e x))^(m-1)) (((a+b x+c (x^2)))^(p+1))dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  (d+e*x)^m*(a+b*x+c*x^2)^(p+1)*(b*f-2*a*g+(2*c*f-b*g)*x)/((p+1)*(b^2-4*a*c)) - 
  m*(b*(e*f+d*g)-2*(c*d*f+a*e*g))/((p+1)*(b^2-4*a*c))*Int[(d+e*x)^(m-1)*(a+b*x+c*x^2)^(p+1),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && EqQ[Simplify[m+2*p+3],0] && LtQ[p,-1]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  (d+e*x)^m*(a+c*x^2)^(p+1)*(a*g-c*f*x)/(2*a*c*(p+1)) - 
  m*(c*d*f+a*e*g)/(2*a*c*(p+1))*Int[(d+e*x)^(m-1)*(a+c*x^2)^(p+1),x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && EqQ[Simplify[m+2*p+3],0] && LtQ[p,-1]

3:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m+2 p+3==0 ∧ p≰-1

Derivation: Quadratic recurrence 3b

Rule 1.2.1.3.10.3: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m+2 p+3==0 ∧ p≰-1, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
-(((e f-d g) (((d+e x))^(m+1)) (((a+b x+c (x^2)))^(p+1)))/(2(p+1) (c (d^2)-b d e+a (e^2))))-((b (e f+d g)-2 (c d f+a e g))/(2 (c (d^2)-b d e+a (e^2)))) ∫(((d+e x))^(m+1)) (((a+b x+c (x^2)))^p)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  -(e*f-d*g)*(d+e*x)^(m+1)*(a+b*x+c*x^2)^(p+1)/(2*(p+1)*(c*d^2-b*d*e+a*e^2)) - 
  (b*(e*f+d*g)-2*(c*d*f+a*e*g))/(2*(c*d^2-b*d*e+a*e^2))*Int[(d+e*x)^(m+1)*(a+b*x+c*x^2)^p,x] /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && EqQ[Simplify[m+2*p+3],0]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  -(e*f-d*g)*(d+e*x)^(m+1)*(a+c*x^2)^(p+1)/(2*(p+1)*(c*d^2+a*e^2)) + 
  (c*d*f+a*e*g)/(c*d^2+a*e^2)*Int[(d+e*x)^(m+1)*(a+c*x^2)^p,x] /;
FreeQ[{a,c,d,e,f,g,m,p},x] && NeQ[c*d^2+a*e^2,0] && EqQ[Simplify[m+2*p+3],0]

11:  ∫(((e x))^m) (f+g x) (((a+c (x^2)))^p)dx  when m∉ℚ ∧ p∉(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule 1.2.1.3.11: If  m∉ℚ ∧ p∉(SuperPlus[ℤ]), then

∫(((e x))^m) (f+g x) (((a+c (x^2)))^p)dx  ⟶  f∫(((e x))^m) (((a+c (x^2)))^p)dx+(g/e)∫(((e x))^(m+1)) (((a+c (x^2)))^p)dx

Program code:

Int[(e_.*x_)^m_*(f_+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  f*Int[(e*x)^m*(a+c*x^2)^p,x] + g/e*Int[(e*x)^(m+1)*(a+c*x^2)^p,x] /;
FreeQ[{a,c,e,f,g,p},x] && Not[RationalQ[m]] && Not[IGtQ[p,0]]

12:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m==p ∧ b d+a e==0 ∧ c d+b e==0

Derivation: Piecewise constant extraction

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

Rule 1.2.1.3.12: If  m==p ∧ b d+a e==0 ∧ c d+b e==0, then

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

Program code:

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

13.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p>0

1:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p>0 ∧ m<-2

Derivation: ???

Rule 1.2.1.3.13.1: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p>0 ∧ m<-2, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
-(((((d+e x))^(m+1)) (((a+b x+c (x^2)))^p))/((e^2) (m+1) (m+2) (c (d^2)-b d e+a (e^2))))·
((d g-e f (m+2)) (c (d^2)-b d e+a (e^2))-d p (2 c d-b e) (e f-d g)-e (g (m+1) (c (d^2)-b d e+a (e^2))+p (2 c d-b e) (e f-d g)) x)-

(p/((e^2) (m+1) (m+2) (c (d^2)-b d e+a (e^2))))∫(((d+e x))^(m+2)) (((a+b x+c (x^2)))^(p-1))·
(2 a c e (e f-d g) (m+2)+(b^2) e (d g (p+1)-e f (m+p+2))+b (a (e^2) g (m+1)-c d (d g (2 p+1)-e f (m+2 p+2)))-
c (2 c d (d g (2 p+1)-e f (m+2 p+2))-e (2 a e g (m+1)-b (d g (m-2 p)+e f (m+2 p+2)))) x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  -(d+e*x)^(m+1)*(a+b*x+c*x^2)^p/(e^2*(m+1)*(m+2)*(c*d^2-b*d*e+a*e^2))*
    ((d*g-e*f*(m+2))*(c*d^2-b*d*e+a*e^2)-d*p*(2*c*d-b*e)*(e*f-d*g)-e*(g*(m+1)*(c*d^2-b*d*e+a*e^2)+p*(2*c*d-b*e)*(e*f-d*g))*x) - 
  p/(e^2*(m+1)*(m+2)*(c*d^2-b*d*e+a*e^2))*Int[(d+e*x)^(m+2)*(a+b*x+c*x^2)^(p-1)*
    Simp[2*a*c*e*(e*f-d*g)*(m+2)+b^2*e*(d*g*(p+1)-e*f*(m+p+2))+b*(a*e^2*g*(m+1)-c*d*(d*g*(2*p+1)-e*f*(m+2*p+2)))-
      c*(2*c*d*(d*g*(2*p+1)-e*f*(m+2*p+2))-e*(2*a*e*g*(m+1)-b*(d*g*(m-2*p)+e*f*(m+2*p+2))))*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && 
  GtQ[p,0] && LtQ[m,-2] && LtQ[m+2*p,0] && Not[ILtQ[m+2*p+3,0]]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  -(d+e*x)^(m+1)*(a+c*x^2)^p/(e^2*(m+1)*(m+2)*(c*d^2+a*e^2))*
    ((d*g-e*f*(m+2))*(c*d^2+a*e^2)-2*c*d^2*p*(e*f-d*g)-e*(g*(m+1)*(c*d^2+a*e^2)+2*c*d*p*(e*f-d*g))*x) - 
  p/(e^2*(m+1)*(m+2)*(c*d^2+a*e^2))*Int[(d+e*x)^(m+2)*(a+c*x^2)^(p-1)*
    Simp[2*a*c*e*(e*f-d*g)*(m+2)-c*(2*c*d*(d*g*(2*p+1)-e*f*(m+2*p+2))-2*a*e^2*g*(m+1))*x,x],x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && 
  GtQ[p,0] && LtQ[m,-2] && LtQ[m+2*p,0] && Not[ILtQ[m+2*p+3,0]]

2:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p>0 ∧ m<-1 ∧ m+2 p+1∉(SuperMinus[ℤ])

Derivation: Quadratic recurrence 1a

Rule 1.2.1.3.13.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p>0 ∧ m<-1 ∧ m+2 p+1∉(SuperMinus[ℤ]), then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((((d+e x))^(m+1)) (f e (m+2 p+2)-g d (2 p+1)+e g (m+1) x) (((a+b x+c (x^2)))^p))/((e^2)(m+1) (m+2 p+2)))+
(p/((e^2)(m+1) (m+2 p+2)))∫(((d+e x))^(m+1)) (((a+b x+c (x^2)))^(p-1))·
(g (b d+2 a e+2 a e m+2 b d p)-f b e (m+2 p+2)+(g (2 c d+b e+b e m+4 c d p)-2 c e f (m+2 p+2))x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  (d+e*x)^(m+1)*(e*f*(m+2*p+2)-d*g*(2*p+1)+e*g*(m+1)*x)*(a+b*x+c*x^2)^p/(e^2*(m+1)*(m+2*p+2)) + 
  p/(e^2*(m+1)*(m+2*p+2))*Int[(d+e*x)^(m+1)*(a+b*x+c*x^2)^(p-1)*
    Simp[g*(b*d+2*a*e+2*a*e*m+2*b*d*p)-f*b*e*(m+2*p+2)+(g*(2*c*d+b*e+b*e*m+4*c*d*p)-2*c*e*f*(m+2*p+2))*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && RationalQ[p] && p>0 && 
  (LtQ[m,-1] || EqQ[p,1] || IntegerQ[p] && Not[RationalQ[m]]) && NeQ[m,-1] && Not[ILtQ[m+2*p+1,0]] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  (d+e*x)^(m+1)*(e*f*(m+2*p+2)-d*g*(2*p+1)+e*g*(m+1)*x)*(a+c*x^2)^p/(e^2*(m+1)*(m+2*p+2)) + 
  p/(e^2*(m+1)*(m+2*p+2))*Int[(d+e*x)^(m+1)*(a+c*x^2)^(p-1)*
    Simp[g*(2*a*e+2*a*e*m)+(g*(2*c*d+4*c*d*p)-2*c*e*f*(m+2*p+2))*x,x],x] /;
FreeQ[{a,c,d,e,f,g,m},x] && NeQ[c*d^2+a*e^2,0] && RationalQ[p] && p>0 && 
  (LtQ[m,-1] || EqQ[p,1] || IntegerQ[p] && Not[RationalQ[m]]) && NeQ[m,-1] && Not[ILtQ[m+2*p+1,0]] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

3:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p>0 ∧ -1≤m<0 ∧ m+2 p∉(SuperMinus[ℤ])

Derivation: Quadratic recurrence 1b

Rule 1.2.1.3.13.3: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p>0 ∧ -1≤m<0 ∧ m+2 p∉(SuperMinus[ℤ]), then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((((d+e x))^(m+1)) (c e f (m+2 p+2)-g (c d+2 c d p-b e p)+g c e(m+2p+1) x)(((a+b x+c (x^2)))^p))/(c (e^2)(m+2p+1) (m+2 p+2)))-
(p/(c (e^2)(m+2p+1) (m+2 p+2)))∫(((d+e x))^m) (((a+b x+c (x^2)))^(p-1))·
(c e f (b d-2 a e) (m+2 p+2)+g (a e (b e-2 c d m+b e m)+b d (b e p-c d-2 c d p))+
(c e f (2 c d-b e) (m+2 p+2)+g ((b^2) (e^2) (p+m+1)-2 (c^2) (d^2) (1+2 p)-c e (b d (m-2 p)+2 a e (m+2p+1)))) x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  (d+e*x)^(m+1)*(c*e*f*(m+2*p+2)-g*(c*d+2*c*d*p-b*e*p)+g*c*e*(m+2*p+1)*x)*(a+b*x+c*x^2)^p/
    (c*e^2*(m+2*p+1)*(m+2*p+2)) - 
  p/(c*e^2*(m+2*p+1)*(m+2*p+2))*Int[(d+e*x)^m*(a+b*x+c*x^2)^(p-1)*
    Simp[c*e*f*(b*d-2*a*e)*(m+2*p+2)+g*(a*e*(b*e-2*c*d*m+b*e*m)+b*d*(b*e*p-c*d-2*c*d*p))+
      (c*e*f*(2*c*d-b*e)*(m+2*p+2)+g*(b^2*e^2*(p+m+1)-2*c^2*d^2*(1+2*p)-c*e*(b*d*(m-2*p)+2*a*e*(m+2*p+1))))*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && 
  GtQ[p,0] && (IntegerQ[p] || Not[RationalQ[m]] || GeQ[m,-1] && LtQ[m,0]) && Not[ILtQ[m+2*p,0]] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  (d+e*x)^(m+1)*(c*e*f*(m+2*p+2)-g*c*d*(2*p+1)+g*c*e*(m+2*p+1)*x)*(a+c*x^2)^p/
    (c*e^2*(m+2*p+1)*(m+2*p+2)) + 
  2*p/(c*e^2*(m+2*p+1)*(m+2*p+2))*Int[(d+e*x)^m*(a+c*x^2)^(p-1)*
    Simp[f*a*c*e^2*(m+2*p+2)+a*c*d*e*g*m-(c^2*f*d*e*(m+2*p+2)-g*(c^2*d^2*(2*p+1)+a*c*e^2*(m+2*p+1)))*x,x],x] /;
FreeQ[{a,c,d,e,f,g,m},x] && NeQ[c*d^2+a*e^2,0] && 
  GtQ[p,0] && (IntegerQ[p] || Not[RationalQ[m]] || GeQ[m,-1] && LtQ[m,0]) && Not[ILtQ[m+2*p,0]] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

14.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1

1.  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1 ∧ m>1

1:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1 ∧ m∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule 1.2.1.3.14.1.1: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1 ∧ m∈(SuperPlus[ℤ]), then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  

∫(((a+b x+c (x^2)))^p) ExpandIntegrand[(((d+e x))^m) (f+g x),x]dx

Program code:

Int[(d_+e_.*x_)^m_*(f_+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  Int[(a+b*x+c*x^2)^p*ExpandIntegrand[(d+e*x)^m*(f+g*x),x],x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && ILtQ[p,-1] && IGtQ[m,0] && RationalQ[a,b,c,d,e,f,g]

Int[(d_+e_.*x_)^m_*(f_+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  Int[(a+c*x^2)^p*ExpandIntegrand[(d+e*x)^m*(f+g*x),x],x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && ILtQ[p,-1] && IGtQ[m,0] && RationalQ[a,c,d,e,f,g]

2:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1 ∧ m>1

Derivation: ???

Note: Although powerful, this rule results in more complicated coefficients unless b==0 ∧ d==0 or the parameters are all numeric.

Rule 1.2.1.3.14.1.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1 ∧ m>1, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
-(((((d+e x))^(m-1)) (((a+b x+c (x^2)))^(p+1)) (2 a c (e f+d g)-b (c d f+a e g)-(2 (c^2) d f+(b^2) e g-c (b e f+b d g+2 a e g)) x))/(c (p+1) ((b^2)-4 a c)))-
(1/(c (p+1) ((b^2)-4 a c)))∫(((d+e x))^(m-2)) (((a+b x+c (x^2)))^(p+1))·
(2 (c^2) (d^2) f (2 p+3)+b e g (a e (m-1)+b d (p+2))-c (2 a e (e f (m-1)+d g m)+b d (d g (2 p+3)-e f (m-2 p-4)))+
e ((b^2) e g (m+p+1)+2 (c^2) d f (m+2 p+2)-c (2 a e g m+b (e f+d g) (m+2 p+2))) x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  -(d+e*x)^(m-1)*(a+b*x+c*x^2)^(p+1)*(2*a*c*(e*f+d*g)-b*(c*d*f+a*e*g)-(2*c^2*d*f+b^2*e*g-c*(b*e*f+b*d*g+2*a*e*g))*x)/
    (c*(p+1)*(b^2-4*a*c)) - 
  1/(c*(p+1)*(b^2-4*a*c))*Int[(d+e*x)^(m-2)*(a+b*x+c*x^2)^(p+1)*
    Simp[2*c^2*d^2*f*(2*p+3)+b*e*g*(a*e*(m-1)+b*d*(p+2))-c*(2*a*e*(e*f*(m-1)+d*g*m)+b*d*(d*g*(2*p+3)-e*f*(m-2*p-4))) + 
      e*(b^2*e*g*(m+p+1)+2*c^2*d*f*(m+2*p+2)-c*(2*a*e*g*m+b*(e*f+d*g)*(m+2*p+2)))*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && LtQ[p,-1] && GtQ[m,1] && 
  (EqQ[m,2] && EqQ[p,-3] && RationalQ[a,b,c,d,e,f,g] || Not[ILtQ[m+2*p+3,0]])

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  (d+e*x)^(m-1)*(a+c*x^2)^(p+1)*(a*(e*f+d*g)-(c*d*f-a*e*g)*x)/(2*a*c*(p+1)) - 
  1/(2*a*c*(p+1))*Int[(d+e*x)^(m-2)*(a+c*x^2)^(p+1)*
    Simp[a*e*(e*f*(m-1)+d*g*m)-c*d^2*f*(2*p+3)+e*(a*e*g*m-c*d*f*(m+2*p+2))*x,x],x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && LtQ[p,-1] && GtQ[m,1] && 
  (EqQ[d,0] || EqQ[m,2] && EqQ[p,-3] && RationalQ[a,c,d,e,f,g] || Not[ILtQ[m+2*p+3,0]])

2:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1 ∧ m>0

Derivation: Quadratic recurrence 2a

Rule 1.2.1.3.14.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1 ∧ m>0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((((d+e x))^m) (((a+b x+c (x^2)))^(p+1)) (f b-2 a g+(2 c f-b g) x))/((p+1) ((b^2)-4 a c)))+
(1/((p+1) ((b^2)-4 a c) ))∫(((d+e x))^(m-1)) (((a+b x+c (x^2)))^(p+1))·
(g (2 a e m+b d (2 p+3))-f (b e m+2 c d (2 p+3))-e(2 c f-b g) (m+2 p+3) x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  (d+e*x)^m*(a+b*x+c*x^2)^(p+1)*(f*b-2*a*g+(2*c*f-b*g)*x)/((p+1)*(b^2-4*a*c)) + 
  1/((p+1)*(b^2-4*a*c))*Int[(d+e*x)^(m-1)*(a+b*x+c*x^2)^(p+1)*
    Simp[g*(2*a*e*m+b*d*(2*p+3))-f*(b*e*m+2*c*d*(2*p+3))-e*(2*c*f-b*g)*(m+2*p+3)*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && LtQ[p,-1] && GtQ[m,0] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  (d+e*x)^m*(a+c*x^2)^(p+1)*(a*g-c*f*x)/(2*a*c*(p+1)) - 
  1/(2*a*c*(p+1))*Int[(d+e*x)^(m-1)*(a+c*x^2)^(p+1)*Simp[a*e*g*m-c*d*f*(2*p+3)-c*e*f*(m+2*p+3)*x,x],x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && LtQ[p,-1] && GtQ[m,0] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

3:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1

Derivation: Quadratic recurrence 2b

Rule 1.2.1.3.14.3: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ p<-1, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((((d+e x))^(m+1)) (f (b c d-(b^2) e+2 a c e)-a g (2 c d-b e)+c (f (2 c d-b e)-g (b d-2 a e)) x)(((a+b x+c (x^2)))^(p+1)))/((p+1)((b^2)-4 a c) (c (d^2)-b d e+a (e^2))))+
(1/((p+1)((b^2)-4 a c) (c (d^2)-b d e+a (e^2))))∫(((d+e x))^m) (((a+b x+c (x^2)))^(p+1))·
(f (b c d e (2 p-m+2)+(b^2) (e^2) (p+m+2)-2 (c^2) (d^2) (2 p+3)-2 a c (e^2) (m+2 p+3))-g (a e (b e-2 c d m+b e m)-b d (3 c d-b e+2 c d p-b e p))+
c e(g (b d-2 a e)-f (2 c d-b e)) (m+2p+4) x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] :=
  (d+e*x)^(m+1)*(f*(b*c*d-b^2*e+2*a*c*e)-a*g*(2*c*d-b*e)+c*(f*(2*c*d-b*e)-g*(b*d-2*a*e))*x)*(a+b*x+c*x^2)^(p+1)/
    ((p+1)*(b^2-4*a*c)*(c*d^2-b*d*e+a*e^2)) + 
  1/((p+1)*(b^2-4*a*c)*(c*d^2-b*d*e+a*e^2))*Int[(d+e*x)^m*(a+b*x+c*x^2)^(p+1)*
    Simp[f*(b*c*d*e*(2*p-m+2)+b^2*e^2*(p+m+2)-2*c^2*d^2*(2*p+3)-2*a*c*e^2*(m+2*p+3))-
      g*(a*e*(b*e-2*c*d*m+b*e*m)-b*d*(3*c*d-b*e+2*c*d*p-b*e*p))+
      c*e*(g*(b*d-2*a*e)-f*(2*c*d-b*e))*(m+2*p+4)*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && LtQ[p,-1] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_,x_Symbol] :=
  -(d+e*x)^(m+1)*(f*a*c*e-a*g*c*d+c*(c*d*f+a*e*g)*x)*(a+c*x^2)^(p+1)/(2*a*c*(p+1)*(c*d^2+a*e^2)) + 
  1/(2*a*c*(p+1)*(c*d^2+a*e^2))*Int[(d+e*x)^m*(a+c*x^2)^(p+1)*
    Simp[f*(c^2*d^2*(2*p+3)+a*c*e^2*(m+2*p+3))-a*c*d*e*g*m+c*e*(c*d*f+a*e*g)*(m+2*p+4)*x,x],x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && LtQ[p,-1] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

15.  ∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℤ

1.  ∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∈ℚ

1:  ∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℤ ∧ m>0

Derivation: Quadratic recurrence 3a with p=-1

Rule 1.2.1.3.15.1.1: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℤ ∧ m>0, then

∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  ⟶  ((g(((d+e x))^m))/(c m))+(1/c)∫(((((d+e x))^(m-1)) (c d f-a e g+(g c d-b e g+c e f) x))/(a+b x+c (x^2)))dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_.+b_.*x_+c_.*x_^2),x_Symbol] :=
  g*(d+e*x)^m/(c*m) + 
  1/c*Int[(d+e*x)^(m-1)*Simp[c*d*f-a*e*g+(g*c*d-b*e*g+c*e*f)*x,x]/(a+b*x+c*x^2),x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && FractionQ[m] && GtQ[m,0]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_+c_.*x_^2),x_Symbol] :=
  g*(d+e*x)^m/(c*m) + 
  1/c*Int[(d+e*x)^(m-1)*Simp[c*d*f-a*e*g+(g*c*d+c*e*f)*x,x]/(a+c*x^2),x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && FractionQ[m] && GtQ[m,0]

2.  ∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℤ ∧ m<0

1:  ∫((f+g x)/((Sqrt[d+e x]) (a+b x+c (x^2))))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0

Derivation: Integration by substitution

Basis: ((f+g x)/((Sqrt[d+e x]) (a+b x+c (x^2))))==2 Subst[((e f-d g+g (x^2))/(c (d^2)-b d e+a (e^2)-(2 c d-b e) (x^2)+c (x^4))),x,(Sqrt[d+e x])](∂_x)(Sqrt[d+e x])

Rule 1.2.1.3.15.1.2.1: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0, then

∫((f+g x)/((Sqrt[d+e x]) (a+b x+c (x^2))))dx  ⟶  2 Subst[∫((e f-d g+g (x^2))/(c (d^2)-b d e+a (e^2)-(2 c d-b e) (x^2)+c (x^4)))dx,x,(Sqrt[d+e x])]

Program code:

Int[(f_.+g_.*x_)/(Sqrt[d_.+e_.*x_]*(a_.+b_.*x_+c_.*x_^2)),x_Symbol] :=
  2*Subst[Int[(e*f-d*g+g*x^2)/(c*d^2-b*d*e+a*e^2-(2*c*d-b*e)*x^2+c*x^4),x],x,Sqrt[d+e*x]] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0]

Int[(f_.+g_.*x_)/(Sqrt[d_.+e_.*x_]*(a_+c_.*x_^2)),x_Symbol] :=
  2*Subst[Int[(e*f-d*g+g*x^2)/(c*d^2+a*e^2-2*c*d*x^2+c*x^4),x],x,Sqrt[d+e*x]] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0]

2:  ∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℤ ∧ m<-1

Derivation: Quadratic recurrence 3b

Rule 1.2.1.3.15.1.2.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℤ ∧ m<-1, then

∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  ⟶  (((e f-d g) (((d+e x))^(m+1)))/((m+1)(c (d^2)-b d e+a (e^2))))+(1/(c (d^2)-b d e+a (e^2))) ∫(((((d+e x))^(m+1)) (c d f-f b e+a e g-c (e f-d g) x))/(a+b x+c (x^2)))dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_.+b_.*x_+c_.*x_^2),x_Symbol] :=
  (e*f-d*g)*(d+e*x)^(m+1)/((m+1)*(c*d^2-b*d*e+a*e^2)) + 
  1/(c*d^2-b*d*e+a*e^2)*Int[(d+e*x)^(m+1)*Simp[c*d*f-f*b*e+a*e*g-c*(e*f-d*g)*x,x]/(a+b*x+c*x^2),x] /;
FreeQ[{a,b,c,d,e,f,g,m},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && FractionQ[m] && LtQ[m,-1]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_+c_.*x_^2),x_Symbol] :=
  (e*f-d*g)*(d+e*x)^(m+1)/((m+1)*(c*d^2+a*e^2)) + 
  1/(c*d^2+a*e^2)*Int[(d+e*x)^(m+1)*Simp[c*d*f+a*e*g-c*(e*f-d*g)*x,x]/(a+c*x^2),x] /;
FreeQ[{a,c,d,e,f,g,m},x] && NeQ[c*d^2+a*e^2,0] && FractionQ[m] && LtQ[m,-1]

2:  ∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℚ

Derivation: Algebraic expansion

Rule 1.2.1.3.15.2: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m∉ℤ, then

∫(((((d+e x))^m) (f+g x))/(a+b x+c (x^2)))dx  ⟶  ∫(((d+e x))^m)ExpandIntegrand[((f+g x)/(a+b x+c (x^2))),x]dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_.+b_.*x_+c_.*x_^2),x_Symbol] :=
  Int[ExpandIntegrand[(d+e*x)^m,(f+g*x)/(a+b*x+c*x^2),x],x] /;
FreeQ[{a,b,c,d,e,f,g},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && Not[RationalQ[m]]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)/(a_+c_.*x_^2),x_Symbol] :=
  Int[ExpandIntegrand[(d+e*x)^m,(f+g*x)/(a+c*x^2),x],x] /;
FreeQ[{a,c,d,e,f,g},x] && NeQ[c*d^2+a*e^2,0] && Not[RationalQ[m]]

16:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m>0 ∧ m+2 p+2≠0

Derivation: Quadratic recurrence 3a

Note: The special case rule for m=1 and p=-1 eliminates the constant term ((g d)/c) from the result.

Rule 1.2.1.3.16: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m>0 ∧ m+2 p+2≠0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
((g(((d+e x))^m)(((a+b x+c (x^2)))^(p+1)))/(c(m+2 p+2)))+(1/(c(m+2 p+2)))∫(((d+e x))^(m-1)) (((a+b x+c (x^2)))^p)·
(m(c d f-a e g)+d(2 c f-b g)(p+1) +(m (c e f+c d g-b e g)+e (p+1) (2 c f-b g))x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  g*(d+e*x)^m*(a+b*x+c*x^2)^(p+1)/(c*(m+2*p+2)) + 
  1/(c*(m+2*p+2))*Int[(d+e*x)^(m-1)*(a+b*x+c*x^2)^p*
    Simp[m*(c*d*f-a*e*g)+d*(2*c*f-b*g)*(p+1)+(m*(c*e*f+c*d*g-b*e*g)+e*(p+1)*(2*c*f-b*g))*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g,p},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && GtQ[m,0] && NeQ[m+2*p+2,0] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p]) && Not[IGtQ[m,0] && EqQ[f,0]]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  g*(d+e*x)^m*(a+c*x^2)^(p+1)/(c*(m+2*p+2)) + 
  1/(c*(m+2*p+2))*Int[(d+e*x)^(m-1)*(a+c*x^2)^p*
    Simp[c*d*f*(m+2*p+2)-a*e*g*m+c*(e*f*(m+2*p+2)+d*g*m)*x,x],x] /;
FreeQ[{a,c,d,e,f,g,p},x] && NeQ[c*d^2+a*e^2,0] && GtQ[m,0] && NeQ[m+2*p+2,0] && 
  (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p]) && Not[IGtQ[m,0] && EqQ[f,0]]

17:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m<-1

Derivation: Quadratic recurrence 3b

Rule 1.2.1.3.17: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0 ∧ m<-1, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(((e f-d g) (((d+e x))^(m+1)) (((a+b x+c (x^2)))^(p+1)))/((m+1)(c (d^2)-b d e+a (e^2))))+
(1/((m+1)(c (d^2)-b d e+a (e^2)))) ∫(((d+e x))^(m+1)) (((a+b x+c (x^2)))^p)((c d f-f b e+a e g) (m+1)+b (d g-e f) (p+1)-c (e f-d g) (m+2 p+3) x)dx

Program code:

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  (e*f-d*g)*(d+e*x)^(m+1)*(a+b*x+c*x^2)^(p+1)/((m+1)*(c*d^2-b*d*e+a*e^2)) + 
  1/((m+1)*(c*d^2-b*d*e+a*e^2))*Int[(d+e*x)^(m+1)*(a+b*x+c*x^2)^p*
    Simp[(c*d*f-f*b*e+a*e*g)*(m+1)+b*(d*g-e*f)*(p+1)-c*(e*f-d*g)*(m+2*p+3)*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g,p},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && LtQ[m,-1] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  (e*f-d*g)*(d+e*x)^(m+1)*(a+c*x^2)^(p+1)/((m+1)*(c*d^2+a*e^2)) + 
  1/((m+1)*(c*d^2+a*e^2))*Int[(d+e*x)^(m+1)*(a+c*x^2)^p*Simp[(c*d*f+a*e*g)*(m+1)-c*(e*f-d*g)*(m+2*p+3)*x,x],x] /;
FreeQ[{a,c,d,e,f,g,p},x] && NeQ[c*d^2+a*e^2,0] && LtQ[m,-1] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m,2*p])

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_.+b_.*x_+c_.*x_^2)^p_.,x_Symbol] :=
  (e*f-d*g)*(d+e*x)^(m+1)*(a+b*x+c*x^2)^(p+1)/((m+1)*(c*d^2-b*d*e+a*e^2)) + 
  1/((m+1)*(c*d^2-b*d*e+a*e^2))*Int[(d+e*x)^(m+1)*(a+b*x+c*x^2)^p*
    Simp[(c*d*f-f*b*e+a*e*g)*(m+1)+b*(d*g-e*f)*(p+1)-c*(e*f-d*g)*(m+2*p+3)*x,x],x] /;
FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && ILtQ[Simplify[m+2*p+3],0] && NeQ[m,-1]

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  (e*f-d*g)*(d+e*x)^(m+1)*(a+c*x^2)^(p+1)/((m+1)*(c*d^2+a*e^2)) + 
  1/((m+1)*(c*d^2+a*e^2))*Int[(d+e*x)^(m+1)*(a+c*x^2)^p*Simp[(c*d*f+a*e*g)*(m+1)-c*(e*f-d*g)*(m+2*p+3)*x,x],x] /;
FreeQ[{a,c,d,e,f,g,m,p},x] && NeQ[c*d^2+a*e^2,0] && ILtQ[Simplify[m+2*p+3],0] && NeQ[m,-1]

18:  ∫((f+g x)/((d+e x)(Sqrt[a+b x+c (x^2)])))dx  when 4 c (a-d)-(((b-e))^2)==0 ∧ f e(b-e)-2 g (b d-a e)==0 ∧ b d-a e≠0

Derivation: Integration by substitution

Basis: If  4 c (a-d)-(((b-e))^2)==0 ∧ f e(b-e)-2 g (b d-a e)==0, then ((f+g x)/((d+e x)(Sqrt[a+b x+c (x^2)])))==((4 f (a-d))/(b d-a e)) Subst[(1/(4 (a-d)-(x^2))),x,((2 (a-d)+(b-e) x)/(Sqrt[a+b x+c (x^2)]))] (∂_x)((2 (a-d)+(b-e) x)/(Sqrt[a+b x+c (x^2)]))

Rule 1.2.1.3.18: If  4 c (a-d)-(((b-e))^2)==0 ∧ f e(b-e)-2 g (b d-a e)==0 ∧ b d-a e≠0, then

∫((f+g x)/((d+e x)(Sqrt[a+b x+c (x^2)])))dx  ⟶  ((4 f (a-d))/(b d-a e)) Subst[∫(1/(4 (a-d)-(x^2)))dx,x,((2 (a-d)+(b-e) x)/(Sqrt[a+b x+c (x^2)]))]

Program code:

Int[(f_+g_.*x_)/((d_.+e_.*x_)*Sqrt[a_.+b_.*x_+c_.*x_^2]),x_Symbol] :=
  4*f*(a-d)/(b*d-a*e)*Subst[Int[1/(4*(a-d)-x^2),x],x,(2*(a-d)+(b-e)*x)/Sqrt[a+b*x+c*x^2]] /;
FreeQ[{a,b,c,d,e,f,g},x] && EqQ[4*c*(a-d)-(b-e)^2,0] && EqQ[e*f*(b-e)-2*g*(b*d-a*e),0] && NeQ[b*d-a*e,0]

19.  ∫((f+g x)/((Sqrt[e x]) (Sqrt[a+b x+c (x^2)])))dx  when (b^2)-4 a c≠0

1:  ∫((f+g x)/((Sqrt[x]) (Sqrt[a+b x+c (x^2)])))dx  when (b^2)-4 a c≠0

Derivation: Integration by substitution

Basis: (x^m) F[x]==2Subst[(x^(2m+1)) F[(x^2)],x,(Sqrt[x])](∂_x)(Sqrt[x])

Rule 1.2.1.3.19.1: If  (b^2)-4 a c≠0, then

∫((f+g x)/((Sqrt[x]) (Sqrt[a+b x+c (x^2)])))dx  ⟶  2Subst[∫((f+g (x^2))/(Sqrt[a+b (x^2)+c (x^4)]))dx,x,(Sqrt[x])]

Program code:

Int[(f_+g_.*x_)/(Sqrt[x_]*Sqrt[a_+b_.*x_+c_.*x_^2]),x_Symbol] :=
  2*Subst[Int[(f+g*x^2)/Sqrt[a+b*x^2+c*x^4],x],x,Sqrt[x]] /;
FreeQ[{a,b,c,f,g},x] && NeQ[b^2-4*a*c,0]

Int[(f_+g_.*x_)/(Sqrt[x_]*Sqrt[a_+c_.*x_^2]),x_Symbol] :=
  2*Subst[Int[(f+g*x^2)/Sqrt[a+c*x^4],x],x,Sqrt[x]] /;
FreeQ[{a,c,f,g},x]

2:  ∫((f+g x)/((Sqrt[e x]) (Sqrt[a+b x+c (x^2)])))dx  when (b^2)-4 a c≠0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[x])/(Sqrt[e x]))==0

Rule 1.2.1.3.19.2: If  (b^2)-4 a c≠0, then

∫((f+g x)/((Sqrt[e x]) (Sqrt[a+b x+c (x^2)])))dx  ⟶  ((Sqrt[x])/(Sqrt[e x])) ∫((f+g x)/((Sqrt[x]) (Sqrt[a+b x+c (x^2)])))dx

Int[(f_+g_.*x_)/(Sqrt[e_*x_]*Sqrt[a_+b_.*x_+c_.*x_^2]),x_Symbol] :=
  Sqrt[x]/Sqrt[e*x]*Int[(f+g*x)/(Sqrt[x]*Sqrt[a+b*x+c*x^2]),x] /;
FreeQ[{a,b,c,e,f,g},x] && NeQ[b^2-4*a*c,0]

Int[(f_+g_.*x_)/(Sqrt[e_*x_]*Sqrt[a_+c_.*x_^2]),x_Symbol] :=
  Sqrt[x]/Sqrt[e*x]*Int[(f+g*x)/(Sqrt[x]*Sqrt[a+c*x^2]),x] /;
FreeQ[{a,c,e,f,g},x]

20:  ∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  when  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0

Derivation: Algebraic expansion

Basis: f+g x==((g (d+e x))/e)+((e f-d g)/e)

Rule 1.2.1.3.20: If  (b^2)-4 a c≠0 ∧ c (d^2)-b d e+a (e^2)≠0, then

∫(((d+e x))^m) (f+g x) (((a+b x+c (x^2)))^p)dx  ⟶  
(g/e)∫(((d+e x))^(m+1)) (((a+b x+c (x^2)))^p)dx+((e f-d g)/e)∫(((d+e x))^m) (((a+b x+c (x^2)))^p)dx

Program code:

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

Int[(d_.+e_.*x_)^m_*(f_.+g_.*x_)*(a_+c_.*x_^2)^p_.,x_Symbol] :=
  g/e*Int[(d+e*x)^(m+1)*(a+c*x^2)^p,x] + (e*f-d*g)/e*Int[(d+e*x)^m*(a+c*x^2)^p,x] /;
FreeQ[{a,c,d,e,f,g,m,p},x] && NeQ[c*d^2+a*e^2,0] && Not[IGtQ[m,0]]