Rules for integrands involving trig integral functions

1.  ∫u SinIntegral[a+b x]dx

1:  ∫SinIntegral[a+b x]dx

Derivation: Integration by parts

Rule:

∫SinIntegral[a+b x]dx  ⟶  (((a+b x) SinIntegral[a+b x])/b)+((Cos[a+b x])/b)

Program code:

Int[SinIntegral[a_.+b_.*x_],x_Symbol] :=
  (a+b*x)*SinIntegral[a+b*x]/b + Cos[a+b*x]/b/;
FreeQ[{a,b},x]

Int[CosIntegral[a_.+b_.*x_],x_Symbol] :=
  (a+b*x)*CosIntegral[a+b*x]/b - Sin[a+b*x]/b /;
FreeQ[{a,b},x]

2.  ∫(((c+d x))^m) SinIntegral[a+b x]dx

1:  ∫((SinIntegral[b x])/x)dx

Basis: SinIntegral[z]==(1/2) i (ExpIntegralE[1,-i z]-ExpIntegralE[1,i z]+Log[-i z]-Log[i z])

Basis: CosIntegral[z]==(1/2) (-ExpIntegralE[1,-i z]-ExpIntegralE[1,i z]-Log[-i z]-Log[i z]+2 Log[z])

Rule:

∫((SinIntegral[b x])/x)dx  ⟶  
(1/2) b x HypergeometricPFQ[{1,1,1},{2,2,2},-i b x]+(1/2) b x HypergeometricPFQ[{1,1,1},{2,2,2},i b x]

Program code:

Int[SinIntegral[b_.*x_]/x_,x_Symbol] :=
  1/2*b*x*HypergeometricPFQ[{1,1,1},{2,2,2},-I*b*x] + 
  1/2*b*x*HypergeometricPFQ[{1,1,1},{2,2,2},I*b*x] /;
FreeQ[b,x]

Int[CosIntegral[b_.*x_]/x_,x_Symbol] :=
  -1/2*I*b*x*HypergeometricPFQ[{1,1,1},{2,2,2},-I*b*x] + 
  1/2*I*b*x*HypergeometricPFQ[{1,1,1},{2,2,2},I*b*x] + 
  EulerGamma*Log[x] + 
  1/2*Log[b*x]^2 /;
FreeQ[b,x]

2:  ∫(((c+d x))^m) SinIntegral[a+b x]dx  when  m≠-1

Derivation: Integration by parts

Rule: If  m≠-1, then

∫(((c+d x))^m) SinIntegral[a+b x]dx  ⟶  (((((c+d x))^(m+1)) SinIntegral[a+b x])/(d (m+1)))-(b/(d (m+1)))∫(((((c+d x))^(m+1)) Sin[a+b x])/(a+b x))dx

Program code:

Int[(c_.+d_.*x_)^m_.*SinIntegral[a_.+b_.*x_],x_Symbol] :=
  (c+d*x)^(m+1)*SinIntegral[a+b*x]/(d*(m+1)) - 
  b/(d*(m+1))*Int[(c+d*x)^(m+1)*Sin[a+b*x]/(a+b*x),x] /;
FreeQ[{a,b,c,d,m},x] && NeQ[m,-1]

Int[(c_.+d_.*x_)^m_.*CosIntegral[a_.+b_.*x_],x_Symbol] :=
  (c+d*x)^(m+1)*CosIntegral[a+b*x]/(d*(m+1)) - 
  b/(d*(m+1))*Int[(c+d*x)^(m+1)*Cos[a+b*x]/(a+b*x),x] /;
FreeQ[{a,b,c,d,m},x] && NeQ[m,-1]

2.  ∫u ((SinIntegral[a+b x])^2)dx

1:  ∫((SinIntegral[a+b x])^2)dx

Derivation: Integration by parts

Rule:

