Difference between revisions of "Extended mean value theorem"

From JSXGraph Wiki
Jump to: navigation, search
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
The ''extended mean value theorem'' (also called ''Cauchy's mean value theorem'') is usually formulated as:
 +
 +
Let
 +
:<math> f, g: [a,b] \to \mathbb{R}</math>
 +
be continuous functions that are differentiable on the open interval <math>(a,b)</math>.
 +
If <math>g'(x)\neq 0</math> for all <math>x\in(a,b)</math>,
 +
then there exists a value <math>\xi \in (a,b)</math> such that
 +
:<math>
 +
\frac{f'(\xi)}{g'(\xi)} = \frac{f(b)-f(a)}{g(b)-g(a)}.
 +
</math>
 +
 +
'''Remark:'''
 +
It seems to be easier to state the extended mean value theorem in the following form:
 +
 +
Let
 +
:<math> f, g: [a,b] \to \mathbb{R}</math>
 +
be continuous functions that are differentiable on the open interval <math>(a,b)</math>.
 +
Then there exists a value <math>\xi \in (a,b)</math> such that
 +
:<math>
 +
f'(\xi)\cdot (g(b)-g(a))  = g'(\xi) \cdot (f(b)-f(a)).
 +
</math>
 +
This second formulation avoids the need that
 +
<math>g'(x)\neq 0</math> for all <math>x\in(a,b)</math> and is therefore much easier to
 +
handle numerically.
 +
 +
The proof is similar, just use the function
 +
:<math>
 +
h(x) = f(x)\cdot(g(b)-g(a)) - (g(x)-g(a))\cdot(f(b)-f(a))
 +
</math>
 +
and apply Rolle's theorem.
 +
 +
'''Visualization:'''
 +
The extended mean value theorem says that given the curve
 +
:<math> C: [a,b]\to\mathbb{R}, \quad t \mapsto (f(t), g(t)) </math>
 +
with the above prerequisites for <math>f</math> and <math>g</math>,
 +
there exists a <math>\xi</math> such that the tangent to the curve in the point <math>C(\xi)</math> 
 +
is parallel to the secant through <math>C(a)</math> and <math>C(b)</math>.
 +
 +
 
<jsxgraph width="600" height="400" box="box">
 
<jsxgraph width="600" height="400" box="box">
 
var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-5, 10, 7, -6], axis:true});
 
var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-5, 10, 7, -6], axis:true});
 
var p = [];
 
var p = [];
  
board.suspendUpdate();
+
p[0] = board.create('point', [0, -2], {size:2, name: 'C(a)'});
p[0] = board.create('point', [-2,-2], {size:2});
+
p[1] = board.create('point', [-1.5, 5], {size:2, name: ''});
p[1] = board.create('point', [-1.5, 5], {size:2});
+
p[2] = board.create('point', [1, 4], {size:2, name: ''});
p[2] = board.create('point', [1,4], {size:2});
+
p[3] = board.create('point', [3, 3], {size:2, name: 'C(b)'});
p[3] = board.create('point', [3,-1], {size:2});
 
  
 
// Curve
 
// Curve
 
var fg = JXG.Math.Numerics.Neville(p);
 
var fg = JXG.Math.Numerics.Neville(p);
 
var graph = board.create('curve', fg, {strokeWidth:3, strokeOpacity:0.5});
 
var graph = board.create('curve', fg, {strokeWidth:3, strokeOpacity:0.5});
console.log(fg);
 
  
 
// Secant  
 
// Secant  
Line 20: Line 57:
 
var dg = JXG.Math.Numerics.D(fg[1]);
 
var dg = JXG.Math.Numerics.D(fg[1]);
  
 +
// Usually, the extended mean value theorem is formulated as
 +
// df(t) / dg(t) == (p[3].X() - p[0].X()) / (p[3].Y() - p[0].Y())
 +
// We can avoid division by zero with the following formulation:
 
var quot = function(t) {
 
var quot = function(t) {
    //console.log("t=", t, df(t), dg(t), df(t)/dg(t));
+
    return df(t) * (p[3].Y() - p[0].Y()) - dg(t) * (p[3].X() - p[0].X());
    return df(t) / dg(t) - (p[3].X() - p[0].X()) / (p[3].Y() - p[0].Y());
 
 
};
 
};
  
 
var r = board.create('glider', [
 
var r = board.create('glider', [
                    function() {  
+
            function() { return fg[0](JXG.Math.Numerics.root(quot, (fg[3]() + fg[2]) * 0.5)); },
 
+
            function() { return fg[1](JXG.Math.Numerics.root(quot, (fg[3]() + fg[2]) * 0.5)); },
var t0 = JXG.Math.Numerics.root(quot, [fg[3](), fg[2]]);
+
            graph], {name: 'C(&xi;)', size: 4, fixed:true, color: 'blue'});
console.log(t0, quot(t0), fg[0](t0), fg[1](t0));
 
return fg[0](JXG.Math.Numerics.root(quot, [fg[3](), fg[2]])); },
 
 
 
                    function() { return fg[1](JXG.Math.Numerics.root(quot, [fg[3](), fg[2]])); },
 
                    graph], {name:'',size:4,fixed:true});
 
  
 
board.create('tangent', [r], {strokeColor:'#ff0000'});
 
board.create('tangent', [r], {strokeColor:'#ff0000'});
  
board.unsuspendUpdate();
 
 
</jsxgraph>
 
</jsxgraph>
  
 
===The underlying JavaScript code===
 
