Differentiation af andengradspolynomium.
Figuren illustrerer differentiation af funktionen f(x) = x2 - 4x. Du kan flytte P0.
Figure figure = Position [0,0] Size[x,y] Origin[x/5,y/4] Unit x/10 Color "white";
Axes axes = Color "black";
Grid grid = Color "blue";
Units units = Color "black";
Function f( Number x ) = x^2 - 4*x;
Function f_deriv( Number x ) = 2*x - 4;
Graph graph = f(x) Size 1.5 Color "red";
Point P = [3,-3] Slider graph Size 2.5 Color "red";
Line tangent = Start P Dir [1,f_deriv(P:0)] Infinite Size 1.5 Color "black";
Variable x = P:0;
Variable y = P:1;
Variable deriv = f_deriv(x);
Point x0 = [x,0] Size 2.5 Color "black";
Label Plabel = "P0(x,1, y,1); hældning: deriv,1" At P Offset [10,-5] Color "black" Style "";
Label x0label = "x0 = x,1" At x0 Offset [10,-10] Color "black" Style "";
Line l = Start P Dir x0-P Size 1 Color "gray";