Project 2:(this project is urgent, please bid immediately)
You need to do a Gaussian elimination algorithm with complete pivoting together with backward substitution to solve Ax = b, where A is an n times n square matrix. The program should read A and b from two input files and output the solution x.
Plus, the program should count how many multiplications and additions are done.
have two command line arguments for the filenames. The first argument is the file where we
read the A matrix, and the second one is the file where you read the b vector. Each line in a
file represents a row,
use dynamically allocated memory to store the matrix and the vector,
print out an error message and quit if it detects that A is singular**
use counters to count the total number of multiplication and addition operations,
print out the number of operations together with the solution x.
**It should be done if any pivot is zero after the multiplications and additions. Or any other singularity check is ok.
Project 3: (This one's due has almost 10 days more so it's not that urgent.)
In this project, you will design a root finding software for general third degree polynomials using
Newton's method. You will only worry about one-dimensional problems of the form
f(x) = x3+ ax2+ bx + c = 0 (x3 is "x"cube, ax2 is "a" times "x"square)
The program should
accept five command line parameters, the first three being the polynomial coecients a, b,
and c, the fourth one being the stopping parameter e (defined below), and the final one is the
initial guess x0,
print out (for each iteration i) the current approximate root x(i) and the corresponding function
determine that it is time to stop when the stopping condition |x(n) - x(n - 1)|<= e is satised
You can check Newton's method from wiki or so, to understand it better.