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

1:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∈ℤ

Rule: If  p∈ℤ, then

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  ∫(x^(m+p q))(A+B (x^(n-q)))(((a+b (x^(n-q))+c (x^(2(n-q)))))^p)dx

Program code:

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  Int[x^(m+p*q)*(A+B*x^(n-q))*(a+b*x^(n-q)+c*x^(2*(n-q)))^p,x] /;
FreeQ[{a,b,c,A,B,m,n,q},x] && EqQ[r,n-q] && EqQ[j,2*n-q] && IntegerQ[p] && PosQ[n-q]

2.  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])

1:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ p>0 ∧ m+p q≤-(n-q) ∧ m+p q+1≠0 ∧ m+p q+(n-q) (2 p+1)+1≠0

Derivation: Generalized trinomial recurrence 1a

Rule: If  p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ p>0 ∧ m+p q≤-(n-q) ∧ m+p q+1≠0 ∧ m+p q+(n-q) (2 p+1)+1≠0, then

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  
(((x^(m+1)) (A (m+p q+(n-q) (2 p+1)+1)+B (m+p q+1) (x^(n-q))) (((a (x^q)+b (x^n)+c (x^(2 n-q))))^p))/((m+p q+1) (m+p q+(n-q) (2 p+1)+1)))+(((n-q) p)/((m+p q+1) (m+p q+(n-q) (2 p+1)+1)))·
∫(x^(m+n)) (2 a B (m+p q+1)-A b (m+p q+(n-q) (2 p+1)+1)+(b B (m+p q+1)-2 A c (m+p q+(n-q) (2 p+1)+1)) (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p-1))dx

Program code:

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  x^(m+1)*(A*(m+p*q+(n-q)*(2*p+1)+1)+B*(m+p*q+1)*x^(n-q))*(a*x^q+b*x^n+c*x^(2*n-q))^p/((m+p*q+1)*(m+p*q+(n-q)*(2*p+1)+1)) + 
  (n-q)*p/((m+p*q+1)*(m+p*q+(n-q)*(2*p+1)+1))*
    Int[x^(n+m)*
      Simp[2*a*B*(m+p*q+1)-A*b*(m+p*q+(n-q)*(2*p+1)+1)+(b*B*(m+p*q+1)-2*A*c*(m+p*q+(n-q)*(2*p+1)+1))*x^(n-q),x]*
      (a*x^q+b*x^n+c*x^(2*n-q))^(p-1),x] /;
FreeQ[{a,b,c,A,B},x] && EqQ[r,n-q] && EqQ[j,2*n-q] && Not[IntegerQ[p]] && NeQ[b^2-4*a*c,0] && IGtQ[n,0] && GtQ[p,0] && 
  RationalQ[m,q] && LeQ[m+p*q,-(n-q)] && NeQ[m+p*q+1,0] && NeQ[m+p*q+(n-q)*(2*p+1)+1,0]

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  With[{n=q+r},
  x^(m+1)*(A*(m+p*q+(n-q)*(2*p+1)+1)+B*(m+p*q+1)*x^(n-q))*(a*x^q+c*x^(2*n-q))^p/((m+p*q+1)*(m+p*q+(n-q)*(2*p+1)+1)) + 
  2*(n-q)*p/((m+p*q+1)*(m+p*q+(n-q)*(2*p+1)+1))*
    Int[x^(n+m)*Simp[a*B*(m+p*q+1)-A*c*(m+p*q+(n-q)*(2*p+1)+1)*x^(n-q),x]*(a*x^q+c*x^(2*n-q))^(p-1),x] /;
 EqQ[j,2*n-q] && IGtQ[n,0] && LeQ[m+p*q,-(n-q)] && NeQ[m+p*q+1,0] && NeQ[m+p*q+(n-q)*(2*p+1)+1,0]] /;
FreeQ[{a,c,A,B},x] && Not[IntegerQ[p]] && RationalQ[m,p,q] && GtQ[p,0]

2:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ p<-1 ∧ m+p q>n-q-1

Derivation: Generalized trinomial recurrence 2a

Rule: If  p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ p<-1 ∧ m+p q>n-q-1, then

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  
(( (x^(m-n+1)) (A b-2 a B-(b B-2 A c) (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p+1)))/((n-q)(p+1) ((b^2)-4 a c) ))+(1/((n-q)(p+1) ((b^2)-4 a c) ))·
∫(x^(m-n))((m+p q-n+q+1)(2 a B-A b)+(m+p q+2(n-q) (p+1)+1) (b B-2 A c) (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p+1))dx

