This would have been in the 60s or 70s.
It was a story about a young man who invented a perpetual motion machine that could provide power for everyone. Knowing corporations or government would block him from giving it away, he went to college, cut his hair, and invented other things to get so rich he could have all the lawyers and be so powerful that ultimately he could give away the machine so that arid land could be irrigated/people fed/no pollution, etc.
But the young woman who loved him when he was young turned away from him when he went inside the system, not understanding or believing that he had not sold out. The very end had him looking back and comparing the lost love of his life with all the good he had done, that children didn't starve anymore and the rest and he knew he had made the right decision. Can anyone help me find that original story?