import graph; size(10cm,0); real xmin=-4,xmax=4; real ymin=-6,ymax=7; real a=1, b, c=-1; pen[] couleurs={red,blue,green}; // Définition de la fonction real f(real x) {return a*x^2+b*x+c;} // Construction de points sous forme de croix path Cf1=graph(f,xmin,xmax,n=16); marker cross=marker(scale(2)*rotate(45)*cross(4),1bp+red); cross.mark(Cf1); // Définition et construction de la famille de paraboles for(int b=-4;b<5;++b){ real f(real x) {return a*x^2+b*x+c;} path Cf2=graph(f,xmin,xmax,n=400); draw(Cf2,linewidth(1bp)+couleurs[b%couleurs.length]); dot((-b/2a,f(-b/2a)),3bp+gray); if(b!=0) label(scale(.6)*format("$b=%i$",b),(.95(-b/2a-sgn(a*b)),f(-b/2a)), couleurs[b%couleurs.length]); } // Définition et construction de la parabole des sommets real g(real x) {return c-a*x^2;} path Cg=graph(g,xmin,xmax,n=400); draw(Cg,linewidth(1bp)+dotted); ylimits(ymin,ymax,Crop); xaxis(Label("$x$",position=EndPoint, align=NE), xmin=xmin,xmax=xmax, Ticks(scale(.7)*Label(align=E), NoZero, begin=false,beginlabel=false, end=false,endlabel=false, Step=1,step=.25, Size=1mm, size=.5mm, pTick=black,ptick=gray), Arrow); yaxis(Label("$y$",position=EndPoint, align=NE), ymin=ymin,ymax=ymax, Ticks(scale(.7)*Label(), NoZero, begin=false,beginlabel=false, end=false,endlabel=false, Step=1,step=.25, Size=1mm, size=.5mm, pTick=black,ptick=gray), Arrow); label("$a=1$, $c=-1$ - Incidence de $b$ ?",truepoint(N),N); label("$f:x\mapsto ax^2+bx+c$",truepoint(N),N); shipout(bbox(2mm,Fill(white)));