Newton-Rhapson Calculator

Purpose:The Newton-Rhapson calculator solves up to three simultaneous equations using a Newton-Rhapson method.

Restrictions on Use: None

General Information:

  1. The input window is divided into three screens, which are selected by a Choice control. These windows are the variable guess window, the constant definition window, and the constraint definition window.
  2. The Newton-Rhapson method needs an initial guess at a solution in order to proceed. Enter your initial guess for your variables here.
  3. You can store constants to make defining your constraints easier. For instance, if many of your equations of constraint depend on the speed of light, you could enter it once here.
  4. The Newton-Rhapson method solves simultaneous equations in the form Fi(x,y,z)=0. These equations are referred to as constraints, as they constrain the solution. Specify the equation of constraint in the constraint window. You should not include the "=0".
  5. If you are solving for less than three equations, simply leave the constraint field for that equation equal to the variable, i.e., if you are solving the equation x*x-1=0, you would have F2 wriiten as y=0, and F3 written as z=0.
  6. The output is written in 5 columns. The first is the current iteration; the second, third, and fourth are the successive values of x, y, and z; and the fifth (the convergence parameter, dcon) is the relative difference between the successive attempts to solve the problem. When this last value drops below 0.001 the solution ceases.
  7. If the solution does not converge within 100 iterations, you will recieve an error message.

Example: y=2-x2 and y=2*x

  1. Start by defining your equations of constraint. Expressing each of the equations to be solved in terms of something equalling zero, you get 2-x2-y=0 and 2*x-y=0.
  2. Enter the equations without the "=0" into the constraints window. Format is the same as FORTRAN equations. Most math functions are supported, and raising to a power is done with 2 asteriks (i.e. x2 is entered as x**2.
  3. Leave the third equation of constraint as z=0 (i.e. enter "z" in the field).
  4. Press the calculate equilibrium button.
  5. You should get the result that in 3 iterations the solution converges to x=0.732 and y=1.464.
  6. Change to the variable guess screen, and give an initial guess for the Newton-Rhapson method of x=y=0. Do you results change?
  7. Now try an initial guess of x=y=-1. Do you still get the same solution?
  8. Try using a spreadsheet to plot these two equations. The interscetion of the plots are the places at which the system of equations is solved. How many places do the two lines intersect? How many solutions should you be able to find?
  9. Press the calculate equilibrium button.

Proceed/Return to Calculator