Pencarian Akar Persamaan dengan Metode Increment


<html>
<head>
<script language=”javascript”>
var x;
var fungsixy;
var xkiri;
var xkanan;
var deltax;
var xmin;
var xmax;
var xtengah;

xkiri=-4;
xkanan=6;
deltax=0.5;

</script>
</head>
<body>
<font size=2>
<script language=”javascript”>
document.write(“<b>x &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp y</b><br>”);
x=xkiri;
for (i=xkiri;i<=xkanan;i+=deltax)
{
x=x+deltax;
y=Math.pow(x,3)-x+1;
document.write(x+” &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp “+y+”<br>”);
}
</script>
</font>
</body>
</html>

Leave a Reply