Which code should I use it for? FindRoot? or Plot? I am actually new to this program... and I would appreciate if you could tell how to mention the precision. Thanks!
Solve the nonlinear equation $\sin(x+0.5)=0.2x-2$ by Newton's method (precision e=0.00001)
Here is a code I wrote in Mathematica to perform Newton's Method. Merely define your function that you are using before actually running this code (you must call it f[x_]:= function of $x$ you want).
Here, the inputs are error, the maximum error you want, initial, the starting point in $x$, max iteration, how many times at most you want this to run, and error power, for you that will be $1$ its calculating the ratios of errors to a certain power to check for something much deeper than you need (it helps check the rate of convergence really). This should work just fine. At the very least, it gives you a starting point for the code.