Professional Documents
Culture Documents
Soln l24
Soln l24
Problem 1a
5.00
-15.00
-25.00
-35.00
-6.0
-4.0
-2.0
0.0
2.0
4.0
6.0
Problem 1b
20.00
0.00
-20.00
function
polynomial
-40.00
-60.00
-80.00
-100.00
-120.00
-8.0
-6.0
-4.0
-2.0
0.0
2.0
4.0
6.0
8.0
Problem 2
-4.0
-3.5
-3.0
-2.5
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
y
-17.0
-4.1
4.0
8.1
9.0
7.4
4.0
-0.4
-5.0
-9.1
-12.0
-12.9
-11.0
-5.6
4.0
18.6
39.0
y = x3+x2-9x-5
50.0
40.0
30.0
20.0
10.0
0.0
-5.0 -4.0 -3.0 -2.0 -1.0
-10.00.0 1.0 2.0 3.0 4.0 5.0
-20.0
f(x)
If the initial guess is beyond a maximum or minimum, the next solution will be found instead
Problem 1 a
Function is y = 4 sin(x) - x2
y
x
-5.0
-4.5
-4.0
-3.5
-3.0
-2.5
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
y
-21.16
-16.34
-12.97
-10.85
-9.56
-8.64
-7.64
-6.24
-4.37
-2.17
0.00
1.67
2.37
1.74
-0.36
-3.86
-8.44
-13.65
-19.03
-24.16
-28.84
x
-7.0
-6.5
-6.0
-5.5
-5.0
-4.5
-4.0
-3.5
-3.0
-2.5
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
6.0
6.5
7.0
x
-5.0
-4.5
-4.0
-3.5
-3.0
-2.5
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
Average:
y
-21.16
-16.34
-12.97
-10.85
-9.56
-8.64
-7.64
-6.24
-4.37
-2.17
0.00
1.67
2.37
1.74
-0.36
-3.86
-8.44
-13.65
x
-5.0
-4.5
-4.0
-3.5
-3.0
-2.5
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
x2
25.0
20.3
16.0
12.3
9.0
6.3
4.0
2.3
1.0
0.3
0.0
0.3
1.0
2.3
4.0
6.3
9.0
12.3
x3
x4
-125.0
-91.1
-64.0
-42.9
-27.0
-15.6
-8.0
-3.4
-1.0
-0.1
0.0
0.1
1.0
3.4
8.0
15.6
27.0
42.9
625.0
410.1
256.0
150.1
81.0
39.1
16.0
5.1
1.0
0.1
0.0
0.1
1.0
5.1
16.0
39.1
81.0
150.1
x5
-3125.0
-1845.3
-1024.0
-525.2
-243.0
-97.7
-32.0
-7.6
-1.0
0.0
0.0
0.0
1.0
7.6
32.0
97.7
243.0
525.2
from function
-21.16
-16.34
-12.97
-10.85
-9.56
-8.64
-7.64
-6.24
-4.37
-2.17
0.00
1.67
2.37
1.74
-0.36
-3.86
-8.44
-13.65
-19.03
-24.16
-28.84
-9.17
4.0
4.5
5.0
-19.03
-24.16
-28.84
4.0
4.5
5.0
16.0
20.3
25.0
64.0
91.1
125.0
256.0
410.1
625.0
1024.0
1845.3
3125.0
SUMMARY OUTPUT
Regression Statistics
Multiple R
0.999316
R Square
0.998633
Adjusted R Squ 0.998177
Standard Error 0.380053
Observations
21
ANOVA
df
Regression
Residual
Total
Intercept
X Variable 1
X Variable 2
X Variable 3
X Variable 4
X Variable 5
SS
MS
F
Significance F
5 1582.554 316.5108 2191.2910047 6.40986918E-021
15 2.166605 0.14444
20 1584.721
P-value
1
2.810184E-014
2.748750E-014
1.641192E-013
1
6.914115E-012
Lower 95%
-0.3332433835
3.1199509058
-1.0770480936
-0.4756969834
-0.0031611553
0.0097311501
(yf-yavg)2
143.94
51.45
14.49
2.82
0.16
0.27
2.34
8.57
23.05
48.99
84.03
117.38
133.00
118.95
77.51
28.20
0.53
20.13
97.23
224.80
386.87
1584.72
R2:
(yf-yp)2
0.091417
0.271287
0.052368
0.053973
0.182291
0.084856
0.000653
0.09761
0.169515
0.079332
0
0.079332
0.169515
0.09761
0.000653
0.084856
0.182291
0.053973
0.052368
0.271289
0.091415
2.17
0.99863
a1
a2
3.3808
-1
a3 -0.437602
a4 -2.24E-09
a5 0.010964
Using Solver to
minimize cell L26
Could also set a4=0
Problem 1:
a. Calculate y = 4 sin(x) - x2 from x = - 5 to + 5 using increments of 0.5.
Plot the result and fit the data using a fifth-order polynomial with zero intercept.
(Use trendline and display the equation.)
Right-click on a data point and add trendline. It may be necessary to first d
b. Now plot this same function from x = -7 to + 7. On the same graph, plot
the fifth order polynomial you found in part a.
What general conclusion can you draw from these results?
Problem 2:
a. Plot y = x3 + x2 - 9x -5 for x from x = - 4 to + 4.
From this plot, estimate the values of x at which y = 0.
b. Use goal seek to find more accurate values of x at which y = 0.
Use the results of part a as your initial guesses.
Extra credit:
You will note that the trendline equation in Problem 1 does not give very many significant
figures for the constants in the polynomial. Devise a method to obtain
more significant figures for these constants.
y, spring 2004