?:  ∫u ((P[x])^p) ((Q[x])^q)dx  when p∈(SuperPlus[ℤ])∧ q∈(SuperMinus[ℤ])∧ PolyGCD[P[x],Q[x],x]≠1

Derivation: Algebraic simplification

Rule: If  p∈(SuperPlus[ℤ])∧ q∈(SuperMinus[ℤ]), let gcd=PolyGCD[P[x],Q[x],x], if gcd≠1, then

∫u ((P[x])^p) ((Q[x])^q)dx  ⟶  ∫u (gcd^(p+q)) ((PolynomialQuotient[P[x],gcd,x])^p) ((PolynomialQuotient[Q[x],gcd,x])^q) dx

Program code:

Int[u_.*P_^p_*Q_^q_,x_Symbol] :=
  Module[{gcd=PolyGCD[P,Q,x]},
  Int[u*gcd^(p+q)*PolynomialQuotient[P,gcd,x]^p*PolynomialQuotient[Q,gcd,x]^q,x] /;
 NeQ[gcd,1]] /;
IGtQ[p,0] && ILtQ[q,0] && PolyQ[P,x] && PolyQ[Q,x]

Int[u_.*P_*Q_^q_,x_Symbol] :=
  Module[{gcd=PolyGCD[P,Q,x]},
  Int[u*gcd^(q+1)*PolynomialQuotient[P,gcd,x]*PolynomialQuotient[Q,gcd,x]^q,x] /;
 NeQ[gcd,1]] /;
ILtQ[q,0] && PolyQ[P,x] && PolyQ[Q,x]

Rules for integrands of the form((P[x])^p)

0:  ∫u ((P[x])^p)dx  when  p∉ℤ ∧ P[x]==(x^m) Q[x]

Derivation: Piecewise constant extraction

Basis: If  P[x]==(x^m) Q[x], then (∂_x)(((P[x])^p)/((x^(m p)) ((Q[x])^p)))==0

Rule: If  p∉ℤ ∧ P[x]==(x^m) Q[x], then

∫u ((P[x])^p)dx  ⟶  (((P[x])^(FracPart[p]))/((x^(m FracPart[p])) ((Q[x])^(FracPart[p])))) ∫u (x^(m p)) ((Q[x])^p)dx

Program code:

Int[u_.*P_^p_.,x_Symbol] :=
  With[{m=MinimumMonomialExponent[P,x]},
  P^FracPart[p]/(x^(m*FracPart[p])*Distrib[1/x^m,P]^FracPart[p])*Int[u*x^(m*p)*Distrib[1/x^m,P]^p,x]] /;
