Newton's root finding method: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) 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" onchange="newGraph(this.value);" value=" | <input style="border:none; background-color:#efefef;padding:5px;margin-left:2px;" type="text" onchange="newGraph(this.value);" value="x*x" size="40"/> | ||
</form> | </form> | ||
</td> | </td> | ||
Line 14: | Line 14: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
// Initial function term | // Initial function term | ||
function term(x) { return | function term(x) { return x*x; } | ||
// Recursion depth | // Recursion depth | ||
var steps = 11; | var steps = 11; | ||
Line 40: | Line 40: | ||
} | } | ||
board.addHook(xval); | //board.addHook(xval); | ||
function newton(p, i) { | function newton(p, i) { |
Revision as of 14:01, 3 February 2010
xo is the start value. Drag it. You may change the function term here: