Part of Standard Excel Installation Finds the root of a scalar
function Recall that root-finding methods (e.g., bisection method,
Newtons method) rely on a change in sign of the objective function
Any f(x) function used in GOALSEEK should have a well defined sign
change
Slide 2
Use Excels GOALSEEK feature to find the root of f(x) = x cos(x)
between 0 and 1.
Slide 3
Make use of named ranges in Excel Create solution variable cell
xval and target cell fofx
Slide 4
Highlight cells that will be named. Under Formulas Tab select
Create from Selection
Slide 5
Input the function into the target cell Use the named variable
Type =xval cos(xval) into the target cell
Slide 6
Slide 7
Put an initial guess in the variable cell 0.5 is the middle of
the interval, so use it Now invoke the GOALSEEK function You can
use the named ranges in the GOALSEEK dialog box, or point and
click
Slide 8
Goal Seek found on Data Tab under What-If Analysis
Slide 9
Slide 10
Then click OK
Slide 11
Slide 12
Solver is an add-in to Excel It is not installed by default
SOLVER will find a particular value, the maximum, or the minimum of
a scalar function of a vector
Slide 13
Uses a gradient-based method (like Newtons method) to find the
root or the max/min Works very well for functions that have a
well-defined minimum (or maximum), like a quadratic form (a
parabola)
Slide 14
Go to Excel Options
Slide 15
Go to Add-Ins Tab on left and click Go at bottom
Slide 16
Make sure Solver Add-In is checked and click ok
Slide 17
Now go to Data tab and click on Solver on the far right
Slide 18
Find the minimum of f(x,y)=(x-5) 2 + (y-5) 2
Slide 19
Use named ranges to establish variables for xval and yval Use
named range to create a target cell fxy
Slide 20
Slide 21
Put initial guesses for xval, yval in their cells (use (0,0))
Type the formula into the target cell (=(xval-5)^2 + (yval-
5)^2)
Slide 22
Slide 23
Invoke the SOLVER function
Slide 24
Define and solve a problem by using Solver On the Data Tab,
click Solver (far right). If the Solver command is not on the Data
Tab, you need to install the Solver add-in. In the Set Target Cell
box, enter a cell reference or name for the target cell. The target
cell must contain a formula.
Slide 25
Solver is found on far right of Data tab
Slide 26
To have the value of the target cell be as large as possible,
click Max. To have the value of the target cell be as small as
possible, click Min. To have the target cell be a certain value,
click Value of, and then type the value in the box. In the By
Changing Cells box, enter a name or reference for each adjustable
cell, separating nonadjacent references with commas. The adjustable
cells must be related directly or indirectly to the target cell.
You can specify up to 200 adjustable cells.
Slide 27
Slide 28
To have Solver automatically propose the adjustable cells based
on the target cell, click Guess. In the Subject to the Constraints
box, enter any constraints you want to apply. constraints Click
Solve. To keep the solution values on the worksheet, click Keep
Solver Solution in the Solver Results dialog box.
Slide 29
Slide 30
To restore the original data, click Restore Original Values.
Tips You can interrupt the solution process by pressing ESC.
Microsoft Excel recalculates the worksheet with the last values
found for the adjustable cells.