You are on page 1of 1

Page 1/1

Homework B of Numerical Optimization

Name: Student ID: 2023.10.4


In this homework, you have to submit a ipynb-file to the moodle. All explanation should
be listed in the file.
77 2 98 2 72 46 28
1. Consider the function f (x1 , x2 ) = x
25 1
+ x
25 2
+ xx
25 1 2
− 5 1
x − 5 2
x + 17
2 2
(a) Explain why f (x1 , x2 ) = 5(y1 − 1) + 2(y2 − 1) + 10 where

y1 = 53 x1 + 45 x2

,
y2 = 45 x1 + −3 x
5 2

7 7

(b) Explain why the minimum of f (x1 , x2 ) is 10 whenever (x1 , x2 ) = ,
5 5
(c) Can you provide me a ipynb-file for all quadratic functions to obtain an optimal
solution?

2. There are 10 data points (x1 , y1 ), (x2 , y2 ), · · · , (x10 , y10 ):

i 1 2 3 4 5 6 7 8 9 10
xi 4.0 4.2 4.5 4.7 5.1 5.5 5.9 6.3 6.8 7.1
yi 102.56 113.18 130.11 142.05 167.53 195.14 224.87 256.73 299.50 326.72 + 300

Assume that the curve f (x) is defined by (α1 , α2 , α3 ) i.e. f (x) = α3 x2 + α2 x1 + α1 . Here,
we consider two fitting problem:
10
X
min |yi − f (xi )|
(P1 )
i=1
s.t. α1 , α2 , α3 : unrestricted.

and
10
X
min (yi − f (xi ))2
(P2 )
i=1
s.t. α1 , α2 , α3 : unrestricted.
(a) Can you solve the problem (P1 ) by your simplex tableau in the first homework? If
not, please modify it and report the old and new subroutines. Otherwise, show the
result in the cell of ipynb-file.
(b) Solve the problem (P2 ) by the following link
https://en.wikipedia.org/wiki/Least squares
(c) What is the difference between the functions obtained by comparing the two differ-
ent methods?

You might also like