Rules for integrands of the form(((g+h x))^m) (((a+b x+c (x^2)))^p) (((d+e x+f (x^2)))^q)

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

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

Derivation: Algebraic simplification

Basis: If  c d-a f==0 ∧ b d-a e==0 ∧ (p∈ℤ ∨ (c/f)>0), then (((a+b x+c (x^2)))^p)==((((c/f)))^p)(((d+e x+f (x^2)))^p)

Rule 1.2.1.6.1.1: If  c d-a f==0 ∧ b d-a e==0 ∧ (p∈ℤ ∨ (c/f)>0), then

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

Program code:

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

2:  ∫(((g+h x))^m) (((a+b x+c (x^2)))^p) (((d+e x+f (x^2)))^q)dx  when  c d-a f==0 ∧ b d-a e==0 ∧ p∉ℤ ∧ q∉ℤ ∧ ¬((c/f)>0)

Derivation: Piecewise constant extraction

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

Rule 1.2.1.6.1.2: If  c d-a f==0 ∧ b d-a e==0 ∧ p∉ℤ ∧ q∉ℤ ∧ ¬((c/f)>0), then

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

Program code:

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

2:  ∫(((g+h x))^m) (((a+b x+c (x^2)))^p) (((d+e x+f (x^2)))^q)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.6.2: If  (b^2)-4 a c==0, then

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

Program code:

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

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

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

Derivation: Algebraic simplification

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

Rule 1.2.1.6.3: If  c (g^2)-b g h+a (h^2)==0 ∧ (c^2) d (g^2)-a c e g h+(a^2) f (h^2)==0 ∧ q==m ∧ m∈ℤ, then

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

Program code:

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

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

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

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

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

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

Derivation: Algebraic simplification

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

Rule 1.2.1.6.x.1: If  c (g^2)-b g h+a (h^2)==0 ∧ p∈ℤ, then

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

Program code:

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

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

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

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

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

Derivation: Piecewise constant extraction

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

Rule 1.2.1.6.x.2: If  c (g^2)-b g h+a (h^2)==0 ∧ p∉ℤ, then

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

Program code:

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

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

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

(* Int[(g_+h_.*x_)^m_.*(a_+c_.*x_^2)^p_*(d_.+f_.*x_^2)^q_,x_Symbol] :=
  (a+c*x^2)^FracPart[p]/((g+h*x)^FracPart[p]*(a/g+(c*x)/h)^FracPart[p])*Int[(g+h*x)^(m+p)*(a/g+c/h*x)^p*(d+f*x^2)^q,x] /;
FreeQ[{a,c,d,f,g,h,m,q},x] && EqQ[c*g^2+a*h^2,0] && Not[IntegerQ[p]] *)

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

Derivation: Algebraic simplification

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

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

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

Program code:

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

Int[x_^p_*(a_+c_.*x_^2)^p_*(e_.*x_+f_.*x_^2)^q_,x_Symbol] :=
  Int[(a/e+c/f*x)^p*(e*x+f*x^2)^(p+q),x] /;
FreeQ[{a,c,e,f,q},x] && EqQ[c*e^2+a*f^2,0] && IntegerQ[p]

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

1.  ∫(g+h x) (((a+c (x^2)))^p) (((d+f (x^2)))^q)dx

1.  ∫((g+h x)/((((a+c (x^2)))^(1/3)) (d+f (x^2))))dx  when c d+3 a f==0 ∧ c (g^2)+9 a (h^2)==0

1:  ∫((g+h x)/((((a+c (x^2)))^(1/3)) (d+f (x^2))))dx  when c d+3 a f==0 ∧ c (g^2)+9 a (h^2)==0 ∧ a>0

Derived from formula for this class of Goursat pseudo-elliptic integrands contributed by Martin Welz on 19 August 2016

Rule 1.2.1.6.6.1.1.1: If  c d+3 a f==0 ∧ c (g^2)+9 a (h^2)==0 ∧ a>0, then

∫((g+h x)/((((a+c (x^2)))^(1/3)) (d+f (x^2))))dx  ⟶  
(((Sqrt[3]) h ArcTan[(1/(Sqrt[3]))-(((2^(2/3)) (((1-((3 h x)/g)))^(2/3)))/((Sqrt[3]) (((1+((3 h x)/g)))^(1/3))))])/((2^(2/3)) (a^(1/3)) f))+((h Log[d+f (x^2)])/((2^(5/3)) (a^(1/3)) f))-((3 h Log[(((1-((3 h x)/g)))^(2/3))+(2^(1/3))(((1+((3 h x)/g)))^(1/3))])/((2^(5/3)) (a^(1/3)) f))

