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, 23.06.2019 23:30
What can you prevent issues related to downloading content form the internet
Answers: 1
question
Computers and Technology, 24.06.2019 07:20
3pointsyou've found an image you want to insert into your slide presentation. youwant to make the image look more gray so that it looks like an older imagewhat would you need to adjust? 0.00o a. sizeo b. hueo c. contrasto d. tones
Answers: 2
question
Computers and Technology, 24.06.2019 22:30
When can you access the bios setup utility?
Answers: 1
question
Computers and Technology, 25.06.2019 16:00
When entering new data into your table, which key should you press to move from one field or cell to the next?
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
Questions on the website: 13722360