Rules for integrands involving partial derivatives

1.  ∫u Derivative[n][f][x]dx

1:  ∫Derivative[n][f][x] dx

Reference: G&R 2.02.4

Rule:

∫Derivative[n][f][x]dx  ⟶  Derivative[n-1][f][x]

Program code:

Int[Derivative[n_][f_][x_],x_Symbol] :=
  Derivative[n-1][f][x] /;
FreeQ[{f,n},x]

2.  ∫(((c (F^(a+b x))))^p) Derivative[n][f][x]dx

1:  ∫(((c (F^(a+b x))))^p) Derivative[n][f][x]dx  when  n∈(SuperPlus[ℤ])

Derivation: Integration by parts

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

∫(((c (F^(a+b x))))^p) Derivative[n][f][x]dx  ⟶  (((c (F^(a+b x))))^p) Derivative[n-1][f][x]-b p Log[F] ∫(((c (F^(a+b x))))^p) Derivative[n-1][f][x]dx

Program code:

Int[(c_.*F_^(a_.+b_.*x_))^p_.*Derivative[n_][f_][x_],x_Symbol] :=
  (c*F^(a+b*x))^p*Derivative[n-1][f][x] - b*p*Log[F]*Int[(c*F^(a+b*x))^p*Derivative[n-1][f][x],x] /;
FreeQ[{a,b,c,f,F,p},x] && IGtQ[n,0]

2:  ∫(((c (F^(a+b x))))^p) Derivative[n][f][x]dx  when  n∈(SuperMinus[ℤ])

Derivation: Integration by parts

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

∫(((c (F^(a+b x))))^p) Derivative[n][f][x]dx  ⟶  (((((c (F^(a+b x))))^p) Derivative[n][f][x])/(b p Log[F]))-(1/(b p Log[F]))∫(((c (F^(a+b x))))^p) Derivative[n+1][f][x]dx

Program code:

Int[(c_.*F_^(a_.+b_.*x_))^p_.*Derivative[n_][f_][x_],x_Symbol] :=
  (c*F^(a+b*x))^p*Derivative[n][f][x]/(b*p*Log[F]) - 1/(b*p*Log[F])*Int[(c*F^(a+b*x))^p*Derivative[n+1][f][x],x] /;
FreeQ[{a,b,c,f,F,p},x] && ILtQ[n,0]

3.  ∫Sin[a+b x] Derivative[n][f][x]dx

1:  ∫Sin[a+b x] Derivative[n][f][x]dx  when  n∈(SuperPlus[ℤ])

Derivation: Integration by parts

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

∫Sin[a+b x] Derivative[n][f][x]dx  ⟶  Sin[a+b x] Derivative[n-1][f][x]-b ∫Cos[a+b x] Derivative[n-1][f][x]dx

Program code:

Int[Sin[a_.+b_.*x_]*Derivative[n_][f_][x_],x_Symbol] :=
  Sin[a+b*x]*Derivative[n-1][f][x] - b*Int[Cos[a+b*x]*Derivative[n-1][f][x],x] /;
FreeQ[{a,b,f},x] && IGtQ[n,0]

Int[Cos[a_.+b_.*x_]*Derivative[n_][f_][x_],x_Symbol] :=
  Cos[a+b*x]*Derivative[n-1][f][x] + b*Int[Sin[a+b*x]*Derivative[n-1][f][x],x] /;
FreeQ[{a,b,f},x] && IGtQ[n,0]

2:  ∫Sin[a+b x] Derivative[n][f][x]dx  when  n∈(SuperMinus[ℤ])

Derivation: Integration by parts

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

∫Sin[a+b x] Derivative[n][f][x]dx  ⟶  -((Cos[a+b x] Derivative[n][f][x])/b)+(1/b)∫Cos[a+b x] Derivative[n+1][f][x]dx

Program code:

Int[Sin[a_.+b_.*x_]*Derivative[n_][f_][x_],x_Symbol] :=
  -Cos[a+b*x]*Derivative[n][f][x]/b + 1/b*Int[Cos[a+b*x]*Derivative[n+1][f][x],x] /;
FreeQ[{a,b,f},x] && ILtQ[n,0]

Int[Cos[a_.+b_.*x_]*Derivative[n_][f_][x_],x_Symbol] :=
  Sin[a+b*x]*Derivative[n][f][x]/b - 1/b*Int[Sin[a+b*x]*Derivative[n+1][f][x],x] /;
FreeQ[{a,b,f},x] && ILtQ[n,0]

4:  ∫F[Derivative[n-1][f][x]]Derivative[n][f][x] dx

Reference: G&R 2.02.7