Program code:

Int[(g_+h_.*x_)/((a_+c_.*x_^2)^(1/3)*(d_+f_.*x_^2)),x_Symbol] :=
  Sqrt[3]*h*ArcTan[1/Sqrt[3]-2^(2/3)*(1-3*h*x/g)^(2/3)/(Sqrt[3]*(1+3*h*x/g)^(1/3))]/(2^(2/3)*a^(1/3)*f) + 
  h*Log[d+f*x^2]/(2^(5/3)*a^(1/3)*f) - 
  3*h*Log[(1-3*h*x/g)^(2/3)+2^(1/3)*(1+3*h*x/g)^(1/3)]/(2^(5/3)*a^(1/3)*f) /;
FreeQ[{a,c,d,f,g,h},x] && EqQ[c*d+3*a*f,0] && EqQ[c*g^2+9*a*h^2,0] && GtQ[a,0]

2:  ∫((g+h x)/((((a+c (x^2)))^(1/3)) (d+f (x^2))))dx  when c d+3 a f==0 ∧ c (g^2)+9 a (h^2)==0 ∧ a≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((((1+((c (x^2))/a)))^(1/3))/(((a+c (x^2)))^(1/3)))==0

Rule 1.2.1.6.6.1.1.2: If  c d+3 a f==0 ∧ c (g^2)+9 a (h^2)==0 ∧ a≯0, then

∫((g+h x)/((((a+c (x^2)))^(1/3)) (d+f (x^2))))dx  ⟶  ((((1+((c (x^2))/a)))^(1/3))/(((a+c (x^2)))^(1/3))) ∫((g+h x)/((((1+((c (x^2))/a)))^(1/3)) (d+f (x^2))))dx

Program code:

Int[(g_+h_.*x_)/((a_+c_.*x_^2)^(1/3)*(d_+f_.*x_^2)),x_Symbol] :=
  (1+c*x^2/a)^(1/3)/(a+c*x^2)^(1/3)*Int[(g+h*x)/((1+c*x^2/a)^(1/3)*(d+f*x^2)),x] /;
FreeQ[{a,c,d,f,g,h},x] && EqQ[c*d+3*a*f,0] && EqQ[c*g^2+9*a*h^2,0] && Not[GtQ[a,0]]

2:  ∫(g+h x) (((a+c (x^2)))^p) (((d+f (x^2)))^q)dx

Derivation: Algebraic expansion

Rule 1.2.1.6.6.1.2:

∫(g+h x) (((a+c (x^2)))^p) (((d+f (x^2)))^q)dx  ⟶  g ∫(((a+c (x^2)))^p) (((d+f (x^2)))^q)dx+h ∫x (((a+c (x^2)))^p) (((d+f (x^2)))^q)dx

Program code:

Int[(g_+h_.*x_)*(a_+c_.*x_^2)^p_*(d_+f_.*x_^2)^q_,x_Symbol] :=
  g*Int[(a+c*x^2)^p*(d+f*x^2)^q,x] + h*Int[x*(a+c*x^2)^p*(d+f*x^2)^q,x] /;
FreeQ[{a,c,d,f,g,h,p,q},x]

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

Derivation: Algebraic expansion

Rule 1.2.1.6.6.2: If  (b^2)-4 a c≠0 ∧ (e^2)-4 d f≠0 ∧ p∈(SuperPlus[ℤ])∧ q∈ℤ, then

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

Program code:

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

Int[(a_+c_.*x_^2)^p_*(d_+e_.*x_+f_.*x_^2)^q_*(g_.+h_.*x_),x_Symbol] :=
  Int[ExpandIntegrand[(a+c*x^2)^p*(d+e*x+f*x^2)^q*(g+h*x),x],x] /;
FreeQ[{a,c,d,e,f,g,h},x] && NeQ[e^2-4*d*f,0] && IntegersQ[p,q] && (GtQ[p,0] || GtQ[q,0])

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

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

Derivation: Nondegenerate biquadratic recurrence 1

Rule 1.2.1.6.6.3.1: If  (b^2)-4 a c≠0 ∧ (e^2)-4 d f≠0 ∧ p<-1 ∧ q>0, then

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

Program code:

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

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

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

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

Derivation: Nondegenerate biquadratic recurrence 3

Rule 1.2.1.6.6.3.2: If  (b^2)-4 a c≠0 ∧ (e^2)-4 d f≠0 ∧ p<-1 ∧ q≯0 ∧ (((c d-a f))^2)-(b d-a e) (c e-b f)≠0, then

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

