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

From JSXGraph Wiki
Jump to navigationJump to search
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*x/5" 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>
 
</td>
 
</td>
Line 65: Line 64:
 
</jsxgraph>
 
</jsxgraph>
 
You also may try the following function terms:
 
You also may try the following function terms:
Math.sin(x)
+
* <math>Math.sin(x)</math>
Math.exp(x)
+
* <math>Math.exp(x)</math>
Math.pow(2,x)  
+
* <math>Math.pow(2,x)</math>
1-2/(x*x)
+
* <math>1-2/(x*x)</math>
 +
 
 +
===The underlying JavaScript code===

Revision as of 16:20, 3 February 2010

xo is the start value. Drag it.

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

You also may try the following function terms:

  • [math]Math.sin(x)[/math]
  • [math]Math.exp(x)[/math]
  • [math]Math.pow(2,x)[/math]
  • [math]1-2/(x*x)[/math]

The underlying JavaScript code