1 Introduction

First publications related to packing of rectangles or squares appeared over fifty years ago. In 1957 Kosiński [6] proved, among others, that any sequence of rectangles of total area \(V\) and with sides of length not greater than \(D\) can be packed into a rectangle of side lengths \( 3D\) and \(\ (V+D^2)/D\). This result was improved in [4, 7, 8]. Other problems related to this subject were outlined in the sixties of the last century by L. Moser [9]. He asked, for example, “Can every set of rectangles of total area 1 and maximal side 1 be accommodated in a square of area 2?” (the answer is positive [5]) or “What is the smallest number A such that any set of squares of total area 1 can be packed into some rectangle of area A?” (some bounds are given in [3, 10, 11]). The question of packing of equal squares into a square as small as possible was posed in [2].

Let \(I_x\) be a square of side length \(x\). We say that a collection \(\ R_1, R_2, \dots \ \) of rectangles can be packed into \(I_x\), if it is possible to apply translations and rotations to the sets \(R_i\) so that the resulting translated and rotated rectangles are contained in \(I_x\) and have mutually disjoint interiors. Denote by \(s(x)\) the greatest number such that any collection of rectangles of sides of length not greater than \(1\) with total area smaller than \(s(x)\) can be packed into \(I_x\).

Groemer [4] proved that \( s(x) \ge (x-1)^2\ \) provided \(x\ge 3\). By Remark 3 of [5] we know that \(\ s(x) \ge x^2-2x+2 \ \) for \(\ x\ge 2\). The aim of this note is to show that \(\ s(x) \ge x^2 - O \bigl ( x^{5/6} \bigr )\). It is an open question whether the exponent \(5/6\) may be lessened in the above-presented estimation.

If all rectangles are unit squares, then \(\ s_{unit}(x) \ge x^2 -O \bigl ( x^{(3+\sqrt{2} )/7} \log x \bigr ) \) (see [1]). Also in this case we do not know whether the exponent \((3+\sqrt{2} )/7\) may be lessened. On the other hand, by [12] we know that \( s_{unit}(x)\) is smaller than \(\ x^2 - 10^{-100} \sqrt{x|x- \lfloor x+1/2 \rfloor | } \ \) provided \(\ x(x-\lfloor x \rfloor ) > 1/6\).

2 Preliminaries

Let \(\mathcal R\) be a finite collection of rectangles \(\ R_1, R_2, \dots , R_z \ \) of sides of length not greater than \(1\). Denote by \(w_i\) the width and by \(h_i\) the height of \(R_i\). Furthermore, assume that \(\ w_i \le h_i\ \) for any \(\ i=1,\dots , z\ \) and that \(\ h_1\ge h_2 \ge \dots \ge h_z\).

Let \(S\) be a rectangle of width \(\ a \ge 1 \ \) and height \(\ d\ge 1\). Denote by \(p\) a vertex of \(S\). Moreover, let \(\ S_1, \dots , S_r\ \) be a collection of rectangles \(S_i\) of width \(\ v_i <a\ \) and height smaller than \(d\) such that \(\ p\in S_i\ \) and \(\ S_i \subset S\ \) for \(\ i =1,\dots , r\). Then \(\ S \setminus \bigcup _{i=1}^r S_i\ \) is called a \(\sigma -polygon\) of base \(a\), top \(\ a-\max (v_1, \dots , v_r)\ \) and height \(d\) (see Fig. 1). The rectangle \(S\) is also called a \(\sigma \)-polygon.

Fig. 1
figure 1

\(\sigma \)-polygon

Lemma 2.1

Let \(\ a\ge 1\), \(\ d\ge 1\ \) and assume that the total area of rectangles in \(\mathcal R\) is not smaller than \(\ (a+1)(d+1)\). There exist integers \(\ j_1< \dots < j_k\ \) such that the following conditions are fulfilled:

  • \( a\le b_{i} < a +1\), where \(\ b_{i} = w_{j_{i-1}} + \dots + w_{j_i-1}\ \)   for \(\ i=1, \dots , k\ \) \((j_0=1)\);

  • \( d \le h_1+h_{j_1}+\dots +h_{j_{k-1}} <d+1\);

  • the rectangles \(\ R_1, \dots , R_{j_k-1}\ \) can be packed into the union \(\ \bigcup _{i=1}^k L_i\ \) of rectangles \((\)with mutually disjoint interiors\()\) \(L_i\) of sides of length \(b_i\) and \(h_{j_{i-1}}\);

  • the area of the uncovered part of \(\ \bigcup _{i=1}^k L_i\ \) is smaller than \(\ a+1\).

Proof

Denote by \(j_1\) the smallest integer such that \(\ w_1+w_2+\dots +w_{j_1-1} \ge a\). Moreover, denote by \(j_2\) the smallest integer satisfying \(\ w_{j_{1}}+\dots +w_{j_2-1} \ge a\ \) and so on. Let \(k\) be the smallest integer such that \(\ h_1+h_{j_1}+\dots +h_{j_{k-1}} \ge d\). Clearly, the rectangles \(\ R_1, \dots , R_{j_k-1}\ \) can be packed into the union \(\ \bigcup _{i=1}^k L_i\ \) of rectangles \((\)with mutually disjoint interiors\()\) \(L_i\) of sides of length \(b_i\) and \(h_{j_{i-1}}\) (see Fig. 2). The area of the uncovered part in each \(L_i\) does not exceed \(\ b_i(h_{j_{i-1}}-h_{j_i-1} )\). Consequently, the area of the uncovered part of \(\ \bigcup _{i=1}^k L_i\ \) (the waste in this packing) does not exceed

$$\begin{aligned} \omega _0&= (h_1-h_{j_1-1})b_1 +(h_{j_1}-h_{j_2-1})b_2+\dots +(h_{j_{k-1}}-h_{j_k-1})b_k \\&\le (h_1-h_{j_1} +h_{j_1}-h_{j_2}+ \dots +h_{j_{k-1}}-h_{j_k}) \cdot \max (b_{1}, \dots , b_{k}) \\&= (h_1-h_{j_k})\cdot \max (b_{1}, \dots , b_{k}) \\&< \max (b_{1}, \dots , b_{k}) \\&< a+1. \end{aligned}$$

\(\square \)

By the proof of Lemma 2.1 we deduce the following two results (see Figs. 2, 3, 4).

Fig. 2
figure 2

\(L_1, \ L_2, \dots \)

Fig. 3
figure 3

\(A_i\)

Fig. 4
figure 4

\(L_m\)

Lemma 2.2

Let \(\ a\ge 1\), \(\ d\ge 1\ \) and let \(n\) be a positive integer. Assume that the total area of rectangles in \(\mathcal R\) is not smaller than \(\ n(a+1)(d+1)\). There is an integer \(k\) and there are \(n\) mutually disjoint \(\sigma \)-polygons \( A_i \) (for \(\ i = 1, \dots , n\)) of base \(a_i\), top \(\ a_i - \uplambda _i\ \) and height \(d_i\), where \( a \le a_i < a+1 \), \(\ d \le d_i < d+1\ \) and \(\ \sum _{i=1}^n \uplambda _i <1\) such that the following conditions are fulfilled:

  • the rectangles \(\ R_1, \dots , R_k\ \) can be packed into \(\ \bigcup _{i=1}^n A_i;\)

  • the area of the uncovered part of \(\ \bigcup _{i=1}^n A_i\ \) is smaller than \(a+1\).

Lemma 2.3

Let \(\ a\ge 1\). There is an integer \(m\) and there are \(m\) rectangles \(L_i\) \((\)with mutually disjoint interiors\()\) of height not greater than \(1\) and width \(b_i\), where \(\ a\le b_{i} < a +1\), such that:

  • the rectangles from \(\mathcal R\) can be packed into \(\ \bigcup _{i=1}^{m} L_i\);

  • the area of the uncovered part of \(\ \bigcup _{i=1}^{m} L_i\ \) is smaller than \(\ 2a+1\).

In the following lemma we will describe how to efficiently pack rectangles \(L_i\).

Lemma 2.4

Let \(B\) be a \(\sigma \)-polygon of base \(b\), top \(\ b-\uplambda \ \) and height \(h\), where \(\ h \ge b\ge 27\ \) and \(\ 0\le \uplambda <1\). Furthermore, let \( L_i\,(\hbox {for } i=1, \dots , m )\) be a rectangle of width \(b_i\) and height \(t_i\), where

$$\begin{aligned} b\le b_1 \le \dots \le b_{m} <b+1 \end{aligned}$$

and where \(\ t_i \le 1\ \) for \(\ i=1, \dots , m\). Put \(\ \mu = b_m - b \ \) and

$$\begin{aligned} v(b,h,\uplambda , \mu )= (b^{2}+h+1)b^{-1/2} \bigl [ (2\uplambda +2\mu )^{1/2}+3b^{-1/4}\bigr ].\end{aligned}$$

If \(b\) is sufficiently large and if

$$\begin{aligned}\sum _{i=1}^{m} area(L_i) \le area(B) - v(b,h,\uplambda , \mu ),\end{aligned}$$

then \(\ L_1, \dots , L_{m}\ \) can be packed into \(B\).

Proof

Assume that \(\ b\ge 27\ \) and that the sum of the areas of rectangles \(\ L_1, \dots , L_{m}\ \) is not greater than \(\ area(B) - v(b,h,\uplambda , \mu )\).

Put

$$\begin{aligned} \vartheta _i = \arctan \frac{t_i}{b_i} + \arccos \frac{b}{\sqrt{b_i^2 + t_i^2 } } \end{aligned}$$

(see Fig. 5). Without loss of generality we can assume that \(\ \vartheta _1 \le \dots \le \vartheta _{m} \).

Fig. 5
figure 5

\(\vartheta _i\)

We pack the rectangles \(\ L_1, L_2, \dots \ \) into \(B\) as in Fig. 6. Contrary to the statement suppose that the rectangles cannot be packed. We show that this leads to a contradiction. Let \(L_{\kappa }\) be the first rectangle which cannot be packed into \(B\).

Fig. 6
figure 6

\(\ L_i \subset B\)

By \(\ b_{\kappa } \le b+\mu < b+1\ \) and \(\ u>b-\uplambda -1 >b-2\ \) in Fig. 6 we have

$$\begin{aligned} \theta \le \tan \theta = \frac{\sqrt{b_{\kappa }^2 -u^2}}{u} < \frac{\sqrt{(b+1)^2 -(b-2)^2}}{b-2} < \frac{\sqrt{6b}}{b-2}< \sqrt{\frac{7}{b}}. \end{aligned}$$

We need a more precise estimation. Since \(\ t_{\kappa } \le 1\ \) and \(\ \sin \theta \le \theta <\sqrt{7/b}\), it follows that \(\ u = b - \uplambda - t_{\kappa } \sin \theta > b - \uplambda - \sqrt{7/b}\). By \(\ b_{\kappa } \le b +\mu \ \) we obtain

$$\begin{aligned} \tan \theta&= \frac{\sqrt{b_{\kappa }^2 -u^2}}{u} \\&< \frac{\sqrt{ (b+\mu )^2-(b-\uplambda - \sqrt{7/b} )^2}}{b-\uplambda -\sqrt{7/b}} \\&= \sqrt{\frac{ 2b(\uplambda +\mu )+ \mu ^2-\uplambda ^2-7/b+2(b-\uplambda )\sqrt{7/b}}{b^2-2\uplambda b+\uplambda ^2+7/b-2(b-\uplambda )\sqrt{7/b}}} \\&< \sqrt{\frac{2b( \uplambda + \mu ) +1 +6\sqrt{b}}{b^2-2\uplambda b -6\sqrt{b}}}. \end{aligned}$$

It is easy to check that

$$\begin{aligned} \frac{2b( \uplambda + \mu ) +1 +6\sqrt{b}}{b^2-2\uplambda b -6\sqrt{b}} < 2(\uplambda + \mu )b^{-1} + 7b^{-3/2},\end{aligned}$$

for sufficiently large \(b\).

Since \(\ \sqrt{\alpha _1+\alpha _2} \le \sqrt{\alpha _1}+\sqrt{\alpha _2}\ \) for non-negative values \(\alpha _1\) and \(\alpha _2\), it follows that

$$\begin{aligned}\theta \le \tan \theta < f(b,\uplambda , \mu ),\end{aligned}$$

where

$$\begin{aligned} f(b, \uplambda , \mu )=(2\uplambda + 2\mu )^{1/2}b^{-1/2} + 7^{1/2}b^{-3/4}.\end{aligned}$$

The uncovered dark shaded part on the left side of \(B\) in Fig. 7 consists of a number of triangles. The total length of the left sides of the triangles is smaller than \(h+1\). The height of each such triangle (the height parallel to the bottom of \(B\)) is not greater than \( \sin \theta \). Consequently, the uncovered dark shaded part on the left side of \(B\) in Fig. 7 is of the area

$$\begin{aligned} \omega _l < \frac{1}{2} (h+1) \sin \theta < \frac{1}{2}(h+1) \theta < \frac{1}{2}(h+1) f(b,\uplambda , \mu ). \end{aligned}$$

Similarly we estimate the area \(\omega _r\) of the uncovered dark shaded part on the right side of \(B\):

$$\begin{aligned} \omega _r \le \omega _l < \frac{1}{2}(h+1) f(b,\uplambda , \mu ).\end{aligned}$$

Since the distance between \(p\) and \(q\) is equal to \(\uplambda \) and the height of each \(L_i\) is not greater than \(1\), it follows that the non-shaded uncovered part on the right side of \(B\) in Fig. 7 is of the area

$$\begin{aligned}\omega _u \le \uplambda < 1.\end{aligned}$$

Denote by \(\omega ^+_s\) the area of a right triangle of legs of length \(b\) and \(b \tan \theta \). Moreover, denote by \(\omega _s\) the area of the light shaded uncovered part of \(B\) in Fig. 7. By \(\ \eta _1 + \eta _2 + \dots + \eta _{\kappa } = \theta \ \) (see Fig. 6) we deduce that

$$\begin{aligned} \omega _s \le \omega ^+_s = \frac{1}{2} b^2 \tan \theta < \frac{1}{2} b^2 f(b,\uplambda , \mu ). \end{aligned}$$

The uncovered non-shaded part on the top of \(B\) in Fig. 7 is of the area

$$\begin{aligned} \omega _t < \frac{1}{2}b^2 \tan \theta + area(L_{\kappa }) < \frac{1}{2}b^2 f(b,\uplambda , \mu ) +b+1. \end{aligned}$$

Consequently, the area of the uncovered part of \(B\) does not exceed

$$\begin{aligned} \omega&= \omega _l+\omega _r+\omega _u+\omega _s+\omega _t \\&< ( b^2+h+1)f(b,\uplambda , \mu ) +b+2\\&= ( b^2+h+1) \bigl [(2\uplambda + 2\mu )^{1/2}b^{-1/2} + 7^{1/2}b^{-3/4}\bigr ] +b+2 \\&< ( b^2+h+1) \bigl [(2\uplambda + 2\mu )^{1/2}b^{-1/2} + 3b^{-3/4}\bigr ], \end{aligned}$$

for sufficiently large \(b\). This implies that

$$\begin{aligned} \sum _{i=1}^{\kappa -1} area(L_i) \ge area(B) - \omega > area(B) - v(b,h,\uplambda , \mu ), \end{aligned}$$

which is a contradiction. \(\square \)

Fig. 7
figure 7

Wasted area

3 Packing into a large square

In the main packing method \(I_x\) will be partitioned into a number of \(\sigma \)-polygons. Next, rectangles from \(\mathcal R\) will be packed into adequate \(\sigma \)-polygons.

Theorem 3.1

Let \(\ \epsilon >0\). Any collection of rectangles of sides of length not greater than \(1\) with total area smaller than \(\ x^2 -(5+\epsilon ) x^{5/6} \) can be packed into \(I_x\), for sufficiently large \(x\).

Proof

