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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, bl88676
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, Knownothing
When early motion pictures played in movie theaters, they were often accompanied by live organ or piano music. which of the following are the most likely reasons that this happened? (select all that apply). the music was provided to distract audience members from the loud sounds made when filmstrips were changed. the music accompanied the movies because the movies were silent and audiences were used to hearing music during plays in theaters. the music usually was played before, and sometimes after the movie, as an alternative form of entertainment. the music viewers to interpret the dramatic action in the films.
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, ahmedeldyame
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, trashellyoung
Why might you choose to create a functional resume
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 in other subjects:

Konu
Mathematics, 14.10.2019 13:00
Konu
Mathematics, 14.10.2019 13:00
Konu
Mathematics, 14.10.2019 13:10
Konu
Mathematics, 14.10.2019 13:10