A pharmacist needs 40 liters of a 50% alcohol solution. He has 30% and an 80% alcohol solution. How many liters of each will be required to make 40 liters of a 50% solution?

30x + 80(40-x) = 50*40

To solve the problem, we can set up a system of equations based on the given information.

Let's assume that the pharmacist will need x liters of the 30% alcohol solution and (40 - x) liters of the 80% alcohol solution to make a total of 40 liters of the 50% alcohol solution.

Now we can write the equation for the total amount of alcohol in the mixture:

0.30x + 0.80(40 - x) = 0.50(40)

Simplifying the equation, we have:

0.30x + 32 - 0.80x = 20

Combining like terms, we get:

-0.50x = -12

To isolate x, divide both sides of the equation by -0.50:

x = -12 / -0.50

x = 24

Therefore, the pharmacist will need 24 liters of the 30% alcohol solution and (40 - 24) = 16 liters of the 80% alcohol solution to make 40 liters of the 50% alcohol solution.