Secant and tangent: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 17: Line 17:
         p[3] = board.createElement('point', [6,5], {style:4});
         p[3] = board.createElement('point', [6,5], {style:4});
         var pol = board.lagrangePolynomial(p);
         var pol = board.lagrangePolynomial(p);
         graph = board.createElement('curve', ['x', pol, 'x', -10, 10], {curveType:'graph'});
         graph = board.createElement('functiongraph', [pol, -10, 10]);


q = board.createElement('glider', [4.5,0,graph], {style:6});
q = board.createElement('glider', [4.5,0,graph], {style:6});
Line 40: Line 40:


         var f = function(x) { return (Math.abs(x)); };
         var f = function(x) { return (Math.abs(x)); };
         graph = board.createElement('curve', ['x', f, 'x', -10, 10], {curveType:'graph'});
         graph = board.createElement('functiongraph', [f, -10, 10]);


         qf = board.createElement('glider', [0,0,graph], {style:6});
         qf = board.createElement('glider', [0,0,graph], {style:6});
Line 63: Line 63:


         var g = function(x) { return (x<=0)?0:1; };
         var g = function(x) { return (x<=0)?0:1; };
         graph = board.createElement('curve', ['x', g, 'x', -10, 10], {curveType:'graph'});
         graph = board.createElement('functiongraph', [g,-10, 10]);


         qg = board.createElement('glider', [0,0,graph], {style:6});
         qg = board.createElement('glider', [0,0,graph], {style:6});

Revision as of 12:11, 10 March 2009