Why is my iphone 5 always on E (edge)?

I have an iphone 5 32GB AT&T NOT jail broken. Recently it's always been stuck on E. It's really annoying because as it is I have horrible service at home and at school but at home I normally get 4G but now it's always E. When I'm at school I turn airplane mode on because I never get service in there because of AT&T and my school but more AT&T because my friends have Verizon and they have service! To get 4G back I have to turn airplane more on and off and SOMETIMES it goes back to 4G but now it seems to not. Ill have to do it more than once and I don't like having to do it. Sometimes it won't even work. And if I leave it on E and not do airplane mode it doesn't just go back to 4G. Please help I feel it's AT&T because no offense they've been known to have service issues but I just want this fixed As soon as possible.

It may be the iPhone itself, maybe an internal problem. But it could also be a network error with AT&T. Its hard to tell what's wrong when its an error that involves the network and not the phone. Either way your best bet is to take it into an AT&T retail store and explain this to them. They will most likely run a diagnostic test and if its a problem with the phone they can replace it.