Generate random numbers α ∈ (0,1) and β ∈ (0,1). Furthermore, generate the
noisy data {x> , y> }, where k = 0, ... ,100, according to the following rule:
y> = αx> + β + δ> ,
x> =
>
,
9EE
where δ> ~N(0,1) are values of a random variable with standard normal
distribution. Approximate the data by the following linear and rational functions:
1. F (x, a, b) = ax + b (linear approximant),
2. F (x, a, b) =
K
9LM:
(rational approximant),
by means of least squares through the numerical minimization (with precision ε =
0.001) of the following function:
9EE
D (a, b) = O(F (x> , a, b) − y> )P.
>QE
To solve the minimization problem, use the methods of exhaustive search, Gauss and
Nelder-Mead. If necessary, set the initial approximations and other parameters of
the methods. Visualize the data and the approximants obtained in a plot separately
for each type of approximant so that one can compare the results for the numerical
methods used. Analyze the results obtained (in terms of number of iterations