Program code:

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  x^(m-n+1)*(A*b-2*a*B-(b*B-2*A*c)*x^(n-q))*(a*x^q+b*x^n+c*x^(2*n-q))^(p+1)/((n-q)*(p+1)*(b^2-4*a*c)) + 
  1/((n-q)*(p+1)*(b^2-4*a*c))*
    Int[x^(m-n)*
      Simp[(m+p*q-n+q+1)*(2*a*B-A*b)+(m+p*q+2*(n-q)*(p+1)+1)*(b*B-2*A*c)*x^(n-q),x]*
      (a*x^q+b*x^n+c*x^(2*n-q))^(p+1),x] /;
FreeQ[{a,b,c,A,B},x] && EqQ[r,n-q] && EqQ[j,2*n-q] && Not[IntegerQ[p]] && NeQ[b^2-4*a*c,0] && IGtQ[n,0] && LtQ[p,-1] && 
  RationalQ[m,q] && GtQ[m+p*q,n-q-1]

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  With[{n=q+r},
  x^(m-n+1)*(a*B-A*c*x^(n-q))*(a*x^q+c*x^(2*n-q))^(p+1)/(2*a*c*(n-q)*(p+1)) - 
  1/(2*a*c*(n-q)*(p+1))*
    Int[x^(m-n)*Simp[a*B*(m+p*q-n+q+1)-A*c*(m+p*q+(n-q)*2*(p+1)+1)*x^(n-q),x]*(a*x^q+c*x^(2*n-q))^(p+1),x] /;
 EqQ[j,2*n-q] && IGtQ[n,0] && m+p*q>n-q-1] /;
FreeQ[{a,c,A,B},x] && Not[IntegerQ[p]] && RationalQ[m,q] && LtQ[p,-1]

3:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ p>0 ∧ m+p q>-(n-q)-1 ∧ m+p (2 n-q)+1≠0 ∧ m+p q+(n-q) (2 p+1)+1≠0

Derivation: Generalized trinomial recurrence 1b