===The underlying JavaScript code===
 
<source lang="javascript">
 
<source lang="javascript">
 +
var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-5, 10, 7, -6], axis:true});
 +
var p = [];
 +
 +
p[0] = board.create('point', [0, -2], {size:2, name: 'C(a)'});
 +
p[1] = board.create('point', [-1.5, 5], {size:2, name: ''});
 +
p[2] = board.create('point', [1, 4], {size:2, name: ''});
 +
p[3] = board.create('point', [3, 3], {size:2, name: 'C(b)'});
 +
 +
// Curve
 +
var fg = JXG.Math.Numerics.Neville(p);
 +
var graph = board.create('curve', fg, {strokeWidth:3, strokeOpacity:0.5});
 +
 +
// Secant
 +
line = board.create('line', [p[0], p[3]], {strokeColor:'#ff0000', dash:1});
 +
 +
var df = JXG.Math.Numerics.D(fg[0]);
 +
var dg = JXG.Math.Numerics.D(fg[1]);
 +
 +
// Usually, the extended mean value theorem is formulated as
 +
// df(t) / dg(t) == (p[3].X() - p[0].X()) / (p[3].Y() - p[0].Y())
 +
// We can avoid division by zero with the following formulation:
 +
var quot = function(t) {
 +
    return df(t) * (p[3].Y() - p[0].Y()) - dg(t) * (p[3].X() - p[0].X());
 +
};
 +
 +
var r = board.create('glider', [
 +
            function() { return fg[0](JXG.Math.Numerics.root(quot, (fg[3]() + fg[2]) * 0.5)); },
 +
            function() { return fg[1](JXG.Math.Numerics.root(quot, (fg[3]() + fg[2]) * 0.5)); },
 +
            graph], {name: 'C(&xi;)', size: 4, fixed:true, color: 'blue'});
 +
 +
board.create('tangent', [r], {strokeColor:'#ff0000'});
 
</source>
 
</source>
  
 
[[Category:Examples]]
 
[[Category:Examples]]
 
[[Category:Calculus]]
 
[[Category:Calculus]]

Latest revision as of 12:38, 4 February 2019

The extended mean value theorem (also called Cauchy's mean value theorem) is usually formulated as:

Let

[math] f, g: [a,b] \to \mathbb{R}[/math]

be continuous functions that are differentiable on the open interval [math](a,b)[/math]. If [math]g'(x)\neq 0[/math] for all [math]x\in(a,b)[/math], then there exists a value [math]\xi \in (a,b)[/math] such that

[math] \frac{f'(\xi)}{g'(\xi)} = \frac{f(b)-f(a)}{g(b)-g(a)}. [/math]

Remark: It seems to be easier to state the extended mean value theorem in the following form:

Let

[math] f, g: [a,b] \to \mathbb{R}[/math]

be continuous functions that are differentiable on the open interval [math](a,b)[/math]. Then there exists a value [math]\xi \in (a,b)[/math] such that

[math] f'(\xi)\cdot (g(b)-g(a)) = g'(\xi) \cdot (f(b)-f(a)). [/math]

This second formulation avoids the need that [math]g'(x)\neq 0[/math] for all [math]x\in(a,b)[/math] and is therefore much easier to handle numerically.

The proof is similar, just use the function

[math] h(x) = f(x)\cdot(g(b)-g(a)) - (g(x)-g(a))\cdot(f(b)-f(a)) [/math]

and apply Rolle's theorem.

Visualization: The extended mean value theorem says that given the curve

[math] C: [a,b]\to\mathbb{R}, \quad t \mapsto (f(t), g(t)) [/math]

with the above prerequisites for [math]f[/math] and [math]g[/math], there exists a [math]\xi[/math] such that the tangent to the curve in the point [math]C(\xi)[/math] is parallel to the secant through [math]C(a)[/math] and [math]C(b)[/math].


The underlying JavaScript code

var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-5, 10, 7, -6], axis:true});
var p = [];

p[0] = board.create('point', [0, -2], {size:2, name: 'C(a)'});
p[1] = board.create('point', [-1.5, 5], {size:2, name: ''});
p[2] = board.create('point', [1, 4], {size:2, name: ''});
p[3] = board.create('point', [3, 3], {size:2, name: 'C(b)'});

// Curve
var fg = JXG.Math.Numerics.Neville(p);
var graph = board.create('curve', fg, {strokeWidth:3, strokeOpacity:0.5});

// Secant 
line = board.create('line', [p[0], p[3]], {strokeColor:'#ff0000', dash:1});

var df = JXG.Math.Numerics.D(fg[0]);
var dg = JXG.Math.Numerics.D(fg[1]);

// Usually, the extended mean value theorem is formulated as
// df(t) / dg(t) == (p[3].X() - p[0].X()) / (p[3].Y() - p[0].Y())
// We can avoid division by zero with the following formulation:
var quot = function(t) {
    return df(t) * (p[3].Y() - p[0].Y()) - dg(t) * (p[3].X() - p[0].X());
};

var r = board.create('glider', [
            function() { return fg[0](JXG.Math.Numerics.root(quot, (fg[3]() + fg[2]) * 0.5)); },
            function() { return fg[1](JXG.Math.Numerics.root(quot, (fg[3]() + fg[2]) * 0.5)); },
            graph], {name: 'C(&xi;)', size: 4, fixed:true, color: 'blue'});

board.create('tangent', [r], {strokeColor:'#ff0000'});