I am struggling on ps2 with Newton's method. I really just need to understand the concept of how it works. I have little to no understanding of calculus. If you could point me to a source that would help i'd appreciate it. Got the first two parts correct (derivatives and polynomials)
ps2?
problem set 2 of course 6.00ocw
So using Newton's method in general, or for a certain function?
it's down a little bit. The third part to the problem. I just do not know where to start. what variables to use. Where I should loop, if i should loop
So you are able to compute the derivative and evaluate a polynomial?
Yes
Okay, we start out with \(x_n=x_0\). We want to do \(x_{n+1} = x_n - f(x_n)/f'(x_n)\).
How would you calculate \(f(x_n)\) in your code?
so xn would be the root that we are trying to find?
What \(x_n\) is some number which is close to our root, and \(x_{n+1}\) is supposed to be a bit closer.
Regardless, do you understand how to implement this programmatically?
You should realize that \(f(x_n)\) → `evaluate_poly(poly, x_n)`
these are the arguments allowed: def compute_root(poly, x_0, epsilon): So x_0 is a random guess, that we make up. epsilon is the accuracy and poly is the polynomial. Would I be using the derivatives from the code I have already done
Okay I see what your saying
You can calculate the derivative just once and save it. `dpoly = compute_derivative(poly)`
yes
You can let \(x_n=x_0\) at the beginning.
Ok it's clicked with me now. Thanks for your help. I will be right from here :)
Join our real-time social learning platform and learn together with your friends!