Rule: If  p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ p>0 ∧ m+p q>-(n-q)-1 ∧ m+p (2 n-q)+1≠0 ∧ m+p q+(n-q) (2 p+1)+1≠0, then

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  
(((x^(m+1)) (b B (n-q) p+A c (m+p q+(n-q) (2 p+1)+1)+B c (m+p (2 n-q)+1) (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^p))/(c (m+p (2 n-q)+1) (m+p q+(n-q) (2 p+1)+1)))+
(((n-q) p)/(c (m+p (2 n-q)+1) (m+p q+(n-q) (2 p+1)+1)))∫(x^(m+q)) (2 a A c (m+p q+(n-q) (2 p+1)+1)-a b B (m+p q+1)+
(2 a B c (m+p (2 n-q)+1)+A b c (m+p q+(n-q) (2 p+1)+1)-(b^2) B (m+p q+(n-q) p+1)) (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p-1))dx

Program code:

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  x^(m+1)*(b*B*(n-q)*p+A*c*(m+p*q+(n-q)*(2*p+1)+1)+B*c*(m+p*q+2*(n-q)*p+1)*x^(n-q))*(a*x^q+b*x^n+c*x^(2*n-q))^p/
    (c*(m+p*(2*n-q)+1)*(m+p*q+(n-q)*(2*p+1)+1)) + 
  (n-q)*p/(c*(m+p*(2*n-q)+1)*(m+p*q+(n-q)*(2*p+1)+1))*
    Int[x^(m+q)*
      Simp[2*a*A*c*(m+p*q+(n-q)*(2*p+1)+1)-a*b*B*(m+p*q+1)+
        (2*a*B*c*(m+p*q+2*(n-q)*p+1)+A*b*c*(m+p*q+(n-q)*(2*p+1)+1)-b^2*B*(m+p*q+(n-q)*p+1))*x^(n-q),x]*
      (a*x^q+b*x^n+c*x^(2*n-q))^(p-1),x] /;
FreeQ[{a,b,c,A,B},x] && EqQ[r,n-q] && EqQ[j,2*n-q] && Not[IntegerQ[p]] && NeQ[b^2-4*a*c,0] && IGtQ[n,0] && GtQ[p,0] && 
  RationalQ[m,q] && GtQ[m+p*q,-(n-q)-1] && NeQ[m+p*(2*n-q)+1,0] && NeQ[m+p*q+(n-q)*(2*p+1)+1,0]

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  With[{n=q+r},
  x^(m+1)*(A*(m+p*q+(n-q)*(2*p+1)+1)+B*(m+p*q+2*(n-q)*p+1)*x^(n-q))*(a*x^q+c*x^(2*n-q))^p/
    ((m+p*(2*n-q)+1)*(m+p*q+(n-q)*(2*p+1)+1)) + 
  (n-q)*p/((m+p*(2*n-q)+1)*(m+p*q+(n-q)*(2*p+1)+1))*
    Int[x^(m+q)*Simp[2*a*A*(m+p*q+(n-q)*(2*p+1)+1)+2*a*B*(m+p*q+2*(n-q)*p+1)*x^(n-q),x]*(a*x^q+c*x^(2*n-q))^(p-1),x] /;
 EqQ[j,2*n-q] && IGtQ[n,0] && GtQ[m+p*q,-(n-q)] && NeQ[m+p*q+2*(n-q)*p+1,0] && NeQ[m+p*q+(n-q)*(2*p+1)+1,0] && NeQ[m+1,n]] /;
FreeQ[{a,c,A,B},x] && Not[IntegerQ[p]] && RationalQ[m,q] && GtQ[p,0]

4:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ p<-1 ∧ m+p q<n-q-1

Derivation: Generalized trinomial recurrence 2b

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

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  
-(((x^(m-q+1)) (A (b^2)-a b B-2 a A c+(A b-2 a B) c (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p+1)))/(a (n-q)(p+1) ((b^2)-4 a c)))+
(1/(a (n-q)(p+1) ((b^2)-4 a c)))∫(x^(m-q)) (A (b^2)(m+p q+(n-q) (p+1)+1)-a b B(m+p q+1)-2a A c(m+p q+2(n-q) (p+1)+1)+
(m+p q+(n-q) (2p+3)+1)(A b-2 a B) c (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p+1))dx

Program code:

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  -x^(m-q+1)*(A*b^2-a*b*B-2*a*A*c+(A*b-2*a*B)*c*x^(n-q))*(a*x^q+b*x^n+c*x^(2*n-q))^(p+1)/(a*(n-q)*(p+1)*(b^2-4*a*c)) + 
  1/(a*(n-q)*(p+1)*(b^2-4*a*c))*
    Int[x^(m-q)*
      Simp[A*b^2*(m+p*q+(n-q)*(p+1)+1)-a*b*B*(m+p*q+1)-2*a*A*c*(m+p*q+2*(n-q)*(p+1)+1)+
        (m+p*q+(n-q)*(2*p+3)+1)*(A*b-2*a*B)*c*x^(n-q),x]*
      (a*x^q+b*x^n+c*x^(2*n-q))^(p+1),x] /;
FreeQ[{a,b,c,A,B},x] && EqQ[r,n-q] && EqQ[j,2*n-q] && Not[IntegerQ[p]] && NeQ[b^2-4*a*c,0] && IGtQ[n,0] && LtQ[p,-1] && 
  RationalQ[m,q] && m+p*q<n-q-1

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  With[{n=q+r},
  -x^(m-q+1)*(A*c+B*c*x^(n-q))*(a*x^q+c*x^(2*n-q))^(p+1)/(2*a*c*(n-q)*(p+1)) + 
  1/(2*a*c*(n-q)*(p+1))*
    Int[x^(m-q)*Simp[A*c*(m+p*q+2*(n-q)*(p+1)+1)+B*(m+p*q+(n-q)*(2*p+3)+1)*c*x^(n-q),x]*(a*x^q+c*x^(2*n-q))^(p+1),x] /;
 EqQ[j,2*n-q] && IGtQ[n,0] && LtQ[m+p*q,n-q-1]] /;
FreeQ[{a,c,A,B},x] && Not[IntegerQ[p]] && RationalQ[m,q] && LtQ[p,-1]

5:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ -1≤p<0 ∧ m+p q≥n-q-1 ∧ m+p q+(n-q) (2 p+1)+1≠0

Derivation: Generalized trinomial recurrence 3a

Rule: If  p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ -1≤p<0 ∧ m+p q≥n-q-1 ∧ m+p q+(n-q) (2 p+1)+1≠0, then

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  
((B (x^(m-n+1))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p+1)))/(c (m+p q+(n-q) (2 p+1)+1)))-(1/(c (m+p q+(n-q) (2 p+1)+1)))·
∫(x^(m-n+q)) (a B (m+p q-n+q+1)+(b B (m+p q+(n-q) p+1)-A c (m+p q+(n-q) (2 p+1)+1)) (x^(n-q))) (((a (x^q)+b (x^n)+c (x^(2 n-q))))^p)dx

