Just going to list the problems that jump out at me with a short description, still quite early here so might miss a few ;p.
1. spool << "The answers for x ,y and z would be " << x << " " << y << " " << z << endl;
No where in the code is spool defined. So you are basically using a object that doesn't exist.
The same goes for spool.close();
2. double a1, a2, a3, b1, b2 ,b3, c1, c2, c3, d1, d2, d3; in your function body. You are declaring variables with the exact same names as your parameters which you shouldn't be doing. Just delete that line and use the parameter names to reference the data that is passed in while calling the function.
3. Not really a mistake but you can shorten the function to just this
4. inputfile.close(); that line is wrong since you declared your ifstream object to have the name inputefile and not inputfile. So just a minor typo.
Basically there is no need to declare the den variable just to return the result of the equation. But either way works and I fine some people like to have the variable and some don't.
Other then that I don't see anything glaringly obvious as to what the problem is but haven't dug into your code just did a quick glance over. So try fixing those things and if it still doesn't work we can continue from there.
EDIT: Also not sure why you get a entry point error. You really shouldn't be getting said error in this case... What compiler are you using by chance?