It's an emachines ET1831-01. About two years ago the power went off a lot while the computer was being used. After a while it would turn off while in use and when we I would try to turn it on the fans would go on sometimes the power button light turns on as if it were about to turn on. Sometimes it turns on and stays on for about 15-30 minutes but it still turns off. What could it be?
Most likely a bad power supply unit. If it were the motherboard I would imagine it wouldn't start at all, RAM errors would result in it failing to POST and wouldn't start, hard drive errors I would imagine would give you a BSOD, graphics would probably BSOD. My bets are on the power supply being busted if its not a severe heat problem with the machine