You don't need to copy the formula by hand: the Fit Model procedure can do that for you. In the following, I've opened up the Big Class data set, added three rows to the bottom of it and inserted into them three heights for which I want to predict the corresponding weight. Since these rows don't have a corresponding weight (y) value, the extra heights I've added won't affect the equation I get from the regression that I'm about to run on the whole table.
I've then fitted a cubic polynomial in height to the weight data: originally I did this interactively, but I've copied the resulting script below (to do that, click on the red triangle at the top of the window and select Script | Save Script to Script Window), so if you run this you should see the resulting output from that model fit:
If the polynomial is degree 1 or 2 then solve manually for X and use the resulting formula. If your polynomial is of degree 3 or higher solving directly is either impossible or extremely messy.
Solving numerically automatically for all real roots is not straight forward. If you are willing to be involved in the solution, then, assuming the formula has been saved in a column with a couple of rows and a provisional min and max value for X, you can call up the Profiler and specify that column. Then you will see a graph of the polynomial. Specify that you want a desirability function. It will default to "maximize". Change the desirability function to "target" and adjust the curve so that it is centered at 5 and is fairly wide to start. Adjust the horizontal axis as necessary to see where your function heads off to infinity at either end. Then use the desirability function plot to locate the current value at one of the high desirability values and click on "maximize desirability". You may need to repeat to get convergence. Repeat for each of the indicated solutions.
Message was edited by: mpb
If you do a Google search for "Solving Quartics and Cubics for Graphics" the first hit is a paper on the topic which will give you a feel for the difficulty of automatic solution.