Extended mean value theorem: Difference between revisions

From JSXGraph Wiki
No edit summary
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 g = function(x) {
// Secant
    return JXG.Math.Numerics.D(f)(x)-(p[1].Y()-p[0].Y())/(p[1].X()-p[0].X());
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(g,(p[0].X()+p[1].X())*0.5); },
                     function() { return fg[0](JXG.Math.Numerics.root(quot, (p[3] - p[2]) * 0.5)); },
                     function() { return f(JXG.Math.Numerics.root(g,(p[0].X()+p[1].X())*0.5)); },
                     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'});
line = board.create('line',[p[0],p[1]],{strokeColor:'#ff0000',dash:1});
 
*/
board.unsuspendUpdate();
board.unsuspendUpdate();
</jsxgraph>
</jsxgraph>

Revision as of 15:04, 29 January 2019

The underlying JavaScript code