I need help with this particular question:
The nonlinear system
- $3x_1 - \cos (x_2 x_3) - \frac{1}{2} = 0$
- $x{_1}^2 - 625x{_2}^2 - \frac{1}{4}=0$
- $\exp ^{-x_1x_2} + 20x_3 + \frac{10\Pi -3}{3}=0$
has a singular Jacobian matrix at the solution. Apply Newton's method with x$^{(0)} = (1,1,-1)^t$. Note that convergence may be slow or may not occur within a reasonable number of iterations.
My attempt on Maple:

What am I doing wrong here?
Solving it by-hand is a pain.
In your
NewtonMVprocedure, try changing,to,
or to,
Also, change the call
LinearSolve(...)to:-LinearAlgebra:-LinearSolve(...)so that it gets the right export from the right top package, regardless of whether you've loaded any subpackage ofStudent.Personally, I'd rather see
evalfwrapped around each of the two arguments toLinearSolvethan around its call, if only so that the very first iteration doesn't attempt an exact subcomputation.So, something like,
Please note that you can inline code into your Questions and Answers here see the menubar above the editing region. It's not so helpful to paste images of code.
[edited, after all the typos have been resolved] You might want to consider additional stopping criteria. Apart from a maximal number of iterations to allow, you could stop when either the increment
dxgot small enough, or when the evaluation offgot close enough to zero (ie. x is considered a root).That is not intended to be the epitome of great coding, but it might give you some ideas.