Task 4. (20 points) At a refinery, a tank was filled with crude oil with a sulfur concentration of $1.5 \%$. Part of this oil was directed to production, and the same amount of oil with a sulfur concentration of $0.5 \%$ was added to the tank. Then, the same amount of oil as before was directed to production again, but this time oil with a sulfur concentration of $2 \%$ was added. As a result, the sulfur concentration in the oil in the tank returned to its original level. Determine what fraction of the oil from the tank was sent to production twice.
# Solution.

Let $x$ be the fraction of oil that was sent to production twice ($x>0$). Then the balance equation for the amount of sulfur in the oil will look as follows:

$\frac{1.5}{100}-\frac{1.5}{100} x+\frac{0.5}{100} x-\left(\frac{1.5}{100}-\frac{1.5}{100} x+\frac{0.5}{100} x\right) x+\frac{2}{100} x=\frac{1.5}{100}$,

where $\frac{1.5}{100}-\frac{1.5}{100} x+\frac{0.5}{100} x$ is the concentration of sulfur in the oil after the first addition of oil to the tank.

Multiplying both sides of the equation by 100, expanding the brackets, and combining like terms, we get the quadratic equation $x^{2}-0.5 x=0$. The condition $x>0$ is satisfied only by $x=\frac{1}{2}$

Answer. $\frac{1}{2}$.