Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer all questions,,,. sun Cabe (x - 2)) sun (abe (y - 2)) Since we are finding the difference between the computed solution and the

Answer all questions,,,.

image text in transcribedimage text in transcribedimage text in transcribed
sun Cabe (x - 2)) sun (abe (y - 2)) Since we are finding the difference between the computed solution and the exact solution, the smaller number is associated with the method that is more accurate. Recall that x was computed using the "\\" operation , while y was computed using the inverse. Which method produces the more accurate solution?" (b) Repeat part (a) using n = 1400 and n = 2800. (c) Explain why the exact solution of the system Ax = b is the vector z. 2. The goal of this exercise is to emphasize how, when solving a linear system, the choice of which method to use is extremely important, especially in the case of matrices which are close to singular (these matrices are often refereed to as ill conditioned) Similarly to Exercise 1, in this exercise you will solve a system using two methods: the *\\" operator method and the inverse method. One of these two methods will produce extremely inaccurate results, while the other will produce the exact answer. Consider the 50 x 50 matrix: B = Use the following MATLAB commands to generate the matrix B, the matrix A = BT B and two vectors b and z n = 50 ; B - eye(n) - triu(ones (n) , 1) ; A-B' *B; z = ones (n, 1) ; b- A*z; Similarly to the previous problem, the exact solution of the system Ax = b is the vector z. Compute the solution using the "\\" and using the inverse: y - inv(A)+b; Compare the accuracy of the two methods as in the previous problem, that is, compute gum (abs (x - 2) ) gum (abs (y - 2)) Recall that the two commands above compute how close the computed solution is to the exact solution. Thus the smaller value is associated to the more accurate method. Which method produces the more accurate solution?" If you solved this exercise correctly, you should have found that the inverse method produced a very inaccurate result. This is not a coincidence. In fact, in real applications, the inverse matrix is never used to solve linear systems. Besides being inaccurate, this method is also numerically inefficient since it requires a high number of computations. Finding methods that are both efficient and accurate is one of the main goals of applied linear algebra. Just like the "\\" operator, these methods are often based on matrix factorizations, which you will learn in later chapters.3. Generate a random 7 x 7 matrix A with integer entries by setting A = floor (40+rand(7)) ; and generate a 7 x 1 vector b by setting b = floor (80*rand (7,1))-40; Note: the command floor (80+rand(7, 1) ) generates a random 7 x 1 vector with entries between 0 and 79. We subtract 40 to each entry so that the vector b will have entries between -40 and 39. (a) Since A was generated randomly, we would expect it to be nonsingular. The system Ax = b should have a unique solution. Find the solution using the "\\" operation (if MATLAB gives a warning about the matrix being close to singular, generate the matrix A again). (b) Enter U - rref ([A, b]) to compute the reduced row echelon form, /, of the augmented matrix [A b]. Note that, in exact arithmetic, the last column of U and the solution x from part (a) should be the same since they are both solutions to the system Ax = b. (c) To compare the solutions from part (a) and part (b), compute the difference between the last column of U and the vector x: U(: , 8) - X (d) Let us now change A so as to make it singular. Set A(: ,6) - 4+A(:,4)+3-A(:, 1); (the above command replaces column 6 of A with a linear combination of columns 4 and 1: as = 4a, + 3a, where a, is the ith column of A.) Use MATLAB to compute rref ( [A b]). How many solutions will the system Ax = b have?' Explain. Hint: Look at the last row(s) of the RREF. (e) Generate two vectors, y and c by setting y - floor (80 rand (7,1)) - 40; c = A+y: (here A is the matrix from part (d)). The way the vector c is defined guarantees that the system Ax = c is consistent, that is, it has at least one solution. Explain why that is the case. (f) Compute the reduced row echelon form ( of [A e]. How many solutions does the system Ax = c have?' Explain. Hint: Look at the last row(s) of the RREF.If you've gotten this far, you should know how to: a Start at a point with a basis of variables that are 0, forming the pivot columns of a row reduced matrix. 0 Determine whether exchanging one of those basis variables will increase or decrease the objective function. 0 Exchange a basis variable in order to increase the objective function, and put the equations into row reduced echelon form with respect to the new basis. The simples algorithm is to continue in this manner, always performing basis exchanges which improve the objective function, until no more exchanges are possible. We conclude with an example: Buzz Buzz Buzz Coffee has on hand 1 kg of coffee grounds, 1 gallon of milk and 10 cups of sugar. They can use these to make espressos, containing 8 grams of grounds and no milk or sugar; lattes, containing 15 grams of grounds, 0.0625 gallons of milk and 0.125 cups of sugar; or cafe cubano, containing 7.5 grams of grounds, no milk and 0.125 cutps of sugar. They will be able to sell all they produce, which they will sell at prices of $2 for espressos, $4 for lattes and $5 for a cafe cubano. Question 10. Let s, l and c be the number of espressos, lattes and cafs cubanos manufactured, and let 9, m and s be the amounts of grounds, milk and sugar left over when they are done. Let p be the amount of money they take in. Record the linear equations relating e, l, c, g, m, s and p. Question 11. Start at the point where no drinks are made (so P. = l = c = 0]. Exchange one of these variables, in order to increase p. Repeat the process of exchanging a basis variable to increase p until there are no exchanges which will make p larger. How many of each drink should be made

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Algebra advanced algebra with financial applications

Authors: Robert K. Gerver

1st edition

978-1285444857, 128544485X, 978-0357229101, 035722910X, 978-0538449670

More Books

Students also viewed these Mathematics questions

Question

Types of curriculum ?

Answered: 1 week ago

Question

Curriculum analysis: main points explain?

Answered: 1 week ago

Question

Advantages of team teaching ?

Answered: 1 week ago

Question

Describe the ethics of marketing.

Answered: 1 week ago

Question

ASCII stand for?

Answered: 1 week ago