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" id="graphterm" value="x*x" size="30"/> | <input style="border:none; background-color:#efefef;padding:5px;margin-left:2px;" type="text" id="graphterm" value="x*x*x/5" 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 15: | Line 15: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
// Initial function term | // Initial function term | ||
var term = function(x) { return x*x; }; | var term = function(x) { return x*x*x/5; }; | ||
var graph = function(x) { return term(x); }; | var graph = function(x) { return term(x); }; | ||
Line 63: | Line 63: | ||
board.update(); | board.update(); | ||
} | } | ||
</jsxgraph> | </jsxgraph> | ||
You also may try the following function terms: | |||
Math.sin(x) | |||
Math.exp(x) | |||
Math.pow(2,x) | |||
1-2/(x*x) |
Revision as of 14:19, 3 February 2010
xo is the start value. Drag it. You may change the function term here:
You also may try the following function terms: Math.sin(x) Math.exp(x) Math.pow(2,x) 1-2/(x*x)