The Journal of Online Mathematics and Its Applications, Volume 7 (2007)
Creating Mathlets with Open Source Tools, Markus Hohenwarter and Judith Preinder
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.
"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.f(x) = Polynomial[a x^3 + b x^2 + c x + d] into the input field and hit the Enter-key.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.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".g(x) = 0 into the input field and hit the Enter-key.
"Insert text" and click on the drawing pad. Type "f(x) = " + f into the input field and click "Apply". diff(x) = Polynomial[h(x) - g(x)] into the input field and hit the Enter-key. Please find information on how to extend this dynamic worksheet into an interactive exercise Derivative of a Polynomial in the section GeoGebra and JavaScript.