Newton's root finding method: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 16: Line 16:
// Initial function term
// Initial function term
var term;
var term;
//function term(x) { return x*x; }
var graph;
// Recursion depth
      //function term(x) { return x*x; }
      // Recursion depth
var steps = 11;
var steps = 11;
// Start value
// Start value
Line 56: Line 57:
}
}
function newGraph(v) {
function newGraph(v) {
eval("function term(x){ return "+v+";}");
eval("term = function(x){ return "+v+";}");
graph = function(x) { return term(x); }
graph = function(x) { return term(x); }
g.Y = function(x){ return term(x); };
g.Y = function(x){ return term(x); };

Revision as of 14:06, 3 February 2010

xo is the start value. Drag it.

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