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

From JSXGraph Wiki
Jump to: navigation, search
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 12:07, 3 February 2010

xo is the start value. Drag it.

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