Newton's root finding method: Difference between revisions

From JSXGraph Wiki
No edit summary
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*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 14: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]\displaystyle{ Math.sin(x) }[/math]
  • [math]\displaystyle{ Math.exp(x) }[/math]
  • [math]\displaystyle{ Math.pow(2,x) }[/math]
  • [math]\displaystyle{ 1-2/(x*x) }[/math]

The underlying JavaScript code