Some students planned a picnic. The budget for food was Rs. 500. But, 5 of them failed to go and thus the cost of food for each member increased by Rs. 5. How many students attended the picnic?
Let x students planned a picnic.
Then, the share of each student $=\frac{500}{x}$
According to question, 5 students fail to go picnic, then remaining students $=(x-5)$.
Therefore, new share of each student $=\frac{500}{x-5}$
It is given that
$\frac{500}{x-5}-\frac{500}{x}=5$
$\frac{500 x-500(x-5)}{(x-5) x}=5$
$\frac{2500}{(x-5) x}=5$
$5\left(x^{2}-5 x\right)=2500$
$\left(x^{2}-5 x\right)=500$
$x^{2}-5 x-500=0$
$x^{2}+20 x-25 x-500=0$
$x(x+20)-25(x+20)=0$
$(x+20)(x-25)=0$
Because x cannot be negative.
Thus, the total numbers of students attend a picnic
$=x-5$
$=25-5$
$=20$
Therefore, the total numbers of students attend a picnic be $x=20$