Program code:

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

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

Int[(a_+b_.*x_+c_.*x_^2)^p_*(d_+f_.*x_^2)^q_*(g_.+h_.*x_),x_Symbol] :=
  (a+b*x+c*x^2)^(p+1)*(d+f*x^2)^(q+1)/((b^2-4*a*c)*(b^2*d*f+(c*d-a*f)^2)*(p+1))*
    ((g*c)*(-b*(c*d+a*f))+(g*b-a*h)*(2*c^2*d+b^2*f-c*(2*a*f))+
      c*(g*(2*c^2*d+b^2*f-c*(2*a*f))-h*(b*c*d+a*b*f))*x) + 
  1/((b^2-4*a*c)*(b^2*d*f+(c*d-a*f)^2)*(p+1))*
    Int[(a+b*x+c*x^2)^(p+1)*(d+f*x^2)^q*
      Simp[(b*h-2*g*c)*((c*d-a*f)^2-(b*d)*(-b*f))*(p+1)+
        (b^2*(g*f)-b*(h*c*d+a*h*f)+2*(g*c*(c*d-a*f)))*(a*f*(p+1)-c*d*(p+2))-
        (2*f*((g*c)*(-b*(c*d+a*f))+(g*b-a*h)*(2*c^2*d+b^2*f-c*(2*a*f)))*(p+q+2)-
          (b^2*(g*f)-b*(h*c*d+a*h*f)+2*(g*c*(c*d-a*f)))*
          (b*f*(p+1)))*x-
        c*f*(b^2*(g*f)-b*(h*c*d+a*h*f)+2*(g*c*(c*d-a*f)))*(2*p+2*q+5)*x^2,x],x]/;
FreeQ[{a,b,c,d,f,g,h,q},x] && NeQ[b^2-4*a*c,0] && LtQ[p,-1] && NeQ[b^2*d*f+(c*d-a*f)^2,0] && Not[Not[IntegerQ[p]] && ILtQ[q,-1]]

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

Derivation: Nondegenerate biquadratic recurrence 2

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

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

Program code:

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

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

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

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

Derivation: Algebraic expansion

Basis: Let q=(c^2) (d^2)-b c d e+a c (e^2)+(b^2) d f-2 a c d f-a b e f+(a^2) (f^2), then ((g+h x)/((a+b x+c (x^2)) (d+e x+f (x^2))))==
((g (c^2) d-g b c e+a h c e+g (b^2) f-a b h f-a g c f+c (h c d-g c e+g b f-a h f) x)/(q (a+b x+c (x^2))))+((-h c d e+g c (e^2)+b h d f-g c d f-g b e f+a g (f^2)-f (h c d-g c e+g b f-a h f) x)/(q (d+e x+f (x^2))))

Rule 1.2.1.6.6.5: If  (b^2)-4 a c≠0 ∧ (e^2)-4 d f≠0, let q=(c^2) (d^2)-b c d e+a c (e^2)+(b^2) d f-2 a c d f-a b e f+(a^2) (f^2), if  q≠0, then

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

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

Program code:

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

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

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

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

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

Derivation: Integration by substitution

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

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

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

Program code:

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

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

Derivation: Algebraic expansion

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

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

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

Program code:

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

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

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

Derivation: Integration by substitution

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

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

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

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

Program code:

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

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

Derivation: Integration by substitution

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

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

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

Program code:

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

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

Derivation: Algebraic expansion

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

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

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

Program code:

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

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

Derivation: Integration by substitution

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

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

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

Program code:

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

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

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

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

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

Derivation: Algebraic expansion

Basis: Let q=(Sqrt[(b^2)-4 a c]), then ((g+h x)/(a+b x+c (x^2)))==((2c g-h (b-q))/q)(1/((b-q+2c x)))-((2c g-h (b+q))/q)(1/((b+q+2c x)))

Rule 1.2.1.6.6.6.4.1: If  (b^2)-4 a c≠0 ∧ (e^2)-4 d f≠0 ∧ (b^2)-4 a c>0, let q=(Sqrt[(b^2)-4 a c]), then

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

Program code:

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

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

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

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

Derivation: Algebraic expansion

Note: If  (b^2)-4 a c==(((((b (c e-b f)-2 c (c d-a f)))^2)-4 (c^2) ((((c d-a f))^2)-(b d-a e) (c e-b f)))/(((c e-b f))^2))<0, then (((c d-a f))^2)-(b d-a e) (c e-b f)>0 (noted by Martin Welz on sci.math.symbolic on 24 May 2015).

