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, 22.06.2019 14:40
You begin your first day of responsibilities by examining the recent is security breach at gearup to get ideas for safeguards you will take. at gearup, criminals accessed the company's improperly-secured wireless system and stole customers' credit card information as well as employee social security numbers. what kind of computer crime did gearup face?
Answers: 3
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
question
Computers and Technology, 24.06.2019 12:10
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
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: 13722361