Answered step by step
Verified Expert Solution
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.***
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 b) Write a function defined as: def Secant(func, x0,x1, maxiter =10, xtol =0.0002 ): Purpose: use the Secant Method to find the root of func(x), in the neighborhood of x0 and x1. func: the function for which we want to find the root x0 and x : two x values in the neighborhood of the root xtol: exit if the xnewestxprevious
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started