Meilleure approximation affine
Posté : lun. 29 mars 2010, 18:15
Cela pourra peut-être être utile pour introduire les notions de nombre dérivé et d'approximation affine :
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***
- CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
- import geometry;
- import graph_pi;
- usepackage("mathrsfs");
- real f(real x) {return (x/2)^3-x+2.5;}
- pair F(real x) {return (x,f(x));}
- real g(real x) {return 1/2*(x-2)+1.5;}
- pair G(real x) {return (x,g(x));}
- graphicrules(xunit=2cm, yunit=2cm,
- xmin=-1, xmax=4,
- ymin=-1, ymax=4,
- crop=Crop
- );
- cartesianaxis(Ticks("%",Size=.5mm,size=.3mm,Step=1),
- Ticks("%",Size=.5mm,size=.3mm,Step=1),
- Arrow
- );
- line l1=line((1,3),(3,0)),
- l2=line((1,2),(3,1)),
- l3=line((1,-1),(3,4));
- draw(Label("$\mathscr{C}_f$",Relative(.75),SE),graph(f,-.3,3.5,1000));
- draw(Label("$\mathscr{T}$",Relative(1),S),graph(g,.5,3.5,1000),.8gray);
- draw(l1,.4bp+gray);
- draw(l2,.4bp+gray);
- draw(l3,.4bp+gray);
- dot("$A$",(2,f(2)),S);
- xlimits(-.3,4,Crop);
- ylimits(-.3,3,Crop);
- picture pic;
- size(pic,6cm);
- draw(pic,graph(pic,f,1.8,2.2,1000));
- draw(pic,Label("$\mathscr{T}$",Relative(.95),S),graph(pic,g,1.8,2.2,1000),.8gray);
- draw(pic,relpoint(l1,.4)--relpoint(l1,.6),.4bp+gray);
- draw(pic,relpoint(l2,.4)--relpoint(l2,.6),.4bp+gray);
- draw(pic,Label("$T$",Relative(.9)),relpoint(l3,.4)--relpoint(l3,.6),.4bp+gray);
- dot(pic,"$A$",(2,f(2)),S);
- ylimits(pic,1.4,1.65,Crop);
- pair xm=min(pic,user=true),
- ym=max(pic,user=true);
- xaxis(pic,BottomTop(),xmin=1.8,xmax=2.2,blue,Ticks(Step=0.1,Size=.5mm,size=.3mm));
- yaxis(pic,LeftRight(),red,Ticks(Step=0.1,Size=.5mm,size=.3mm));
- add(new void(frame f, transform t) {
- frame G=shift(point(f,E))*align(bbox(pic,lightgray),10E);
- add(f,G);
- draw(f,t*box(xm,ym),red);
- draw(f,point(G,W)--t*point(pic,2E),dashed,Arrow);
- });