Solution
Let the number of sheep bought be x.
Price per sheep:
x9000
If he paid Rs. 100 less per sheep, new price per sheep is:
x9000−100
Then he would get x+3 sheep for Rs. 9000:
(x+3)(x9000−100)=9000
Expand:
9000+x27000−100x−300=9000
x27000−100x−300=0
Multiply by x:
27000−100x2−300x=0
Divide by −100:
x2+3x−270=0
(x+18)(x−15)=0
So x=−18 or x=15. Reject x=−18.
x=15
The farmer bought 15 sheep.