Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*** PLEASE EXPLAIN ALL LINES OF CODE USING THE # OPTION IN YOUR CODE. I AM USING SPYDER.*** You will write three Python files named

*** PLEASE EXPLAIN ALL LINES OF CODE USING THE "#" OPTION IN YOUR CODE. I AM USING SPYDER.***

image text in transcribed

image text in transcribed

You will write three Python files named hwwapy,hwwbpp, and hwwc.py. Those programs will fulfill all of the requirements given in parts a,b, and c below. You will place those four python files into a single compressed file named firstname_lastname_hw2.zip. You will upload the .zip file to the Homework 2 dropbox. You will test your functions and using the particular numerical values and function calls given. When we grade your assignment, we will run your program with those given numerical values, looking for correct answers. For now, you may not use any of the powerful functions available in python modules, with two exceptions: you may import functions from the math module and the copy module. You must include reasonable comments in your code. See your MAE 3013 textbook or online materials for a reminder of: The Secant Method for finding the solution (root or zero) or a nonlinear equation The Simpson's 1/3 rule for numerical integration The Gauss-Jacobi and Gauss-Seidel methods for solving a set of linear equations c) Write a function defined as: def GaussJacobi (A, b, xguess, maxiter = 15): Purpose: use the GaussJacobi method to estimate the solution to a set of N linear equations expressed in matrix form as Ax=b. A: a square, full matrix of numbers having N rows and N columns, where N is the number of equations in the set. b: an array of numbers having N terms, where N is the number of equations in the set. xguess: a vector (array) contain the values of the initial guess maxiter: the number of iterations (new x vectors) to compute return value: the final new x vector. Write and call a main() function that uses your GaussJacobi function to estimate and print the solution to the sets of linear equations contained in the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions