Can't connect to internet on Wi-Fi since update to iOS 7.1.1
I had the same EXACT problem when I upgraded my iPhone 4S to iOS 7. I had no wi-fi. I never got it to work, except, if I did the "freezer" trick with my phone, sometimes it would work for a little bit. This makes me believe it has to do with power use and heat.

I kept meaning to take it to the Apple Store to make them do something about it, but never got around to it. Then, when the latest iOS update came out, a couple days later, my phone started working fine again, and it has been ever since.

I think there is definitely something crazy going on with the power saving algorithms Apple uses. Did you get your iPhone 5 when it first came out? My iPhone 4s was one of the first ones. I stink the hardware changes during the production cycle, and sometimes us early adopters get left out when they start tweaking things.