Problem

Gauss Elimination. The accuracy of the Gauss elimination technique can be improved using a...

Gauss Elimination. The accuracy of the Gauss elimination technique can be improved using a process called pivoting. To perform row pivoting, we first reorder the equations so that the equation with the largest absolute value for the first coefficient is the first equation. We then eliminate the first object from the equations that follow the first equation. Then, starting with the second equation, we reorder the equations such that the second equation has the largest coefficient (in absolute value) for the second object. We then eliminate the second object from all equations after the second equation. The process continues similarly for the rest of the objects. Assume that a symbolic constant N contains the number of equations.

Write a function that receives a two-dimensional array and a pivot value that specifies the coefficient of interest j . The function should then reorder all equations starting with the j th equation such that the j th equation will have the largest coefficient (in absolute value) in the j th position. Assume that the function can reference the size of the array as N by N +1, and that the corresponding function prototype is

void pivot_r(double a[][N+1], int j);

Use the program developed in Section 8.4 as a guide to develop a function that receives a double array a of size N by N+1. A second parameter is a double array soln of size N + 1. The function should solve the system of equations represented by array a, and return the solution in array soln. Assume that the corresponding function prototype is

void gauss(double a[][N+1], double soln[N+1]);

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 8
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT