I bought a carpet cleaner when it went on sale at Costco a few years ago. I can't remember the price, but I know it was less than $200. I think I figured out that if I used it 4 times I was ahead of renting. The solution for the machine isn't that bad. I just paid 15 bucks at Costco today for a big jug, I still haven't run out of the first one but this one was on sale.
I did some research on diy solution. Some pros warned against things like white vinegar as they can can start to attract stains over time. Something with the ph, apparently commercial solution has a much more balanced ph level for carpet. At any rate, I've used about $10 worth of solution in the 3 years I've had the machine.
I should mention, the thing I really use the carpet cleaner for is the cars. It has a little wand that works fantastically. My kids spilled a milkshake in the backseat during a Christmas road trip. I didn't think the stain would come out. Remarkably, 5 minutes of work and it completely disappeared. I try to clean our cars out twice a year. It really helps when you're driving a 15 year old car.