Program code:

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  B*x^(m-n+1)*(a*x^q+b*x^n+c*x^(2*n-q))^(p+1)/(c*(m+p*q+(n-q)*(2*p+1)+1)) - 
  1/(c*(m+p*q+(n-q)*(2*p+1)+1))*
    Int[x^(m-n+q)*
      Simp[a*B*(m+p*q-n+q+1)+(b*B*(m+p*q+(n-q)*p+1)-A*c*(m+p*q+(n-q)*(2*p+1)+1))*x^(n-q),x]*
      (a*x^q+b*x^n+c*x^(2*n-q))^p,x] /;
FreeQ[{a,b,c,A,B},x] && EqQ[r,n-q] && EqQ[j,2*n-q] && Not[IntegerQ[p]] && NeQ[b^2-4*a*c,0] && IGtQ[n,0] && GeQ[p,-1] && LtQ[p,0] && 
  RationalQ[m,q] && GeQ[m+p*q,n-q-1] && NeQ[m+p*q+(n-q)*(2*p+1)+1,0]

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  With[{n=q+r},
  B*x^(m-n+1)*(a*x^q+c*x^(2*n-q))^(p+1)/(c*(m+p*q+(n-q)*(2*p+1)+1)) - 
  1/(c*(m+p*q+(n-q)*(2*p+1)+1))*
    Int[x^(m-n+q)*Simp[a*B*(m+p*q-n+q+1)-A*c*(m+p*q+(n-q)*(2*p+1)+1)*x^(n-q),x]*(a*x^q+c*x^(2*n-q))^p,x] /;
 EqQ[j,2*n-q] && IGtQ[n,0] && GeQ[m+p*q,n-q-1] && NeQ[m+p*q+(n-q)*(2*p+1)+1,0]] /;
FreeQ[{a,c,A,B},x] && Not[IntegerQ[p]] && RationalQ[m,p,q] && GeQ[p,-1] && LtQ[p,0]

6:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ -1≤p<0 ∧ m+p q≤-(n-q) ∧ m+p q+1≠0

Derivation: Generalized trinomial recurrence 3b

Rule: If  p∉ℤ ∧ (b^2)-4 a c≠0 ∧ n∈(SuperPlus[ℤ])∧ m+p q≤-(n-q) ∧ -1≤p<0 ∧ m+p q+1≠0, then

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  
((A (x^(m-q+1)) (((a (x^q)+b (x^n)+c (x^(2 n-q))))^(p+1)))/(a(m+p q+1)))+(1/(a(m+p q+1)))·
 ∫(x^(m+n-q)) (a B (m+p q+1)-A b (m+p q+(n-q) (p+1)+1)-A c (m+p q+2 (n-q)(p+1)+1) (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2 n-q))))^p)dx

Program code:

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  A*x^(m-q+1)*(a*x^q+b*x^n+c*x^(2*n-q))^(p+1)/(a*(m+p*q+1)) + 
  1/(a*(m+p*q+1))*
    Int[x^(m+n-q)*
      Simp[a*B*(m+p*q+1)-A*b*(m+p*q+(n-q)*(p+1)+1)-A*c*(m+p*q+2*(n-q)*(p+1)+1)*x^(n-q),x]*
      (a*x^q+b*x^n+c*x^(2*n-q))^p,x] /;
FreeQ[{a,b,c,A,B},x] && EqQ[r,n-q] && EqQ[j,2*n-q] && Not[IntegerQ[p]] && NeQ[b^2-4*a*c,0] && IGtQ[n,0] && 
  RationalQ[m,p,q] && (GeQ[p,-1] && LtQ[p,0] || EqQ[m+p*q+(n-q)*(2*p+1)+1,0]) && LeQ[m+p*q,-(n-q)] && NeQ[m+p*q+1,0]

