Difference between revisions of "Rolle's Theorem"

From JSXGraph Wiki
Jump to navigationJump to search
Line 16: Line 16:
 
         p[2] = board.createElement('point', [-0.5,1], {style:4});
 
         p[2] = board.createElement('point', [-0.5,1], {style:4});
 
         p[3] = board.createElement('point', [2,0.5], {style:4});
 
         p[3] = board.createElement('point', [2,0.5], {style:4});
         var polynomial = function(x) {
+
         var f = function(x) {
 
                 var i;
 
                 var i;
 
                 var y = 0.0;
 
                 var y = 0.0;
Line 34: Line 34:
 
                 return y;
 
                 return y;
 
             };
 
             };
         graph = board.createElement('curve', ['x', polynomial, 'x', -10, 10], {curveType:'graph'});
+
         graph = board.createElement('curve', ['x', f, 'x', -10, 10], {curveType:'graph'});
 +
 
 +
r = board.createElement('point', [function() { board.root(board.D(f),(p[0].X()+p[1].X())*0.5); },2], {style:6});
 +
 
  
 
q = board.createElement('glider', [4.5,0,graph], {style:6});
 
q = board.createElement('glider', [4.5,0,graph], {style:6});
 
q2 = board.createElement('point', [function(){ return q.X()+0.01;},
 
q2 = board.createElement('point', [function(){ return q.X()+0.01;},
 
       function(){ return polynomial(q.X()+0.01);}], {style:7,visible:false});
 
       function(){ return polynomial(q.X()+0.01);}], {style:7,visible:false});
 +
 +
 
line = board.createElement('line',[q,q2],{strokeColor:'#ff0000'});
 
line = board.createElement('line',[q,q2],{strokeColor:'#ff0000'});
 
line = board.createElement('line',[p[0],p[1]],{strokeColor:'#ff0000',dash:1});
 
line = board.createElement('line',[p[0],p[1]],{strokeColor:'#ff0000',dash:1});

Revision as of 20:24, 21 January 2009