Assume that \(\ \epsilon > 0 \ \) and that \(\ x > (5+\epsilon )^{6/7}\). Consider a collection \(\mathcal C\) of rectangles \(P_i\) of sides of length not greater than \(1\) with total area smaller than \(\ x^2 - (5+\epsilon ) x^{5/6}\). If \(\mathcal C\) is finite, then put \(\ {\mathcal R}={\mathcal C}\ \) and denote by \(z\) the number of rectangles in \(\mathcal R\). Otherwise, we can assume that \(\ area(P_1)\ge area(P_2) \ge \dots \). There is an integer \(z\) such that \(\ \sum _{i=z}^{\infty } area(P_i) < \frac{1}{2}\). By [5] we know that rectangles \(\ R_z, R_{z+1}, \dots \ \) can be packed into \(I_1\). Let \(\mathcal R\) be a collection of rectangles \(R_i\), where \(\ R_1 = I_1\ \) and \(\ R_i = P_{i-1}\ \) for \(\ i=2, \dots , z\).

We show that rectangles from \(\mathcal R\) can be packed into \(I_x\) provided \(x\) is sufficiently large. Clearly,

$$\begin{aligned} \sum _{i=1}^z area(R_i) < x^2 - (5+\epsilon )x^{5/6}+1.\end{aligned}$$

We can assume that the width \(w_i\) of \(R_i\) is not greater than its height \(h_i\) for \(\ i=1,\dots , z\ \) and that \(\ h_1\ge \dots \ge h_z\). Put

$$\begin{aligned} n&= \lfloor x^{1/6} \rfloor ,\\ a&= x/n - x^{1/2}\end{aligned}$$

and

$$\begin{aligned}d=x-x^{1/2}.\end{aligned}$$

It is easy to verify that \(\ n(a+1)(d+1) < (x-1)^2.\) If \(\ \rho < n(a+1)(d+1)\), then, by [4], all rectangles from \( \mathcal R\) can be packed into \(I_x\). Otherwise, by Lemma 2.2 we deduce that there is an integer \(k_1\) and there are \(n\) mutually disjoint \(\sigma \)-polygons \( A_i\) of base \(a_i\), top \(\ a_i - \uplambda _i\ \) and height \(d_i\), where

$$\begin{aligned} a\le a_i < a+1, \ \ \ d \le d_i < d+1 \end{aligned}$$

(for \(\ i=1, \dots , n\)) and where \(\ \sum _{i=1}^n \uplambda _i <1\ \) such that \(\ R_1, \dots ,R_{k_1}\ \) can be packed into \( \ \bigcup _{i=1}^n A_i\ \) and that the waste in this packing (i.e., the area of the uncovered part of \( \ \bigcup _{i=1}^n A_i \)) is at most

$$\begin{aligned} \omega _1= a+1 = x/n-x^{1/2}+1.\end{aligned}$$

Clearly,

$$\begin{aligned}\sum _{i=1}^{k_1} area(R_i) \ge \sum _{i=1}^n area (A_i) - \omega _1.\end{aligned}$$

We lose no generality in assuming that \(\ d_1 \ge d_2 \ge \dots \ge d_n\).

\(I_x\) will be divided into: \(n\) polygons \(A_i\) and \(n+1\) other \(\sigma \)-polygons. Then \(\ R_1, \dots , R_{k_1}\ \) will be packed into \(\ \bigcup _{i=1}^n A_i.\) The remaining rectangles from \( \mathcal R\) will be first packed into larger rectangles \(L_i\) or \(L_i'\). Next, \(L_i\) and \(L_i'\) will be packed into \(\ I_x \setminus \bigcup _{i=1}^n A_i\).

We apply Lemma 2.3 for packing \(\ R_{k_1+1}, \dots , R_z\). There is an integer \(m\) and there are rectangles \(L_i\) (for \(\ i=1, \dots , m\ \)) of width \(b_i\), where

$$\begin{aligned} x^{1/2} \le b_i < x^{1/2}+1 \end{aligned}$$

and height not greater than \(1\) such that \(\ R_{k_1+1}, \dots , R_{z} \ \) can be packed into \(\ \bigcup _{i=1}^m L_i\ \) and that the waste in this packing is no more than

