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

From JSXGraph Wiki
Jump to: navigation, search
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="1-2/(x*x)"  size="40"/>
+
<input style="border:none; background-color:#efefef;padding:5px;margin-left:2px;" type="text" onchange="newGraph(this.value);" value="Math.sin(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 1-2/(x*x); }
+
function term(x) { return Math.sin(x); }
 
// Recursion depth
 
// Recursion depth
 
var steps = 11;
 
var steps = 11;

Revision as of 13:12, 3 February 2010

xo is the start value. Drag it.

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