Newton's root finding method: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
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 14:13, 3 February 2010

xo is the start value. Drag it.

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