Newton's root finding method: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 8: Line 8:
<td>
<td>
<form>
<form>
<input style="border:none; background-color:#efefef;padding:5px;margin-left:2px;" type="text" id="graphterm" value="x*x" size="40"/>
<input style="border:none; background-color:#efefef;padding:5px;margin-left:2px;" type="text" id="graphterm" value="x*x" size="30"/>
<input type="button" value="set function term" onClick="newGraph(document.getElementById('graphterm').value);">
<input type="button" value="set function term" onClick="newGraph(document.getElementById('graphterm').value);">
</form>
</form>
Line 31: Line 31:
<jsxgraph width="600" height="500">
<jsxgraph width="600" height="500">
var i;
var i;
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,8,5,-4], axis:true});
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10,5,-2], axis:true});
var ax = board.create('axis', [[0,0], [1,0]], {strokeColor: 'black'});
var ax = board.create('axis', [[0,0], [1,0]], {strokeColor: 'black'});
var ay = board.create('axis', [[0,0], [0,1]], {strokeColor: 'black'});
var ay = board.create('axis', [[0,0], [0,1]], {strokeColor: 'black'});

Revision as of 14:15, 3 February 2010

xo is the start value. Drag it.

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