Teja is making a comeback after his 2011 Sudoku Pick of the Week. This time, he has created a wonderful little Newton-Raphson app. For anyone who's taken a numerical methods class, you are probably familiar with this technique for finding a value for x that satisfies equation f(x) = 0. But if you're new to the concept, Wikipedia has a great article on the subject.
In essence, this algorithm starts with an initial guess for the value of x. If f(x) equals zero, then lucky you, you're done. If not, you calculate the derivative of the function and use that to aim yourself towards a better guess for the value of x. You repeat this process with your new value of x, and after a few iterations, you hopefully converge on f(x) = 0. In the image below, you see how we approach the zero-crossing of the blue line (our f(x)) with several Newton-Raphson iterations (the red lines).
It turns out that this is a screenshot from Teja's root finding app. The user interface enables you to symbolically express your equation. You specify your initial guess and number of iterations; the app will then present you the solution. What's really fun about this is that you can click on the figure and instantaneously get results for a new initial guess. This interaction is quite instructive in the effectiveness yet limitations of this root finding method. I enjoyed experimenting with functions that weren't continuously differentiable. Oftentimes, my results would be unstable, but every once in a while, I could still achieve convergence.
Let us know what you think here or leave a comment for Teja.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.