$$\begin{aligned} \omega _2 = 2x^{1/2}+1. \end{aligned}$$

There is no loss of generality in assuming that \(\ b_1 \le b_2 \le \dots \le b_m.\)

We divide \(I_x\) into: \(n\) rectangles \(D_i\) (for \(\ i=1,\dots , n \)) of width \(e_i \) and height \(d_i\) and one \(\sigma \)-polygon \(B_{n+1}\) of base \(\ x-d_n\ \) and height \(x\) (as in Fig. 8). Now we will describe how to choose proper values \(\ e_1, \dots , e_n\). This action depends on the width of some rectangles \(L_i\).

Fig. 8
figure 8

Partition of \(I_x\)

Put \(\ e_1 = a_1-\uplambda _1+b_{1}\). Clearly, \(D_1\) can be divided into the \(\sigma \)-polygon \(A_1\) and a \(\sigma \)-polygon \(B_1\) of base \(b_{1}\), top \(\ b_1-\uplambda _1\ \) and height \(d_1\) (see Fig. 9). Denote by \(m_1\) the greatest integer such that

$$\begin{aligned} \sum _{i=1}^{m_1} area(L_i) \le area(B_1) -v(b_1,d_1,{\uplambda }_{i}, b_{m_1}-b_1). \end{aligned}$$

By Lemma 2.4 we know that \(\ L_1, \dots , L_{m_1} \ \) can be packed into \(B_1\), for sufficiently large \(x\). Obviously,

$$\begin{aligned}\sum _{i=1}^{m_1+1} area(L_i) > area(B_1) - v(b_1,d_1,{\uplambda }_{i}, b_{m_1+1}-b_1).\end{aligned}$$

Consequently,

$$\begin{aligned}\sum _{i=1}^{m_1} area(L_i) > area(B_1) - (x^{1/2}+1)- v(b_1,d_1,{\uplambda }_{i}, b_{m_1+1}-b_1).\end{aligned}$$

We proceed in a similar way for \(\ i=2, \dots , n-1 \). Put

$$\begin{aligned} e_i = a_i - {\uplambda }_{i} +b_{m_{i-1}+1}\end{aligned}$$

for \(\ i=2, \dots , n-1\). Each \(D_i\) is divided into the \(\sigma \)-polygon \(A_i\) and a \(\sigma \)-polygon \(B_i\) of base \(b_{m_{i-1}+1}\), top \(\ b_{m_{i-1}+1}-{\uplambda }_i \ \) and height \(d_i\). Denote by \(m_i\) the greatest integer such that

$$\begin{aligned}\sum _{i=m_{i-1}+1}^{m_i} area(L_i)\le area(B_i) - v(b_{m_{i-1}+1},d_i,{\uplambda }_{i},b_{m_i}-b_{m_{i-1}+1}),\end{aligned}$$

By Lemma 2.4 we know that \(\ L_{m_{i-1}+1}, \dots , L_{m_i} \ \) can be packed into \(B_i\) provided \(x\) is sufficiently large. Moreover,

$$\begin{aligned} \sum _{i=m_{i-1}+1}^{m_i} area(L_i) > area(B_i) - (x^{1/2}+1)- v(b_{m_{i-1}+1},d_i,{\uplambda }_{i}, b_{m_i+1}-b_{m_{i-1}+1}).\end{aligned}$$

Clearly, if \(\ m_i=m\ \) for some integer \(i\), then all rectangles from \(\mathcal R\) were packed into \(I_x\).

Fig. 9
figure 9

Partition of \(D_i\)

Denote by \(m_n\) the greatest integer such that

$$\begin{aligned}\sum _{i=m_{n-1}+1}^{m_n} area(L_i)\le area(B_{n+1}) -v(x-d_n,x,1,1).\end{aligned}$$

By Lemma 2.4 we know that \(\ L_{m_{n-1}+1}, \dots , L_{m_n} \ \) can be packed into \(B_{n+1}\). Moreover,

$$\begin{aligned}\sum _{i=m_{n-1}+1}^{m_n} area(L_i) > area(B_{n+1}) - (x^{1/2}+1)- v(x-d_n,x,1,1).\end{aligned}$$