∫((SinIntegral[a+b x])^2)dx  ⟶  (((a+b x) ((SinIntegral[a+b x])^2))/b)-2∫Sin[a+b x] SinIntegral[a+b x]dx

Program code:

Int[SinIntegral[a_.+b_.*x_]^2,x_Symbol] :=
  (a+b*x)*SinIntegral[a+b*x]^2/b -
  2*Int[Sin[a+b*x]*SinIntegral[a+b*x],x] /;
FreeQ[{a,b},x]

Int[CosIntegral[a_.+b_.*x_]^2,x_Symbol] :=
  (a+b*x)*CosIntegral[a+b*x]^2/b -
  2*Int[Cos[a+b*x]*CosIntegral[a+b*x],x] /;
FreeQ[{a,b},x]

2.  ∫(((c+d x))^m) ((SinIntegral[a+b x])^2)dx

1:  ∫(x^m) ((SinIntegral[b x])^2)dx  when  m∈(SuperPlus[ℤ])

Derivation: Integration by parts

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

∫(x^m) ((SinIntegral[b x])^2)dx  ⟶  (((x^(m+1)) ((SinIntegral[b x])^2))/(m+1))-(2/(m+1))∫(x^m) Sin[b x] SinIntegral[b x]dx

Program code:

Int[x_^m_.*SinIntegral[b_.*x_]^2,x_Symbol] :=
  x^(m+1)*SinIntegral[b*x]^2/(m+1) -
  2/(m+1)*Int[x^m*Sin[b*x]*SinIntegral[b*x],x] /;
FreeQ[b,x] && IGtQ[m,0]

Int[x_^m_.*CosIntegral[b_.*x_]^2,x_Symbol] :=
  x^(m+1)*CosIntegral[b*x]^2/(m+1) -
  2/(m+1)*Int[x^m*Cos[b*x]*CosIntegral[b*x],x] /;
FreeQ[b,x] && IGtQ[m,0]

2:  ∫(((c+d x))^m) ((SinIntegral[a+b x])^2)dx  when  m∈(SuperPlus[ℤ])

Derivation: Iterated integration by parts

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

∫(((c+d x))^m) ((SinIntegral[a+b x])^2)dx  ⟶  

(((a+b x) (((c+d x))^m) ((SinIntegral[a+b x])^2))/(b (m+1)))-
(2/(m+1))∫(((c+d x))^m) Sin[a+b x] SinIntegral[a+b x]dx+(((b c-a d) m)/(b (m+1)))∫(((c+d x))^(m-1)) ((SinIntegral[a+b x])^2)dx

Program code:

Int[(c_.+d_.*x_)^m_.*SinIntegral[a_+b_.*x_]^2,x_Symbol] :=
  (a+b*x)*(c+d*x)^m*SinIntegral[a+b*x]^2/(b*(m+1)) - 
  2/(m+1)*Int[(c+d*x)^m*Sin[a+b*x]*SinIntegral[a+b*x],x] + 
  (b*c-a*d)*m/(b*(m+1))*Int[(c+d*x)^(m-1)*SinIntegral[a+b*x]^2,x] /;
FreeQ[{a,b,c,d},x] && IGtQ[m,0]

Int[(c_.+d_.*x_)^m_.*CosIntegral[a_+b_.*x_]^2,x_Symbol] :=
  (a+b*x)*(c+d*x)^m*CosIntegral[a+b*x]^2/(b*(m+1)) - 
  2/(m+1)*Int[(c+d*x)^m*Cos[a+b*x]*CosIntegral[a+b*x],x] + 
  (b*c-a*d)*m/(b*(m+1))*Int[(c+d*x)^(m-1)*CosIntegral[a+b*x]^2,x] /;
FreeQ[{a,b,c,d},x] && IGtQ[m,0]

x:  ∫(x^m) ((SinIntegral[a+b x])^2)dx  when  m+2∈(SuperMinus[ℤ])

Derivation: Inverted integration by parts

Rule: If  m+2∈(SuperMinus[ℤ]), then

