Newton-Method
This is a simple package demonstrating the Newton Method for finding roots of a function. Learn more.
const newtonMethod = require('newton-method')
console.log(newtonMethod('x^2', 100, 5))
newtonMethod(func, inputIterations, inputInitial)
Required
- Function to evaluate - Uses mathjs
formatting - See here for more information
func - Default: 100
- Number of times to iterate Newton's Method - More times yields more accurate results
inputIterations - Default: 0
- Initial value to start applying Newton's Method to
inputInitial - Result
3.944304526105059e-30