In this example we use xSolverLite to find a third degree polynomial that fits a sine wave through one
half cycle.

In the spreadsheet at figure 1 we have in column A a range for x.  In Column B we have sin for a given
x, hereafter referred to as t(x), column C contains a cubic function of x.  The co-efficients for f(x) are
stored in G1, H1, I1 and J1, these are our solve targets.  Column D computes the difference between
f(x) and t(x).  This is our error vector, hereafter referred to as the Residuals.
figure 1
figure 1
figure 2
Next we add our solve targets to the variable list by highlighting the cells
and selecting "Add Variables" from the xSolver menu as in figure 2.
figure 2
Then we add our residuals the same way.
figure 3
figure 3
Next Page