Int[x_^m_.*(A_+B_.*x_^r_.)*(a_.*x_^q_.+c_.*x_^j_.)^p_.,x_Symbol] :=
  With[{n=q+r},
  A*x^(m-q+1)*(a*x^q+c*x^(2*n-q))^(p+1)/(a*(m+p*q+1)) + 
  1/(a*(m+p*q+1))*
    Int[x^(m+n-q)*Simp[a*B*(m+p*q+1)-A*c*(m+p*q+2*(n-q)*(p+1)+1)*x^(n-q),x]*(a*x^q+c*x^(2*n-q))^p,x] /;
 EqQ[j,2*n-q] && IGtQ[n,0] && (GeQ[p,-1] && LtQ[p,0] || EqQ[m+p*q+(n-q)*(2*p+1)+1,0]) && LeQ[m+p*q,-(n-q)] && NeQ[m+p*q+1,0]] /;
FreeQ[{a,c,A,B},x] && Not[IntegerQ[p]] && RationalQ[m,p,q]

3:  ∫(((x^m)(A+B (x^(n-q))))/(Sqrt[a (x^q)+b (x^n)+c (x^(2 n-q))]))dx  when q<n

Derivation: Piecewise constant extraction

Basis:  (∂_x)(((x^(q/2)) (Sqrt[a+b (x^(n-q))+c (x^(2(n-q)))]))/(Sqrt[a (x^q)+b (x^n)+c (x^(2n-q))]))==0

Rule: If  q<n, then

∫(((x^m)(A+B (x^(n-q))))/(Sqrt[a (x^q)+b (x^n)+c (x^(2 n-q))]))dx  ⟶  (((x^(q/2)) (Sqrt[a+b (x^(n-q))+c (x^(2(n-q)))]))/(Sqrt[a (x^q)+b (x^n)+c (x^(2n-q))]))∫(((x^(m-q/2))(A+B (x^(n-q))))/(Sqrt[a+b (x^(n-q))+c (x^(2(n-q)))]))dx

Program code:

Int[x_^m_.*(A_+B_.*x_^j_.)/Sqrt[a_.*x_^q_.+b_.*x_^n_.+c_.*x_^r_.],x_Symbol] :=
  x^(q/2)*Sqrt[a+b*x^(n-q)+c*x^(2*(n-q))]/Sqrt[a*x^q+b*x^n+c*x^(2*n-q)]*
    Int[x^(m-q/2)*(A+B*x^(n-q))/Sqrt[a+b*x^(n-q)+c*x^(2*(n-q))],x] /;
FreeQ[{a,b,c,A,B,m,n,q},x] && EqQ[j,n-q] && EqQ[r,2*n-q] && PosQ[n-q] && 
	(EqQ[m,1/2] || EqQ[m,-1/2]) && EqQ[n,3] && EqQ[q,1]

x.  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p+(1/2)∈ℤ

x:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p+(1/2)∈(SuperPlus[ℤ])

Derivation: Piecewise constant extraction

Basis:  (∂_x)((Sqrt[a (x^q)+b (x^n)+c (x^(2n-q))])/((x^(q/2)) (Sqrt[a+b (x^(n-q))+c (x^(2(n-q)))])))==0

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

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  ((Sqrt[a (x^q)+b (x^n)+c (x^(2n-q))])/((x^(q/2)) (Sqrt[a+b (x^(n-q))+c (x^(2(n-q)))])))∫(x^(m+q p))(A+B (x^(n-q)))(((a+b (x^(n-q))+c (x^(2(n-q)))))^p)dx

Program code:

(* Int[x_^m_.*(A_+B_.*x_^j_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^r_.)^p_,x_Symbol] :=
  Sqrt[a*x^q+b*x^n+c*x^(2*n-q)]/(x^(q/2)*Sqrt[a+b*x^(n-q)+c*x^(2*(n-q))])*
    Int[x^(m+q*p)*(A+B*x^(n-q))*(a+b*x^(n-q)+c*x^(2*(n-q)))^p,x] /;
FreeQ[{a,b,c,A,B,m,n,p,q},x] && EqQ[j,n-q] && EqQ[r,2*n-q] && IGtQ[p+1/2,0] && PosQ[n-q] *)