∫(x^m) ((SinIntegral[a+b x])^2)dx  ⟶  ((b (x^(m+2)) ((SinIntegral[a+b x])^2))/(a (m+1)))+(((x^(m+1)) ((SinIntegral[a+b x])^2))/(m+1))-   
    ((2 b)/(a (m+1)))∫(x^(m+1)) Sin[a+b x] SinIntegral[a+b x]dx-((b (m+2))/(a (m+1)))∫(x^(m+1)) ((SinIntegral[a+b x])^2)dx

Program code:

(* Int[x_^m_.*SinIntegral[a_+b_.*x_]^2,x_Symbol] :=
  b*x^(m+2)*SinIntegral[a+b*x]^2/(a*(m+1)) +
  x^(m+1)*SinIntegral[a+b*x]^2/(m+1) -
  2*b/(a*(m+1))*Int[x^(m+1)*Sin[a+b*x]*SinIntegral[a+b*x],x] -
  b*(m+2)/(a*(m+1))*Int[x^(m+1)*SinIntegral[a+b*x]^2,x] /;
FreeQ[{a,b},x] && ILtQ[m,-2] *)

(* Int[x_^m_.*CosIntegral[a_+b_.*x_]^2,x_Symbol] :=
  b*x^(m+2)*CosIntegral[a+b*x]^2/(a*(m+1)) +
  x^(m+1)*CosIntegral[a+b*x]^2/(m+1) -
  2*b/(a*(m+1))*Int[x^(m+1)*Cos[a+b*x]*CosIntegral[a+b*x],x] -
  b*(m+2)/(a*(m+1))*Int[x^(m+1)*CosIntegral[a+b*x]^2,x] /;
FreeQ[{a,b},x] && ILtQ[m,-2] *)

3.  ∫u Sin[a+b x] SinIntegral[c+d x]dx

1:  ∫Sin[a+b x] SinIntegral[c+d x]dx

Reference:  G&R 5.32.2

Reference:  G&R 5.31.1

Derivation: Integration by parts

Rule:

∫Sin[a+b x] SinIntegral[c+d x]dx  ⟶  -((Cos[a+b x] SinIntegral[c+d x])/b)+(d/b)∫((Cos[a+b x] Sin[c+d x])/(c+d x))dx

Program code:

Int[Sin[a_.+b_.*x_]*SinIntegral[c_.+d_.*x_],x_Symbol] :=
  -Cos[a+b*x]*SinIntegral[c+d*x]/b +
  d/b*Int[Cos[a+b*x]*Sin[c+d*x]/(c+d*x),x] /;
FreeQ[{a,b,c,d},x]

Int[Cos[a_.+b_.*x_]*CosIntegral[c_.+d_.*x_],x_Symbol] :=
  Sin[a+b*x]*CosIntegral[c+d*x]/b -
  d/b*Int[Sin[a+b*x]*Cos[c+d*x]/(c+d*x),x] /;
FreeQ[{a,b,c,d},x]

2.  ∫(((e+f x))^m) Sin[a+b x] SinIntegral[c+d x]dx

1:  ∫(((e+f x))^m) Sin[a+b x] SinIntegral[c+d x]dx  when  m∈(SuperPlus[ℤ])

Derivation: Integration by parts

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

∫(((e+f x))^m) Sin[a+b x] SinIntegral[c+d x]dx  ⟶  
-(((((e+f x))^m) Cos[a+b x] SinIntegral[c+d x])/b)+(d/b)∫(((((e+f x))^m) Cos[a+b x] Sin[c+d x])/(c+d x))dx+((f m)/b)∫(((e+f x))^(m-1)) Cos[a+b x] SinIntegral[c+d x]dx

Program code:

Int[(e_.+f_.*x_)^m_.*Sin[a_.+b_.*x_]*SinIntegral[c_.+d_.*x_],x_Symbol] :=
  -(e+f*x)^m*Cos[a+b*x]*SinIntegral[c+d*x]/b +
  d/b*Int[(e+f*x)^m*Cos[a+b*x]*Sin[c+d*x]/(c+d*x),x] +
  f*m/b*Int[(e+f*x)^(m-1)*Cos[a+b*x]*SinIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0]

Int[(e_.+f_.*x_)^m_.*Cos[a_.+b_.*x_]*CosIntegral[c_.+d_.*x_],x_Symbol] :=
  (e+f*x)^m*Sin[a+b*x]*CosIntegral[c+d*x]/b -
  d/b*Int[(e+f*x)^m*Sin[a+b*x]*Cos[c+d*x]/(c+d*x),x] -
  f*m/b*Int[(e+f*x)^(m-1)*Sin[a+b*x]*CosIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0]

2:  ∫(((e+f x))^m) Sin[a+b x] SinIntegral[c+d x]dx  when  m+1∈(SuperMinus[ℤ])

Derivation: Inverted integration by parts

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

∫(((e+f x))^m) Sin[a+b x] SinIntegral[c+d x]dx  ⟶  
(((((e+f x))^(m+1)) Sin[a+b x] SinIntegral[c+d x])/(f (m+1)))-(d/(f (m+1)))∫(((((e+f x))^(m+1)) Sin[a+b x] Sin[c+d x])/(c+d x))dx-(b/(f (m+1)))∫(((e+f x))^(m+1)) Cos[a+b x] SinIntegral[c+d x]dx

Program code:

Int[(e_.+f_.*x_)^m_*Sin[a_.+b_.*x_]*SinIntegral[c_.+d_.*x_],x_Symbol] :=
  (e+f*x)^(m+1)*Sin[a+b*x]*SinIntegral[c+d*x]/(f*(m+1)) -
  d/(f*(m+1))*Int[(e+f*x)^(m+1)*Sin[a+b*x]*Sin[c+d*x]/(c+d*x),x] -
  b/(f*(m+1))*Int[(e+f*x)^(m+1)*Cos[a+b*x]*SinIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && ILtQ[m,-1]

Int[(e_.+f_.*x_)^m_.*Cos[a_.+b_.*x_]*CosIntegral[c_.+d_.*x_],x_Symbol] :=
  (e+f*x)^(m+1)*Cos[a+b*x]*CosIntegral[c+d*x]/(f*(m+1)) -
  d/(f*(m+1))*Int[(e+f*x)^(m+1)*Cos[a+b*x]*Cos[c+d*x]/(c+d*x),x] +
  b/(f*(m+1))*Int[(e+f*x)^(m+1)*Sin[a+b*x]*CosIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && ILtQ[m,-1]

4.  ∫u Cos[a+b x] SinIntegral[c+d x]dx

1:  ∫Cos[a+b x] SinIntegral[c+d x]dx

Reference:  G&R 5.32.1

Reference:  G&R 5.31.2

Derivation: Integration by parts

Rule:

∫Cos[a+b x] SinIntegral[c+d x]dx  ⟶  ((Sin[a+b x] SinIntegral[c+d x])/b)-(d/b)∫((Sin[a+b x] Sin[c+d x])/(c+d x))dx

Program code:

Int[Cos[a_.+b_.*x_]*SinIntegral[c_.+d_.*x_],x_Symbol] :=
  Sin[a+b*x]*SinIntegral[c+d*x]/b -
  d/b*Int[Sin[a+b*x]*Sin[c+d*x]/(c+d*x),x] /;
FreeQ[{a,b,c,d},x]

Int[Sin[a_.+b_.*x_]*CosIntegral[c_.+d_.*x_],x_Symbol] :=
  -Cos[a+b*x]*CosIntegral[c+d*x]/b +
  d/b*Int[Cos[a+b*x]*Cos[c+d*x]/(c+d*x),x] /;
FreeQ[{a,b,c,d},x]

2.  ∫(((e+f x))^m) Cos[a+b x] SinIntegral[c+d x]dx

1:  ∫(((e+f x))^m) Cos[a+b x] SinIntegral[c+d x]dx  when  m∈(SuperPlus[ℤ])

Derivation: Integration by parts

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

∫(((e+f x))^m) Cos[a+b x] SinIntegral[c+d x]dx  ⟶  
(((((e+f x))^m) Sin[a+b x] SinIntegral[c+d x])/b)-(d/b)∫(((((e+f x))^m) Sin[a+b x] Sin[c+d x])/(c+d x))dx-((f m)/b)∫(((e+f x))^(m-1)) Sin[a+b x] SinIntegral[c+d x]dx

Program code:

Int[(e_.+f_.*x_)^m_.*Cos[a_.+b_.*x_]*SinIntegral[c_.+d_.*x_],x_Symbol] :=
  (e+f*x)^m*Sin[a+b*x]*SinIntegral[c+d*x]/b -
  d/b*Int[(e+f*x)^m*Sin[a+b*x]*Sin[c+d*x]/(c+d*x),x] -
  f*m/b*Int[(e+f*x)^(m-1)*Sin[a+b*x]*SinIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0]

Int[(e_.+f_.*x_)^m_.*Sin[a_.+b_.*x_]*CosIntegral[c_.+d_.*x_],x_Symbol] :=
  -(e+f*x)^m*Cos[a+b*x]*CosIntegral[c+d*x]/b +
  d/b*Int[(e+f*x)^m*Cos[a+b*x]*Cos[c+d*x]/(c+d*x),x] +
  f*m/b*Int[(e+f*x)^(m-1)*Cos[a+b*x]*CosIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[m,0]

2:  ∫(((e+f x))^m) Cos[a+b x] SinIntegral[c+d x]dx  when  m+1∈(SuperMinus[ℤ])

Derivation: Inverted integration by parts

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

∫(((e+f x))^m) Cos[a+b x] SinIntegral[c+d x]dx  ⟶  
(((((e+f x))^(m+1)) Cos[a+b x] SinIntegral[c+d x])/(f (m+1)))-(d/(f (m+1)))∫(((((e+f x))^(m+1)) Cos[a+b x] Sin[c+d x])/(c+d x))dx+(b/(f (m+1)))∫(((e+f x))^(m+1)) Sin[a+b x] SinIntegral[c+d x]dx

Program code:

Int[(e_.+f_.*x_)^m_.*Cos[a_.+b_.*x_]*SinIntegral[c_.+d_.*x_],x_Symbol] :=
  (e+f*x)^(m+1)*Cos[a+b*x]*SinIntegral[c+d*x]/(f*(m+1)) -
  d/(f*(m+1))*Int[(e+f*x)^(m+1)*Cos[a+b*x]*Sin[c+d*x]/(c+d*x),x] +
  b/(f*(m+1))*Int[(e+f*x)^(m+1)*Sin[a+b*x]*SinIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && ILtQ[m,-1]

Int[(e_.+f_.*x_)^m_*Sin[a_.+b_.*x_]*CosIntegral[c_.+d_.*x_],x_Symbol] :=
  (e+f*x)^(m+1)*Sin[a+b*x]*CosIntegral[c+d*x]/(f*(m+1)) -
  d/(f*(m+1))*Int[(e+f*x)^(m+1)*Sin[a+b*x]*Cos[c+d*x]/(c+d*x),x] -
  b/(f*(m+1))*Int[(e+f*x)^(m+1)*Cos[a+b*x]*CosIntegral[c+d*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && ILtQ[m,-1]

5.  ∫u SinIntegral[d (a+b Log[c (x^n)])]dx

1:  ∫SinIntegral[d (a+b Log[c (x^n)])]dx

Derivation: Integration by parts

Basis: (∂_x)SinIntegral[d (a+b Log[c (x^n)])]==((b d n Sin[d (a+b Log[c (x^n)])])/(x (d (a+b Log[c (x^n)]))))

Rule: If  m≠-1, then

∫SinIntegral[d (a+b Log[c (x^n)])]dx  ⟶  x SinIntegral[d (a+b Log[c (x^n)])]-b d n ∫((Sin[d (a+b Log[c (x^n)])])/(d (a+b Log[c (x^n)])))dx

Program code:

Int[SinIntegral[d_.*(a_.+b_.*Log[c_.*x_^n_.])],x_Symbol] :=
  x*SinIntegral[d*(a+b*Log[c*x^n])] - b*d*n*Int[Sin[d*(a+b*Log[c*x^n])]/(d*(a+b*Log[c*x^n])),x] /;
FreeQ[{a,b,c,d,n},x]

Int[CosIntegral[d_.*(a_.+b_.*Log[c_.*x_^n_.])],x_Symbol] :=
  x*CosIntegral[d*(a+b*Log[c*x^n])] - b*d*n*Int[Cos[d*(a+b*Log[c*x^n])]/(d*(a+b*Log[c*x^n])),x] /;
FreeQ[{a,b,c,d,n},x]

2:  ∫((SinIntegral[d (a+b Log[c (x^n)])])/x)dx

Derivation: Integration by substitution

Basis: ((F[Log[c (x^n)]])/x)==(1/n) Subst[F[x],x,Log[c (x^n)]] (∂_x)Log[c (x^n)]

Rule:

∫((SinIntegral[d (a+b Log[c (x^n)])])/x)dx  ⟶  (1/n) Subst[SinIntegral[d (a+b x)],x,Log[c (x^n)]]

Program code:

Int[F_[d_.*(a_.+b_.*Log[c_.*x_^n_.])]/x_,x_Symbol] :=
  1/n*Subst[F[d*(a+b*x)],x,Log[c*x^n]] /;
FreeQ[{a,b,c,d,n},x] && MemberQ[{SinIntegral,CosIntegral},x]

3:  ∫(((e x))^m) SinIntegral[d (a+b Log[c (x^n)])]dx  when  m≠-1

Derivation: Integration by parts

Basis: (∂_x)SinIntegral[d (a+b Log[c (x^n)])]==((b d n Sin[d (a+b Log[c (x^n)])])/(x (d (a+b Log[c (x^n)]))))

Rule: If  m≠-1, then

∫(((e x))^m) SinIntegral[d (a+b Log[c (x^n)])]dx  ⟶  (((((e x))^(m+1)) SinIntegral[d (a+b Log[c (x^n)])])/(e (m+1)))-((b d n)/(m+1)) ∫(((((e x))^m) Sin[d (a+b Log[c (x^n)])])/(d (a+b Log[c (x^n)])))dx

Program code:

Int[(e_.*x_)^m_.*SinIntegral[d_.*(a_.+b_.*Log[c_.*x_^n_.])],x_Symbol] :=
  (e*x)^(m+1)*SinIntegral[d*(a+b*Log[c*x^n])]/(e*(m+1)) - 
  b*d*n/(m+1)*Int[(e*x)^m*Sin[d*(a+b*Log[c*x^n])]/(d*(a+b*Log[c*x^n])),x] /;
FreeQ[{a,b,c,d,e,m,n},x] && NeQ[m,-1]

Int[(e_.*x_)^m_.*CosIntegral[d_.*(a_.+b_.*Log[c_.*x_^n_.])],x_Symbol] :=
  (e*x)^(m+1)*CosIntegral[d*(a+b*Log[c*x^n])]/(e*(m+1)) - 
  b*d*n/(m+1)*Int[(e*x)^m*Cos[d*(a+b*Log[c*x^n])]/(d*(a+b*Log[c*x^n])),x] /;
FreeQ[{a,b,c,d,e,m,n},x] && NeQ[m,-1]