In this paper, we provide the Euler–Maclaurin expansions for (offset) trapezoidal rule approximations of the divergent finite-range integrals
∫
a
b
f
(
x
)
d
x
\int ^b_af(x)\,dx
, where
f
∈
C
∞
(
a
,
b
)
f\in C^{\infty }(a,b)
but can have arbitrary algebraic singularities at one or both endpoints. We assume that
f
(
x
)
f(x)
has asymptotic expansions of the general forms
a
m
p
;
f
(
x
)
∼
K
(
x
−
a
)
−
1
+
∑
s
=
0
∞
c
s
(
x
−
a
)
γ
s
as
x
→
a
+
,
a
m
p
;
f
(
x
)
∼
L
(
b
−
x
)
−
1
+
∑
s
=
0
∞
d
s
(
b
−
x
)
δ
s
as
x
→
b
−
,
\begin{align*} &f(x)\sim K\,(x-a)^{-1}+\sum ^{\infty }_{s=0}c_s(x-a)^{\gamma _s} \quad \text {as}\ x\to a+,\\ &f(x)\sim L\,(b-x)^{-1}+\sum ^{\infty }_{s=0}d_s(b-x)^{\delta _s} \quad \text {as}\ x\to b-, \end{align*}
where
K
,
L
K,L
, and
c
s
,
d
s
c_s, d_s
,
s
=
0
,
1
,
…
,
s=0,1,\ldots ,
are some constants,
|
K
|
+
|
L
|
≠
0
,
|K|+|L|\neq 0,
and
γ
s
\gamma _s
and
δ
s
\delta _s
are distinct, arbitrary and, in general, complex, and different from
−
1
-1
, and satisfy
\[
ℜ
γ
0
≤
ℜ
γ
1
≤
⋯
,
lim
s
→
∞
ℜ
γ
s
=
+
∞
;
ℜ
δ
0
≤
ℜ
δ
1
≤
⋯
,
lim
s
→
∞
ℜ
δ
s
=
+
∞
.
\Re \gamma _0\leq \Re \gamma _1\leq \cdots , \ \ \lim _{s\to \infty }\Re \gamma _s=+\infty ;\quad \Re \delta _0\leq \Re \delta _1\leq \cdots , \ \ \lim _{s\to \infty }\Re \delta _s=+\infty .
\]
Hence the integral
∫
a
b
f
(
x
)
d
x
\int ^b_af(x)\,dx
exists in the sense of Hadamard finite part. The results we obtain in this work extend some of the results in [A. Sidi, Numer. Math. 98 (2004), pp. 371–387] that pertain to the cases in which
K
=
L
=
0.
K=L=0.
They are expressed in very simple terms based only on the asymptotic expansions of
f
(
x
)
f(x)
as
x
→
a
+
x\to a+
and
x
→
b
−
x\to b-
. With
h
=
(
b
−
a
)
/
n
h=(b-a)/n
, where
n
n
is a positive integer, one of these results reads
h
∑
i
=
1
n
−
1
f
(
a
+
i
h
)
∼
I
[
f
]
a
m
p
;
+
K
(
C
−
log
h
)
+
∑
s
=
0
γ
s
∉
{
2
,
4
,
…
}
∞
c
s
ζ
(
−
γ
s
)
h
γ
s
+
1
a
m
p
;
+
L
(
C
−
log
h
)
+
∑
s
=
0
δ
s
∉
{
2
,
4
,
…
}
∞
d
s
ζ
(
−
δ
s
)
h
δ
s
+
1
as
h
→
0
,
\begin{align*} h\sum ^{n-1}_{i=1}f(a+ih)\sim I[f]&+K\,(C -\log h) + \sum ^{\infty }_{\substack {s=0\\ \gamma _s\not \in \{2,4,\ldots \}}}c_s \zeta (-\gamma _s)\,h^{\gamma _s+1}\\ &+L\,(C -\log h) +\sum ^{\infty }_{\substack {s=0\\ \delta _s\not \in \{2,4,\ldots \}}}d_s\zeta (-\delta _s) h^{\delta _s+1}\quad \text {as $h\to 0$}, \end{align*}
where
I
[
f
]
I[f]
is the Hadamard finite part of
∫
a
b
f
(
x
)
d
x
\int ^b_af(x)\,dx
,
C
C
is Euler’s constant and
ζ
(
z
)
\zeta (z)
is the Riemann Zeta function. We illustrate the results with an example.