Derivation: Integration by substitution

Basis: F[f[x]]f'[x]==Subst[F[x],x,f[x]]f'[x]

Basis: F[Derivative[n-1][f][x]]Derivative[n][f][x]==Subst[F[x],x,Derivative[n-1][f][x]](∂_x)Derivative[n-1][f][x]

Rule:

∫F[Derivative[n-1][f][x]]Derivative[n][f][x]dx  ⟶  Subst[∫F[x]dx,x,Derivative[n-1][f][x]]

Program code:

Int[u_*Derivative[n_][f_][x_],x_Symbol] :=
  Subst[Int[SimplifyIntegrand[SubstFor[Derivative[n-1][f][x],u,x],x],x],x,Derivative[n-1][f][x]] /;
FreeQ[{f,n},x] && FunctionOfQ[Derivative[n-1][f][x],u,x]

5:  ∫F[Derivative[m-1][f][x]Derivative[n-1][g][x]](a Derivative[m][f][x] Derivative[n-1][g][x]+a Derivative[m-1][f][x] Derivative[n][g][x]) dx

Derivation: Integration by substitution

Basis: F[f[x]g[x]](a f'[x] g[x]+a f[x] g'[x])==a Subst[F[x],x,f[x]g[x]](∂_x)(f[x]g[x])

Basis: F[Derivative[m-1][f][x]Derivative[n-1][g][x]](a Derivative[m][f][x] Derivative[n-1][g][x]+a Derivative[m-1][f][x] Derivative[n][g][x])==a Subst[F[x],x,Derivative[m-1][f][x]Derivative[n-1][g][x]](∂_x)(Derivative[m-1][f][x]Derivative[n-1][g][x])

Rule:

∫F[Derivative[m-1][f][x]Derivative[n-1][g][x]](a Derivative[m][f][x] Derivative[n-1][g][x]+a Derivative[m-1][f][x] Derivative[n][g][x])dx  ⟶  a Subst[∫F[x]dx,x,Derivative[m-1][f][x]Derivative[n-1][g][x]]

Program code:

Int[u_*(a_.*Derivative[1][f_][x_]*g_[x_]+a_.*f_[x_]*Derivative[1][g_][x_]),x_Symbol] :=
  a*Subst[Int[SimplifyIntegrand[SubstFor[f[x]*g[x],u,x],x],x],x,f[x]*g[x]] /;
FreeQ[{a,f,g},x] && FunctionOfQ[f[x]*g[x],u,x]

Int[u_*(a_.*Derivative[m_][f_][x_]*g_[x_]+a_.*Derivative[m1_][f_][x_]*Derivative[1][g_][x_]),x_Symbol] :=
  a*Subst[Int[SimplifyIntegrand[SubstFor[Derivative[m-1][f][x]*g[x],u,x],x],x],x,Derivative[m-1][f][x]*g[x]] /;
FreeQ[{a,f,g,m},x] && EqQ[m1,m-1] && FunctionOfQ[Derivative[m-1][f][x]*g[x],u,x]

Int[u_*(a_.*Derivative[m_][f_][x_]*Derivative[n1_][g_][x_]+a_.*Derivative[m1_][f_][x_]*Derivative[n_][g_][x_]),x_Symbol] :=
  a*Subst[Int[SimplifyIntegrand[SubstFor[Derivative[m-1][f][x]*Derivative[n-1][g][x],u,x],x],x],x,Derivative[m-1][f][x]*Derivative[n-1][g][x]] /;
FreeQ[{a,f,g,m,n},x] && EqQ[m1,m-1] && EqQ[n1,n-1] && FunctionOfQ[Derivative[m-1][f][x]*Derivative[n-1][g][x],u,x]

6:  ∫F[((Derivative[m-1][f][x])^(p+1))Derivative[n-1][g][x]]((Derivative[m-1][f][x])^p) (a Derivative[m][f][x] Derivative[n-1][g][x]+b Derivative[m-1][f][x] Derivative[n][g][x]) dx  when  a==b(p+1)

Derivation: Integration by substitution

Basis: If  a==b(p+1), then 
		F[((Derivative[m-1][f][x])^(p+1))Derivative[n-1][g][x]]((Derivative[m-1][f][x])^p)(a Derivative[m][f][x] Derivative[n-1][g][x]+b Derivative[m-1][f][x] Derivative[n][g][x])==b Subst[F[x],x,((Derivative[m-1][f][x])^(p+1))Derivative[n-1][g][x]](∂_x)(((Derivative[m-1][f][x])^(p+1))Derivative[n-1][g][x])

Rule: If  a==b(p+1), then

