Hi, In this case there could be 2 possibilities..1- The Motherboard may have issue 2- Os Failure. To Find out if it is issue with the Motherboard or not, Power on the computer immediately keep taping F2 on Dell Logo. You will get an DOS Like Screen (Bios). don't do anything out there just wait and observe, if it still shuts Off then the issue is with the Motherboard Or Heat sink or System Fan, If it does not, then Back up the HDD of the computer and Re Install the OS or do the Recovery from the Dell Data Safe Local Option. Also you may run the P. S. A. test on the computer, I.E. press and Hold the Fn Button an power on the computer, the computer will run through series of test, just follow the instructions..
I have Dell Inspiron N4050 laptop. It fails as it has lost power. Tried running on battery without charging, running on external power without battery, but problem persists. It does so even when the pc just started and the window just started booting. Ran a pre boot test with enhanced test mode and all tests passed.                                                                    
Laptop fails randomly as if it lost power and restarts