Task 5. (20 points) A lot consisting of three packages of shares from oil extraction companies, Razneft, Dvaneft, and Trineft, is up for auction. The total number of shares in the packages of Razneft and Dvaneft is equal to the number of shares in the Trineft package. The package of Dvaneft shares is 4 times cheaper than the package of Razneft shares, and their combined value is equal to the value of the Trineft package. The price of one share of Razneft exceeds the price of one share of Dvaneft by an amount ranging from 16 thousand rubles to 20 thousand rubles, while the price of one share of Trineft fluctuates between 42 thousand rubles and 60 thousand rubles. Determine the smallest and largest percentage of the total number of shares in the lot that the Dvaneft share package can constitute.
# Solution.

Let's introduce the following notations:

$x$ - the price of one share of Dvanefte,

$y$ - the price of one share of Raznefte,

$z$ - the price of one share of Trinefte,

$n$ - the number of shares in a Dvanefte package,

$m$ - the number of shares in a Raznefte package.

The other conditions of the problem can be written as a system of equations and inequalities:
$\left\{\begin{array}{l}4 x n=y m, \\ x n+y m=z(m+n), \\ 16 \leq y-x \leq 20, \\ 42 \leq z \leq 60 ;\end{array}\left\{\begin{array}{l}\frac{m}{n}=\frac{4 x}{y}, \\ y=x+a, \\ z=x+\frac{a m}{n+m}, \\ 16 \leq a \leq 20, \\ 42 \leq z \leq 60,\end{array}\right.\right.$

We need to find the limits of the value $\frac{n}{n+m+(n+m)} \cdot 100 \%=\frac{n}{2(n+m)} 100 \%$.

If we can find the ratio $\frac{m}{n}$, the problem will be solved, since $\frac{2(n+m)}{n}=2\left(1+\frac{m}{n}\right)$.

First, let's determine under what conditions the percentage of Raznefte shares in the total lot will be the smallest. For this, $\frac{n}{2(n+m)} \rightarrow \min$, if $n \rightarrow \min , m \rightarrow \max , y-x \rightarrow \min$, therefore, $y-x=16, a=16$. If $n \rightarrow \min , m \rightarrow \max$, then $z=x+\frac{16 m}{n+m} \rightarrow \max$, therefore, $z=60$.

Then, $\frac{m}{n}=\frac{4 x}{x+16}, x=\frac{16 m}{4 n-m}, z=\frac{16 m}{4 n-m}+\frac{16 m}{n+m}=60$.

$16 m(m+n)+16 m(4 n-m)=60(4 n-m)(n+m), 80 m n=60\left(4 n^{2}+3 m n-m^{2}\right), 3 m^{2}-5 m n-12 n^{2}=0$, $3\left(\frac{m}{n}\right)^{2}-5 \frac{m}{n}-12=0, \frac{m}{n}=3, \frac{m}{n}=-\frac{4}{3}$.

According to the problem's conditions, we choose $m=3 n$, then the smallest percentage $\frac{n}{2(n+m)} 100 \%=12.5 \%$.

Similarly, let's find the largest percentage:

For this, $\frac{n}{2(n+m)} \rightarrow \max$, if $n \rightarrow \max , m \rightarrow \min , y-x \rightarrow \max$, therefore, $y-x=20, a=20$.

If $n \rightarrow \max , m \rightarrow \min$, then $z=x+\frac{20 m}{n+m} \rightarrow \min$, therefore, $z=42$.

Then, $x=\frac{20 m}{4 n-m}, z=\frac{20 m}{4 n-m}+\frac{20 m}{n+m}=42$,

$21 m^{2}-13 m n-84 n^{2}=0$

$21\left(\frac{m}{n}\right)^{2}-13 \frac{m}{n}-84=0, \frac{m}{n}=\frac{7}{3}, \frac{m}{n}=-\frac{12}{7}$.

According to the problem's conditions, we choose $m=\frac{7 n}{3}$, the largest percentage $\frac{n}{2(n+m)} 100 \%=15 \%$.

Answer. The lot contains from $12.5 \%$ to $15 \%$ of Dvanefte shares from their total number.