Python Lab Tutorials: Lab 6
Create a procedure whose inputs are the vector of functions
, the vector of the names of the unknowns
and the initial guesses
. The procedure should do the following:
Find the length of the vectors
or
(These should be equal, a more robust code should stop the computations if they are not but this is not required)
The procedure should then form the matrix
![]()
The procedure should then output
evaluated at the values of the initial guesses.
Use the above procedure along with an appropriate “while” loop to find two different solutions (using two different initial guesses) for the following system of nonlinear equations.
Use ε
. Compare with the Newton Raphson method implemented in Sympy using “nroot”.
![Rendered by QuickLaTeX.com \[ \begin{split} x_1^2+x_2^2&=100\\ x_1 x_2+x_2 x_3&=-102\\ x_2^2+x_3^2&=117 \end{split}\]](https://engcourses-uofa.ca/wp-content/ql-cache/quicklatex.com-21d33d7fcb3c605e59af034e16fd2f1d_l3.png)