Finally, put

$$\begin{aligned} e_n = x -\sum _{i=1}^{n-1} e_i .\end{aligned}$$

The rectangle \(D_n\) is divided into the \(\sigma \)-polygon \(A_n\) and a \(\sigma \)-polygon \(B'_n\) of height \(d_n\) and base

$$\begin{aligned} b' = e_n - a_n + {\uplambda }_{n} = x - \sum _{i=1}^n a_n + \sum _{i=1}^n {\uplambda }_{i} - \sum _{i=1}^{n-1} b_{m_{i-1}+1} \end{aligned}$$

\((m_0 = 0)\). Since

$$\begin{aligned}&\sum _{i=1}^n {\uplambda }_{i} < 1,\\&x-nx^{1/2} = na \le \sum _{i=1}^n a_i < n(a+1)= x-nx^{1/2} +n\end{aligned}$$

and

$$\begin{aligned} (n-1)x^{1/2} \le \sum _{i=1}^{n-1} b_{m_{i-1}+1} < (n-1)(x^{1/2}+1), \end{aligned}$$

it follows that

$$\begin{aligned}x^{1/2} -2n + 1 \le b' < x^{1/2}+1.\end{aligned}$$

Denote by \(R_{k_2}\) the last rectangle packed in \(L_{m_{n}}\). The rectangles \(\ R_1, \dots , R_{k_1} \) were packed into \(\ A_1 \cup \dots \cup A_n\). The rectangles \(\ R_{k_1+1}, \dots , R_{k_2}\ \) were packed into \(\ B_1 \cup \dots \cup B_{n-1} \cup B_{n+1}\). The remaining rectangles \(\ R_{{k_2}+1}, \dots ,\) \( R_z\ \) will be packed into \(B_n'\). Unfortunately, it is possible that \(\ L_{m_n+1}, \dots , L_m\ \) are too large to apply Lemma 2.4 and therefore we need to repack \(\ R_{{k_2}+1}, \dots , R_z\ \) into other larger rectangles. We apply Lemma 2.3. There is an integer \(l\) and there are rectangles \(L'_i\) (for \(\ i=1, \dots , l\ \)) of width \(b'_i\), where

$$\begin{aligned}b' \le b'_i < b'+1\end{aligned}$$

and height not greater than \(1\) such that \(\ R_{k_2+1}, \dots , R_{z} \ \) can be packed into \(\ \bigcup _{i=1}^l L'_i\ \) and that the waste in this packing is no more than

$$\begin{aligned} \omega _3 = 2b'+1 < 2x^{1/2}+3.\end{aligned}$$

It remains to check that

$$\begin{aligned} \sum _{i=1}^l area(L'_i) \le area(B_n') -v(b', d_n, {\uplambda }_{n},1), \end{aligned}$$
(*)

for sufficiently large \(x\) (then, by Lemma 2.4, \(\ L'_1, \dots , L'_l\ \) and, consequently, the rectangles \(\ R_{k_2+1}, \dots , R_{z} \ \) can be packed into \(B_n'\)).

Put \(\ \mu _1 = b_{m_1+1}-b_1 \ \) and \(\ \mu _i = b_{m_i+1}-b_{m_{i-1}+1}\ \) for \(\ i=2, \dots , n-1\). Obviously, \(\ \sum _{i=1}^{n-1} \mu _i <1\). By

$$\begin{aligned} \sum _{i=1}^{k_1} area(R_i) \ge \sum _{i=1}^n area(A_i) - \omega _1,\\ \sum _{i=k_1+1}^{k_2} area(R_i) \ge \sum _{i=1}^{m_n} area(L_i) -\omega _2 \end{aligned}$$

and

$$\begin{aligned} \sum _{i=k_2+1}^{z} area(R_i) \ge \sum _{i=1}^l area(L'_i) - \omega _3, \end{aligned}$$

we have

$$\begin{aligned} \sum _{i=1}^{z} area(R_i)&\ge \sum _{i=1}^n area(A_i) - \omega _1 + \sum _{i=1}^{n-1} area(B_i) \\&- (n-1)(x^{1/2}+1)- \sum _{i=1}^{n-1} v(b_{m_{i-1}+1}, d_i, {\uplambda }_{i}, \mu _i) \\&+ area(B_{n+1}) -(x^{1/2}+1)- v(x-d_n,x,1,1) -\omega _2 \\&+ \sum _{i=1}^{l} area(L'_i) - \omega _3. \end{aligned}$$

Consequently,

$$\begin{aligned} x^2-(5+\epsilon ) x^{5/6} +1&> x^2 - area(B'_n) - \omega _1 -\omega _2 -\omega _3 -n(x^{1/2}+1)\\&- \sum _{i=1}^{n-1} v(b_{m_{i-1}+1}, d_i, {\uplambda }_{i}, \mu _i) - v(x-d_n,x,1,1) \\&+ \sum _{i=1}^{l} area(L'_i). \end{aligned}$$

To prove the inequality \((*)\) we show that

It is easy to check that

$$\begin{aligned} \omega _1 + \omega _2 + \omega _3 +1 +n(x^{1/2}+1) \le x/n + 3x^{1/2} +6 +n(x^{1/2}+1) < (1+ \epsilon /4 )x^{5/6}, \\ v(x-d_n, x, 1,1) \le v(x^{1/2}, x,1,1) = (2x+1)(2x^{-1/4} +3x^{-3/8})< \epsilon x^{5/6}/4\end{aligned}$$

and

$$\begin{aligned} v(b', d_n, {\uplambda }_{n}, 1)< \epsilon x^{5/6}/4, \end{aligned}$$

for sufficiently large \(x\). This implies that

$$\begin{aligned} \zeta&< (1+3\epsilon /4) x^{5/6}+ \sum _{i=1}^{n-1} \frac{ b_{m_{i-1}+1}^{2}+x +1 }{ b_{m_{i-1}+1}^{1/2} } \cdot \bigl [ (2{\uplambda }_{i} + 2\mu _i)^{1/2}+3b^{-1/4}_{m_{i-1}+1} \bigr ] \\&< (1+3\epsilon /4) x^{5/6}+ \frac{ (x^{1/2}+1)^{2}+x +1}{ (x^{1/2})^{1/2} } \cdot \sum _{i=1}^{n-1} \bigl [ (2{\uplambda }_{i} + 2\mu _i)^{1/2}+3x^{-1/8} \bigr ]. \end{aligned}$$

The arithmetic mean of a list of non-negative real numbers is smaller than or equal to the quadratic mean of the same list. Therefore

$$\begin{aligned} \alpha _1^{1/2} + \dots +\alpha _{n-1}^{1/2} \le \bigl [(n-1)(\alpha _1 + \dots + \alpha _{n-1}) \bigr ]^{1/2} \end{aligned}$$

for non-negative numbers \(\ \alpha _1, \dots , \alpha _{n-1}\). Since \(\ \sum _{i=1}^{n-1} ({\uplambda }_{i}+\mu _i) < 2\), it follows that

$$\begin{aligned} \sum _{i=1}^{n-1} ( 2{\uplambda }_{i} + 2\mu _i)^{1/2} < 2(n-1)^{1/2}. \end{aligned}$$

Hence

$$\begin{aligned} \zeta&< (1+3\epsilon /4)x^{5/6} + \frac{2x+2x^{1/2} +2}{x^{1/4} } \cdot \bigl [ 2 (n-1)^{1/2} + 3(n-1)x^{-1/8} \bigr ] \\&< (1+3\epsilon /4)x^{5/6} + (2x^{3/4}+2x^{1/4} +2x^{-1/4} ) \cdot \bigl [ 2(x^{1/6})^{1/2} +3x^{1/6}x^{-1/8} \bigr ] \\&= (5+3\epsilon /4)x^{5/6}+6x^{19/24}+4x^{1/3} + 6x^{7/24}+4x^{-1/6}+6x^{-5/24}. \end{aligned}$$

Consequently,

$$\begin{aligned} \zeta < (5+\epsilon )x^{5/6}, \end{aligned}$$

for sufficiently large \(x\). \(\square \)