Answer:
20
Explanation:
Let's assume the number of children initially was 'x'. So, each child would receive 40/x marbles.
If there were 2 children fewer, the number of children would be (x - 2), and each child would receive (40/x + 1) marbles.
According to the given condition:
40/x = 40/(x - 2) + 1
To solve this equation, we can cross multiply:
40(x - 2) = 40x + x(x - 2)
Now, expand and simplify:
40x - 80 = 40x + x^2 - 2x
Combine like terms:
x^2 - 2x - 80 = 0
Now, let's solve this quadratic equation using the quadratic formula:
x = (-b ± √(b^2 - 4ac)) / 2a
where a = 1, b = -2, and c = -80.
x = (2 ± √((-2)^2 - 4 * 1 * (-80))) / 2 * 1
x = (2 ± √(4 + 320)) / 2
x = (2 ± √324) / 2
x = (2 ± 18) / 2
Now, we have two possible values for 'x':
1. x = (2 + 18) / 2 = 20 (Rejecting this value since it would lead to dividing by zero when finding the initial number of marbles per child, which is 40/20).
2. x = (2 - 18) / 2 = -16 (Rejecting this value as the number of children cannot be negative).
Therefore, the correct number of children initially is x = 20.