subject

1) Write a function defined as: def Secant(fcn, x0, x1, maxnew = 14, xtol = 1e-4): Purpose: use the Secant Method to find the root of fcn(x), in the neighborhood of x0 and x1.
fcn: the function for which we want to find the root x0 and x1: two x values in the neighborhood of the root xtol: exit if the |xnewest - xprevious| < xtol maxnew: exit if the number of iterations (new x values) equals this number return value: the final estimate of the root (most recent new x value)
Write and call a main() function that uses your Secant function to estimate and print the solution of:
X-3 * cos(x) = 0 with x0 = 1, x1 = 2, maxnew = 4 and xtol = 10-4
cos(2x).x3 with x0 = 1, xl = 2, maxnew = 15 and xtol = 10-8
cos(2x).x3 = 0 with x0 = 1, x1 = 2, maxnew =23 and xtol = le-8 = 0
2) Write a function defined as: def Gauss Jacobi(Aaug, x, niter = 15):
Purpose: use the Gauss-Jacobi method to estimate the solution to a set of N linear equations expressed in matrix form as A x=b. Both A and b are contained in the function argument - Aaug - an augmented A-matrix Do NOT use pivoting to try to improve the solution. Simply use the values as given
Aaug: an augmented matrix containing [A | b ] having N rows and N+1 columns, where N is the number of equations in the set.
x: a vector (array) contain the values of the initial guess
niter: the number of iterations (new x solutions) to compute
return value: the final new x vector.
Write and call a main() function that uses your Gauss Jacobi function to estimate and print the solution to the sets of linear equations contained in the following Augmented A-matrices:
MyA =
[[4, -1, -1, 3], [-2, -3, 1, 9], (-1, 1, 7, -6]],
using initial guesses of all ZEROS. Perform 22 iterations.
another A = [[ 4, 3, 1, -1, 2], [ 2, -5, 0, -2, -3), [ -3, 3, -6, 1, 5), [ 0, 1, 4, 8, -2]]
using initial guesses of all ONES. iterations.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
What is linux? an open source operating system a version of ms dos the first version of unix the newest technology available
Answers: 1
question
Computers and Technology, 22.06.2019 01:30
How will you cite information that is common knowledge in your research paper?
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
You know the right answer?
1) Write a function defined as: def Secant(fcn, x0, x1, maxnew = 14, xtol = 1e-4): Purpose: use the...
Questions
question
Mathematics, 01.01.2020 20:31
question
Chemistry, 01.01.2020 20:31
question
Mathematics, 01.01.2020 20:31
Questions on the website: 13722367