Goal Seek Method of Excel
1. How to use Goal Seek Method of Excel
X+ (1-/2) = sin X ; What is X ?
Easiest way is using Trial & Error Method.
If one changes X value at random, one may get the answer.
Left Sidebecomes same as (Right Side when one happens to select X1.571 Exact analysis solution is; X=/2
X
1.000
1.500
1.530
1.570
1.571
1.580
1.600
1.620
1.640
1.660
1.680
1.700
1.720
Left Side Right Side
(Left Side-Right Side
X+(1-/2)
sin X
0.429
0.841
-0.412
0.929
0.997
-0.068
0.959
0.999
-0.040
0.999
1.000
-0.001
1.000
1.000
0.000
1.009
1.000
0.009
1.029
1.000
0.030
1.049
0.999
0.050
1.069
0.998
0.072
1.089
0.996
0.093
1.109
0.994
0.115
1.129
0.992
0.138
1.149
0.989
0.160
This can be obtained using GoalSeek function of Excel.
Before trial, the following table shall be prepared at first.
X
1.000
Left Side Right Side
(Left Side-Right Side
X+(1-/2)
in X
0.429
0.841
-0.412
Data --> What if Analysis -->Goal Seek
Equation Cell
Target Value
Cell of which value is to be changed
After pushing OK, the above table will be changed as follows and one can get the answer of X=1.570
X
1.570
Left Side Right Side
(Left Side-Right Side
X+(1-/2)
in X
0.999
1.000
-0.001
To increase the accuracy, we should modify the parameter as follows;
File --> Option -->Formula -->Max. Valuation (0.0001)
After pushing OK, the above table will be changed as follows and one can get the answer of X=1.571
X
1.571
Left Side Right Side
(Left Side-Right Side
X+(1-/2)
in X
1.000
1.000
0.000
2Example of Application
For Hydraulic calculation using Manning Formula, if one tries to obtain h(m) to achieve flow rate of Q(m3/h),
h (m) is included both in the left side and right side of equation.
In this case, h (m) can be easily obtained by using the goal seek function of Excel in spite of adopting Runge-Kutta method
that we learned at FORTRAN or BASIC class.
Manning Formula
v = 1/n I1/2R2/3
Q/A = 1/n I1/2 (A/S)2/3
Q/(wh) = 1/n I1/2 (wh/(2h+w))2/3
v: Velocity of Fluid (m/s)
n: Manning's Coefficient of Roughness
I: Hydraulic Gradient (slope)
R: Hydraulic Radius(m) = A/S
A: Flow Area (m2) = (w h
S: Wetted Perimeter (m) = (2 h + w)
A (m2)
h (m)
w (m)
3Caution
For example, in case of Cubic Equation, we have three(3) answers in general.
In this case, the result of goal seek differs depending upon the initial value.
While getting the answer of (X-1)(X-2)(X-3)=0 by Goal Seek method, the following result has been obtained.
Initial Value
of X
0
0.9
1.1
1.9
2.1
2.9
3.1
4
Convergence
value of X
(Result)
1
1
1
2
2
3
3
3
Prepared by H. Kiyono
Date
17-Jul-09
Final Rev.
19-Nov-14
olution is; X=/2
nge-Kutta method