Extended mean value theorem: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary  | 
				A WASSERMANN (talk | contribs) No edit summary  | 
				||
| Line 9: | Line 9: | ||
p[3] = board.create('point', [3,-2], {size:2});  | p[3] = board.create('point', [3,-2], {size:2});  | ||
// Curve  | |||
var fg = board.create('curve', JXG.Math.Numerics.Neville(p),{strokeWidth:5,strokeOpacity:0.5});  | var fg = board.create('curve', JXG.Math.Numerics.Neville(p),{strokeWidth:5,strokeOpacity:0.5});  | ||
var graph = board.create('curve', [fg]);  | var graph = board.create('curve', [fg]);  | ||
/  | |||
var   | // Secant   | ||
line = board.create('line',[p[0],p[3]],{strokeColor:'#ff0000',dash:1});  | |||
var df =  return JXG.Math.Numerics.D(fg[0]);  | |||
var dg =  return JXG.Math.Numerics.D(fg[1]);  | |||
var quot = function(t) {  | |||
     return df(t) / dg(t) - (p[3].Y() - p[0].Y()) / (p[3].X() - p[0].X());  | |||
};  | };  | ||
var r = board.create('glider', [  | var r = board.create('glider', [  | ||
                     function() { return JXG.Math.Numerics.root(  |                      function() { return fg[0](JXG.Math.Numerics.root(quot, (p[3] - p[2]) * 0.5)); },  | ||
                     function() { return   |                      function() { return fg[1](JXG.Math.Numerics.root(quot, (p[3] - p[2]) * 0.5)); },  | ||
                     graph], {name:' ',size:4,fixed:true});  |                      graph], {name:'',size:4,fixed:true});  | ||
board.create('tangent', [r], {strokeColor:'#ff0000'});  | board.create('tangent', [r], {strokeColor:'#ff0000'});  | ||
board.unsuspendUpdate();  | board.unsuspendUpdate();  | ||
</jsxgraph>  | </jsxgraph>  | ||