∫F[((Derivative[m-1][f][x])^(p+1))Derivative[n-1][g][x]]((Derivative[m-1][f][x])^p) (a Derivative[m][f][x] Derivative[n-1][g][x]+b Derivative[m-1][f][x] Derivative[n][g][x]) dx  ⟶  
b Subst[∫F[x]dx,x,((Derivative[m-1][f][x])^(p+1))Derivative[n-1][g][x]]

Program code:

Int[u_*f_[x_]^p_.*(a_.*Derivative[1][f_][x_]*g_[x_]+b_.*f_[x_]*Derivative[1][g_][x_]),x_Symbol] :=
  b*Subst[Int[SimplifyIntegrand[SubstFor[f[x]^(p+1)*g[x],u,x],x],x],x,f[x]^(p+1)*g[x]] /;
FreeQ[{a,b,f,g,p},x] && EqQ[a,b*(p+1)] && FunctionOfQ[f[x]^(p+1)*g[x],u,x]

Int[u_*Derivative[m1_][f_][x_]^p_.*
    (a_.*Derivative[m_][f_][x_]*g_[x_]+b_.*Derivative[m1_][f_][x_]*Derivative[1][g_][x_]),x_Symbol] :=
  b*Subst[Int[SimplifyIntegrand[SubstFor[Derivative[m-1][f][x]^(p+1)*g[x],u,x],x],x],x,
    Derivative[m-1][f][x]^(p+1)*g[x]] /;
FreeQ[{a,b,f,g,m,p},x] && EqQ[m1,m-1] && EqQ[a,b*(p+1)] && FunctionOfQ[Derivative[m-1][f][x]^(p+1)*g[x],u,x]

Int[u_*g_[x_]^q_.*
    (a_.*Derivative[m_][f_][x_]*g_[x_]+b_.*Derivative[m1_][f_][x_]*Derivative[1][g_][x_]),x_Symbol] :=
  a*Subst[Int[SimplifyIntegrand[SubstFor[Derivative[m-1][f][x]*g[x]^(q+1),u,x],x],x],x,
    Derivative[m-1][f][x]*g[x]^(q+1)] /;
FreeQ[{a,b,f,g,m,q},x] && EqQ[m1,m-1] && EqQ[a*(q+1),b] && FunctionOfQ[Derivative[m-1][f][x]*g[x]^(q+1),u,x]

Int[u_*Derivative[m1_][f_][x_]^p_.*
    (a_.*Derivative[m_][f_][x_]*Derivative[n1_][g_][x_]+b_.*Derivative[m1_][f_][x_]*Derivative[n_][g_][x_]),x_Symbol] :=
  b*Subst[Int[SimplifyIntegrand[SubstFor[Derivative[m-1][f][x]^(p+1)*Derivative[n-1][g][x],u,x],x],x],x,
    Derivative[m-1][f][x]^(p+1)*Derivative[n-1][g][x]] /;
FreeQ[{a,b,f,g,m,n,p},x] && EqQ[m1,m-1] && EqQ[n1,n-1] && EqQ[a,b*(p+1)] && 
  FunctionOfQ[Derivative[m-1][f][x]^(p+1)*Derivative[n-1][g][x],u,x]

7:  ∫F[((Derivative[m-1][f][x])^(p+1))((Derivative[n-1][g][x])^(q+1))]((Derivative[m-1][f][x])^p) ((Derivative[n-1][g][x])^q)(a Derivative[m][f][x] Derivative[n-1][g][x]+b Derivative[m-1][f][x] Derivative[n][g][x]) dx  when  a(q+1)==b(p+1)

Derivation: Integration by substitution

Basis: If  a(q+1)==b(p+1), then F[((f[x])^(p+1)) ((g[x])^(q+1))]((f[x])^p) ((g[x])^q) (a f'[x] g[x]+b f[x] g'[x])==(a/(p+1)) Subst[F[x],x,((f[x])^(p+1)) ((g[x])^(q+1))](∂_x)(((f[x])^(p+1)) ((g[x])^(q+1)))

Basis: If  a(q+1)==b(p+1), then F[((Derivative[m-1][f][x])^(p+1))((Derivative[n-1][g][x])^(q+1))]((Derivative[m-1][f][x])^p) ((Derivative[n-1][g][x])^q)(a Derivative[m][f][x] Derivative[n-1][g][x]+b Derivative[m-1][f][x] Derivative[n][g][x])==
								(a/(p+1)) Subst[F[x],x,((Derivative[m-1][f][x])^(p+1))((Derivative[n-1][g][x])^(q+1))](∂_x)(((Derivative[m-1][f][x])^(p+1))((Derivative[n-1][g][x])^(q+1)))

