Difference between revisions of "Newton's root finding method"

From JSXGraph Wiki
Jump to navigationJump to search
Line 15: Line 15:
 
<script type="text/javascript">
 
<script type="text/javascript">
 
// Initial function term
 
// Initial function term
var term = function(x) { return x*x; };
+
//var term = function(x) { return x*x; };
var graph = function(x) { return term(x); };
+
//var graph = function(x) { return term(x); };
 +
var term, graph;
 +
newGraph(document.getElementById('graphterm').value);
 
 
 
// Recursion depth
 
// Recursion depth
Line 43: Line 45:
 
}
 
}
  
//board.addHook(xval);
+
board.addHook(xval);
  
 
function newton(p, i) {
 
function newton(p, i) {

Revision as of 16:13, 3 February 2010

xo is the start value. Drag it.

You may change the function term here:
f(x) =