A painter bought some paint for $500. He paid $x for each litre of paint. He accidentally spilt 5 liters of paint and sold the remainder of the psint for $2/litre more than he paid for it. If he made a profit of $40, find the amount he paid for each litre of paint.

Cost per litre = $x

Number of litres bought = 500/x
Number of litres sold, q = 500/x-5
new sale price per litre = x+2
Total revenue = q*(x+2) = 540
so
(500/x -5 )*(x+2) = 540
Solve for x (cost of paint per litre)
I'll get you started:
Multiply both sides by x
(500-5x)(x+2)=540x
Expand left side using FOIL:
-5x^2+490x+1000 = 540x
Group like terms:
5x²+50x-1000=0
...
remember to reject negative roots of the above quadratic equation.

To solve this problem, we need to set up an equation.

Let's start by finding the amount of paint the painter bought after he spilled 5 liters. We'll call this quantity "Q."

Q = Total amount of paint bought - Amount spilled
Q = Total amount of paint bought - 5 liters

Now, let's find the cost of the remaining paint. We'll call the cost per liter "x."

Cost of remaining paint = Quantity of remaining paint * Cost per liter
Cost of remaining paint = (Q - 5) * x

Next, we'll find the selling price of the remaining paint. The problem states that he sold it for $2 more per liter than he paid for it. So, the selling price per liter would be "x + 2."

Total selling price = Quantity of remaining paint * Selling price per liter
Total selling price = (Q - 5) * (x + 2)

Finally, we need to calculate the profit.

Profit = Total selling price - Total cost
Profit = (Q - 5) * (x + 2) - 500

The problem states that the profit is $40. So, we have:

40 = (Q - 5) * (x + 2) - 500

Now, we can solve this equation for x.

Simplify the equation:

40 + 500 = Qx + Q*2 - 5x - 5*2

Simplify further:

540 = Qx - 5x + 2Q - 10

Combine like terms:

540 = x(Q - 5) + 2(Q - 5)

Factor out (Q - 5):

540 = (Q - 5)(x + 2)

Now, we have two possibilities for this equation to hold true: (Q - 5) = 0 or (x + 2) = 0.

Case 1: (Q - 5) = 0

If (Q - 5) = 0, that means Q = 5 (since we know that 5 liters were spilled).

Case 2: (x + 2) = 0

If (x + 2) = 0, that means x = -2. However, since we are looking for the cost of paint, which cannot be negative, we can disregard this case.

Therefore, in the case where Q = 5, we can solve for x:

540 = (5 - 5)(x + 2)
540 = 0(x + 2)

0x cannot be equal to 540, so this does not give us a valid solution.

Hence, there is no solution for the amount he paid for each litre of paint given the given conditions.