Note: Resulting integrands are of the form ((g+h x)/((a+b x+c (x^2)) (Sqrt[d+e x+f (x^2)]))) where (h^2) (b d-a e)-2 g h (c d-a f)+(g^2) (c e-b f)==0.

Rule 1.2.1.6.6.6.4.2: If  (b^2)-4 a c≠0 ∧ (e^2)-4 d f≠0 ∧ (b^2)-4 a c≯0 ∧ b d-a e≠0, let q=(Sqrt[(((c d-a f))^2)-(b d-a e) (c e-b f)]), then

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

Program code:

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

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

Int[(g_.+h_.*x_)/((a_.+b_.*x_+c_.*x_^2)*Sqrt[d_+f_.*x_^2]),x_Symbol] :=
  With[{q=Rt[(c*d-a*f)^2+b^2*d*f,2]},
  1/(2*q)*Int[Simp[h*b*d-g*(c*d-a*f-q)+(h*(c*d-a*f+q)+g*b*f)*x,x]/((a+b*x+c*x^2)*Sqrt[d+f*x^2]),x] - 
  1/(2*q)*Int[Simp[h*b*d-g*(c*d-a*f+q)+(h*(c*d-a*f-q)+g*b*f)*x,x]/((a+b*x+c*x^2)*Sqrt[d+f*x^2]),x]] /;
FreeQ[{a,b,c,d,f,g,h},x] && NeQ[b^2-4*a*c,0] && NegQ[b^2-4*a*c]

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

Derivation: Piecewise constant extraction

Basis: Let s->(Sqrt[(b^2)-4 a c]), then (∂_x)(((Sqrt[b+s+2 c x]) (Sqrt[2 a+(b+s) x]))/(Sqrt[a+b x+c (x^2)]))==0

Rule 1.2.1.6.6.7: If  (b^2)-4 a c≠0 ∧ (e^2)-4 d f≠0, let s->(Sqrt[(b^2)-4 a c]) and t->(Sqrt[(e^2)-4 d f]), then

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

(((Sqrt[b+s+2 c x]) (Sqrt[2 a+(b+s) x]) (Sqrt[e+t+2 f x]) (Sqrt[2 d+(e+t) x]))/((Sqrt[a+b x+c (x^2)]) (Sqrt[d+e x+f (x^2)])))∫((g+h x)/((Sqrt[b+s+2 c x]) (Sqrt[2 a+(b+s) x]) (Sqrt[e+t+2 f x]) (Sqrt[2 d+(e+t) x])))dx

Program code:

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

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

8.  ∫((g+h x)/((((a+b x+c (x^2)))^(1/3)) (d+e x+f (x^2))))dx  when c e-b f==0 ∧ (c^2) d-f ((b^2)-3 a c)==0 ∧ (c^2) (g^2)-b c g h-2 (b^2) (h^2)+9 a c (h^2)==0

1:  ∫((g+h x)/((((a+b x+c (x^2)))^(1/3)) (d+e x+f (x^2))))dx  when c e-b f==0 ∧ (c^2) d-f ((b^2)-3 a c)==0 ∧ (c^2) (g^2)-b c g h-2 (b^2) (h^2)+9 a c (h^2)==0 ∧ -((9 c (h^2))/(((2 c g-b h))^2))>0

Derived from formula for this class of Goursat pseudo-elliptic integrands contributed by Martin Welz on 19 August 2016

Rule 1.2.1.6.6.8.1: If  c e-b f==0 ∧ (c^2) d-f ((b^2)-3 a c)==0 ∧ (c^2) (g^2)-b c g h-2 (b^2) (h^2)+9 a c (h^2)==0 ∧ -((9 c (h^2))/(((2 c g-b h))^2))>0, let q->(((-((9 c (h^2))/(((2 c g-b h))^2))))^(1/3)), then

∫((g+h x)/((((a+b x+c (x^2)))^(1/3)) (d+e x+f (x^2))))dx  ⟶  
(((Sqrt[3]) h q ArcTan[(1/(Sqrt[3]))-(((2^(2/3)) (((1-((3 h (b+2 c x))/(2 c g-b h))))^(2/3)))/((Sqrt[3]) (((1+((3 h (b+2 c x))/(2 c g-b h))))^(1/3))))])/f)+((h q Log[d+e x+f (x^2)])/(2 f))-((3 h q Log[(((1-((3 h (b+2 c x))/(2 c g-b h))))^(2/3))+(2^(1/3)) (((1+((3 h (b+2 c x))/(2 c g-b h))))^(1/3))])/(2 f))

