Newton's root finding method: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 13: Line 13:
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<script type="text/javascript">
<script type="text/javascript">
    for (i = 0; i < steps; i++) {
// Initial function term
        document.write('<tr><td><nobr>x<sub>' + i + '</sub> = </nobr></td><td><font id="xv' + i + '"></font></td></tr>');
function term(x) { return 1-2/(x*x); }
    }
// Recursion depth
var steps = 11;
// Start value
var s = 3;
 
for (i = 0; i < steps; i++) {
    document.write('<tr><td><nobr>x<sub>' + i + '</sub> = </nobr></td><td><font id="xv' + i + '"></font></td></tr>');
}
</script>
</script>
</table>  
</table>  

Revision as of 11:07, 3 February 2010

xo is the start value. Drag it.

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