FreeQ[p,x] && Not[IntegerQ[p]] && SumQ[P] && EveryQ[Function[BinomialQ[#,x]],P] && Not[PolyQ[P,x,2]]

1.  ∫((P[x])^p)dx  when  P[x]==P1[x] P2[x] ⋯

1:  ∫((P[(x^2)])^p)dx  when  p∈(SuperMinus[ℤ])∧ P[x]==P1[x] P2[x] ⋯

Derivation: Algebraic simplification

Note: This rule assumes host CAS distributes integer powers over products.

Rule: If  p∈(SuperMinus[ℤ])∧ P[x]==P1[x] P2[x] ⋯, then

∫((P[(x^2)])^p)dx  ⟶  ∫ExpandIntegrand[((P1[(x^2)])^p) ((P2[(x^2)])^p) ⋯,x] dx

Program code:

Int[P_^p_,x_Symbol] :=
  With[{u=Factor[ReplaceAll[P,x->Sqrt[x]]]},
  Int[ExpandIntegrand[ReplaceAll[u,x->x^2]^p,x],x] /;
 Not[SumQ[NonfreeFactors[u,x]]]] /;
PolyQ[P,x^2] && ILtQ[p,0]

2:  ∫((P[x])^p)dx  when  p∈(SuperMinus[ℤ])∧ P[x]==P1[x] P2[x] ⋯

Derivation: Algebraic simplification

Note: This rule assumes host CAS distributes integer powers over products.

Rule: If  p∈(SuperMinus[ℤ])∧ P[x]==P1[x] P2[x] ⋯, then

∫((P[x])^p) dx  ⟶  ∫((P1[x])^p) ((P2[x])^p) ⋯ dx

Program code:

Int[P_^p_,x_Symbol] :=
  With[{u=Factor[P]},
  Int[ExpandIntegrand[u^p,x],x] /;
 Not[SumQ[NonfreeFactors[u,x]]]] /;
PolyQ[P,x] && ILtQ[p,0]

2:  ∫((P[x])^p)dx  when  p∈ℤ ∧ P[x]==P1[x] P2[x] ⋯

Derivation: Algebraic simplification

Note: This rule assumes host CAS distributes integer powers over products.

Rule: If  p∈ℤ ∧ P[x]==P1[x] P2[x] ⋯, then

∫((P[x])^p) dx  ⟶  ∫((P1[x])^p) ((P2[x])^p) ⋯ dx

Program code:

Int[P_^p_,x_Symbol] :=
  With[{u=Factor[P]},
  Int[u^p,x] /;
 Not[SumQ[NonfreeFactors[u,x]]]] /;
PolyQ[P,x] && IntegerQ[p]

x:  ∫(((Subscript[P, n])[x])^p)dx  when  (Subscript[P, n])[x]==(((Subscript[Q, n1])[x])^q) (((Subscript[R, n2])[x])^r) ⋯ ∧ p∉ℤ

Derivation: Piecewise constant extraction

Basis: If  (Subscript[P, n])[x]==(((Subscript[Q, n1])[x])^q) (((Subscript[R, n2])[x])^r) ⋯, then (∂_x)((((Subscript[P, n])[x])^p)/((((Subscript[Q, n1])[x])^(p q)) (((Subscript[R, n2])[x])^(p r)) ⋯))==0

Rule: If  (Subscript[P, n])[x]==(((Subscript[Q, n1])[x])^q) (((Subscript[R, n2])[x])^r) ⋯ ∧ p∉ℤ, then

∫(((Subscript[P, n])[x])^p)dx  ⟶  ((((Subscript[P, n])[x])^p)/((((Subscript[Q, n1])[x])^(p q)) (((Subscript[R, n2])[x])^(p r)) ⋯))∫(((Subscript[Q, n1])[x])^(p q)) (((Subscript[R, n2])[x])^(p r)) ⋯ dx

Program code:

(* Int[Pn_^p_,x_Symbol] :=
  With[{u=Factor[Pn]},
  Pn^p/DistributeDegree[u,p]*Int[DistributeDegree[u,p],x] /;
 Not[SumQ[u]]] /;
PolyQ[Pn,x] && Not[IntegerQ[p]] *)

2.  ∫((P[x])^p)dx  when  p∈(SuperPlus[ℤ])

1:  ∫(((a+b x+c (x^2)+d (x^3)))^p)dx  when  p∈(SuperPlus[ℤ])∧ (c^2)-3 b d==0

Derivation: Integration by substitution

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

Rule: If  p∈(SuperPlus[ℤ])∧ (c^2)-3 b d==0, then

∫(((a+b x+c (x^2)+d (x^3)))^p)dx  ⟶  (1/(3^p)) Subst[∫(((((3 a c-(b^2))/c)+(((c^2) (x^3))/b)))^p)dx,x,(c/(3 d))+x]

Program code:

Int[(a_.+b_.*x_+c_.*x_^2+d_.*x_^3)^p_,x_Symbol] :=
  1/3^p*Subst[Int[Simp[(3*a*c-b^2)/c+c^2*x^3/b,x]^p,x],x,c/(3*d)+x] /;
FreeQ[{a,b,c,d},x] && IGtQ[p,0] && EqQ[c^2-3*b*d,0]

2:  ∫((P[x])^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

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

∫((P[x])^p)dx  ⟶  ∫ExpandToSum[((P[x])^p),x] dx

Program code:

Int[P_^p_,x_Symbol] :=
  Int[ExpandToSum[P^p,x],x] /;
PolyQ[P,x] && IGtQ[p,0]

3:  ∫((P[x])^p)dx  when  p∈ℤ ∧ P[x]==(a+b x+c (x^2)) (d+e x+f (x^2)) ⋯

Derivation: Algebraic expansion

Rule: If  p∈ℤ ∧ P[x]==(a+b x+c (x^2)) (d+e x+f (x^2)) ⋯, then

∫((P[x])^p)dx  ⟶  ∫ExpandIntegrand[((P[x])^p),x] dx

Program code:

Int[P_^p_,x_Symbol] :=
  Int[ExpandIntegrand[P^p,x],x] /;
PolyQ[P,x] && IntegerQ[p] && QuadraticProductQ[Factor[P],x]

4.  ∫(((a+b x+c (x^2)+d (x^3)))^p)dx

1.  ∫(((a+b x+d (x^3)))^p)dx

1.  ∫(((a+b x+d (x^3)))^p)dx  when  4 (b^3)+27 (a^2) d==0

1:  ∫(((a+b x+d (x^3)))^p)dx  when  4 (b^3)+27 (a^2) d==0 ∧ p∈ℤ

Derivation: Algebraic expansion

Basis: If  4 (b^3)+27 (a^2) d==0, then a+b x+d (x^3)==(1/((3^3) (a^2)))(3 a-b x) (((3 a+2 b x))^2)

Rule: If  4 (b^3)+27 (a^2) d==0 ∧ p∈ℤ, then

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

Program code:

Int[(a_.+b_.*x_+d_.*x_^3)^p_,x_Symbol] :=
  1/(3^(3*p)*a^(2*p))*Int[(3*a-b*x)^p*(3*a+2*b*x)^(2*p),x] /;
FreeQ[{a,b,d},x] && EqQ[4*b^3+27*a^2*d,0] && IntegerQ[p]

2:  ∫(((a+b x+d (x^3)))^p)dx  when  4 (b^3)+27 (a^2) d==0 ∧ p∉ℤ

Derivation: Piecewise constant extraction

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

Rule: If  4 (b^3)+27 (a^2) d==0 ∧ p∉ℤ, then

∫(((a+b x+d (x^3)))^p)dx  ⟶  ((((a+b x+d (x^3)))^p)/((((3 a-b x))^p) (((3 a+2 b x))^(2 p))))∫(((3 a-b x) )^p)(((3 a+2 b x) )^(2p))dx

Program code:

Int[(a_.+b_.*x_+d_.*x_^3)^p_,x_Symbol] :=
  (a+b*x+d*x^3)^p/((3*a-b*x)^p*(3*a+2*b*x)^(2*p))*Int[(3*a-b*x)^p*(3*a+2*b*x)^(2*p),x] /;
FreeQ[{a,b,d,p},x] && EqQ[4*b^3+27*a^2*d,0] && Not[IntegerQ[p]]

2.  ∫(((a+b x+d (x^3)))^p)dx  when  4 (b^3)+27 (a^2) d≠0

1:  ∫(((a+b x+d (x^3)))^p)dx  when  4 (b^3)+27 (a^2) d≠0 ∧ p∈ℤ

Derivation: Algebraic expansion

Basis: If  r->(((-9 a (d^2)+(Sqrt[3]) d(Sqrt[4 (b^3) d+27 (a^2) (d^2)])))^(1/3)), then a+b x+d (x^3)==((2 (b^3) d)/(3 (r^3)))-((r^3)/(18 (d^2)))+b x+d (x^3)

Basis: ((2 (b^3) d)/(3 (r^3)))-((r^3)/(18 (d^2)))+b x+d (x^3)==(1/(d^2))((((18^(1/3)) b d)/(3 r))-(r/(18^(1/3)))+d x) (((b d)/3)+(((12^(1/3)) (b^2) (d^2))/(3 (r^2)))+((r^2)/(3 (12^(1/3))))-d ((((2^(1/3)) b d)/((3^(1/3)) r))-(r/(18^(1/3)))) x+(d^2) (x^2))

Rule: If  4 (b^3)+27 (a^2) d≠0 ∧ p∈ℤ, let r->(((-9 a (d^2)+(Sqrt[3]) d(Sqrt[4 (b^3) d+27 (a^2) (d^2)])))^(1/3)), then

∫(((a+b x+d (x^3)))^p)dx  ⟶  
(1/(d^(2 p)))∫((((((18^(1/3)) b d)/(3 r))-(r/(18^(1/3)))+d x) )^p)(((((b d)/3)+(((12^(1/3)) (b^2) (d^2))/(3 (r^2)))+((r^2)/(3 (12^(1/3))))-d ((((2^(1/3)) b d)/((3^(1/3)) r))-(r/(18^(1/3)))) x+(d^2) (x^2)) )^p)dx

Program code:

Int[(a_.+b_.*x_+d_.*x_^3)^p_,x_Symbol] :=
  With[{r=Rt[-9*a*d^2+Sqrt[3]*d*Sqrt[4*b^3*d+27*a^2*d^2],3]},
  1/d^(2*p)*Int[Simp[18^(1/3)*b*d/(3*r)-r/18^(1/3)+d*x,x]^p*
    Simp[b*d/3+12^(1/3)*b^2*d^2/(3*r^2)+r^2/(3*12^(1/3))-d*(2^(1/3)*b*d/(3^(1/3)*r)-r/18^(1/3))*x+d^2*x^2,x]^p,x]] /;
FreeQ[{a,b,d},x] && NeQ[4*b^3+27*a^2*d,0] && IntegerQ[p]

2:  ∫(((a+b x+d (x^3)))^p)dx  when  4 (b^3)+27 (a^2) d≠0 ∧ p∉ℤ

Derivation: Piecewise constant extraction

Basis: If  r->(((-9 a (d^2)+(Sqrt[3]) d(Sqrt[4 (b^3) d+27 (a^2) (d^2)])))^(1/3)), then (∂_x)((((a+b x+d (x^3)))^p)/(((((((18^(1/3)) b d)/(3 r))-(r/(18^(1/3)))+d x) )^p)(((((b d)/3)+(((12^(1/3)) (b^2) (d^2))/(3 (r^2)))+((r^2)/(3 (12^(1/3))))-d ((((2^(1/3)) b d)/((3^(1/3)) r))-(r/(18^(1/3)))) x+(d^2) (x^2)) )^p)))==0

Rule: If  4 (b^3)+27 (a^2) d≠0 ∧ p∉ℤ, let r->(((-9 a (d^2)+(Sqrt[3]) d(Sqrt[4 (b^3) d+27 (a^2) (d^2)])))^(1/3)), then

∫(((a+b x+d (x^3)))^p)dx  ⟶  
((((a+b x+d (x^3)))^p)/(((((((18^(1/3)) b d)/(3 r))-(r/(18^(1/3)))+d x) )^p)(((((b d)/3)+(((12^(1/3)) (b^2) (d^2))/(3 (r^2)))+((r^2)/(3 (12^(1/3))))-d ((((2^(1/3)) b d)/((3^(1/3)) r))-(r/(18^(1/3)))) x+(d^2) (x^2)) )^p)))·
∫((((((18^(1/3)) b d)/(3 r))-(r/(18^(1/3)))+d x) )^p)(((((b d)/3)+(((12^(1/3)) (b^2) (d^2))/(3 (r^2)))+((r^2)/(3 (12^(1/3))))-d ((((2^(1/3)) b d)/((3^(1/3)) r))-(r/(18^(1/3)))) x+(d^2) (x^2)) )^p)dx

Program code:

Int[(a_.+b_.*x_+d_.*x_^3)^p_,x_Symbol] :=
  With[{r=Rt[-9*a*d^2+Sqrt[3]*d*Sqrt[4*b^3*d+27*a^2*d^2],3]},
  (a+b*x+d*x^3)^p/
    (Simp[18^(1/3)*b*d/(3*r)-r/18^(1/3)+d*x,x]^p*
      Simp[b*d/3+12^(1/3)*b^2*d^2/(3*r^2)+r^2/(3*12^(1/3))-d*(2^(1/3)*b*d/(3^(1/3)*r)-r/18^(1/3))*x+d^2*x^2,x]^p)*
    Int[Simp[18^(1/3)*b*d/(3*r)-r/18^(1/3)+d*x,x]^p*
      Simp[b*d/3+12^(1/3)*b^2*d^2/(3*r^2)+r^2/(3*12^(1/3))-d*(2^(1/3)*b*d/(3^(1/3)*r)-r/18^(1/3))*x+d^2*x^2,x]^p,x]] /;
FreeQ[{a,b,d,p},x] && NeQ[4*b^3+27*a^2*d,0] && Not[IntegerQ[p]]

2:  ∫(((a+b x+c (x^2)+d (x^3)))^p)dx

Derivation: Integration by substitution

Rule:

∫(((a+b x+c (x^2)+d (x^3)))^p)dx  ⟶  Subst[∫(((((2 (c^3)-9 b c d+27 a (d^2))/(27 (d^2)))-((((c^2)-3 b d) x)/(3 d))+d (x^3)))^p)dx,x,x+(c/(3 d))]

Program code:

Int[P3_^p_,x_Symbol] :=
  With[{a=Coeff[P3,x,0],b=Coeff[P3,x,1],c=Coeff[P3,x,2],d=Coeff[P3,x,3]},
  Subst[Int[Simp[(2*c^3-9*b*c*d+27*a*d^2)/(27*d^2)-(c^2-3*b*d)*x/(3*d)+d*x^3,x]^p,x],x,x+c/(3*d)] /;
 NeQ[c,0]] /;
FreeQ[p,x] && PolyQ[P3,x,3]

5.  ∫(((a+b x+c (x^2)+d (x^3)+e (x^4)))^p)dx

1:  ∫(((a+b x+c (x^2)+d (x^3)+e (x^4)))^p)dx  when  p∈(SuperMinus[ℤ])∧ a≠0 ∧ c==((b^2)/a) ∧ d==((b^3)/(a^2)) ∧ e==((b^4)/(a^3))

Derivation: Algebraic simplification

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

Rule: If  p∈(SuperMinus[ℤ])∧ a≠0 ∧ c==((b^2)/a) ∧ d==((b^3)/(a^2)) ∧ e==((b^4)/(a^3)), then

∫(((a+b x+c (x^2)+d (x^3)+e (x^4)))^p)dx  ⟶  (1/(a^(3 p))) ∫ExpandIntegrand[((((a-b x))^(-p))/((((a^5)-(b^5) (x^5)))^(-p))),x] dx

Program code:

Int[P4_^p_,x_Symbol] :=
  With[{a=Coeff[P4,x,0],b=Coeff[P4,x,1],c=Coeff[P4,x,2],d=Coeff[P4,x,3],e=Coeff[P4,x,4]},
  1/a^(3*p)*Int[ExpandIntegrand[(a-b*x)^(-p)/(a^5-b^5*x^5)^(-p),x],x] /;
 NeQ[a,0] && EqQ[c,b^2/a] && EqQ[d,b^3/a^2] && EqQ[e,b^4/a^3]] /;
FreeQ[p,x] && PolyQ[P4,x,4] && ILtQ[p,0]

2:  ∫(((a+b x+c (x^2)+d (x^3)+e (x^4)))^p)dx  when  (b^3)-4 a b c+8 (a^2) d==0 ∧ 2p∈ℤ

Derivation: Integration by substitution

Basis: If  (b^3)-4 a b c+8 (a^2) d==0, then  (((a+b x+c (x^2)+d (x^3)+e (x^4)))^p)==-16(a^2)  Subst[(1/(((b-4 a x))^2))(((((a(-3 (b^4)+16 a (b^2) c-64 (a^2) b d+256 (a^3) e-32 (a^2) (3 (b^2)-8 a c) (x^2)+256 (a^4) (x^4)))/(((b-4 a x))^4))))^p),x,(b/(4 a))+(1/x)](∂_x)((b/(4 a))+(1/x))

Note: The substitution transforms a dense quartic polynomial into a symmetric quartic trinomial over the 4th power of a linear.

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

∫(((a+b x+c (x^2)+d (x^3)+e (x^4)))^p)dx  ⟶  
-16(a^2) Subst[∫(1/(((b-4 a x))^2))(((((a(-3 (b^4)+16 a (b^2) c-64 (a^2) b d+256 (a^3) e-32 (a^2) (3 (b^2)-8 a c) (x^2)+256 (a^4) (x^4)))/(((b-4 a x))^4))))^p)dx,x,(b/(4 a))+(1/x)]

Program code:

Int[P4_^p_,x_Symbol] :=
  With[{a=Coeff[P4,x,0],b=Coeff[P4,x,1],c=Coeff[P4,x,2],d=Coeff[P4,x,3],e=Coeff[P4,x,4]},
  -16*a^2*Subst[
    Int[1/(b-4*a*x)^2*(a*(-3*b^4+16*a*b^2*c-64*a^2*b*d+256*a^3*e-32*a^2*(3*b^2-8*a*c)*x^2+256*a^4*x^4)/(b-4*a*x)^4)^p,x],
    x,b/(4*a)+1/x] /;
 NeQ[a,0] && NeQ[b,0] && EqQ[b^3-4*a*b*c+8*a^2*d,0]] /;
FreeQ[p,x] && PolyQ[P4,x,4] && IntegerQ[2*p] && Not[IGtQ[p,0]]

6:  ∫(((a+b (x^2)+c (x^3)+d (x^4)+e (x^6)))^p)dx  when  p∈(SuperMinus[ℤ])∧ (b^2)-3 a d==0 ∧ (b^3)-27 (a^2) e==0

Algebraic expansion

Basis: If  (b^2)-3 a d==0 ∧ (b^3)-27 (a^2) e==0, then a+b (x^2)+c (x^3)+d (x^4)+e (x^6)==(1/(27 (a^2))) (3 a+3 (a^(2/3)) (c^(1/3)) x+b (x^2)) (3 a-3 (((-1))^(1/3)) (a^(2/3)) (c^(1/3)) x+b (x^2)) (3 a+3 (((-1))^(2/3)) (a^(2/3)) (c^(1/3)) x+b (x^2))

Note: If  ((m+1)/2)∈(SuperPlus[ℤ]), then c (x^m)+(((a+b (x^2)))^m)==(∏_(k=1)^m)(a+(((-1))^(k (1-(1/m)))) (c^(1/m)) x+b (x^2))

Rule: If  p∈(SuperMinus[ℤ])∧ (b^2)-3 a d==0 ∧ (b^3)-27 (a^2) e==0, then

∫(((a+b (x^2)+c (x^3)+d (x^4)+e (x^6)))^p)dx  ⟶  
(1/((3^(3 p)) (a^(2 p)))) ∫ExpandIntegrand[(((3 a+3 (a^(2/3)) (c^(1/3)) x+b (x^2)))^p) (((3 a-3 (((-1))^(1/3)) (a^(2/3)) (c^(1/3)) x+b (x^2)))^p) (((3 a+3 (((-1))^(2/3)) (a^(2/3)) (c^(1/3)) x+b (x^2)))^p),x]dx

Program code:

Int[Q6_^p_,x_Symbol] :=
  With[{a=Coeff[Q6,x,0],b=Coeff[Q6,x,2],c=Coeff[Q6,x,3],d=Coeff[Q6,x,4],e=Coeff[Q6,x,6]},
  1/(3^(3*p)*a^(2*p))*Int[ExpandIntegrand[
    (3*a+3*Rt[a,3]^2*Rt[c,3]*x+b*x^2)^p*
    (3*a-3*(-1)^(1/3)*Rt[a,3]^2*Rt[c,3]*x+b*x^2)^p*
    (3*a+3*(-1)^(2/3)*Rt[a,3]^2*Rt[c,3]*x+b*x^2)^p,x],x] /;
 EqQ[b^2-3*a*d,0] && EqQ[b^3-27*a^2*e,0]] /;
ILtQ[p,0] && PolyQ[Q6,x,6] && EqQ[Coeff[Q6,x,1],0] && EqQ[Coeff[Q6,x,5],0] && RationalFunctionQ[u,x]