HOMEWORK #1
1. a) Write a question about the Newton-Raphson method for solving systems. Then solve your question using the method.
b) Create a built-in function code for the Newton-Raphson method for a general system and name it Newton_Sys. Make sure this function works for a general matrix system. One of your input variables is "tol" which will be determined by the user. Your function will return the error of the approximation of the solution vector to the user. PS: You may utilize the code that we wrote in the course. Just put it in function form (more general form).
Instructions:
- Describe the inputs of the function Newton_Sys.
- Describe the outputs of the function Newton_Sys.
- Take our written code for Newton-Raphson for systems and convert it to a general form. This means that, for example, you do not know F(x,y) and you do not know the initial guess. So, all of these descriptions will be determined by us without using input code.
- On another script, this function code will be recalled and all of these descriptions will be defined therein, and my function returns the desired values.
- Use HOFI to control the error.
- Use another script to call your created function and, finally, test your code by using your theoretical question.