Rules for integrands of the form(Subscript[P, q])[x] (((a+b (x^n)))^p)

x:  ∫(Subscript[P, q])[x] (((a+b x))^p)dx  when  p∈𝔽 ∧ m+1∈(SuperMinus[ℤ])

Derivation: Integration by substitution

Basis: If  n∈(SuperPlus[ℤ]), then F[x] (((a+b x))^p)==(n/b) Subst[(x^(n p+n-1))F[-(a/b)+((x^n)/b)],x,(((a+b x))^(1/n))] (∂_x)(((a+b x))^(1/n))

Rule: If  p∈𝔽 ∧ m+1∈(SuperMinus[ℤ]), let n=Denominator[p],  then

∫(Subscript[P, q])[x] (((a+b x))^p)dx  ⟶  (n/b) Subst[∫(x^(n p+n-1)) (Subscript[P, q])[-(a/b)+((x^n)/b)]dx,x,(((a+b x))^(1/n))]

Program code:

(* Int[Pq_*(a_+b_.*x_)^p_,x_Symbol] :=
  With[{n=Denominator[p]},
  n/b*Subst[Int[x^(n*p+n-1)*ReplaceAll[Pq,x->-a/b+x^n/b],x],x,(a+b*x)^(1/n)]] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && FractionQ[p] *)

2:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ]), then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  ∫ ExpandIntegrand[(Subscript[P, q])[x] (((a+b (x^n)))^p),x]dx

Program code:

Int[Pq_*(a_+b_.*x_^n_.)^p_.,x_Symbol] :=
  Int[ExpandIntegrand[Pq*(a+b*x^n)^p,x],x] /;
FreeQ[{a,b,n},x] && PolyQ[Pq,x] && (IGtQ[p,0] || EqQ[n,1])

3:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when (Subscript[P, q])[x,0]==0

Derivation: Algebraic simplification

Rule: If  (Subscript[P, q])[x,0]==0, then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  ∫x PolynomialQuotient[(Subscript[P, q])[x],x,x] (((a+b (x^n)))^p)dx

Program code:

Int[Pq_*(a_+b_.*x_^n_.)^p_,x_Symbol] :=
  Int[x*PolynomialQuotient[Pq,x,x]*(a+b*x^n)^p,x] /;
FreeQ[{a,b,n,p},x] && PolyQ[Pq,x] && EqQ[Coeff[Pq,x,0],0] && Not[MatchQ[Pq,x^m_.*u_. /; IntegerQ[m]]]

4.  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈ℤ

1.  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])

0:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ q≥n ∧ PolynomialRemainder[(Subscript[P, q])[x],a+b (x^n),x]==0

Derivation: Algebraic simplification

Rule: If  n∈(SuperPlus[ℤ])∧ q≥n ∧ PolynomialRemainder[(Subscript[P, q])[x],a+b (x^n),x]==0, then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  ∫PolynomialQuotient[(Subscript[P, q])[x],a+b (x^n),x] (((a+b (x^n)))^(p+1))dx

Program code:

Int[Pq_*(a_+b_.*x_^n_.)^p_.,x_Symbol] :=
  Int[PolynomialQuotient[Pq,a+b*x^n,x]*(a+b*x^n)^(p+1),x] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x] && IGtQ[n,0] && GeQ[Expon[Pq,x],n] && EqQ[PolynomialRemainder[Pq,a+b*x^n,x],0]

1:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when ((n-1)/2)∈(SuperPlus[ℤ])∧ p>0

Derivation: Binomial recurrence 1b applied q times

Rule: If  ((n-1)/2)∈(SuperPlus[ℤ])∧ p>0, then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  (((a+b (x^n)))^p) (∑_(i=0)^q)(((Subscript[P, q])[x,i] (x^(i+1)))/(m+n p+i+1))+a n p ∫(((a+b (x^n)))^(p-1)) ((∑_(i=0)^q)(((Subscript[P, q])[x,i] (x^i))/(m+n p+i+1))) dx

Program code:

Int[Pq_*(a_+b_.*x_^n_.)^p_,x_Symbol] :=
  Module[{q=Expon[Pq,x],i},
  (a+b*x^n)^p*Sum[Coeff[Pq,x,i]*x^(i+1)/(n*p+i+1),{i,0,q}] + 
  a*n*p*Int[(a+b*x^n)^(p-1)*Sum[Coeff[Pq,x,i]*x^i/(n*p+i+1),{i,0,q}],x]] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && IGtQ[(n-1)/2,0] && GtQ[p,0]

2.  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ p<-1

