It's been over a decade since I studied it, but from memory you could also end up in infinite loops when you start generating the closed form solution if it doesn't exist. Which with as much hand waving as possible is ultimately equivalent to the computer function form auto integration would produce.
Can't we just integrate away and check if it's correct by differentiating it back?
EDIT: oh, I guess that's why we need to be able to check for function equality :)