3. (70 marks) (Gauss-Newton Method)
Solve the minimization problem
min f(x), (1)
where x = [x1, x2], f(x) = 1/2 F^T(x)F(x) and F(x) = [3x1^2 + 2x1x2 - 1; -3x2 + 5x1x2 - 4; e^x1 - sin(x2) + 1], by the Gauss-Newton method without line search.
(d). (10 marks) Plot r(x) value with respect to iterations with the first set of input parameters.
Note: you need to hand in all your Matlab codes for question (a) to (d).
(a). (20 marks) Implement the evaluation of F(x) and evaluate the Jacobian matrix of F(x) by the finite difference method with delta x_i = 0.01, i = 1, 2 in Matlab. The head of the function for the Matlab code is " [F, J] = pfun(x)", where F is the function value of x and J is the Jacobian matrix.
(b). (20 marks) Implement the Gauss-Newton method to solve the minimization problem without line search in Matlab. The function head for the Gauss-Newton method is
function [x, it, r] = Gauss_Newton(fun, x0, itmax, tol)
%
% Gauss-Newton method for solving nonlinear least squares problem without line search
%
% Input
% fun - function F(x), the objective function is 1/2*F'*F, which returns
% F(x) and corresponding Jacobian matrix J.
% x0 - initial value of x
% itmax - max number of iteration
% tol - stopping tolerance
%
% Output
% x - final result
% it - number of iterations
% r - objective function value 1/2*F'*F
(c). (20 marks) Run the Matlab implementation in (b) to solve the minimization problem (1) with function value and the Jacobian matrix code in (a). Consider following two sets of inputs:
1. x0=[1;1]; tol = 1e-4; itmax = 100;
2. x0=[0;0]; tol = 1e-5; itmax = 100;
Write down your results for the above two sets of inputs and your observations.