The Journal of Online Mathematics and Its Applications, Volume 7 (2007)
Creating Mathlets with Open Source Tools, Markus Hohenwarter and Judith Preinder

Creating "Derivative of a Polynomial"

In order to create the interactive exercise Derivative of a Polynomial you first need to create the following dynamic construction in GeoGebra. Although only the sliders a, b, c, and d as well as the polynomial function f are visible on the dynamic worksheet, you need to create some auxiliary objects for the exercise logic in JavaScript.

  1. Open a new GeoGebra window and hide the algebra window by unchecking "Algebra Window" in the "View" menu.
  2. Activate the tool Tool: Slider "Slider". Create slider a by clicking on the drawing pad and clicking "Apply" in the appearing dialog window. Repeat this process to create sliders b, c, and d.
  3. Type f(x) = Polynomial[a x^3 + b x^2 + c x + d] into the input field and hit the Enter-key.
    Tips: The command Polynomial[] simplifies an expression to get a polynomial function in standard form, i.e. here this removes the monomials with zero coefficients. You may change the properties of function f by right clicking the object (Mac OS: ctrl-click) and selecting "Properties", e.g. change the color and line thickness.
  4. Type h(x) = Polynomial[Derivative[f]] into the input field an hit the Enter-key. Right click (Mac OS: ctrl-click) its graph and uncheck "Show object".
    Tip: You may change the color of function h in the properties dialog before hiding its graph.
  5. Type g(x) = 0 into the input field and hit the Enter-key.
  6. Insert a dynamic text next to the graph of function f. Activate the tool Tool: Insert text "Insert text" and click on the drawing pad. Type "f(x) = " + f into the input field and click "Apply".
    Tip: This text consists of the following three parts: The quotation marks enclose the static part of the text. The plus sign connects the static part of the text with the dynamic part. The last letter f refers to the function f(x) and gives us its equation, which is the dynamic part of the text.
  7. Type diff(x) = Polynomial[h(x) - g(x)] into the input field and hit the Enter-key.
    Tip: Function diff gives you the difference between function h and g.
  8. Reduce the size of the GeoGebra window if necessary and export the construction as a dynamic worksheet.

Please find information on how to extend this dynamic worksheet into an interactive exercise Derivative of a Polynomial in the section GeoGebra and JavaScript.