Sequences of functions: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Pointwise convergence== | |||
<jsxgraph width="650" height="400" box="box"> | <jsxgraph width="650" height="400" box="box"> | ||
var brd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | var brd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | ||
Line 5: | Line 7: | ||
var f = function(x){ return Math.pow(x,n.Value()); } | var f = function(x){ return Math.pow(x,n.Value()); } | ||
var plot = brd.create('functiongraph',[f,0,1], {strokeWidth:2}); | var plot = brd.create('functiongraph',[f,0,1], {strokeWidth:2}); | ||
brd. | brd.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n.Value())+'</sub>(x)=x<sup>'+Math.floor(n.Value())+'</sup>';}], | ||
{fontSize: | {fontSize:20}); | ||
brd.unsuspendUpdate(); | brd.unsuspendUpdate(); | ||
</jsxgraph> | </jsxgraph> | ||
<source lang="javascript"> | |||
var brd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | |||
brd.suspendUpdate(); | |||
var n = brd.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1}); | |||
var f = function(x){ return Math.pow(x,n.Value()); } | |||
var plot = brd.create('functiongraph',[f,0,1], {strokeWidth:2}); | |||
brd.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n.Value())+'</sub>(x)=x<sup>'+Math.floor(n.Value())+'</sup>';}], | |||
{fontSize:20}); | |||
brd.unsuspendUpdate(); | |||
</source> | |||
==Uniform convergence== | |||
<jsxgraph width="650" height="400" box="box2"> | <jsxgraph width="650" height="400" box="box2"> | ||
var brd2 = JXG.JSXGraph.initBoard('box2', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | var brd2 = JXG.JSXGraph.initBoard('box2', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | ||
brd2.suspendUpdate(); | brd2.suspendUpdate(); | ||
var n2 = brd2.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1}); | var n2 = brd2.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1}); | ||
var f2 = function(x){ return x*x/n2.Value(); } | var f2 = function(x){ return 4*(1-x)*x/n2.Value(); } | ||
var plot2 = brd2.create('functiongraph',[ | var plot2 = brd2.create('functiongraph',[f2,0,1], {strokeWidth:2}); | ||
brd2. | brd2.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n2.Value())+'</sub>(x)=4*(1-x)*x/'+n2.Value().toFixed(0);}], | ||
{fontSize: | {fontSize:20}); | ||
brd2.unsuspendUpdate(); | brd2.unsuspendUpdate(); | ||
</jsxgraph> | </jsxgraph> | ||
<source lang="javascript"> | |||
var brd2 = JXG.JSXGraph.initBoard('box2', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | |||
brd2.suspendUpdate(); | |||
var n2 = brd2.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1}); | |||
var f2 = function(x){ return 4*(1-x)*x/n2.Value(); } | |||
var plot2 = brd2.create('functiongraph',[f2,0,1], {strokeWidth:2}); | |||
brd2.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n2.Value())+'</sub>(x)=4*(1-x)*x/'+n2.Value().toFixed(0);}], | |||
{fontSize:20}); | |||
brd2.unsuspendUpdate(); | |||
</source> | |||
<jsxgraph width="650" height="400" box="box3"> | |||
var brd3 = JXG.JSXGraph.initBoard('box3', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | |||
<jsxgraph width=" | brd3.suspendUpdate(); | ||
var | var n3 = brd3.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1}); | ||
var | var f3 = function(x){ return x*x+x/n3.Value(); } | ||
var | var plot3 = brd3.create('functiongraph',[f3,0,1], {strokeWidth:2}); | ||
var | brd3.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n3.Value())+'</sub>(x)=x<sup>2</sup>+x/'+n3.Value().toFixed(0);}], | ||
{fontSize:20}); | |||
{fontSize: | brd3.unsuspendUpdate(); | ||
</jsxgraph> | </jsxgraph> | ||
<source lang="javascript"> | |||
var brd3 = JXG.JSXGraph.initBoard('box3', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]}); | |||
brd3.suspendUpdate(); | |||
var n3 = brd3.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1}); | |||
var f3 = function(x){ return x*x+x/n3.Value(); } | |||
var plot3 = brd3.create('functiongraph',[f3,0,1], {strokeWidth:2}); | |||
brd3.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n3.Value())+'</sub>(x)=x<sup>2</sup>+x/'+n3.Value().toFixed(0);}], | |||
{fontSize:20}); | |||
brd3.unsuspendUpdate(); | |||
</source> | </source> | ||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Calculus]] | [[Category:Calculus]] |
Latest revision as of 13:23, 3 March 2021
Pointwise convergence
var brd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]});
brd.suspendUpdate();
var n = brd.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1});
var f = function(x){ return Math.pow(x,n.Value()); }
var plot = brd.create('functiongraph',[f,0,1], {strokeWidth:2});
brd.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n.Value())+'</sub>(x)=x<sup>'+Math.floor(n.Value())+'</sup>';}],
{fontSize:20});
brd.unsuspendUpdate();
Uniform convergence
var brd2 = JXG.JSXGraph.initBoard('box2', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]});
brd2.suspendUpdate();
var n2 = brd2.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1});
var f2 = function(x){ return 4*(1-x)*x/n2.Value(); }
var plot2 = brd2.create('functiongraph',[f2,0,1], {strokeWidth:2});
brd2.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n2.Value())+'</sub>(x)=4*(1-x)*x/'+n2.Value().toFixed(0);}],
{fontSize:20});
brd2.unsuspendUpdate();
var brd3 = JXG.JSXGraph.initBoard('box3', {axis:true, boundingbox:[-0.25,1.7,1.25,-0.5]});
brd3.suspendUpdate();
var n3 = brd3.create('slider',[[0.1,1.5],[1.1,1.5],[1,1,100]],{name:'n',snapWidth:1});
var f3 = function(x){ return x*x+x/n3.Value(); }
var plot3 = brd3.create('functiongraph',[f3,0,1], {strokeWidth:2});
brd3.create('text',[0.2,0.7,function(){return 'f<sub>'+Math.floor(n3.Value())+'</sub>(x)=x<sup>2</sup>+x/'+n3.Value().toFixed(0);}],
{fontSize:20});
brd3.unsuspendUpdate();