If you had a memory issue prior to this problem...maybe you didn't take care of it as well as you might think you did...
You say it will not boot.....exactly what does it do when you turn it on?
You say that it sometimes turns itself off after a few minutes. Does it give any error messages or just turns everything off like from the switch being turned off?
Can you boot to the BIOS (set-up) ???
More than likely a hardware problem and it is a tough one to determine as you must systematically check all hardware componets to determine which one is bad. One thing is that you had a memory problem that you think you fixed....start there first!
Then check for overheating issues. Make sure all the cables are free and not blocking any fans and that the fans all work and are not clogged by dust build up.
Bad connections would be the next line of approach. Remove all add on components and reseat them firmly back in their respective sockets!