Rule: If  a(q+1)==b(p+1), then

∫F[((Derivative[m-1][f][x])^(p+1))((Derivative[n-1][g][x])^(q+1))]((Derivative[m-1][f][x])^p) ((Derivative[n-1][g][x])^q)(a Derivative[m][f][x] Derivative[n-1][g][x]+b Derivative[m-1][f][x] Derivative[n][g][x])dx  ⟶  
(a/(p+1)) Subst[∫F[x]dx,x,((Derivative[m-1][f][x])^(p+1))((Derivative[n-1][g][x])^(q+1))]

Program code:

Int[u_*f_[x_]^p_.*g_[x_]^q_.*(a_.*Derivative[1][f_][x_]*g_[x_]+b_.*f_[x_]*Derivative[1][g_][x_]),x_Symbol] :=
  a/(p+1)*Subst[Int[SimplifyIntegrand[SubstFor[f[x]^(p+1)*g[x]^(q+1),u,x],x],x],x,f[x]^(p+1)*g[x]^(q+1)] /;
FreeQ[{a,b,f,g,p,q},x] && EqQ[a*(q+1),b*(p+1)] && FunctionOfQ[f[x]^(p+1)*g[x]^(q+1),u,x]

Int[u_*Derivative[m1_][f_][x_]^p_.*g_[x_]^q_.*
    (a_.*Derivative[m_][f_][x_]*g_[x_]+b_.*Derivative[m1_][f_][x_]*Derivative[1][g_][x_]),x_Symbol] :=
  a/(p+1)*Subst[Int[SimplifyIntegrand[SubstFor[Derivative[m-1][f][x]^(p+1)*g[x]^(q+1),u,x],x],x],x,
    Derivative[m-1][f][x]^(p+1)*g[x]^(q+1)] /;
FreeQ[{a,b,f,g,m,p,q},x] && EqQ[m1,m-1] && EqQ[a*(q+1),b*(p+1)] && FunctionOfQ[Derivative[m-1][f][x]^(p+1)*g[x]^(q+1),u,x]

Int[u_*Derivative[m1_][f_][x_]^p_.*Derivative[n1_][g_][x_]^q_.*
    (a_.*Derivative[m_][f_][x_]*Derivative[n1_][g_][x_]+b_.*Derivative[m1_][f_][x_]*Derivative[n_][g_][x_]),x_Symbol] :=
  a/(p+1)*Subst[Int[SimplifyIntegrand[SubstFor[Derivative[m-1][f][x]^(p+1)*Derivative[n-1][g][x]^(q+1),u,x],x],x],x,
    Derivative[m-1][f][x]^(p+1)*Derivative[n-1][g][x]^(q+1)] /;
FreeQ[{a,b,f,g,m,n,p,q},x] && EqQ[m1,m-1] && EqQ[n1,n-1] && EqQ[a*(q+1),b*(p+1)] && 
  FunctionOfQ[Derivative[m-1][f][x]^(p+1)*Derivative[n-1][g][x]^(q+1),u,x]

2:  ∫f'[x]g[x]+f[x]g'[x] dx

Reference: G&R 2.02.5

Derivation: Inverse of derivative of a product rule

Rule:

∫f'[x]g[x]+f[x]g'[x]dx  ⟶  f[x] g[x]

Program code:

Int[f_'[x_]*g_[x_] + f_[x_]*g_'[x_],x_Symbol] :=
  f[x]*g[x] /;
FreeQ[{f,g},x]

3:  ∫((f'[x] g[x]-f[x] g'[x])/((g[x])^2)) dx

Reference: G&R 2.02.11

Derivation: Inverse of derivative of a quotient rule

Rule:

∫((f'[x] g[x]-f[x] g'[x])/((g[x])^2))dx  ⟶  ((f[x])/(g[x]))

Program code:

Int[(f_'[x_]*g_[x_] - f_[x_]*g_'[x_])/g_[x_]^2,x_Symbol] :=
  f[x]/g[x] /;
FreeQ[{f,g},x]

4:  ∫((f'[x] g[x]-f[x] g'[x])/(f[x] g[x])) dx

Reference: G&R 2.02.12

Derivation: Inverse of derivative of log of a quotient rule

Rule:

∫((f'[x] g[x]-f[x] g'[x])/(f[x] g[x]))dx  ⟶  Log[((f[x])/(g[x]))]

Program code:

Int[(f_'[x_]*g_[x_] - f_[x_]*g_'[x_])/(f_[x_]*g_[x_]),x_Symbol] :=
  Log[f[x]/g[x]] /;
FreeQ[{f,g},x]