1.  ∫(Subscript[P, q])[x](((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ p<-1 ∧ q<n

1:  ∫(Subscript[P, q])[x](((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ p<-1 ∧ q==n-1

Derivation: Algebraic expansion and binomial recurrence 2b applied q-1 times

Rule: If  n∈(SuperPlus[ℤ])∧ p<-1 ∧ q==n-1, then

∫(Subscript[P, q])[x](((a+b (x^n)))^p)dx  ⟶  
(((a (Subscript[P, q])[x,q]-b x ((Subscript[P, q])[x]-(Subscript[P, q])[x,q](x^q)))(((a+b (x^n)))^(p+1)))/(a b n(p+1)))+(1/(a n(p+1)))∫((∑_(i=0)^(q-1))(n (p+1)+i+1)(Subscript[P, q])[x,i](x^i))(((a+b (x^n)))^(p+1))dx

Program code:

Int[Pq_*(a_+b_.*x_^n_)^p_,x_Symbol] :=
  Module[{q=Expon[Pq,x],i},
  (a*Coeff[Pq,x,q]-b*x*ExpandToSum[Pq-Coeff[Pq,x,q]*x^q,x])*(a+b*x^n)^(p+1)/(a*b*n*(p+1)) + 
  1/(a*n*(p+1))*Int[Sum[(n*(p+1)+i+1)*Coeff[Pq,x,i]*x^i,{i,0,q-1}]*(a+b*x^n)^(p+1),x] /;
 q==n-1] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && IGtQ[n,0] && LtQ[p,-1]

2:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ p<-1 ∧ q<n-1

Derivation: Binomial recurrence 2b applied q times

Note: (∑_(i=0)^q)(i+1) (Subscript[P, q])[x,i] (x^i)==(∂_x)(x (Subscript[P, q])[x]) contributed by Martin Welz on 5 June 2015

Rule: If  n∈(SuperPlus[ℤ])∧ p<-1 ∧ q<n-1, then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  

-((x (Subscript[P, q])[x] (((a+b (x^n)))^(p+1)))/(a n(p+1)))+(1/(a n(p+1)))∫( (∑_(i=0)^q)(n (p+1)+i+1) (Subscript[P, q])[x,i] (x^i)) (((a+b (x^n)))^(p+1)) dx

-((x (Subscript[P, q])[x] (((a+b (x^n)))^(p+1)))/(a n(p+1)))+(1/(a n(p+1)))∫(n (p+1) (Subscript[P, q])[x]+(∂_x)(x (Subscript[P, q])[x])) (((a+b (x^n)))^(p+1)) dx

Program code:

Int[Pq_*(a_+b_.*x_^n_.)^p_,x_Symbol] :=
  -x*Pq*(a+b*x^n)^(p+1)/(a*n*(p+1)) + 
  1/(a*n*(p+1))*Int[ExpandToSum[n*(p+1)*Pq+D[x*Pq,x],x]*(a+b*x^n)^(p+1),x] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && IGtQ[n,0] && LtQ[p,-1] && LtQ[Expon[Pq,x],n-1]

2.  ∫(Subscript[P, q])[x](((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ p<-1 ∧ q≥n

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

Rule: If  b d+a g==0, then

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

Program code:

Int[P4_/(a_+b_.*x_^4)^(3/2),x_Symbol] :=
  With[{d=Coeff[P4,x,0],e=Coeff[P4,x,1],f=Coeff[P4,x,3],g=Coeff[P4,x,4]},
  -(a*f+2*a*g*x-b*e*x^2)/(2*a*b*Sqrt[a+b*x^4]) /;
 EqQ[b*d+a*g,0]] /;
FreeQ[{a,b},x] && PolyQ[P4,x,4] && EqQ[Coeff[P4,x,2],0]

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

Rule: If  b e-3 a h==0 ∧ b d+a g==0 , then

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

Program code:

Int[P6_/(a_+b_.*x_^4)^(3/2),x_Symbol] :=
  With[{d=Coeff[P6,x,0],e=Coeff[P6,x,2],f=Coeff[P6,x,3],g=Coeff[P6,x,4],h=Coeff[P6,x,6]},
  -(a*f-2*b*d*x-2*a*h*x^3)/(2*a*b*Sqrt[a+b*x^4]) /;
 EqQ[b*e-3*a*h,0] && EqQ[b*d+a*g,0]] /;
FreeQ[{a,b},x] && PolyQ[P6,x,6] && EqQ[Coeff[P6,x,1],0] && EqQ[Coeff[P6,x,5],0]

3:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ p<-1 ∧ q≥n

Derivation: Algebraic expansion and binomial recurrence 2b applied n-1 times

Note: (∑_(i=0)^q)(i+1) (Subscript[P, q])[x,i] (x^i)==(∂_x)(x (Subscript[P, q])[x]) contributed by Martin Welz on 5 June 2015

Rule: If  n∈(SuperPlus[ℤ])∧ p<-1 ∧ q≥n, let (Subscript[Q, q-n])[x]=PolynomialQuotient[(Subscript[P, q])[x],a+b (x^n),x] and (Subscript[R, n-1])[x]=PolynomialRemainder[(Subscript[P, q])[x],a+b (x^n),x], then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  

∫(Subscript[R, n-1])[x] (((a+b (x^n)))^p)dx+∫(Subscript[Q, q-n])[x] (((a+b (x^n)))^(p+1))dx  ⟶  

-((x (Subscript[R, n-1])[x] (((a+b (x^n)))^(p+1)))/(a n(p+1)))+(1/(a n(p+1)))∫(a n(p+1) (Subscript[Q, q-n])[x]+n (p+1) (Subscript[R, n-1])[x]+(∂_x)(x (Subscript[R, n-1])[x])) (((a+b (x^n)))^(p+1)) dx

Program code:

Int[Pq_*(a_+b_.*x_^n_.)^p_,x_Symbol] :=
  With[{q=Expon[Pq,x]},
  Module[{Q=PolynomialQuotient[b^(Floor[(q-1)/n]+1)*Pq,a+b*x^n,x],
          R=PolynomialRemainder[b^(Floor[(q-1)/n]+1)*Pq,a+b*x^n,x]},
  -x*R*(a+b*x^n)^(p+1)/(a*n*(p+1)*b^(Floor[(q-1)/n]+1)) + 
  1/(a*n*(p+1)*b^(Floor[(q-1)/n]+1))*Int[(a+b*x^n)^(p+1)*ExpandToSum[a*n*(p+1)*Q+n*(p+1)*R+D[x*R,x],x],x]] /;
 GeQ[q,n]] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && IGtQ[n,0] && LtQ[p,-1]

3.  ∫(((Subscript[P, q])[x])/(a+b (x^n)))dx  when n∈(SuperPlus[ℤ])∧ q<n

1.  ∫(((Subscript[P, q])[x])/(a+b (x^3)))dx  when n∈(SuperPlus[ℤ])∧ q<3

1.  ∫((A+B x)/(a+b (x^3)))dx

1:  ∫((A+B x)/(a+b (x^3)))dx  when a (B^3)-b (A^3)==0

Derivation: Algebraic simplification

Basis: If  a (B^3)-b (A^3)==0, then ((A+B x)/(a+b (x^3)))==((B^3)/(b ((A^2)-A B x+(B^2) (x^2))))

Rule: If  a (B^3)-b (A^3)==0, then

∫((A+B x)/(a+b (x^3)))dx  ⟶  ((B^3)/b)∫(1/((A^2)-A B x+(B^2) (x^2)))dx

Program code:

Int[(A_+B_.*x_)/(a_+b_.*x_^3),x_Symbol] :=
  B^3/b*Int[1/(A^2-A*B*x+B^2*x^2),x] /;
FreeQ[{a,b,A,B},x] && EqQ[a*B^3-b*A^3,0]

2.  ∫((A+B x)/(a+b (x^3)))dx  when a (B^3)-b (A^3)≠0

1:  ∫((A+B x)/(a+b (x^3)))dx  when a (B^3)-b (A^3)≠0 ∧ (a/b)>0

Reference: G&R 2.126.2, CRC 75

Derivation: Algebraic expansion

Basis: Let (r/s)=((((a/b)))^(1/3)), then ((A+B x)/(a+b (x^3)))==-((r (B r-A s))/(3 a s))(1/(r+s x))+(r/(3 a s))((r (B r+2 A s)+s (B r-A s) x)/((r^2)-r s x+(s^2) (x^2)))

Rule: If  a (B^3)-b (A^3)≠0 ∧ (a/b)>0, let (r/s)=((((a/b)))^(1/3)), then

∫((A+B x)/(a+b (x^3)))dx  ⟶  -((r (B r-A s))/(3 a s))∫(1/(r+s x))dx+(r/(3 a s))∫((r (B r+2 A s)+s (B r-A s) x)/((r^2)-r s x+(s^2) (x^2)))dx

Program code:

Int[(A_+B_.*x_)/(a_+b_.*x_^3),x_Symbol] :=
  With[{r=Numerator[Rt[a/b,3]], s=Denominator[Rt[a/b,3]]},
  -r*(B*r-A*s)/(3*a*s)*Int[1/(r+s*x),x] + 
  r/(3*a*s)*Int[(r*(B*r+2*A*s)+s*(B*r-A*s)*x)/(r^2-r*s*x+s^2*x^2),x]] /;
FreeQ[{a,b,A,B},x] && NeQ[a*B^3-b*A^3,0] && PosQ[a/b]

2:  ∫((A+B x)/(a+b (x^3)))dx  when a (B^3)-b (A^3)≠0 ∧ (a/b)≯0

Derivation: Algebraic expansion

Basis: Let (r/s)=(((-(a/b)))^(1/3)), then ((A+B x)/(a+b (x^3)))==((r (B r+A s))/(3 a s (r-s x)))-((r (r (B r-2 A s)-s (B r+A s) x))/(3 a s ((r^2)+r s x+(s^2) (x^2))))

Rule: If  a (B^3)-b (A^3)≠0 ∧ (a/b)≯0, let (r/s)=(((-(a/b)))^(1/3)), then

∫((A+B x)/(a+b (x^3)))dx  ⟶  ((r (B r+A s))/(3 a s))∫(1/(r-s x))dx-(r/(3 a s))∫((r (B r-2 A s)-s (B r+A s) x)/((r^2)+r s x+(s^2) (x^2)))dx

Program code:

Int[(A_+B_.*x_)/(a_+b_.*x_^3),x_Symbol] :=
  With[{r=Numerator[Rt[-a/b,3]], s=Denominator[Rt[-a/b,3]]},
  r*(B*r+A*s)/(3*a*s)*Int[1/(r-s*x),x] - 
  r/(3*a*s)*Int[(r*(B*r-2*A*s)-s*(B*r+A*s)*x)/(r^2+r*s*x+s^2*x^2),x]] /;
FreeQ[{a,b,A,B},x] && NeQ[a*B^3-b*A^3,0] && NegQ[a/b]

2.  ∫((A+B x+C (x^2))/(a+b (x^3)))dx

1:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when (B^2)-A C==0 ∧ b (B^3)+a (C^3)==0

Derivation: Algebraic simplification

Basis: If  (B^2)-A C==0 ∧ b (B^3)+a (C^3)==0, then ((A+B x+C (x^2))/(a+b (x^3)))==-((C^2)/(b (B-C x)))

Rule: If  (B^2)-A C==0 ∧ b (B^3)+a (C^3)==0, then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  -((C^2)/b)∫(1/(B-C x))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    -C^2/b*Int[1/(B-C*x),x] /;
  EqQ[B^2-A*C,0] && EqQ[b*B^3+a*C^3,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

2.  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A (b^(2/3))-(a^(1/3)) (b^(1/3)) B-2 (a^(2/3)) C==0

1:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A (b^(2/3))-(a^(1/3)) (b^(1/3)) B-2 (a^(2/3)) C==0

Derivation: Algebraic expansion

Basis: If  A (b^(2/3))-(a^(1/3)) (b^(1/3)) B-2 (a^(2/3)) C==0, let q=((a^(1/3))/(b^(1/3))), then ((A+B x+C (x^2))/(a+b (x^3)))==(C/(b (q+x)))+((B+C q)/(b ((q^2)-q x+(x^2))))

Rule: If  A (b^(2/3))-(a^(1/3)) (b^(1/3)) B-2 (a^(2/3)) C==0, let q=((a^(1/3))/(b^(1/3))), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  (C/b)∫(1/(q+x))dx+((B+C q)/b)∫(1/((q^2)-q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=a^(1/3)/b^(1/3)}, C/b*Int[1/(q+x),x] + (B+C*q)/b*Int[1/(q^2-q*x+x^2),x]] /;
  EqQ[A*b^(2/3)-a^(1/3)*b^(1/3)*B-2*a^(2/3)*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

2:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A (((-b))^(2/3))-(((-a))^(1/3)) (((-b))^(1/3)) B-2 (((-a))^(2/3)) C==0

Derivation: Algebraic expansion

Basis: If  A (((-b))^(2/3))-(((-a))^(1/3)) (((-b))^(1/3)) B-2 (((-a))^(2/3)) C==0, let q=((((-a))^(1/3))/(((-b))^(1/3))), then ((A+B x+C (x^2))/(a+b (x^3)))==(C/(b (q+x)))+((B+C q)/(b ((q^2)-q x+(x^2))))

Rule: If  A (((-b))^(2/3))-(((-a))^(1/3)) (((-b))^(1/3)) B-2 (((-a))^(2/3)) C==0, let q=((((-a))^(1/3))/(((-b))^(1/3))), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  (C/b)∫(1/(q+x))dx+((B+C q)/b)∫(1/((q^2)-q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=(-a)^(1/3)/(-b)^(1/3)}, C/b*Int[1/(q+x),x] + (B+C*q)/b*Int[1/(q^2-q*x+x^2),x]] /;
  EqQ[A*(-b)^(2/3)-(-a)^(1/3)*(-b)^(1/3)*B-2*(-a)^(2/3)*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

3:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A (b^(2/3))+(((-a))^(1/3)) (b^(1/3)) B-2 (((-a))^(2/3)) C==0

Derivation: Algebraic expansion

Basis: If  A (b^(2/3))+(((-a))^(1/3)) (b^(1/3)) B-2 (((-a))^(2/3)) C==0, let q=((((-a))^(1/3))/(b^(1/3))), then ((A+B x+C (x^2))/(a+b (x^3)))==-(C/(b (q-x)))+((B-C q)/(b ((q^2)+q x+(x^2))))

Rule: If  A (b^(2/3))+(((-a))^(1/3)) (b^(1/3)) B-2 (((-a))^(2/3)) C==0, let q=((((-a))^(1/3))/(b^(1/3))), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  -(C/b)∫(1/(q-x))dx+((B-C q)/b)∫(1/((q^2)+q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=(-a)^(1/3)/b^(1/3)}, -C/b*Int[1/(q-x),x] + (B-C*q)/b*Int[1/(q^2+q*x+x^2),x]] /;
  EqQ[A*b^(2/3)+(-a)^(1/3)*b^(1/3)*B-2*(-a)^(2/3)*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

4:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A (((-b))^(2/3))+(a^(1/3)) (((-b))^(1/3)) B-2 (a^(2/3)) C==0

Derivation: Algebraic expansion

Basis: If  A (((-b))^(2/3))+(a^(1/3)) (((-b))^(1/3)) B-2 (a^(2/3)) C==0, let q=((a^(1/3))/(((-b))^(1/3))), then ((A+B x+C (x^2))/(a+b (x^3)))==-(C/(b (q-x)))+((B-C q)/(b ((q^2)+q x+(x^2))))

Rule: If  A (((-b))^(2/3))+(a^(1/3)) (((-b))^(1/3)) B-2 (a^(2/3)) C==0, let q=((a^(1/3))/(((-b))^(1/3))), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  -(C/b)∫(1/(q-x))dx+((B-C q)/b)∫(1/((q^2)+q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=a^(1/3)/(-b)^(1/3)}, -C/b*Int[1/(q-x),x] + (B-C*q)/b*Int[1/(q^2+q*x+x^2),x]] /;
  EqQ[A*(-b)^(2/3)+a^(1/3)*(-b)^(1/3)*B-2*a^(2/3)*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

5:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A-((((a/b)))^(1/3)) B-2 ((((a/b)))^(2/3)) C==0

Derivation: Algebraic expansion

Basis: If  A-((((a/b)))^(1/3)) B-2 ((((a/b)))^(2/3)) C==0, let q=((((a/b)))^(1/3)), then ((A+B x+C (x^2))/(a+b (x^3)))==(C/(b (q+x)))+((B+C q)/(b ((q^2)-q x+(x^2))))

Rule: If  A-((((a/b)))^(1/3)) B-2 ((((a/b)))^(2/3)) C==0, let q=((((a/b)))^(1/3)), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  (C/b)∫(1/(q+x))dx+((B+C q)/b)∫(1/((q^2)-q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=(a/b)^(1/3)}, C/b*Int[1/(q+x),x] + (B+C*q)/b*Int[1/(q^2-q*x+x^2),x]] /;
  EqQ[A-(a/b)^(1/3)*B-2*(a/b)^(2/3)*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=Rt[a/b,3]}, C/b*Int[1/(q+x),x] + (B+C*q)/b*Int[1/(q^2-q*x+x^2),x]] /;
  EqQ[A-Rt[a/b,3]*B-2*Rt[a/b,3]^2*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

6:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A+(((-(a/b)))^(1/3)) B-2 (((-(a/b)))^(2/3)) C==0

Derivation: Algebraic expansion

Basis: If  A+(((-(a/b)))^(1/3)) B-2 (((-(a/b)))^(2/3)) C==0, let q=(((-(a/b)))^(1/3)), then ((A+B x+C (x^2))/(a+b (x^3)))==-(C/(b (q-x)))+((B-C q)/(b ((q^2)+q x+(x^2))))

Rule: If  A+(((-(a/b)))^(1/3)) B-2 (((-(a/b)))^(2/3)) C==0, let q=(((-(a/b)))^(1/3)), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  -(C/b)∫(1/(q-x))dx+((B-C q)/b)∫(1/((q^2)+q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=(-a/b)^(1/3)}, -C/b*Int[1/(q-x),x] + (B-C*q)/b*Int[1/(q^2+q*x+x^2),x]] /;
  EqQ[A+(-a/b)^(1/3)*B-2*(-a/b)^(2/3)*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=Rt[-a/b,3]}, -C/b*Int[1/(q-x),x] + (B-C*q)/b*Int[1/(q^2+q*x+x^2),x]] /;
  EqQ[A+Rt[-a/b,3]*B-2*Rt[-a/b,3]^2*C,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

3:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when a (B^3)-b (A^3)==0 ∨ (a/b)∉ℚ

Derivation: Algebraic expansion

Basis: ((A+B x+C (x^2))/(a+b (x^3)))==((A+B x)/(a+b (x^3)))+((C (x^2))/(a+b (x^3)))

Rule: If  a (B^3)-b (A^3)==0 ∨ (a/b)∉ℚ, then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  ∫((A+B x)/(a+b (x^3)))dx+C∫((x^2)/(a+b (x^3)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    Int[(A+B*x)/(a+b*x^3),x] + C*Int[x^2/(a+b*x^3),x] /;
  EqQ[a*B^3-b*A^3,0] || Not[RationalQ[a/b]]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

4.  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A-B((((a/b)))^(1/3))+C((((a/b)))^(2/3))==0

1:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A-B((((a/b)))^(1/3))+C((((a/b)))^(2/3))==0

Derivation: Algebraic simplification

Basis: If  A-B((((a/b)))^(1/3))+C((((a/b)))^(2/3))==0, let q=((((a/b)))^(1/3)), then ((A+B x+C (x^2))/(a+b (x^3)))==((q^2)/a)((A+C q x)/((q^2)-q x+(x^2)))

Rule: If  A-B((((a/b)))^(1/3))+C((((a/b)))^(2/3))==0, let q=((((a/b)))^(1/3)), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  ((q^2)/a)∫((A+C q x)/((q^2)-q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=(a/b)^(1/3)}, q^2/a*Int[(A+C*q*x)/(q^2-q*x+x^2),x]] /;
  EqQ[A-B*(a/b)^(1/3)+C*(a/b)^(2/3),0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

2:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A+B(((-(a/b)))^(1/3))+C(((-(a/b)))^(2/3))==0

Derivation: Algebraic simplification

Basis: If  A+B(((-(a/b)))^(1/3))+C(((-(a/b)))^(2/3))==0, let q=(((-(a/b)))^(1/3)), then ((A+B x+C (x^2))/(a+b (x^3)))==(q/a)((A q+(A+B q) x)/((q^2)+q x+(x^2)))

Rule: If  A+B(((-(a/b)))^(1/3))+C(((-(a/b)))^(2/3))==0, let q=(((-(a/b)))^(1/3)), then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  (q/a)∫((A q+(A+B q) x)/((q^2)+q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2]},
    With[{q=(-a/b)^(1/3)}, q/a*Int[(A*q+(A+B*q)*x)/(q^2+q*x+x^2),x]] /;
  EqQ[A+B*(-a/b)^(1/3)+C*(-a/b)^(2/3),0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2]

5.  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when A-B((((a/b)))^(1/3))+C((((a/b)))^(2/3))≠0

1:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when a (B^3)-b (A^3)≠0 ∧ (a/b)>0 ∧ A-B((((a/b)))^(1/3))+C((((a/b)))^(2/3))≠0

Derivation: Algebraic expansion

Basis: Let q=((((a/b)))^(1/3)), then ((A+B x+C (x^2))/(a+b (x^3)))==((q (A-B q+C (q^2)))/(3 a(q+x)))+((q (q (2 A+B q-C (q^2))-(A-B q-2 C (q^2)) x))/(3 a((q^2)-q x+(x^2))))

Rule: If  a (B^3)-b (A^3)≠0 ∧ (a/b)>0, let q=((((a/b)))^(1/3)), if  A-B q+C (q^2)≠0, then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  ((q (A-B q+C (q^2)))/(3 a))∫(1/(q+x))dx+(q/(3 a))∫((q (2 A+B q-C (q^2))-(A-B q-2 C (q^2)) x)/((q^2)-q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2],q=(a/b)^(1/3)},
    q*(A-B*q+C*q^2)/(3*a)*Int[1/(q+x),x] + 
    q/(3*a)*Int[(q*(2*A+B*q-C*q^2)-(A-B*q-2*C*q^2)*x)/(q^2-q*x+x^2),x] /;
  NeQ[a*B^3-b*A^3,0] && NeQ[A-B*q+C*q^2,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2] && GtQ[a/b,0]

2:  ∫((A+B x+C (x^2))/(a+b (x^3)))dx  when a (B^3)-b (A^3)≠0 ∧ (a/b)<0 ∧ A+B(((-(a/b)))^(1/3))+C(((-(a/b)))^(2/3))≠0

Derivation: Algebraic expansion

Basis: Let q=(((-(a/b)))^(1/3)), then ((A+B x+C (x^2))/(a+b (x^3)))==((q(A+B q+C (q^2)))/(3 a(q-x)))+((q (q (2 A-B q-C (q^2))+(A+B q-2 C (q^2)) x))/(3 a((q^2)+q x+(x^2))))

Rule: If  a (B^3)-b (A^3)≠0 ∧ (a/b)<0, let q=(((-(a/b)))^(1/3)), if  A+B q+C (q^2)≠0, then

∫((A+B x+C (x^2))/(a+b (x^3)))dx  ⟶  ((q(A+B q+C (q^2)))/(3 a))∫(1/(q-x))dx+(q/(3 a))∫((q (2 A-B q-C (q^2))+(A+B q-2 C (q^2)) x)/((q^2)+q x+(x^2)))dx

Program code:

Int[P2_/(a_+b_.*x_^3),x_Symbol] :=
  With[{A=Coeff[P2,x,0],B=Coeff[P2,x,1],C=Coeff[P2,x,2],q=(-a/b)^(1/3)},
    q*(A+B*q+C*q^2)/(3*a)*Int[1/(q-x),x] + 
    q/(3*a)*Int[(q*(2*A-B*q-C*q^2)+(A+B*q-2*C*q^2)*x)/(q^2+q*x+x^2),x] /;
  NeQ[a*B^3-b*A^3,0] && NeQ[A+B*q+C*q^2,0]] /;
FreeQ[{a,b},x] && PolyQ[P2,x,2] && LtQ[a/b,0]

2:  ∫(((Subscript[P, q])[x])/(a+b (x^n)))dx  when (n/2)∈(SuperPlus[ℤ])∧ q<n

Derivation: Algebraic expansion

Basis: If  (n/2)∈ℤ ∧ q<n, then (Subscript[P, q])[x]==(∑_(i=0)^(n-1))(x^i)(Subscript[P, q])[x,i]==(∑_(i=0)^(n/2-1))(x^i)((Subscript[P, q])[x,i]+(Subscript[P, q])[x,(n/2)+i](x^(n/2)))

Note: The resulting integrands are of the form (((x^q) (r+s (x^(n/2))))/(a+b (x^n))) for which there are rules.

Rule: If  (n/2)∈(SuperPlus[ℤ])∧ q<n, then

∫(((Subscript[P, q])[x])/(a+b (x^n)))dx  ⟶  ∫ (∑_(i=0)^(n/2-1))(((x^i) ((Subscript[P, q])[x,i]+(Subscript[P, q])[x,(n/2)+i] (x^(n/2))))/((c^i) (a+b (x^n))))dx

Program code:

Int[Pq_/(a_+b_.*x_^n_),x_Symbol] :=
  With[{v=Sum[x^ii*(Coeff[Pq,x,ii]+Coeff[Pq,x,n/2+ii]*x^(n/2))/(a+b*x^n),{ii,0,n/2-1}]},
  Int[v,x] /;
 SumQ[v]] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && IGtQ[n/2,0] && Expon[Pq,x]<n

4.  ∫(((Subscript[P, q])[x])/(Sqrt[a+b (x^n)]))dx  when  n∈(SuperPlus[ℤ])∧ q<n-1

1.  ∫((c+d x)/(Sqrt[a+b (x^3)]))dx

1.  ∫((c+d x)/(Sqrt[a+b (x^3)]))dx  when  a>0

1:  ∫((c+d x)/(Sqrt[a+b (x^3)]))dx  when  a>0 ∧ b (c^3)-2 (5-3 (Sqrt[3])) a (d^3)==0

Reference: G&R 3.139

Note: If  a>0 ∧ b>0, then ArcSin[((-1+(Sqrt[3])-((((b/a)))^(1/3)) x)/(1+(Sqrt[3])+((((b/a)))^(1/3)) x))] is real when (Sqrt[a+b (x^3)]) is real.

Warning: The result is discontinuous on the real line when x==-((1+(Sqrt[3]))/q) where q->((((b/a)))^(1/3)).

Rule: If  a>0 ∧ b (c^3)-2 (5-3 (Sqrt[3])) a (d^3)==0, let q->(r/s)->(((1-(Sqrt[3])) d)/c), then

∫((c+d x)/(Sqrt[a+b (x^3)]))dx  ⟶  ((2 d (Sqrt[a+b (x^3)]))/(a (q^2) (1+(Sqrt[3])+q x)))+(((3^(1/4)) (Sqrt[2-(Sqrt[3])]) d (1+q x) (Sqrt[((1-q x+(q^2) (x^2))/(((1+(Sqrt[3])+q x))^2))]))/((q^2) (Sqrt[a+b (x^3)]) (Sqrt[((1+q x)/(((1+(Sqrt[3])+q x))^2))])))EllipticE[ArcSin[((-1+(Sqrt[3])-q x)/(1+(Sqrt[3])+q x))],-7-4 (Sqrt[3])]

∫((c+d x)/(Sqrt[a+b (x^3)]))dx  ⟶  ((2 d (s^3) (Sqrt[a+b (x^3)]))/(a (r^2) ((1+(Sqrt[3])) s+r x)))-(((3^(1/4)) (Sqrt[2-(Sqrt[3])]) d s (s+r x) (Sqrt[(((s^2)-r s x+(r^2) (x^2))/((((1+(Sqrt[3])) s+r x))^2))]))/((r^2) (Sqrt[a+b (x^3)]) (Sqrt[((s (s+r x))/((((1+(Sqrt[3])) s+r x))^2))]))) EllipticE[ArcSin[(((1-(Sqrt[3])) s+r x)/((1+(Sqrt[3])) s+r x))],-7-4 (Sqrt[3])]

Program code:

Int[(c_+d_.*x_)/Sqrt[a_+b_.*x_^3],x_Symbol] :=
  With[{r=Numer[Simplify[(1-Sqrt[3])*d/c]], s=Denom[Simplify[(1-Sqrt[3])*d/c]]},
  2*d*s^3*Sqrt[a+b*x^3]/(a*r^2*((1+Sqrt[3])*s+r*x)) - 
  3^(1/4)*Sqrt[2-Sqrt[3]]*d*s*(s+r*x)*Sqrt[(s^2-r*s*x+r^2*x^2)/((1+Sqrt[3])*s+r*x)^2]/
    (r^2*Sqrt[a+b*x^3]*Sqrt[s*(s+r*x)/((1+Sqrt[3])*s+r*x)^2])*
    EllipticE[ArcSin[((1-Sqrt[3])*s+r*x)/((1+Sqrt[3])*s+r*x)],-7-4*Sqrt[3]]] /;
FreeQ[{a,b,c,d},x] && PosQ[a] && EqQ[b*c^3-2*(5-3*Sqrt[3])*a*d^3,0]

2:  ∫((c+d x)/(Sqrt[a+b (x^3)]))dx  when  a>0 ∧ b (c^3)-2 (5-3 (Sqrt[3])) a (d^3)≠0

Derivation: Algebraic expansion

Note: Second integrand is of the form ((c+d x)/(Sqrt[a+b (x^3)])) where a>0 ∧ b (c^3)-2 (5-3 (Sqrt[3])) a (d^3)==0.

Rule: If  a>0 ∧ b (c^3)-2 (5-3 (Sqrt[3])) a (d^3)≠0, let (r/s)->((((b/a)))^(1/3)), then

∫((c+d x)/(Sqrt[a+b (x^3)]))dx  ⟶  ((c r-(1-(Sqrt[3])) d s)/r) ∫(1/(Sqrt[a+b (x^3)]))dx+(d/r) ∫(((1-(Sqrt[3])) s+r x)/(Sqrt[a+b (x^3)]))dx

Program code:

Int[(c_+d_.*x_)/Sqrt[a_+b_.*x_^3],x_Symbol] :=
  With[{r=Numer[Rt[b/a,3]], s=Denom[Rt[b/a,3]]},
  (c*r-(1-Sqrt[3])*d*s)/r*Int[1/Sqrt[a+b*x^3],x] + d/r*Int[((1-Sqrt[3])*s+r*x)/Sqrt[a+b*x^3],x]] /;
FreeQ[{a,b,c,d},x] && PosQ[a] && NeQ[b*c^3-2*(5-3*Sqrt[3])*a*d^3,0]

2.  ∫((c+d x)/(Sqrt[a+b (x^3)]))dx  when  a≯0

1:  ∫((c+d x)/(Sqrt[a+b (x^3)]))dx  when  a≯0 ∧ b (c^3)-2 (5+3 (Sqrt[3])) a (d^3)==0

Reference: G&R 3.139

Note: If  a<0 ∧ b<0, then ArcSin[((1+(Sqrt[3])+((((b/a)))^(1/3)) x)/(-1+(Sqrt[3])-((((b/a)))^(1/3)) x))] is real when (Sqrt[a+b (x^3)]) is real.

Warning: The result is discontinuous on the real line when x==-((1-(Sqrt[3]))/q) where q->((((b/a)))^(1/3)).

Rule: If  a≯0 ∧ b (c^3)-2 (5+3 (Sqrt[3])) a (d^3)==0, let q->(r/s)->(((1+(Sqrt[3])) d)/c), then

∫((c+d x)/(Sqrt[a+b (x^3)]))dx  ⟶  ((2 d (Sqrt[a+b (x^3)]))/(a (q^2) (1-(Sqrt[3])+q x)))+(((3^(1/4)) (Sqrt[2+(Sqrt[3])]) d (1+q x) (Sqrt[((1-q x+(q^2) (x^2))/(((1-(Sqrt[3])+q x))^2))]))/((q^2) (Sqrt[a+b (x^3)]) (Sqrt[-((1+q x)/(((1-(Sqrt[3])+q x))^2))])))EllipticE[ArcSin[((1+(Sqrt[3])+q x)/(1-(Sqrt[3])+q x))],-7+4 (Sqrt[3])]

∫((c+d x)/(Sqrt[a+b (x^3)]))dx  ⟶  ((2 d (s^3) (Sqrt[a+b (x^3)]))/(a (r^2) ((1-(Sqrt[3])) s+r x)))+(((3^(1/4)) (Sqrt[2+(Sqrt[3])]) d s (s+r x) (Sqrt[(((s^2)-r s x+(r^2) (x^2))/((((1-(Sqrt[3])) s+r x))^2))]))/((r^2) (Sqrt[a+b (x^3)]) (Sqrt[-((s (s+r x))/((((1-(Sqrt[3])) s+r x))^2))]))) EllipticE[ArcSin[(((1+(Sqrt[3])) s+r x)/((1-(Sqrt[3])) s+r x))],-7+4 (Sqrt[3])]

Program code:

Int[(c_+d_.*x_)/Sqrt[a_+b_.*x_^3],x_Symbol] :=
  With[{r=Numer[Simplify[(1+Sqrt[3])*d/c]], s=Denom[Simplify[(1+Sqrt[3])*d/c]]},
  2*d*s^3*Sqrt[a+b*x^3]/(a*r^2*((1-Sqrt[3])*s+r*x)) + 
  3^(1/4)*Sqrt[2+Sqrt[3]]*d*s*(s+r*x)*Sqrt[(s^2-r*s*x+r^2*x^2)/((1-Sqrt[3])*s+r*x)^2]/
    (r^2*Sqrt[a+b*x^3]*Sqrt[-s*(s+r*x)/((1-Sqrt[3])*s+r*x)^2])*
    EllipticE[ArcSin[((1+Sqrt[3])*s+r*x)/((1-Sqrt[3])*s+r*x)],-7+4*Sqrt[3]]] /;
FreeQ[{a,b,c,d},x] && NegQ[a] && EqQ[b*c^3-2*(5+3*Sqrt[3])*a*d^3,0]

2:  ∫((c+d x)/(Sqrt[a+b (x^3)]))dx  when  a≯0 ∧ b (c^3)-2 (5+3 (Sqrt[3])) a (d^3)≠0

Derivation: Algebraic expansion

Note: Second integrand is of the form ((c+d x)/(Sqrt[a+b (x^3)])) where a≯0 ∧ b (c^3)-2 (5+3 (Sqrt[3])) a (d^3)==0.

Rule: If  a≯0 ∧ b (c^3)-2 (5+3 (Sqrt[3])) a (d^3)≠0, let q->(r/s)->((((b/a)))^(1/3)), then

∫((c+d x)/(Sqrt[a+b (x^3)]))dx  ⟶  ((c r-(1+(Sqrt[3])) d s)/r) ∫(1/(Sqrt[a+b (x^3)]))dx+(d/r) ∫(((1+(Sqrt[3])) s+r x)/(Sqrt[a+b (x^3)]))dx

Program code:

Int[(c_+d_.*x_)/Sqrt[a_+b_.*x_^3],x_Symbol] :=
  With[{r=Numer[Rt[b/a,3]], s=Denom[Rt[b/a,3]]},
  (c*r-(1+Sqrt[3])*d*s)/r*Int[1/Sqrt[a+b*x^3],x] + d/r*Int[((1+Sqrt[3])*s+r*x)/Sqrt[a+b*x^3],x]] /;
FreeQ[{a,b,c,d},x] && NegQ[a] && NeQ[b*c^3-2*(5+3*Sqrt[3])*a*d^3,0]

2.  ∫((c+d (x^4))/(Sqrt[a+b (x^6)]))dx

1:  ∫((c+d (x^4))/(Sqrt[a+b (x^6)]))dx  when  2 ((((b/a)))^(2/3)) c-(1-(Sqrt[3])) d==0

Rule: If  2 ((((b/a)))^(2/3)) c-(1-(Sqrt[3])) d==0, let (r/s)->((((b/a)))^(1/3)), then

∫((c+d (x^4))/(Sqrt[a+b (x^6)]))dx  ⟶  
(((1+(Sqrt[3])) d (s^3) x (Sqrt[a+b (x^6)]))/(2 a (r^2) (s+(1+(Sqrt[3])) r (x^2))))-(((3^(1/4)) d s x (s+r (x^2)) (Sqrt[(((s^2)-r s (x^2)+(r^2) (x^4))/(((s+(1+(Sqrt[3])) r (x^2)))^2))]))/(2 (r^2) (Sqrt[((r (x^2) (s+r (x^2)))/(((s+(1+(Sqrt[3])) r (x^2)))^2))]) (Sqrt[a+b (x^6)])))EllipticE[ArcCos[((s+(1-(Sqrt[3])) r (x^2))/(s+(1+(Sqrt[3])) r (x^2)))],((2+(Sqrt[3]))/4)]

Program code:

Int[(c_+d_.*x_^4)/Sqrt[a_+b_.*x_^6],x_Symbol] :=
  With[{r=Numer[Rt[b/a,3]], s=Denom[Rt[b/a,3]]},
  (1+Sqrt[3])*d*s^3*x*Sqrt[a+b*x^6]/(2*a*r^2*(s+(1+Sqrt[3])*r*x^2)) - 
  3^(1/4)*d*s*x*(s+r*x^2)*Sqrt[(s^2-r*s*x^2+r^2*x^4)/(s+(1+Sqrt[3])*r*x^2)^2]/
    (2*r^2*Sqrt[(r*x^2*(s+r*x^2))/(s+(1+Sqrt[3])*r*x^2)^2]*Sqrt[a+b*x^6])*
    EllipticE[ArcCos[(s+(1-Sqrt[3])*r*x^2)/(s+(1+Sqrt[3])*r*x^2)],(2+Sqrt[3])/4]] /;
FreeQ[{a,b,c,d},x] && EqQ[2*Rt[b/a,3]^2*c-(1-Sqrt[3])*d,0]

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

Derivation: Algebraic expansion

Basis: ((c+d (x^4))/(Sqrt[a+b (x^6)]))==((2 c (q^2)-(1-(Sqrt[3])) d)/(2 (q^2) (Sqrt[a+b (x^6)])))+((d (1-(Sqrt[3])+2 (q^2) (x^4)))/(2 (q^2) (Sqrt[a+b (x^6)])))

Rule: If  2 ((((b/a)))^(2/3)) c-(1-(Sqrt[3])) d≠0, let q=((((b/a)))^(1/3)), then

∫((c+d (x^4))/(Sqrt[a+b (x^6)]))dx  ⟶  ((2 c (q^2)-(1-(Sqrt[3])) d)/(2 (q^2)))∫(1/(Sqrt[a+b (x^6)]))dx+(d/(2 (q^2)))∫((1-(Sqrt[3])+2 (q^2) (x^4))/(Sqrt[a+b (x^6)]))dx

Program code:

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

3.  ∫((c+d (x^2))/(Sqrt[a+b (x^8)]))dx

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

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

∫((c+d (x^2))/(Sqrt[a+b (x^8)]))dx  ⟶  
-((c d (x^3) (Sqrt[-((((c-d (x^2)))^2)/(c d (x^2)))]) (Sqrt[-(((d^2) (a+b (x^8)))/(b (c^2) (x^4)))]))/((Sqrt[2+(Sqrt[2])]) (c-d (x^2)) (Sqrt[a+b (x^8)]))) EllipticF[ArcSin[(1/2) (Sqrt[(((Sqrt[2]) (c^2)+2 c d (x^2)+(Sqrt[2]) (d^2) (x^4))/(c d (x^2)))])],-2 (1-(Sqrt[2]))]

Program code:

Int[(c_+d_.*x_^2)/Sqrt[a_+b_.*x_^8],x_Symbol] :=
  -c*d*x^3*Sqrt[-(c-d*x^2)^2/(c*d*x^2)]*Sqrt[-d^2*(a+b*x^8)/(b*c^2*x^4)]/(Sqrt[2+Sqrt[2]]*(c-d*x^2)*Sqrt[a+b*x^8])*
    EllipticF[ArcSin[1/2*Sqrt[(Sqrt[2]*c^2+2*c*d*x^2+Sqrt[2]*d^2*x^4)/(c*d*x^2)]],-2*(1-Sqrt[2])] /;
FreeQ[{a,b,c,d},x] && EqQ[b*c^4-a*d^4,0]

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

Derivation: Algebraic expansion

Basis: ((c+d (x^2))/(Sqrt[a+b (x^8)]))==(((d+((((b/a)))^(1/4)) c) (1+((((b/a)))^(1/4)) (x^2)))/(2 ((((b/a)))^(1/4)) (Sqrt[a+b (x^8)])))-(((d-((((b/a)))^(1/4)) c) (1-((((b/a)))^(1/4)) (x^2)))/(2((((b/a)))^(1/4)) (Sqrt[a+b (x^8)])))

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

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

Program code:

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

5:  ∫(((Subscript[P, q])[x])/(x (Sqrt[a+b (x^n)])))dx  when n∈(SuperPlus[ℤ])∧ (Subscript[P, q])[x,0]≠0

Derivation: Algebraic expansion

Rule: If  n∈(SuperPlus[ℤ])∧ (Subscript[P, q])[x,0]≠0, then

∫(((Subscript[P, q])[x])/(x (Sqrt[a+b (x^n)])))dx  ⟶  (Subscript[P, q])[x,0] ∫(1/(x(Sqrt[a+b (x^n)])))dx+∫(((Subscript[P, q])[x]-(Subscript[P, q])[x,0])/x)(1/(Sqrt[a+b (x^n)]))dx

Program code:

Int[Pq_/(x_*Sqrt[a_+b_.*x_^n_]),x_Symbol] :=
  Coeff[Pq,x,0]*Int[1/(x*Sqrt[a+b*x^n]),x] + 
  Int[ExpandToSum[(Pq-Coeff[Pq,x,0])/x,x]/Sqrt[a+b*x^n],x] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && IGtQ[n,0] && NeQ[Coeff[Pq,x,0],0]

6:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when (n/2)∈(SuperPlus[ℤ])∧ ¬PolynomialQ[(Subscript[P, q])[x],(x^(n/2))]

Derivation: Algebraic expansion

Basis: If  n∈(SuperPlus[ℤ]) , then (Subscript[P, q])[x]==(∑_(j=0)^(n-1))(x^j)(∑_(k=0)^((q-j)/n+1))(Subscript[P, q])[x,j+k n] (x^(k n))

Note: This rule transform integrand into a sum of terms of the form (x^k) (Subscript[Q, r])[(x^(n/2))] (((a+b (x^n)))^p).

Rule: If  (n/2)∈(SuperPlus[ℤ])∧ ¬PolynomialQ[(Subscript[P, q])[x],(x^(n/2))], then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  ∫ (∑_(j=0)^((n/2)-1))(x^j)((∑_(k=0)^(((2 (q-j))/n)+1))(Subscript[P, q])[x,j+((k n)/2)] (x^((k n)/2)))(((a+b (x^n)))^p)dx

Program code:

Int[Pq_*(a_+b_.*x_^n_)^p_,x_Symbol] :=
  Module[{q=Expon[Pq,x],j,k},
  Int[Sum[x^j*Sum[Coeff[Pq,x,j+k*n/2]*x^(k*n/2),{k,0,2*(q-j)/n+1}]*(a+b*x^n)^p,{j,0,n/2-1}],x]] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x] && IGtQ[n/2,0] && Not[PolyQ[Pq,x^(n/2)]]

7:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ q==n-1

Derivation: Algebraic expansion

Rule: If  n∈(SuperPlus[ℤ])∧ q==n-1, then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  (Subscript[P, q])[x,n-1] ∫(x^(n-1)) (((a+b (x^n)))^p)dx+∫((Subscript[P, q])[x]-(Subscript[P, q])[x,n-1] (x^(n-1))) (((a+b (x^n)))^p)dx

Program code:

Int[Pq_*(a_+b_.*x_^n_)^p_,x_Symbol] :=
  Coeff[Pq,x,n-1]*Int[x^(n-1)*(a+b*x^n)^p,x] + 
  Int[ExpandToSum[Pq-Coeff[Pq,x,n-1]*x^(n-1),x]*(a+b*x^n)^p,x] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x] && IGtQ[n,0] && Expon[Pq,x]==n-1

8:  ∫(((Subscript[P, q])[x])/(a+b (x^n)))dx  when n∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  n∈(SuperPlus[ℤ]), then

∫(((Subscript[P, q])[x])/(a+b (x^n)))dx  ⟶  ∫ ExpandIntegrand[(((Subscript[P, q])[x])/(a+b (x^n))),x]dx

Program code:

Int[Pq_/(a_+b_.*x_^n_),x_Symbol] :=
  Int[ExpandIntegrand[Pq/(a+b*x^n),x],x] /;
FreeQ[{a,b},x] && PolyQ[Pq,x] && IntegerQ[n]

9:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when n∈(SuperPlus[ℤ])∧ q-n≥0 ∧ q+n p+1≠0

Reference: G&R 2.110.5, CRC 88a

Derivation: Algebraic expansion and binomial recurrence 3a

Reference: G&R 2.104

Note: This rule reduces the degree of the polynomial in the resulting integrand.

Rule: If  n∈(SuperPlus[ℤ])∧ q+n p+1≠0 ∧ q-n≥0, then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  

(Subscript[P, q])[x,q]∫(x^q)(((a+b (x^n)))^p)+∫((Subscript[P, q])[x]-(Subscript[P, q])[x,q] (x^q))(((a+b (x^n)))^p)dxdx  ⟶  

(((Subscript[P, q])[x,q] (x^(q-n+1)) (((a+b (x^n)))^(p+1)))/(b (q+n p+1)))+
(1/(b (q+n p+1)))∫(b (q+n p+1) ((Subscript[P, q])[x]-(Subscript[P, q])[x,q] (x^q))-a (Subscript[P, q])[x,q] (q-n+1)(x^(q-n))) (((a+b (x^n)))^p)dx

Program code:

Int[Pq_*(a_+b_.*x_^n_)^p_,x_Symbol] :=
  With[{q=Expon[Pq,x]},
    With[{Pqq=Coeff[Pq,x,q]},
    Pqq*x^(q-n+1)*(a+b*x^n)^(p+1)/(b*(q+n*p+1)) + 
    1/(b*(q+n*p+1))*Int[ExpandToSum[b*(q+n*p+1)*(Pq-Pqq*x^q)-a*Pqq*(q-n+1)*x^(q-n),x]*(a+b*x^n)^p,x]] /;
  NeQ[q+n*p+1,0] && q-n≥0 && (IntegerQ[2*p] || IntegerQ[p+(q+1)/(2*n)])] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x] && IGtQ[n,0]

2:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when  n∈(SuperMinus[ℤ])

Derivation: Integration by substitution

Basis: F[x]==-Subst[((F[(x^(-1))] )/(x^2)),x,(1/x)](∂_x)(1/x)

Note: (x^q) (Subscript[P, q])[(x^(-1))] is a polynomial in x.

Rule: If  n∈(SuperMinus[ℤ]), then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  -Subst[∫(((x^q) (Subscript[P, q])[(x^(-1))] (((a+b (x^(-n))))^p))/(x^(q+2)))dx,x,(1/x)]

Program code:

Int[Pq_*(a_+b_.*x_^n_)^p_,x_Symbol] :=
  With[{q=Expon[Pq,x]},
  -Subst[Int[ExpandToSum[x^q*ReplaceAll[Pq,x->x^(-1)],x]*(a+b*x^(-n))^p/x^(q+2),x],x,1/x]] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x] && ILtQ[n,0]

5:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  when  n∈𝔽

Derivation: Integration by substitution

Basis: If  g∈(SuperPlus[ℤ]), then (x^m)(Subscript[P, q])[x] F[(x^n)]==g Subst[(x^(g(m+1)-1)) (Subscript[P, q])[(x^g)] F[(x^(g n))],x,(x^(1/g))] (∂_x)(x^(1/g))

Rule: If  n∈𝔽, let g=Denominator[n], then

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  g Subst[∫(x^(g-1)) (Subscript[P, q])[(x^g)] (((a+b (x^(g n))))^p)dx,x,(x^(1/g))]

Program code:

Int[Pq_*(a_+b_.*x_^n_)^p_,x_Symbol] :=
  With[{g=Denominator[n]},
  g*Subst[Int[x^(g-1)*ReplaceAll[Pq,x->x^g]*(a+b*x^(g*n))^p,x],x,x^(1/g)]] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x] && FractionQ[n]

6:  ∫(A+B (x^m)) (((a+b (x^n)))^p)dx  when  m-n+1==0

Derivation: Algebraic expansion

Rule:

∫(A+B (x^m)) (((a+b (x^n)))^p)dx  ⟶  A ∫(((a+b (x^n)))^p)dx+B ∫(x^m) (((a+b (x^n)))^p)dx

Program code:

Int[(A_+B_.*x_^m_.)*(a_+b_.*x_^n_)^p_.,x_Symbol] :=
  A*Int[(a+b*x^n)^p,x] + B*Int[x^m*(a+b*x^n)^p,x] /;
FreeQ[{a,b,A,B,m,n,p},x] && EqQ[m-n+1,0]

?:  ∫(A+B (x^(n/2))+C (x^n)+D (x^(3 n/2)))(((a+b (x^n)))^p)dx  when p+1∈(SuperMinus[ℤ])

Derivation: OS and binomial recurrence

Note: This special case rule can be eliminated when there is a rule for integrands of the form (Subscript[P, q])[(x^n)] (((a+b (x^n)+c (x^(2 n))))^p).

Rule: If  p+1∈(SuperMinus[ℤ]), then

∫(A+B (x^(n/2))+C (x^n)+D (x^(3 n/2)))(((a+b (x^n)))^p)dx  ⟶  
-((x (b A-a C+(b B-a D) (x^(n/2))) (((a+b (x^n)))^(p+1)))/(a b n (p+1)))-
(1/(2 a b n (p+1)))∫(((a+b (x^n)))^(p+1)) (2 a C-2 b A (n (p+1)+1)+(a D (n+2)-b B (n (2 p+3)+2)) (x^(n/2)))dx

Program code:

Int[P3_*(a_+b_.*x_^n_)^p_,x_Symbol] :=
  With[{A=Coeff[P3,x^(n/2),0],B=Coeff[P3,x^(n/2),1],C=Coeff[P3,x^(n/2),2],D=Coeff[P3,x^(n/2),3]},
  -(x*(b*A-a*C+(b*B-a*D)*x^(n/2))*(a+b*x^n)^(p+1))/(a*b*n*(p+1)) - 
  1/(2*a*b*n*(p+1))*Int[(a+b*x^n)^(p+1)*Simp[2*a*C-2*b*A*(n*(p+1)+1)+(a*D*(n+2)-b*B*(n*(2*p+3)+2))*x^(n/2),x],x]] /;
FreeQ[{a,b,n},x] && PolyQ[P3,x^(n/2),3] && ILtQ[p,-1]

7:  ∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx

Derivation: Algebraic expansion

Rule:

∫(Subscript[P, q])[x] (((a+b (x^n)))^p)dx  ⟶  ∫ ExpandIntegrand[(Subscript[P, q])[x] (((a+b (x^n)))^p),x]dx

Program code:

Int[Pq_*(a_+b_.*x_^n_)^p_.,x_Symbol] :=
  Int[ExpandIntegrand[Pq*(a+b*x^n)^p,x],x] /;
FreeQ[{a,b,n,p},x] && (PolyQ[Pq,x] || PolyQ[Pq,x^n])

S:  ∫(Subscript[P, q])[(v^n)] (((a+b (v^n)))^p)dx  when  v==f+g x

Derivation: Integration by substitution

Rule: If  v==f+g x, then

∫(Subscript[P, q])[(v^n)] (((a+b (v^n)))^p)dx  ⟶  (1/g)Subst[∫(Subscript[P, q])[(x^n)] (((a+b (x^n)))^p)dx,x,v]

Program code:

Int[Pq_*(a_+b_.*v_^n_.)^p_,x_Symbol] :=
  1/Coeff[v,x,1]*Subst[Int[SubstFor[v,Pq,x]*(a+b*x^n)^p,x],x,v] /;
FreeQ[{a,b,n,p},x] && LinearQ[v,x] && PolyQ[Pq,v^n]

Rules for integrands of the form(Subscript[P, q])[x] (((a+b (x^n)))^p) (((c+d (x^n)))^q)

1.  ∫(Subscript[P, q])[x] ((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^p) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^p)dx  when  (Subscript[a, 2]) (Subscript[b, 1])+(Subscript[a, 1]) (Subscript[b, 2])==0

1:  ∫(Subscript[P, q])[x] ((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^p) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^p)dx  when  (Subscript[a, 2]) (Subscript[b, 1])+(Subscript[a, 1]) (Subscript[b, 2])==0 ∧ (p∈ℤ ∨ (Subscript[a, 1])>0 ∧ (Subscript[a, 2])>0)

Derivation: Algebraic simplification

Basis: If  (Subscript[a, 2]) (Subscript[b, 1])+(Subscript[a, 1]) (Subscript[b, 2])==0 ∧ (p∈ℤ ∨ (Subscript[a, 1])>0 ∧ (Subscript[a, 2])>0), then ((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^p) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^p)==((((Subscript[a, 1]) (Subscript[a, 2])+(Subscript[b, 1]) (Subscript[b, 2]) (x^(2 n))))^p)

Rule: If  (Subscript[a, 2]) (Subscript[b, 1])+(Subscript[a, 1]) (Subscript[b, 2])==0 ∧ (p∈ℤ ∨ (Subscript[a, 1])>0 ∧ (Subscript[a, 2])>0), then

∫(Subscript[P, q])[x] ((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^p) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^p)dx  ⟶  ∫(Subscript[P, q])[x] ((((Subscript[a, 1]) (Subscript[a, 2])+(Subscript[b, 1]) (Subscript[b, 2]) (x^(2 n))))^p)dx

Program code:

Int[Pq_*(a1_+b1_.*x_^n_.)^p_.*(a2_+b2_.*x_^n_.)^p_.,x_Symbol] :=
  Int[Pq*(a1*a2+b1*b2*x^(2*n))^p,x] /;
FreeQ[{a1,b1,a2,b2,n,p},x] && PolyQ[Pq,x] && EqQ[a2*b1+a1*b2,0] && (IntegerQ[p] || GtQ[a1,0] && GtQ[a2,0])

2:  ∫(Subscript[P, q])[x] ((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^p) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^p)dx  when  (Subscript[a, 2]) (Subscript[b, 1])+(Subscript[a, 1]) (Subscript[b, 2])==0

Derivation: Piecewise constant extraction

Basis: If  (Subscript[a, 2]) (Subscript[b, 1])+(Subscript[a, 1]) (Subscript[b, 2])==0, then (∂_x)((((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^p) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^p))/((((Subscript[a, 1]) (Subscript[a, 2])+(Subscript[b, 1]) (Subscript[b, 2]) (x^(2 n))))^p))==0

Rule: If  (Subscript[a, 2]) (Subscript[b, 1])+(Subscript[a, 1]) (Subscript[b, 2])==0, then

∫(Subscript[P, q])[x] ((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^p) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^p)dx  ⟶  ((((((Subscript[a, 1])+(Subscript[b, 1]) (x^n)))^(FracPart[p])) ((((Subscript[a, 2])+(Subscript[b, 2]) (x^n)))^(FracPart[p])))/((((Subscript[a, 1]) (Subscript[a, 2])+(Subscript[b, 1]) (Subscript[b, 2]) (x^(2 n))))^(FracPart[p])))∫(Subscript[P, q])[x] ((((Subscript[a, 1]) (Subscript[a, 2])+(Subscript[b, 1]) (Subscript[b, 2]) (x^(2 n))))^p)dx

Program code:

Int[Pq_*(a1_+b1_.*x_^n_.)^p_.*(a2_+b2_.*x_^n_.)^p_.,x_Symbol] :=
  (a1+b1*x^n)^FracPart[p]*(a2+b2*x^n)^FracPart[p]/(a1*a2+b1*b2*x^(2*n))^FracPart[p]*
    Int[Pq*(a1*a2+b1*b2*x^(2*n))^p,x] /;
FreeQ[{a1,b1,a2,b2,n,p},x] && PolyQ[Pq,x] && EqQ[a2*b1+a1*b2,0] && Not[EqQ[n,1] && LinearQ[Pq,x]]

2:  ∫(e+f (x^n)+g (x^(2 n))) (((a+b (x^n)))^p) (((c+d (x^n)))^p)dx  when a c f==e (b c+a d) (n (p+1)+1)∧ a c g==b d e (2 n (p+1)+1)

Rule: If  a c f==e (b c+a d) (n (p+1)+1)∧ a c g==b d e (2 n (p+1)+1) , then

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

Program code:

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

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

3:  ∫(A+B (x^m)) (((a+b (x^n)))^p) (((c+d (x^n)))^q)dx  when  b c-a d≠0 ∧ m-n+1==0

Derivation: Algebraic expansion

Rule: If  b c-a d≠0 ∧ m-n+1==0, then

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

Program code:

Int[(A_+B_.*x_^m_.)*(a_.+b_.*x_^n_)^p_.*(c_+d_.*x_^n_)^q_.,x_Symbol] :=
  A*Int[(a+b*x^n)^p*(c+d*x^n)^q,x] + B*Int[x^m*(a+b*x^n)^p*(c+d*x^n)^q,x] /;
FreeQ[{a,b,c,d,A,B,m,n,p,q},x] && NeQ[b*c-a*d,0] && EqQ[m-n+1,0]

Rules for integrands of the form(((Subscript[P, m])[x])^q) (((a+b (((c+d x))^n)))^p)

1:  ∫(((Subscript[P, m])[x])^q)(((a+b (((c+d x))^n)))^p)dx  when  q∈ℤ ∧ n∈𝔽

Derivation: Integration by substitution

Basis: If  k∈(SuperPlus[ℤ]), then F[x,(((c+d x))^(1/k))]==(k/d)Subst[(x^(k-1)) F[((x^k)/d)-(c/d),x],x,(((c+d x))^(1/k))](∂_x)(((c+d x))^(1/k))

Rule: If  q∈ℤ ∧ n∈𝔽, let k=Denominator[n], then

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

Program code:

Int[Px_^q_.*(a_.+b_.*(c_+d_.*x_)^n_)^p_,x_Symbol] :=
  With[{k=Denominator[n]},
  k/d*Subst[Int[SimplifyIntegrand[x^(k-1)*ReplaceAll[Px,x->x^k/d-c/d]^q*(a+b*x^(k*n))^p,x],x],x,(c+d*x)^(1/k)]] /;
FreeQ[{a,b,c,d,p},x] && PolynomialQ[Px,x] && IntegerQ[q] && FractionQ[n]