x:  ∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  when p-(1/2)∈(SuperMinus[ℤ])

Derivation: Piecewise constant extraction

Basis:  (∂_x)(((x^(q/2)) (Sqrt[a+b (x^(n-q))+c (x^(2(n-q)))]))/(Sqrt[a (x^q)+b (x^n)+c (x^(2n-q))]))==0

Rule: If  p-(1/2)∈(SuperMinus[ℤ]), then

∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx  ⟶  (((x^(q/2)) (Sqrt[a+b (x^(n-q))+c (x^(2(n-q)))]))/(Sqrt[a (x^q)+b (x^n)+c (x^(2n-q))]))∫(x^(m+q p))(A+B (x^(n-q)))(((a+b (x^(n-q))+c (x^(2(n-q)))))^p)dx

Program code:

(* Int[x_^m_.*(A_+B_.*x_^j_.)*(a_.*x_^q_.+b_.*x_^n_.+c_.*x_^r_.)^p_,x_Symbol] :=
  x^(q/2)*Sqrt[a+b*x^(n-q)+c*x^(2*(n-q))]/Sqrt[a*x^q+b*x^n+c*x^(2*n-q)]*
    Int[x^(m+q*p)*(A+B*x^(n-q))*(a+b*x^(n-q)+c*x^(2*(n-q)))^p,x] /;
FreeQ[{a,b,c,A,B,m,n,p,q},x] && EqQ[j,n-q] && EqQ[r,2*n-q] && ILtQ[p-1/2,0] && PosQ[n-q] *)

4:  ∫(x^m)(A+B (x^(k-j)))(((a (x^j)+b (x^k)+c (x^(2k-j))))^p)dx  when p∉ℤ

Derivation: Piecewise constant extraction

Basis:  (∂_x)((((a (x^j)+b (x^k)+c (x^(2k-j))))^p)/((x^(j p)) (((a+b (x^(k-j))+c (x^(2(k-j)))))^p)))==0

Rule: If  p∉ℤ, then

∫(x^m)(A+B (x^(k-j)))(((a (x^j)+b (x^k)+c (x^(2k-j))))^p)dx  ⟶  ((((a (x^j)+b (x^k)+c (x^(2k-j))))^p)/((x^(j p)) (((a+b (x^(k-j))+c (x^(2(k-j)))))^p)))∫(x^(m+j p))(A+B (x^(k-j)))(((a+b (x^(k-j))+c (x^(2(k-j)))))^p)dx

Program code:

Int[x_^m_.*(A_+B_.*x_^q_)*(a_.*x_^j_.+b_.*x_^k_.+c_.*x_^n_.)^p_,x_Symbol] :=
  (a*x^j+b*x^k+c*x^n)^p/(x^(j*p)*(a+b*x^(k-j)+c*x^(2*(k-j)))^p)*
    Int[x^(m+j*p)*(A+B*x^(k-j))*(a+b*x^(k-j)+c*x^(2*(k-j)))^p,x] /;
FreeQ[{a,b,c,A,B,j,k,m,p},x] && EqQ[q,k-j] && EqQ[n,2*k-j] && Not[IntegerQ[p]] && PosQ[k-j]

S:  ∫(u^m)(A+B (u^(n-q)))(((a (u^q)+b (u^n)+c (u^(2n-q))))^p)dx  when  u==d+e x

Derivation: Integration by substitution

Rule: If  u==d+e x, then

∫(u^m)(A+B (u^(n-q)))(((a (u^q)+b (u^n)+c (u^(2n-q))))^p)dx  ⟶  (1/e)Subst[∫(x^m)(A+B (x^(n-q)))(((a (x^q)+b (x^n)+c (x^(2n-q))))^p)dx,x,u]

Program code:

Int[u_^m_.*(A_+B_.*u_^j_.)*(a_.*u_^q_.+b_.*u_^n_.+c_.*u_^r_.)^p_.,x_Symbol] :=
  1/Coefficient[u,x,1]*Subst[Int[x^m*(A+B*x^(n-q))*(a*x^q+b*x^n+c*x^(2*n-q))^p,x],x,u] /;
FreeQ[{a,b,c,A,B,m,n,p,q},x] && EqQ[j,n-q] && EqQ[r,2*n-q] && LinearQ[u,x] && NeQ[u,x]