Rules for integrands of the form(((a (x^j)+b (x^n)))^p)

1:  ∫(((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ j≠n ∧ j p-n+j+1==0

Derivation: Generalized binomial recurrence 2a with m=0 and j p-n+j+1==0

Rule: If  p∉ℤ ∧ j≠n ∧ j p-n+j+1==0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((((a (x^j)+b (x^n)))^(p+1))/(b(n-j)(p+1)(x^(n-1))))

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  (a*x^j+b*x^n)^(p+1)/(b*(n-j)(p+1)*x^(n-1)) /;
FreeQ[{a,b,j,n,p},x] && Not[IntegerQ[p]] && NonzeroQ[n-j] && ZeroQ[j*p-n+j+1]

2.  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ ((n p+n-j+1)/(n-j))∈(SuperMinus[ℤ])

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

Derivation: Generalized binomial recurrence 2b with m=0

Note: This rule increments ((n p+n-j+1)/(n-j)) by 1 thus driving it to 0.

Rule: If  p∉ℤ ∧ j≠n ∧ ((n p+n-j+1)/(n-j))∈(SuperMinus[ℤ])∧ p<-1 ∧ (j∈ℤ ∨ c>0), then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  -((((a (x^j)+b (x^n)))^(p+1))/(a(n-j) (p+1)(x^(j-1))))+((n p+n-j+1)/(a(n-j) (p+1)))∫((((a (x^j)+b (x^n)))^(p+1))/(x^j))dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  -(a*x^j+b*x^n)^(p+1)/(a*(n-j)*(p+1)*x^(j-1)) + 
  (n*p+n-j+1)/(a*(n-j)*(p+1))*Int[(a*x^j+b*x^n)^(p+1)/x^j,x] /;
FreeQ[{a,b,j,n},x] && Not[IntegerQ[p]] && NonzeroQ[n-j] && NegativeIntegerQ[Simplify[(n*p+n-j+1)/(n-j)]] && RationalQ[p] && p<-1

2:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ ((n p+n-j+1)/(n-j))∈(SuperMinus[ℤ])∧ j p+1≠0

Derivation: Generalized binomial recurrence 3b with m=0

Note: This rule increments ((n p+n-j+1)/(n-j)) by 1 thus driving it to 0.

Rule: If  p∉ℤ ∧ j≠n ∧ ((n p+n-j+1)/(n-j))∈(SuperMinus[ℤ])∧ j p+1≠0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((((a (x^j)+b (x^n)))^(p+1))/(a (j p+1)(x^(j-1))))-((b (n p+n-j+1))/(a (j p+1)))∫(x^(n-j)) (((a (x^j)+b (x^n)))^p)dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  (a*x^j+b*x^n)^(p+1)/(a*(j*p+1)*x^(j-1)) - 
  b*(n*p+n-j+1)/(a*(j*p+1))*Int[x^(n-j)*(a*x^j+b*x^n)^p,x] /;
FreeQ[{a,b,j,n,p},x] && Not[IntegerQ[p]] && NonzeroQ[n-j] && NegativeIntegerQ[Simplify[(n*p+n-j+1)/(n-j)]] && NonzeroQ[j*p+1]

4.  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ 0<j<n

1.  ∫(((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ 0<j<n ∧ p>0

1:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ 0<j<n ∧ p>0 ∧ j p+1<0

Derivation: Generalized binomial recurrence 1a with m=0

Rule: If  p∉ℤ ∧ 0<j<n ∧ p>0 ∧ j p+1<0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((x (((a (x^j)+b (x^n)))^p))/(j p+1))-((b (n-j) p)/(j p+1))∫(x^n) (((a (x^j)+b (x^n)))^(p-1))dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  x*(a*x^j+b*x^n)^p/(j*p+1) - 
  b*(n-j)*p/(j*p+1)*Int[x^n*(a*x^j+b*x^n)^(p-1),x] /;
FreeQ[{a,b},x] && Not[IntegerQ[p]] && RationalQ[j,n,p] && 0<j<n && p>0 && j*p+1<0

2:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ 0<j<n∧ p>0 ∧ n p+1≠0

Derivation: Generalized binomial recurrence 1b with m=0

Rule: If  p∉ℤ ∧ 0<j<n∧ p>0 ∧ n p+1≠0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((x (((a (x^j)+b (x^n)))^p))/(n p+1))+((a (n-j) p)/(n p+1))∫(x^j) (((a (x^j)+b (x^n)))^(p-1))dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  x*(a*x^j+b*x^n)^p/(n*p+1) + 
  a*(n-j)*p/(n*p+1)*Int[x^j*(a*x^j+b*x^n)^(p-1),x] /;
FreeQ[{a,b},x] && Not[IntegerQ[p]] && RationalQ[j,n,p] && 0<j<n && p>0 && NonzeroQ[n*p+1]

2.  ∫(((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ 0<j<n ∧ p<-1

1:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ 0<j<n ∧ p<-1 ∧ j p+1>n-j

Derivation: Generalized binomial recurrence 2a with m=0

Rule: If  p∉ℤ ∧ 0<j<n ∧ p<-1 ∧ j p+1>n-j, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((((a (x^j)+b (x^n)))^(p+1))/(b (n-j) (p+1)(x^(n-1))))-((j p-n+j+1)/(b (n-j) (p+1)))∫((((a (x^j)+b (x^n)))^(p+1))/(x^n))dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  (a*x^j+b*x^n)^(p+1)/(b*(n-j)*(p+1)*x^(n-1)) - 
  (j*p-n+j+1)/(b*(n-j)*(p+1))*Int[(a*x^j+b*x^n)^(p+1)/x^n,x] /;
FreeQ[{a,b},x] && Not[IntegerQ[p]] && RationalQ[j,n,p] && 0<j<n && p<-1 && j*p+1>n-j

2:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ 0<j<n ∧ p<-1

Derivation: Generalized binomial recurrence 2b with m=0

Rule: If  p∉ℤ ∧ 0<j<n ∧ p<-1, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  -((((a (x^j)+b (x^n)))^(p+1))/(a(n-j) (p+1)(x^(j-1))))+((n p+n-j+1)/(a(n-j) (p+1)))∫((((a (x^j)+b (x^n)))^(p+1))/(x^j))dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  -(a*x^j+b*x^n)^(p+1)/(a*(n-j)*(p+1)*x^(j-1)) + 
  (n*p+n-j+1)/(a*(n-j)*(p+1))*Int[(a*x^j+b*x^n)^(p+1)/x^j,x] /;
FreeQ[{a,b},x] && Not[IntegerQ[p]] && RationalQ[j,n,p] && 0<j<n && p<-1

5.  ∫(((a (x^j)+b (x^n)))^p)dx  when  p+(1/2)∈ℤ ∧ j≠n ∧ j p+1==0

1:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p+(1/2)∈(SuperPlus[ℤ])∧ j≠n ∧ j p+1==0

Derivation: Generalized binomial recurrence 1b

Rule: If  p+(1/2)∈(SuperPlus[ℤ])∧ j≠n ∧ j p+1==0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((x (((a (x^j)+b (x^n)))^p))/(p (n-j)))+a∫(x^j) (((a (x^j)+b (x^n)))^(p-1))dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  x*(a*x^j+b*x^n)^p/(p*(n-j)) + a*Int[x^j*(a*x^j+b*x^n)^(p-1),x] /;
FreeQ[{a,b,j,n},x] && PositiveIntegerQ[p+1/2] && NonzeroQ[n-j] && ZeroQ[Simplify[j*p+1]]

2.  ∫(((a (x^j)+b (x^n)))^p)dx  when  p-(1/2)∈(SuperMinus[ℤ]) ∧ j≠n ∧ j p+1==0

1:  ∫(1/(Sqrt[a (x^2)+b (x^n)]))dx  when n≠2

Reference: G&R 2.261.1, CRC 237a, A&S 3.3.33

Reference: CRC 238

Derivation: Integration by substitution

Basis: If  n≠2, then (1/(Sqrt[a (x^2)+b (x^n)]))==(2/(2-n)) Subst[(1/(1-a (x^2))),x,(x/(Sqrt[a (x^2)+b (x^n)]))] (∂_x)(x/(Sqrt[a (x^2)+b (x^n)]))

Rule: If  n≠2, then

∫(1/(Sqrt[a (x^2)+b (x^n)]))dx  ⟶  (2/(2-n)) Subst[∫(1/(1-a (x^2)))dx,x,(x/(Sqrt[a (x^2)+b (x^n)]))]

Program code:

Int[1/Sqrt[a_.*x_^2+b_.*x_^n_.],x_Symbol] :=
  2/(2-n)*Subst[Int[1/(1-a*x^2),x],x,x/Sqrt[a*x^2+b*x^n]] /;
FreeQ[{a,b,n},x] && NonzeroQ[n-2]

2:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p+(1/2)∈(SuperMinus[ℤ])∧ j≠n ∧ j p+1==0

Derivation: Generalized binomial recurrence 2b

Rule: If  p+(1/2)∈(SuperMinus[ℤ])∧ j≠n ∧ j p+1==0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  -((((a (x^j)+b (x^n)))^(p+1))/(a(n-j) (p+1)(x^(j-1))))+((n p+n-j+1)/(a(n-j) (p+1)))∫((((a (x^j)+b (x^n)))^(p+1))/(x^j))dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  -(a*x^j+b*x^n)^(p+1)/(a*(n-j)*(p+1)*x^(j-1)) + 
  (n*p+n-j+1)/(a*(n-j)*(p+1))*Int[(a*x^j+b*x^n)^(p+1)/x^j,x] /;
FreeQ[{a,b,j,n},x] && NegativeIntegerQ[p+1/2] && NonzeroQ[n-j] && ZeroQ[Simplify[j*p+1]]

6:  ∫(1/(Sqrt[a (x^j)+b (x^n)]))dx  when  2(n-1)<j<n

Derivation: Generalized binomial recurrence 3a with m=0 and p=-(1/2)

Rule: If  2(n-1)<j<n, then

∫(1/(Sqrt[a (x^j)+b (x^n)]))dx  ⟶  -((2 (Sqrt[a (x^j)+b (x^n)]))/(b (n-2)(x^(n-1))))-((a (2n-j-2))/(b (n-2)))∫(1/((x^(n-j)) (Sqrt[a (x^j)+b (x^n)])))dx

Program code:

Int[1/Sqrt[a_.*x_^j_.+b_.*x_^n_.],x_Symbol] :=
  -2*Sqrt[a*x^j+b*x^n]/(b*(n-2)*x^(n-1)) - 
  a*(2*n-j-2)/(b*(n-2))*Int[1/(x^(n-j)*Sqrt[a*x^j+b*x^n]),x] /;
FreeQ[{a,b},x] && RationalQ[j,n] && 2*(n-1)<j<n

x.  ∫(((a (x^j)+b (x^n)))^p)dx  when p∉ℤ ∧ j≠n

1:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ j p+1==0

Rule: If  p∉ℤ ∧ j≠n ∧ m+j p+1==0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((x (((a (x^j)+b (x^n)))^p))/(p (n-j)(((((a (x^j)+b (x^n))/(b (x^n)))))^p)))Hypergeometric2F1[-p,-p,1-p,-(a/(b (x^(n-j))))]

Program code:

(* Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  x*(a*x^j+b*x^n)^p/(p*(n-j)*((a*x^j+b*x^n)/(b*x^n))^p)*Hypergeometric2F1[-p,-p,1-p,-a/(b*x^(n-j))] /;
FreeQ[{a,b,j,n,p},x] && Not[IntegerQ[p]] && NonzeroQ[n-j] && ZeroQ[j*p+1] *)

2:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n ∧ j p+1≠0

Rule: If  p∉ℤ ∧ j≠n ∧ j p+1≠0, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((x (((a (x^j)+b (x^n)))^p))/((j p+1)(((((a (x^j)+b (x^n))/(a (x^j)))))^p)))Hypergeometric2F1[-p,((j p+1)/(n-j)),((j p+1)/(n-j))+1,-((b (x^(n-j)))/a)]

Program code:

(* Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  x*(a*x^j+b*x^n)^p/((j*p+1)*((a*x^j+b*x^n)/(a*x^j))^p)*
    Hypergeometric2F1[-p,(j*p+1)/(n-j),(j*p+1)/(n-j)+1,-b*x^(n-j)/a] /;
FreeQ[{a,b,j,n,p},x] && Not[IntegerQ[p]] && NonzeroQ[n-j] && NonzeroQ[j*p+1] *)

7:  ∫(((a (x^j)+b (x^n)))^p)dx  when  p∉ℤ ∧ j≠n

Derivation: Piecewise constant extraction

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

Basis:  ((((a (x^j)+b (x^n)))^p)/((x^(j p)) (((a+b (x^(n-j))))^p)))==((((a (x^j)+b (x^n)))^(FracPart[p]))/((x^(j FracPart[p]))(((a+b (x^(n-j))))^(FracPart[p]))))

Rule: If  p∉ℤ ∧ j≠n, then

∫(((a (x^j)+b (x^n)))^p)dx  ⟶  ((((a (x^j)+b (x^n)))^(FracPart[p]))/((x^(j FracPart[p]))(((a+b (x^(n-j))))^(FracPart[p]))))∫(x^(j p))(((a+b (x^(n-j))))^p)dx

Program code:

Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] :=
  (a*x^j+b*x^n)^FracPart[p]/(x^(j*FracPart[p])*(a+b*x^(n-j))^FracPart[p])*Int[x^(j*p)*(a+b*x^(n-j))^p,x] /;
FreeQ[{a,b,j,n,p},x] && Not[IntegerQ[p]] && NonzeroQ[n-j] && PosQ[n-j]

S:  ∫(((a (u^j)+b (u^n)))^p)dx  when  u==c+d x

Derivation: Integration by substitution

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

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

Program code:

Int[(a_.*u_^j_.+b_.*v_^n_.)^p_,x_Symbol] :=
  1/Coefficient[u,x,1]*Subst[Int[(a*x^j+b*x^n)^p,x],x,u] /;
FreeQ[{a,b,j,n,p},x] && ZeroQ[u-v] && LinearQ[u,x] && NonzeroQ[u-x]