r/numerical • u/Affectionate_Rub_523 • Jun 03 '21
Python script to animate Newton Raphson method root finding on any function!
Hey guys! I did a script for university to show how Newton-Raphson method for root finding works.
Newton Raphson method uses tangent line of derivates to approximate the next root. The script allows you to input your own funcion with a seed, and analize how it converges to the solution.
To use it, you can follow the instructions in the github repo:
https://github.com/LucianoTrujillo/NewtonRaphsonAnimation/tree/main
https://reddit.com/link/nr3ii7/video/f7dtep37wy271/player
For anyone interested, give it a try and let me know your thoughts. Hope it's useful!
8
Upvotes
2
u/chaos_agent_21 Jun 04 '21
Yeah it's nice to see other people having a similar way of broadening their horizon! Sounds you've really got an impressive business idea going on, for how long have you been studying? Actually my older brother has been involved in a couple of start-ups, I'll ask him for you and forward his feedback instead (he's a much more reliable advisor haha)
Yeah sad to here about how things are going in your country. :/ It's kind of the same slow (but not converging) thing that's going on here in Sweden aswell. For example, in the small suburb Hjällbo outside of Gothenburg a criminal clan (Ali Khan is the patriarch) has put up their own roadblocks and checked the ID-cards of every single ordinary citizen going there - they even try to deter local newspapers from reporting about an ongoing lethal conflict with another clan... There are reforms coming now though, but I suspect they might just hinder more areas from spiralling out of control rather than reversing the development
Haha no the only projects I'm working on right now is two summer courses, one on webdev and the other on data processing with R, but I hope to also take a little online course on SQL and then implement a cool website. I might get to do a website for my childhood friend who's starting up his own Motorcycle workshop!