Question: PROBLEM # 3 [ 1 2 points ] Let us consider the following system of two equations ( 3 ) 3 . 1 . Setup

PROBLEM #3[12 points]
Let us consider the following system of two equations
(3)
3.1. Setup the system of two equations in matrix form, . Each entry of the design matrix, coefficient vector and the data vector should be defined below - and is either a numerical value, a symbol, or a combination thereof
[Note: by clicking on X, c and/or d you can modify the content and size of each array]
Please, also copy the MATLAB code you wrote for this system [2 points]
% TYPE YOUR MATLAB CODE HERE
%system of equations defined using numerical methods
function F = system_of_equations(vars)
x = vars(1);
y = vars(2);
F(1)= x^2+ x*y -10; % First equation
F(2)= y +3*x*y^2-57; % Second equation
end
3.2. Which method should we use to solve this system of equations? Explain your answer [1 point]
I utilize fsolve to solve this system of equations as the system is nonlinear, with the numerical method here proving more effective.
3.3. Please solve for the unknown coefficients. List the solution(s) of the system below [4 points]
Insert the MATLAB program and functions you wrote to get the solution(s). The more detail the better!
% TYPE YOUR MATLAB PROGRAM CODE HERE
%initial_guess =[1,1];
%make an intial guess for a possible solution, for example I chose [1,1] to
%serve as a starting point
%options = optimoptions('fsolve', 'Display', 'iter');
%solution = fsolve(@system_of_equations, initial_guess, options);
%utilize fsolve function to determine the solution for the system
%disp('Solution:')
%disp(['x=', num2str(solution(1))])
%disp(['y=', num2str(solution(2))])
% INSERT IN THIS TEXT BOX A COPY OF THE MATLAB FUNCTION(S) YOU WROTE
function F = system_of_equations(vars)
x = vars(1);
y = vars(2);
F(1)= x^2+ x*y -10; % First equation
F(2)= y +3*x*y^2-57; % Second equation
end
3.4. Are all solutions easy to determine? Explain your answer! [1 point]
Determining these solutions is certainily not easy, as the nonlinear nature of the presented equations make the solution difficult to compute. Additionally, the solution we find is incredibily dependent on the initial guess provided to the system. The complexity of this problem comes for its non-linear nature which yields multiple or no solutions in cases.
3.5. Can you think of another method to solve the system of two equations? You can explain your answer here and insert your MATLAB code to do so [2 points]
% TYPE YOUR MATLAB CODE HERE
3.6. Please, write all your answers down here using at least four significant digits (if any)[2 points]
Note, I list five solutions - that does not mean that there are five solutions!
% TYPE YOUR MATLAB CODE HERE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!