Mean Value Theorem: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 35: Line 35:
             };
             };
     var graph = board.createElement('curve', ['x', f, 'x', -10, 10], {curveType:'graph'});
     var graph = board.createElement('curve', ['x', f, 'x', -10, 10], {curveType:'graph'});
    var g = function(x) {
        return board.D(f)(x)-(p[1].Y()-p[0].Y())/(p[1].X()-p[0].X());
        }


     var r = board.createElement('point', [
     var r = board.createElement('point', [
                     function() { return board.root(board.D(f)-(p[1].Y()-p[0].Y())/(p[1].X()-p[0].X()),(p[0].X()+p[1].X())*0.5); },
                     function() { return board.root(g,(p[0].X()+p[1].X())*0.5); },
                     function() { return f(board.root(board.D(f)-(p[1].Y()-p[0].Y())/(p[1].X()-p[0].X()),(p[0].X()+p[1].X())*0.5)); }],  
                     function() { return f(board.root(g,(p[0].X()+p[1].X())*0.5)); }],  
         {name:' ',style:6});
         {name:' ',style:6});
   var r2 = board.createElement('point', [function(){ return r.X()+0.01;},
   var r2 = board.createElement('point', [function(){ return r.X()+0.01;},

Revision as of 18:37, 21 January 2009