Program code:

Int[(g_.+h_.*x_)/((a_.+b_.*x_+c_.*x_^2)^(1/3)*(d_.+e_.*x_+f_.*x_^2)),x_Symbol] :=
  With[{q=(-9*c*h^2/(2*c*g-b*h)^2)^(1/3)},
  Sqrt[3]*h*q*ArcTan[1/Sqrt[3]-2^(2/3)*(1-(3*h*(b+2*c*x))/(2*c*g-b*h))^(2/3)/(Sqrt[3]*(1+(3*h*(b+2*c*x))/(2*c*g-b*h))^(1/3))]/f + 
  h*q*Log[d+e*x+f*x^2]/(2*f) - 
  3*h*q*Log[(1-3*h*(b+2*c*x)/(2*c*g-b*h))^(2/3)+2^(1/3)*(1+3*h*(b+2*c*x)/(2*c*g-b*h))^(1/3)]/(2*f)] /;
FreeQ[{a,b,c,d,e,f,g,h},x] && EqQ[c*e-b*f,0] && EqQ[c^2*d-f*(b^2-3*a*c),0] && EqQ[c^2*g^2-b*c*g*h-2*b^2*h^2+9*a*c*h^2,0] && 
  GtQ[-9*c*h^2/(2*c*g-b*h)^2,0]

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

Derivation: Piecewise constant extraction

Basis: (∂_x)((((q (a+b x+c (x^2))))^(1/3))/(((a+b x+c (x^2)))^(1/3)))==0

Rule 1.2.1.6.6.8.2: If  c e-b f==0 ∧ (c^2) d-f ((b^2)-3 a c)==0 ∧ (c^2) (g^2)-b c g h-2 (b^2) (h^2)+9 a c (h^2)==0 ∧ 4 a-((b^2)/c)≯0, let q->-(c/((b^2)-4 a c)), then

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

Program code:

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

U:  ∫(g+h x) (((a+b x+c (x^2)))^p) (((d+e x+f (x^2)))^q)dx

Rule 1.2.1.6.6.X:

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

Program code:

Int[(a_.+b_.*x_+c_.*x_^2)^p_*(d_.+e_.*x_+f_.*x_^2)^q_*(g_.+h_.*x_),x_Symbol] :=
  Unintegrable[(a+b*x+c*x^2)^p*(d+e*x+f*x^2)^q*(g+h*x),x] /;
FreeQ[{a,b,c,d,e,f,g,h,p,q},x]

Int[(a_.+c_.*x_^2)^p_*(d_.+e_.*x_+f_.*x_^2)^q_*(g_.+h_.*x_),x_Symbol] :=
  Unintegrable[(a+c*x^2)^p*(d+e*x+f*x^2)^q*(g+h*x),x] /;
FreeQ[{a,c,d,e,f,g,h,p,q},x]

S:  ∫(((g+h u))^m) (((a+b u+c (u^2)))^p) (((d+e u+f (u^2)))^q)dx  when  u==g+h x

Derivation: Integration by substitution

Rule 1.2.1.6.S: If  u==g+h x, then

∫(((g+h u))^m) (((a+b u+c (u^2)))^p) (((d+e u+f (u^2)))^q)dx  ⟶  (1/h)Subst[∫(((g+h x))^m) (((a+b x+c (x^2)))^p) (((d+e x+f (x^2)))^q)dx,x,u]

Program code:

Int[(g_.+h_.*u_)^m_.*(a_.+b_.*u_+c_.*u_^2)^p_.*(d_.+e_.*u_+f_.*u_^2)^q_.,x_Symbol] :=
  1/Coefficient[u,x,1]*Subst[Int[(g+h*x)^m*(a+b*x+c*x^2)^p*(d+e*x+f*x^2)^q,x],x,u] /;
FreeQ[{a,b,c,d,e,f,g,h,m,p,q},x] && LinearQ[u,x] && NeQ[u,x]

Int[(g_.+h_.*u_)^m_.*(a_.+c_.*u_^2)^p_.*(d_.+e_.*u_+f_.*u_^2)^q_.,x_Symbol] :=
  1/Coefficient[u,x,1]*Subst[Int[(g+h*x)^m*(a+c*x^2)^p*(d+e*x+f*x^2)^q,x],x,u] /;
FreeQ[{a,c,d,e,f,g,h,m,p,q},x] && LinearQ[u,x] && NeQ[u,x]