Newton's Method Calculator

\( \)\( \)\( \)\( \)

A step by step Newton's method calculator is presented.

Newton's Method

Newton's method of approximating the solution to an equation \( f(x) = 0 \) is a numerical iterative process written as
\( x_{n+1} = x_n - \dfrac{f(x_n)} {f '(x_n) }\)       for \( n = 0,1,2,3,... \)
and therefore starting at an initial value \( x_0 \) , we calculate \( x_1 \) using the above process, then use \( x_1 \) to calculate \( x_2 \) and so on.
The process is continued untill convergence of the solution is obtained.
Example
Let \( \quad x^3 = \ln(x) + 2 \quad \) be an equation to solve.
This equation cannot be solved analytically and therefore we may use Newton's method to find an approximate solution.
The first step is to write the equation with the right hand side equal to zero as follows.
\( x^3 - \ln(x) - 2 = 0 \)
and that write \( f(x) = x^3 - \ln(x) - 2 \)
which you need to enter into the calculator below.
You also have the option to select an initial value \( x_0 \) close to the approximate solution and also the number of iterations needed.
Note that
1) for equations with many solutions such as \( \sin(x) + 1/x \), it all depends on the initial value \( x_0 \) that you assign. It will usually give the nearest approximate solution to \( X_0 \).
2) the method breaks down if at some point in the iteration process, \( x_n \) is outside the domain of \( f(x) \) or \( f'(x) \) or if \( f'(x) = 0 \). It may be possible to just change the initial value \( x_0 \) to obtain an approximation to the solution.
3) You may want to graph \( f(x) \) in order to have a better initial value \( x_0 \) graphically to be used in the calculator.



Use of the Newton's Method Calculator

1 - Enter and edit function $f(x)$ and click "Enter Function" then check what you have entered. Enter the initial value \( x_0 \) which should be as close as possible to the solution sought.
2 - Click "Calculate Equations".
3 - The output include the derivative \( f'(x) \) and the numerical values of \( x_n \), \( f(x_n) \) and \( f'(x_n) \)
Note that
Note that
1) the five operators used are: + (plus) , - (minus), / (division) , ^ (power) and * (multiplication). (example: f(x) = x^3 - 1/x.(more notes on editing functions are located below)
2) the natural logarithm \( \ln(x) \) is entered as log(x) , the natural exponential \( e^x \) as   exp(x) .
3) a function \( f(x) \) to some power \(n\) is entered as: \( (f(x))^n \). Example:   \( \sin^2(2x-1) \)   is entered as   (sin(2x-1))^2.
4) fractions are entered as decimal numbers. Example 1/2 is entered as 0.5.


$f(x)$ =


$x_0$ =


Number of Iterations =


Number of Decimals =






Notes: In editing functions, use the following:
1 - The five operators used are: + (plus) , - (minus), / (division) , ^ (power) and * (multiplication). (example:    f(x) = x^2-1/(2x)-log(x)  )
2 - The function square root function is written as (sqrt). (example: sqrt(x^2-1) for \( \sqrt {x^2 - 1} \) )
3 - The exponential function is written as exp(x). (Example: exp(x+2)    for    \( e^{x+2} \) )
4 - The log base e function is written as log(x). (Example: log(x^2-2)    for    \( \ln(x^2 - 2 \) )
Here are some examples of functions that you may copy and paste to practice:
sqrt(x^3+1) - log(x) - 2             exp(x^2+1) + 2 x - 4             x^2+log(2*x + 2)           (x+2)^2(x^2+1)-1



More References and Links

Newton's Method to approximate solutions of equations.
derivative
rules
formulas