dimanche 10 octobre 2010

Tutoriel Javascript 8: Conjecturer une fonction dérivée



Déplacez le point $T$ pour afficher la trace du point $Q$ et conjecturez l'expression de la dérivée attendue. Modifiez l'expression de $f$.



Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.5 (or later) is installed and active in your browser (Click here to install Java now)


Min X = Max X = Min Y = Max Y =

Abscisse de T:

f(x) = dérivéeattendue(x) =





Très très fortement inspiré de Derivatives and Tangent Lines

Code:

<form name="MyForm">
Min X = <input name="LowXField" size="5" type="text" value="-1" /> Max X = <input name="HighXField" size="5" type="text" value="9" /> Min Y = <input name="LowYField" size="5" type="text" value="-2" /> Max Y = <input name="HighYField" size="5" type="text" value="5" />   <input onclick="setView()" type="button" value="Afficher la fenêtre" /></form>

<form name="TForm" onsubmit="setT('T');  return false;">
Abscisse de T: <input name="setTfield" onchange="setT('T');" size="5" type="text" /></form>

<form name="functionForm" onsubmit="setFunction('T');  return false;">
f(x) = <input name="setFunctionField" onchange="setFunction('T');" size="30" type="text" value="x^2/6-2x+4" /> dérivéeattendue(x) = <input name="setDerivativeField" onchange="setFunction('T');" size="30" type="text" value="x/4" />

<input onclick="setFunction('T');" type="button" value="Afficher f(x) et f'(x) " />
</form>

<script type="text/javascript">

 function setView() {
  var applet = document.ggbApplet;
  var LowX = document.MyForm.LowXField.value;
  var HighX = document.MyForm.HighXField.value;
  var LowY = document.MyForm.LowYField.value;
  var HighY = document.MyForm.HighYField.value;

  applet.setCoordSystem(LowX, HighX, LowY, HighY);
 }

function setT(objName) {
  var applet = document.ggbApplet;
  var x= document.TForm.setTfield.value;
  applet.evalCommand("t2=f("+x+")");
  var y = applet.getValue("t2");
  applet.evalCommand(objName + " = (" + x + ", " + y + ")");
}
function setFunction(objName) {
  var applet = document.ggbApplet;
  var x= document.functionForm.setFunctionField.value;
  applet.evalCommand("f(x)="+x);
  var y= document.functionForm.setDerivativeField.value;
  applet.evalCommand("dérivéeattendue(x)="+y);
}




</script>

Aucun commentaire:

Enregistrer un commentaire