Question: b) Write a function defined as: def Simpson(fcn, a, b, npoints): Purpose: use Simpson's 1 3 rule to estimate the integral of fen(x), between the

b) Write a function defined as: def Simpson(fcn, a, b, npoints): Purpose: use Simpson's 1 3 rule to estimate the integral of fen(x), between the limits of a and b fen: the function we want to integrate a and b: the lower and upper limits of integration npoints: The number of integration points used in the range a to b (inclusive). Npoints must be an ODD number return value: the estimate of the integral c) Write a function defined as: def GaussSeidel(Aaug, x, xtol le-6, maxiter 50) Purpose: use the Gauss-Seidel method to estimate the solution to a set of N linear equations expressed inmatrix form as A x =b Aaug: an augmented matrix contining [A b] having N rows and N+1 columns x: a vector (array) contain the values of the initial guess xtol: exit if the magnitucle of (inew-xold)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
