I'm having some trouble trying to solve this one problem using Mathematica and Newton's Method. I was able to type the following into Mathematica:
f[x_] := (9*Sin[x])/E^x^2 - x^2 + x - 1
iterations = 10;
z = {0.2};
For[j = 1, j <= iterations, j++, a = z[[j]];
z = Append[z, a - f[a]/Derivative[1][f][a]]];
Print[NumberForm[z, 10]]
When I try to shift enter for the problem, this comes up and I'm not sure what to do from here:
$RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of Append[z,z[[1]]-(-1+z[[1]]-z[[1]]^2+9 E^-Power[<<2>>] Sin[z[[1]]])/(1+9 E^Times[<<2>>] Cos[Part[<<2>>]]-2 z[[1]]-18 E^Times[<<2>>] z[[1]] Sin[Part[<<2>>]])].
If anyone has any suggestions, they would be much appreciated. I have also attached my work to make it easier to read. Thanks again.
Attachments: