asus laptop keeps switching from ac to battery and won't stay on plugged in

Solution
Probably either a bad power jack on the laptop or bad wiring near the end of your adapter that plugs into the laptop. The wiring often breaks inside the insulation near that end from being flexed so much.