Sounds like a fault in the ram. It's shutting itself down in order to protect the rest of the computer. I suggest you take it to a specialist to replace the ram.
If it is shutting down by itself you have a problem with maybe power supply. The beep you hear at startup is giving you an error message. Look up beeping sequences for your make and model of your laptop to see what is wrong.